@@ -14969,6 +14969,81 @@ export class SetApisAuthoritiesResponse extends $tea.Model {
1496914969 }
1497014970}
1497114971
14972+ export class SetAppsAuthToApiProductRequest extends $tea.Model {
14973+ apiProductId?: string;
14974+ appIds?: number[];
14975+ authValidTime?: string;
14976+ description?: string;
14977+ securityToken?: string;
14978+ static names(): { [key: string]: string } {
14979+ return {
14980+ apiProductId: 'ApiProductId',
14981+ appIds: 'AppIds',
14982+ authValidTime: 'AuthValidTime',
14983+ description: 'Description',
14984+ securityToken: 'SecurityToken',
14985+ };
14986+ }
14987+
14988+ static types(): { [key: string]: any } {
14989+ return {
14990+ apiProductId: 'string',
14991+ appIds: { 'type': 'array', 'itemType': 'number' },
14992+ authValidTime: 'string',
14993+ description: 'string',
14994+ securityToken: 'string',
14995+ };
14996+ }
14997+
14998+ constructor(map?: { [key: string]: any }) {
14999+ super(map);
15000+ }
15001+ }
15002+
15003+ export class SetAppsAuthToApiProductResponseBody extends $tea.Model {
15004+ requestId?: string;
15005+ static names(): { [key: string]: string } {
15006+ return {
15007+ requestId: 'RequestId',
15008+ };
15009+ }
15010+
15011+ static types(): { [key: string]: any } {
15012+ return {
15013+ requestId: 'string',
15014+ };
15015+ }
15016+
15017+ constructor(map?: { [key: string]: any }) {
15018+ super(map);
15019+ }
15020+ }
15021+
15022+ export class SetAppsAuthToApiProductResponse extends $tea.Model {
15023+ headers: { [key: string]: string };
15024+ statusCode: number;
15025+ body: SetAppsAuthToApiProductResponseBody;
15026+ static names(): { [key: string]: string } {
15027+ return {
15028+ headers: 'headers',
15029+ statusCode: 'statusCode',
15030+ body: 'body',
15031+ };
15032+ }
15033+
15034+ static types(): { [key: string]: any } {
15035+ return {
15036+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
15037+ statusCode: 'number',
15038+ body: SetAppsAuthToApiProductResponseBody,
15039+ };
15040+ }
15041+
15042+ constructor(map?: { [key: string]: any }) {
15043+ super(map);
15044+ }
15045+ }
15046+
1497215047export class SetAppsAuthoritiesRequest extends $tea.Model {
1497315048 apiId?: string;
1497415049 appIds?: string;
@@ -33974,6 +34049,51 @@ export default class Client extends OpenApi {
3397434049 return await this.setApisAuthoritiesWithOptions(request, runtime);
3397534050 }
3397634051
34052+ async setAppsAuthToApiProductWithOptions(request: SetAppsAuthToApiProductRequest, runtime: $Util.RuntimeOptions): Promise<SetAppsAuthToApiProductResponse> {
34053+ Util.validateModel(request);
34054+ let query = { };
34055+ if (!Util.isUnset(request.apiProductId)) {
34056+ query["ApiProductId"] = request.apiProductId;
34057+ }
34058+
34059+ if (!Util.isUnset(request.appIds)) {
34060+ query["AppIds"] = request.appIds;
34061+ }
34062+
34063+ if (!Util.isUnset(request.authValidTime)) {
34064+ query["AuthValidTime"] = request.authValidTime;
34065+ }
34066+
34067+ if (!Util.isUnset(request.description)) {
34068+ query["Description"] = request.description;
34069+ }
34070+
34071+ if (!Util.isUnset(request.securityToken)) {
34072+ query["SecurityToken"] = request.securityToken;
34073+ }
34074+
34075+ let req = new $OpenApi.OpenApiRequest({
34076+ query: OpenApiUtil.query(query),
34077+ });
34078+ let params = new $OpenApi.Params({
34079+ action: "SetAppsAuthToApiProduct",
34080+ version: "2016-07-14",
34081+ protocol: "HTTPS",
34082+ pathname: "/",
34083+ method: "POST",
34084+ authType: "AK",
34085+ style: "RPC",
34086+ reqBodyType: "formData",
34087+ bodyType: "json",
34088+ });
34089+ return $tea.cast<SetAppsAuthToApiProductResponse>(await this.callApi(params, req, runtime), new SetAppsAuthToApiProductResponse({}));
34090+ }
34091+
34092+ async setAppsAuthToApiProduct(request: SetAppsAuthToApiProductRequest): Promise<SetAppsAuthToApiProductResponse> {
34093+ let runtime = new $Util.RuntimeOptions({ });
34094+ return await this.setAppsAuthToApiProductWithOptions(request, runtime);
34095+ }
34096+
3397734097 /**
3397834098 * * This operation is intended for API providers and callers.
3397934099 * * API providers can authorize any apps to call their APIs.
0 commit comments