Skip to content

Commit

Permalink
Nikoudsi/batch 20220101 dataplane release (#20145)
Browse files Browse the repository at this point in the history
* Generated autorest changes for the JavaScript Batch Service Client

* Generated model autorest changes

* Generated operations autorest changes

* Modified unit tests to be more deterministic and to test new API changes

* Made unit test readability optimization

* Modified the package version number
  • Loading branch information
NickKouds authored Feb 3, 2022
1 parent 53d112b commit 477dfb4
Show file tree
Hide file tree
Showing 21 changed files with 4,770 additions and 3,292 deletions.
2 changes: 1 addition & 1 deletion sdk/batch/batch/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021 Microsoft
Copyright (c) 2022 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion sdk/batch/batch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@azure/batch",
"author": "Microsoft Corporation",
"description": "BatchServiceClient Library with typescript type definitions for node.js and browser.",
"version": "10.0.3",
"version": "10.1.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^2.1.0",
"@azure/ms-rest-js": "^2.2.0",
Expand Down
7 changes: 2 additions & 5 deletions sdk/batch/batch/src/batchServiceClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import * as Mappers from "./models/mappers";
import * as operations from "./operations";
import { BatchServiceClientContext } from "./batchServiceClientContext";


class BatchServiceClient extends BatchServiceClientContext {
// Operation groups
application: operations.Application;
Expand All @@ -33,11 +34,7 @@ class BatchServiceClient extends BatchServiceClientContext {
* @param batchUrl The base URL for all Azure Batch service requests.
* @param [options] The parameter options
*/
constructor(
credentials: msRest.ServiceClientCredentials,
batchUrl: string,
options?: msRestAzure.AzureServiceClientOptions
) {
constructor(credentials: msRest.ServiceClientCredentials, batchUrl: string, options?: msRestAzure.AzureServiceClientOptions) {
super(credentials, batchUrl, options);
this.application = new operations.Application(this);
this.pool = new operations.Pool(this);
Expand Down
21 changes: 7 additions & 14 deletions sdk/batch/batch/src/batchServiceClientContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";

const packageName = "@azure/batch";
const packageVersion = "10.0.3";
const packageVersion = "10.1.0";

export class BatchServiceClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
Expand All @@ -24,16 +24,12 @@ export class BatchServiceClientContext extends msRestAzure.AzureServiceClient {
* @param batchUrl The base URL for all Azure Batch service requests.
* @param [options] The parameter options
*/
constructor(
credentials: msRest.ServiceClientCredentials,
batchUrl: string,
options?: msRestAzure.AzureServiceClientOptions
) {
constructor(credentials: msRest.ServiceClientCredentials, batchUrl: string, options?: msRestAzure.AzureServiceClientOptions) {
if (credentials == undefined) {
throw new Error("'credentials' cannot be null.");
throw new Error('\'credentials\' cannot be null.');
}
if (batchUrl == undefined) {
throw new Error("'batchUrl' cannot be null.");
throw new Error('\'batchUrl\' cannot be null.');
}

if (!options) {
Expand All @@ -46,8 +42,8 @@ export class BatchServiceClientContext extends msRestAzure.AzureServiceClient {

super(credentials, options);

this.apiVersion = "2021-06-01.14.0";
this.acceptLanguage = "en-US";
this.apiVersion = '2022-01-01.15.0';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = "{batchUrl}";
this.requestContentType = "application/json; charset=utf-8";
Expand All @@ -57,10 +53,7 @@ export class BatchServiceClientContext extends msRestAzure.AzureServiceClient {
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
this.acceptLanguage = options.acceptLanguage;
}
if (
options.longRunningOperationRetryTimeout !== null &&
options.longRunningOperationRetryTimeout !== undefined
) {
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
}
Expand Down
Loading

0 comments on commit 477dfb4

Please sign in to comment.