Skip to content

Commit 7a65a50

Browse files
author
SDKAuto
committed
CodeGen from PR 14830 in Azure/azure-rest-api-specs
Merge d98744647dd59d2a657b878285b5b4b6e45be3dd into c2e43f82e91ff7ad691381df56c535164b354cba
1 parent 23bb270 commit 7a65a50

29 files changed

+2020
-122
lines changed

sdk/batch/batch/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 Microsoft
3+
Copyright (c) 2021 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is
7+
* regenerated.
8+
*/
9+
10+
import * as msRest from "@azure/ms-rest-js";
11+
import { TokenCredential } from "@azure/core-auth";
12+
import * as msRestAzure from "@azure/ms-rest-azure-js";
13+
import * as Models from "./models";
14+
import * as Mappers from "./models/mappers";
15+
import * as operations from "./operations";
16+
import { BatchServiceContext } from "./batchServiceContext";
17+
18+
19+
class BatchService extends BatchServiceContext {
20+
// Operation groups
21+
application: operations.Application;
22+
pool: operations.Pool;
23+
account: operations.Account;
24+
job: operations.Job;
25+
certificate: operations.CertificateOperations;
26+
file: operations.File;
27+
jobSchedule: operations.JobSchedule;
28+
task: operations.Task;
29+
computeNode: operations.ComputeNodeOperations;
30+
computeNodeExtension: operations.ComputeNodeExtension;
31+
computeNodeExtensions: operations.ComputeNodeExtensions;
32+
33+
/**
34+
* Initializes a new instance of the BatchService class.
35+
* @param credentials Credentials needed for the client to connect to Azure. Credentials
36+
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
37+
* more information about these credentials, see
38+
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
39+
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
40+
* @azure/ms-rest-browserauth are also supported.
41+
* @param batchUrl The base URL for all Azure Batch service requests.
42+
* @param [options] The parameter options
43+
*/
44+
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, batchUrl: string, options?: msRest.AzureServiceClientOptions) {
45+
super(credentials, batchUrl, options);
46+
this.application = new operations.Application(this);
47+
this.pool = new operations.Pool(this);
48+
this.account = new operations.Account(this);
49+
this.job = new operations.Job(this);
50+
this.certificate = new operations.CertificateOperations(this);
51+
this.file = new operations.File(this);
52+
this.jobSchedule = new operations.JobSchedule(this);
53+
this.task = new operations.Task(this);
54+
this.computeNode = new operations.ComputeNodeOperations(this);
55+
this.computeNodeExtension = new operations.ComputeNodeExtension(this);
56+
this.computeNodeExtensions = new operations.ComputeNodeExtensions(this);
57+
}
58+
}
59+
60+
// Operation Specifications
61+
62+
export {
63+
BatchService,
64+
BatchServiceContext,
65+
Models as BatchServiceModels,
66+
Mappers as BatchServiceMappers
67+
};
68+
export * from "./operations";
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is
7+
* regenerated.
8+
*/
9+
10+
import * as msRest from "@azure/ms-rest-js";
11+
import * as msRestAzure from "@azure/ms-rest-azure-js";
12+
import { TokenCredential } from "@azure/core-auth";
13+
14+
const packageName = "@azure/batch";
15+
const packageVersion = "8.0.0";
16+
17+
export class BatchServiceContext extends msRestAzure.AzureServiceClient {
18+
credentials: msRest.ServiceClientCredentials | TokenCredential;
19+
apiVersion?: string;
20+
batchUrl: string;
21+
22+
/**
23+
* Initializes a new instance of the BatchService class.
24+
* @param credentials Credentials needed for the client to connect to Azure. Credentials
25+
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
26+
* more information about these credentials, see
27+
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
28+
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
29+
* @azure/ms-rest-browserauth are also supported.
30+
* @param batchUrl The base URL for all Azure Batch service requests.
31+
* @param [options] The parameter options
32+
*/
33+
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, batchUrl: string, options?: msRestAzure.AzureServiceClientOptions) {
34+
if (credentials == undefined) {
35+
throw new Error('\'credentials\' cannot be null.');
36+
}
37+
if (batchUrl == undefined) {
38+
throw new Error('\'batchUrl\' cannot be null.');
39+
}
40+
41+
if (!options) {
42+
options = {};
43+
}
44+
if (!options.userAgent) {
45+
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
46+
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
47+
}
48+
49+
super(credentials, options);
50+
51+
this.apiVersion = '2021-06-01.14.0';
52+
this.acceptLanguage = 'en-US';
53+
this.longRunningOperationRetryTimeout = 30;
54+
this.baseUri = "{batchUrl}";
55+
this.requestContentType = "application/json; charset=utf-8";
56+
this.credentials = credentials;
57+
this.batchUrl = batchUrl;
58+
59+
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
60+
this.acceptLanguage = options.acceptLanguage;
61+
}
62+
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
63+
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
64+
}
65+
}
66+
}

sdk/batch/batch/src/models/accountMappers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.

sdk/batch/batch/src/models/applicationMappers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.

sdk/batch/batch/src/models/certificateOperationsMappers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
export {
10+
BatchError,
11+
BatchErrorDetail,
12+
ComputeNodeExtensionGetHeaders,
13+
ErrorMessage,
14+
InstanceViewStatus,
15+
NodeVMExtension,
16+
VMExtension,
17+
VMExtensionInstanceView
18+
} from "../models/mappers";
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
4+
*
5+
* Code generated by Microsoft (R) AutoRest Code Generator.
6+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
*/
8+
9+
export {
10+
BatchError,
11+
BatchErrorDetail,
12+
ComputeNodeExtensionsListHeaders,
13+
ErrorMessage,
14+
InstanceViewStatus,
15+
NodeVMExtension,
16+
NodeVMExtensionList,
17+
VMExtension,
18+
VMExtensionInstanceView
19+
} from "../models/mappers";

sdk/batch/batch/src/models/computeNodeOperationsMappers.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
@@ -22,6 +22,7 @@ export {
2222
ComputeNodeGetRemoteDesktopHeaders,
2323
ComputeNodeGetRemoteLoginSettingsHeaders,
2424
ComputeNodeGetRemoteLoginSettingsResult,
25+
ComputeNodeIdentityReference,
2526
ComputeNodeListHeaders,
2627
ComputeNodeListResult,
2728
ComputeNodeRebootHeaders,
@@ -32,6 +33,7 @@ export {
3233
ContainerRegistry,
3334
EnvironmentSetting,
3435
ErrorMessage,
36+
ImageReference,
3537
InboundEndpoint,
3638
NameValuePair,
3739
NodeAgentInformation,
@@ -49,5 +51,6 @@ export {
4951
TaskInformation,
5052
UploadBatchServiceLogsConfiguration,
5153
UploadBatchServiceLogsResult,
52-
UserIdentity
54+
UserIdentity,
55+
VirtualMachineInfo
5356
} from "../models/mappers";

sdk/batch/batch/src/models/fileMappers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) Microsoft Corporation. All rights reserved.
3-
* Licensed under the MIT License. See License.txt in the project root for license information.
2+
* Copyright (c) Microsoft Corporation.
3+
* Licensed under the MIT License.
44
*
55
* Code generated by Microsoft (R) AutoRest Code Generator.
66
* Changes may cause incorrect behavior and will be lost if the code is regenerated.

0 commit comments

Comments
 (0)