Skip to content

Commit

Permalink
CodeGen from PR 28828 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 5d9260bbcb383745865caad3b56099001e38598c into 0bc238ecc7d42a1c814ed076b84e7c6328ae39df
  • Loading branch information
SDKAuto committed May 13, 2024
1 parent 3158783 commit f071d82
Show file tree
Hide file tree
Showing 29 changed files with 1,657 additions and 1,643 deletions.
775 changes: 388 additions & 387 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions sdk/elasticsans/arm-elasticsan/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# Release History

## 1.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes


## 1.1.0 (2024-05-13)

**Features**

- Interface VolumeGroupProperties has a new optional parameter enforceDataIntegrityCheckForIscsi
- Interface VolumeGroupUpdateProperties has a new optional parameter enforceDataIntegrityCheckForIscsi


## 1.0.0 (2024-01-19)

The package of @azure/arm-elasticsan is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart).
8 changes: 4 additions & 4 deletions sdk/elasticsans/arm-elasticsan/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "e280525a283751dcd66d56079e2d60eea4fe207e",
"commit": "8746e5fe7e4008e1c1796ef501167f6cbad10a67",
"readme": "specification/elasticsan/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\elasticsan\\resource-manager\\readme.md --use=@autorest/typescript@6.0.13 --generate-sample=true --modelerfour.flatten-models=false",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/elasticsan/resource-manager/readme.md --use=@autorest/typescript@^6.0.12",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.4",
"use": "@autorest/typescript@6.0.13"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.8",
"use": "@autorest/typescript@^6.0.12"
}
20 changes: 6 additions & 14 deletions sdk/elasticsans/arm-elasticsan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ElasticSanManagement.",
"version": "1.0.1",
"version": "1.1.0",
"engines": {
"node": ">=18.0.0"
},
Expand All @@ -12,8 +12,8 @@
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.12.0",
"@azure/core-auth": "^1.6.0",
"@azure/core-rest-pipeline": "^1.14.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand All @@ -40,6 +40,7 @@
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^10.0.0",
"@types/mocha": "^10.0.0",
"tsx": "^4.7.1",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
Expand Down Expand Up @@ -77,7 +78,6 @@
"pack": "npm pack 2>&1",
"extract-api": "dev-tool run extract-api",
"lint": "echo skipped",
"audit": "echo skipped",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:browser": "echo skipped",
Expand Down Expand Up @@ -106,13 +106,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/elasticsans/arm-elasticsan",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-elasticsan?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/elasticsans/arm-elasticsan"
}
2 changes: 2 additions & 0 deletions sdk/elasticsans/arm-elasticsan/review/arm-elasticsan.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ export interface VolumeGroupList {
export interface VolumeGroupProperties {
encryption?: EncryptionType;
encryptionProperties?: EncryptionProperties;
enforceDataIntegrityCheckForIscsi?: boolean;
networkAcls?: NetworkRuleSet;
readonly privateEndpointConnections?: PrivateEndpointConnection[];
protocolType?: StorageTargetType;
Expand Down Expand Up @@ -765,6 +766,7 @@ export interface VolumeGroupUpdate {
export interface VolumeGroupUpdateProperties {
encryption?: EncryptionType;
encryptionProperties?: EncryptionProperties;
enforceDataIntegrityCheckForIscsi?: boolean;
networkAcls?: NetworkRuleSet;
protocolType?: StorageTargetType;
}
Expand Down
35 changes: 18 additions & 17 deletions sdk/elasticsans/arm-elasticsan/src/elasticSanManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as coreRestPipeline from "@azure/core-rest-pipeline";
import {
PipelineRequest,
PipelineResponse,
SendRequest
SendRequest,
} from "@azure/core-rest-pipeline";
import * as coreAuth from "@azure/core-auth";
import {
Expand All @@ -22,7 +22,7 @@ import {
VolumesImpl,
PrivateEndpointConnectionsImpl,
PrivateLinkResourcesImpl,
VolumeSnapshotsImpl
VolumeSnapshotsImpl,
} from "./operations";
import {
Operations,
Expand All @@ -32,7 +32,7 @@ import {
Volumes,
PrivateEndpointConnections,
PrivateLinkResources,
VolumeSnapshots
VolumeSnapshots,
} from "./operationsInterfaces";
import { ElasticSanManagementOptionalParams } from "./models";

Expand All @@ -50,7 +50,7 @@ export class ElasticSanManagement extends coreClient.ServiceClient {
constructor(
credentials: coreAuth.TokenCredential,
subscriptionId: string,
options?: ElasticSanManagementOptionalParams
options?: ElasticSanManagementOptionalParams,
) {
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
Expand All @@ -65,10 +65,10 @@ export class ElasticSanManagement extends coreClient.ServiceClient {
}
const defaults: ElasticSanManagementOptionalParams = {
requestContentType: "application/json; charset=utf-8",
credential: credentials
credential: credentials,
};

const packageDetails = `azsdk-js-arm-elasticsan/1.0.1`;
const packageDetails = `azsdk-js-arm-elasticsan/1.1.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand All @@ -78,20 +78,21 @@ export class ElasticSanManagement extends coreClient.ServiceClient {
...defaults,
...options,
userAgentOptions: {
userAgentPrefix
userAgentPrefix,
},
endpoint:
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
options.endpoint ?? options.baseUri ?? "https://management.azure.com",
};
super(optionsWithDefaults);

let bearerTokenAuthenticationPolicyFound: boolean = false;
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =
options.pipeline.getOrderedPolicies();
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
(pipelinePolicy) =>
pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName
coreRestPipeline.bearerTokenAuthenticationPolicyName,
);
}
if (
Expand All @@ -101,7 +102,7 @@ export class ElasticSanManagement extends coreClient.ServiceClient {
!bearerTokenAuthenticationPolicyFound
) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
Expand All @@ -111,17 +112,17 @@ export class ElasticSanManagement extends coreClient.ServiceClient {
`${optionsWithDefaults.endpoint}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
coreClient.authorizeRequestOnClaimChallenge,
},
}),
);
}
// Parameter assignments
this.subscriptionId = subscriptionId;

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2023-01-01";
this.apiVersion = options.apiVersion || "2024-05-01";
this.operations = new OperationsImpl(this);
this.skus = new SkusImpl(this);
this.elasticSans = new ElasticSansImpl(this);
Expand All @@ -142,7 +143,7 @@ export class ElasticSanManagement extends coreClient.ServiceClient {
name: "CustomApiVersionPolicy",
async sendRequest(
request: PipelineRequest,
next: SendRequest
next: SendRequest,
): Promise<PipelineResponse> {
const param = request.url.split("?");
if (param.length > 1) {
Expand All @@ -156,7 +157,7 @@ export class ElasticSanManagement extends coreClient.ServiceClient {
request.url = param[0] + "?" + newParams.join("&");
}
return next(request);
}
},
};
this.pipeline.addPolicy(apiVersionPolicy);
}
Expand Down
6 changes: 3 additions & 3 deletions sdk/elasticsans/arm-elasticsan/src/lroImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ export function createLroSpec<T>(inputs: {
sendInitialRequest: () => sendOperationFn(args, spec),
sendPollRequest: (
path: string,
options?: { abortSignal?: AbortSignalLike }
options?: { abortSignal?: AbortSignalLike },
) => {
const { requestBody, ...restSpec } = spec;
return sendOperationFn(args, {
...restSpec,
httpMethod: "GET",
path,
abortSignal: options?.abortSignal
abortSignal: options?.abortSignal,
});
}
},
};
}
Loading

0 comments on commit f071d82

Please sign in to comment.