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 14830 in Azure/azure-rest-api-specs
Merge 1af059bdd982c531673251d92f883bad5d75ba7f into 0f72d7e8267d012ed7f51107f066217c8bfda9a7
- Loading branch information
SDKAuto
committed
Jun 18, 2021
1 parent
d769b84
commit 48bb2b3
Showing
29 changed files
with
1,962 additions
and
122 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* 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 { TokenCredential } from "@azure/core-auth"; | ||
import * as msRestAzure from "@azure/ms-rest-azure-js"; | ||
import * as Models from "./models"; | ||
import * as Mappers from "./models/mappers"; | ||
import * as operations from "./operations"; | ||
import { BatchServiceContext } from "./batchServiceContext"; | ||
|
||
|
||
class BatchService extends BatchServiceContext { | ||
// Operation groups | ||
application: operations.Application; | ||
pool: operations.Pool; | ||
account: operations.Account; | ||
job: operations.Job; | ||
certificate: operations.CertificateOperations; | ||
file: operations.File; | ||
jobSchedule: operations.JobSchedule; | ||
task: operations.Task; | ||
computeNode: operations.ComputeNodeOperations; | ||
computeNodeExtension: operations.ComputeNodeExtension; | ||
computeNodeExtensions: operations.ComputeNodeExtensions; | ||
|
||
/** | ||
* Initializes a new instance of the BatchService class. | ||
* @param credentials Credentials needed for the client to connect to Azure. Credentials | ||
* implementing the TokenCredential interface from the @azure/identity package are recommended. For | ||
* more information about these credentials, see | ||
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the | ||
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and | ||
* @azure/ms-rest-browserauth are also supported. | ||
* @param batchUrl The base URL for all Azure Batch service requests. | ||
* @param [options] The parameter options | ||
*/ | ||
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, batchUrl: string, options?: msRest.AzureServiceClientOptions) { | ||
super(credentials, batchUrl, options); | ||
this.application = new operations.Application(this); | ||
this.pool = new operations.Pool(this); | ||
this.account = new operations.Account(this); | ||
this.job = new operations.Job(this); | ||
this.certificate = new operations.CertificateOperations(this); | ||
this.file = new operations.File(this); | ||
this.jobSchedule = new operations.JobSchedule(this); | ||
this.task = new operations.Task(this); | ||
this.computeNode = new operations.ComputeNodeOperations(this); | ||
this.computeNodeExtension = new operations.ComputeNodeExtension(this); | ||
this.computeNodeExtensions = new operations.ComputeNodeExtensions(this); | ||
} | ||
} | ||
|
||
// Operation Specifications | ||
|
||
export { | ||
BatchService, | ||
BatchServiceContext, | ||
Models as BatchServiceModels, | ||
Mappers as BatchServiceMappers | ||
}; | ||
export * from "./operations"; |
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,66 @@ | ||
/* | ||
* 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 msRestAzure from "@azure/ms-rest-azure-js"; | ||
import { TokenCredential } from "@azure/core-auth"; | ||
|
||
const packageName = "@azure/batch"; | ||
const packageVersion = "8.0.0"; | ||
|
||
export class BatchServiceContext extends msRestAzure.AzureServiceClient { | ||
credentials: msRest.ServiceClientCredentials | TokenCredential; | ||
apiVersion?: string; | ||
batchUrl: string; | ||
|
||
/** | ||
* Initializes a new instance of the BatchService class. | ||
* @param credentials Credentials needed for the client to connect to Azure. Credentials | ||
* implementing the TokenCredential interface from the @azure/identity package are recommended. For | ||
* more information about these credentials, see | ||
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the | ||
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and | ||
* @azure/ms-rest-browserauth are also supported. | ||
* @param batchUrl The base URL for all Azure Batch service requests. | ||
* @param [options] The parameter options | ||
*/ | ||
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, batchUrl: string, options?: msRestAzure.AzureServiceClientOptions) { | ||
if (credentials == undefined) { | ||
throw new Error('\'credentials\' cannot be null.'); | ||
} | ||
if (batchUrl == undefined) { | ||
throw new Error('\'batchUrl\' cannot be null.'); | ||
} | ||
|
||
if (!options) { | ||
options = {}; | ||
} | ||
if (!options.userAgent) { | ||
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); | ||
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; | ||
} | ||
|
||
super(credentials, options); | ||
|
||
this.apiVersion = '2021-06-01.14.0'; | ||
this.acceptLanguage = 'en-US'; | ||
this.longRunningOperationRetryTimeout = 30; | ||
this.baseUri = "{batchUrl}"; | ||
this.requestContentType = "application/json; charset=utf-8"; | ||
this.credentials = credentials; | ||
this.batchUrl = batchUrl; | ||
|
||
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { | ||
this.acceptLanguage = options.acceptLanguage; | ||
} | ||
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { | ||
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* 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 { | ||
BatchError, | ||
BatchErrorDetail, | ||
ComputeNodeExtensionGetHeaders, | ||
ErrorMessage, | ||
InstanceViewStatus, | ||
NodeVMExtension, | ||
VMExtension, | ||
VMExtensionInstanceView | ||
} from "../models/mappers"; |
19 changes: 19 additions & 0 deletions
19
sdk/batch/batch/src/models/computeNodeExtensionsMappers.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,19 @@ | ||
/* | ||
* 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 { | ||
BatchError, | ||
BatchErrorDetail, | ||
ComputeNodeExtensionsListHeaders, | ||
ErrorMessage, | ||
InstanceViewStatus, | ||
NodeVMExtension, | ||
NodeVMExtensionList, | ||
VMExtension, | ||
VMExtensionInstanceView | ||
} from "../models/mappers"; |
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
Oops, something went wrong.