Skip to content

Commit

Permalink
Generated from 11c705caee395c4991964c1025807b6ce95cad93 (#1496)
Browse files Browse the repository at this point in the history
Update some descriptions.
  • Loading branch information
AutorestCI authored Mar 8, 2019
1 parent 84b949e commit abc6488
Show file tree
Hide file tree
Showing 21 changed files with 1,190 additions and 1,417 deletions.
2 changes: 1 addition & 1 deletion packages/@azure/batch/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft
Copyright (c) 2019 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
8 changes: 4 additions & 4 deletions packages/@azure/batch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for BatchServiceClient.

### How to Install

```
```bash
npm install @azure/batch
```

Expand All @@ -19,13 +19,13 @@ npm install @azure/batch

##### Install @azure/ms-rest-nodeauth

```
```bash
npm install @azure/ms-rest-nodeauth
```

##### Sample code

```ts
```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
Expand All @@ -52,7 +52,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {

##### Install @azure/ms-rest-browserauth

```
```bash
npm install @azure/ms-rest-browserauth
```

Expand Down
6 changes: 4 additions & 2 deletions packages/@azure/batch/lib/batchServiceClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/

import * as msRest from "@azure/ms-rest-js";
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";
Expand All @@ -30,10 +31,11 @@ class BatchServiceClient extends BatchServiceClientContext {
/**
* Initializes a new instance of the BatchServiceClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param batchUrl The base URL for all Azure Batch service requests.
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, options?: Models.BatchServiceClientOptions) {
super(credentials, options);
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);
this.account = new operations.Account(this);
Expand Down
15 changes: 10 additions & 5 deletions packages/@azure/batch/lib/batchServiceClientContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,30 @@
* 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/batch";
const packageVersion = "0.1.0";
const packageVersion = "6.0.0";

export class BatchServiceClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
apiVersion?: string;
batchUrl: string;

/**
* Initializes a new instance of the BatchServiceClient class.
* @param credentials Credentials needed for the client to connect to Azure.
* @param batchUrl The base URL for all Azure Batch service requests.
* @param [options] The parameter options
*/
constructor(credentials: msRest.ServiceClientCredentials, options?: Models.BatchServiceClientOptions) {
constructor(credentials: msRest.ServiceClientCredentials, 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 = {};
Expand All @@ -39,12 +43,13 @@ export class BatchServiceClientContext extends msRestAzure.AzureServiceClient {

super(credentials, options);

this.apiVersion = '2018-08-01.7.0';
this.apiVersion = '2018-12-01.8.0';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://batch.core.windows.net";
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;
Expand Down
Loading

0 comments on commit abc6488

Please sign in to comment.