forked from Azure/azure-sdk-for-js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 11637 in Azure/azure-rest-api-specs
Merge eb44f918dc0161329cd22903bd0922f4b7bd40d5 into 2cbfac76b8d9001a8fe9207f7589c3586e28dcc3
- Loading branch information
SDKAuto
committed
Nov 13, 2020
1 parent
ae40b6b
commit 830fe91
Showing
15 changed files
with
1,686 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
140 changes: 140 additions & 0 deletions
140
sdk/managedapplications/arm-managedapplications/src/applicationClient.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. | ||
* Licensed under the MIT License. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is | ||
* regenerated. | ||
*/ | ||
|
||
import * as msRest from "@azure/ms-rest-js"; | ||
import * as Models from "./models"; | ||
import * as Mappers from "./models/mappers"; | ||
import * as Parameters from "./models/parameters"; | ||
import * as operations from "./operations"; | ||
import { ApplicationClientContext } from "./applicationClientContext"; | ||
|
||
|
||
class ApplicationClient extends ApplicationClientContext { | ||
// Operation groups | ||
applications: operations.Applications; | ||
applicationDefinitions: operations.ApplicationDefinitions; | ||
|
||
/** | ||
* Initializes a new instance of the ApplicationClient class. | ||
* @param credentials Credentials needed for the client to connect to Azure. | ||
* @param subscriptionId The ID of the target subscription. | ||
* @param [options] The parameter options | ||
*/ | ||
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ApplicationClientOptions) { | ||
super(credentials, subscriptionId, options); | ||
this.applications = new operations.Applications(this); | ||
this.applicationDefinitions = new operations.ApplicationDefinitions(this); | ||
} | ||
|
||
/** | ||
* Lists all of the available Microsoft.Solutions REST API operations. | ||
* @param [options] The optional parameters | ||
* @returns Promise<Models.ListOperationsResponse> | ||
*/ | ||
listOperations(options?: msRest.RequestOptionsBase): Promise<Models.ListOperationsResponse>; | ||
/** | ||
* @param callback The callback | ||
*/ | ||
listOperations(callback: msRest.ServiceCallback<Models.OperationListResult>): void; | ||
/** | ||
* @param options The optional parameters | ||
* @param callback The callback | ||
*/ | ||
listOperations(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void; | ||
listOperations(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.ListOperationsResponse> { | ||
return this.sendOperationRequest( | ||
{ | ||
options | ||
}, | ||
listOperationsOperationSpec, | ||
callback) as Promise<Models.ListOperationsResponse>; | ||
} | ||
|
||
/** | ||
* Lists all of the available Microsoft.Solutions REST API operations. | ||
* @param nextPageLink The NextLink from the previous successful call to List operation. | ||
* @param [options] The optional parameters | ||
* @returns Promise<Models.ListOperationsNextResponse> | ||
*/ | ||
listOperationsNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ListOperationsNextResponse>; | ||
/** | ||
* @param nextPageLink The NextLink from the previous successful call to List operation. | ||
* @param callback The callback | ||
*/ | ||
listOperationsNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.OperationListResult>): void; | ||
/** | ||
* @param nextPageLink The NextLink from the previous successful call to List operation. | ||
* @param options The optional parameters | ||
* @param callback The callback | ||
*/ | ||
listOperationsNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void; | ||
listOperationsNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.ListOperationsNextResponse> { | ||
return this.sendOperationRequest( | ||
{ | ||
nextPageLink, | ||
options | ||
}, | ||
listOperationsNextOperationSpec, | ||
callback) as Promise<Models.ListOperationsNextResponse>; | ||
} | ||
} | ||
|
||
// Operation Specifications | ||
const serializer = new msRest.Serializer(Mappers); | ||
const listOperationsOperationSpec: msRest.OperationSpec = { | ||
httpMethod: "GET", | ||
path: "providers/Microsoft.Solutions/operations", | ||
queryParameters: [ | ||
Parameters.apiVersion | ||
], | ||
headerParameters: [ | ||
Parameters.acceptLanguage | ||
], | ||
responses: { | ||
200: { | ||
bodyMapper: Mappers.OperationListResult | ||
}, | ||
default: { | ||
bodyMapper: Mappers.CloudError | ||
} | ||
}, | ||
serializer | ||
}; | ||
|
||
const listOperationsNextOperationSpec: msRest.OperationSpec = { | ||
httpMethod: "GET", | ||
baseUrl: "https://management.azure.com", | ||
path: "{nextLink}", | ||
urlParameters: [ | ||
Parameters.nextPageLink | ||
], | ||
queryParameters: [ | ||
Parameters.apiVersion | ||
], | ||
headerParameters: [ | ||
Parameters.acceptLanguage | ||
], | ||
responses: { | ||
200: { | ||
bodyMapper: Mappers.OperationListResult | ||
}, | ||
default: { | ||
bodyMapper: Mappers.CloudError | ||
} | ||
}, | ||
serializer | ||
}; | ||
|
||
export { | ||
ApplicationClient, | ||
ApplicationClientContext, | ||
Models as ApplicationModels, | ||
Mappers as ApplicationMappers | ||
}; | ||
export * from "./operations"; |
61 changes: 61 additions & 0 deletions
61
sdk/managedapplications/arm-managedapplications/src/applicationClientContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. | ||
* Licensed under the MIT License. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is | ||
* regenerated. | ||
*/ | ||
|
||
import * as Models from "./models"; | ||
import * as msRest from "@azure/ms-rest-js"; | ||
import * as msRestAzure from "@azure/ms-rest-azure-js"; | ||
|
||
const packageName = "@azure/arm-managedapplications"; | ||
const packageVersion = "1.0.2"; | ||
|
||
export class ApplicationClientContext extends msRestAzure.AzureServiceClient { | ||
credentials: msRest.ServiceClientCredentials; | ||
subscriptionId: string; | ||
apiVersion?: string; | ||
|
||
/** | ||
* Initializes a new instance of the ApplicationClient class. | ||
* @param credentials Credentials needed for the client to connect to Azure. | ||
* @param subscriptionId The ID of the target subscription. | ||
* @param [options] The parameter options | ||
*/ | ||
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ApplicationClientOptions) { | ||
if (credentials == undefined) { | ||
throw new Error('\'credentials\' cannot be null.'); | ||
} | ||
if (subscriptionId == undefined) { | ||
throw new Error('\'subscriptionId\' cannot be null.'); | ||
} | ||
|
||
if (!options) { | ||
options = {}; | ||
} | ||
if(!options.userAgent) { | ||
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); | ||
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; | ||
} | ||
|
||
super(credentials, options); | ||
|
||
this.apiVersion = '2018-06-01'; | ||
this.acceptLanguage = 'en-US'; | ||
this.longRunningOperationRetryTimeout = 30; | ||
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; | ||
this.requestContentType = "application/json; charset=utf-8"; | ||
this.credentials = credentials; | ||
this.subscriptionId = subscriptionId; | ||
|
||
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { | ||
this.acceptLanguage = options.acceptLanguage; | ||
} | ||
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { | ||
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
sdk/managedapplications/arm-managedapplications/src/models/applicationDefinitionsMappers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. | ||
* Licensed under the MIT License. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
*/ | ||
|
||
export { | ||
Application, | ||
ApplicationArtifact, | ||
ApplicationDefinition, | ||
ApplicationDefinitionListResult, | ||
ApplicationPatchable, | ||
ApplicationProviderAuthorization, | ||
BaseResource, | ||
ErrorResponse, | ||
GenericResource, | ||
Identity, | ||
Plan, | ||
PlanPatchable, | ||
Resource, | ||
Sku | ||
} from "../models/mappers"; |
24 changes: 24 additions & 0 deletions
24
sdk/managedapplications/arm-managedapplications/src/models/applicationsMappers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (c) Microsoft Corporation. | ||
* Licensed under the MIT License. | ||
* | ||
* Code generated by Microsoft (R) AutoRest Code Generator. | ||
* Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
*/ | ||
|
||
export { | ||
Application, | ||
ApplicationArtifact, | ||
ApplicationDefinition, | ||
ApplicationListResult, | ||
ApplicationPatchable, | ||
ApplicationProviderAuthorization, | ||
BaseResource, | ||
ErrorResponse, | ||
GenericResource, | ||
Identity, | ||
Plan, | ||
PlanPatchable, | ||
Resource, | ||
Sku | ||
} from "../models/mappers"; |
Oops, something went wrong.