Skip to content

Commit

Permalink
CodeGen from PR 27641 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge e1561238ae7f6f1d19790bc57421851fa1fd5e1d into f2ccc768574c2d24acd222d8dc530f217490a0ff
  • Loading branch information
SDKAuto committed Feb 3, 2024
1 parent 0886249 commit f8a4ac8
Show file tree
Hide file tree
Showing 22 changed files with 1,494 additions and 1,438 deletions.
813 changes: 436 additions & 377 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sdk/containerservice/arm-containerservicefleet/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2023 Microsoft
Copyright (c) 2024 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 sdk/containerservice/arm-containerservicefleet/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "5ae522bc106bf8609c6cb379e584aa3e0e2639f3",
"commit": "b82160e9528221324e7234b5f47286aea44e22ad",
"readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/fleet/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\\containerservice\\resource-manager\\Microsoft.ContainerService\\fleet\\readme.md --use=@autorest/[email protected].11 --generate-sample=true",
"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/containerservice/resource-manager/Microsoft.ContainerService/fleet/readme.md --use=@autorest/typescript@^6.0.12",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/[email protected].2",
"use": "@autorest/[email protected].11"
"release_tool": "@azure-tools/[email protected].4",
"use": "@autorest/typescript@^6.0.12"
}
22 changes: 6 additions & 16 deletions sdk/containerservice/arm-containerservicefleet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
"mkdirp": "^2.1.2",
"typescript": "~5.3.3",
"typescript": "~5.2.0",
"uglify-js": "^3.4.9",
"rimraf": "^5.0.0",
"dotenv": "^16.0.0",
"@azure/identity": "^4.0.1",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^3.3.0",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^10.0.0",
Expand All @@ -44,8 +45,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^18.0.0",
"ts-node": "^10.0.0",
"@azure/dev-tool": "^1.0.0"
"ts-node": "^10.0.0"
},
"repository": {
"type": "git",
Expand All @@ -66,7 +66,6 @@
"src/**/*.ts",
"README.md",
"LICENSE",
"rollup.config.js",
"tsconfig.json",
"review/*",
"CHANGELOG.md",
Expand All @@ -79,7 +78,6 @@
"pack": "npm pack 2>&1",
"extract-api": "api-extractor run --local",
"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 @@ -108,13 +106,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservicefleet",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerservicefleet?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservicefleet"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ 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 {
OperationsImpl,
FleetsImpl,
FleetMembersImpl,
UpdateRunsImpl,
FleetUpdateStrategiesImpl
FleetUpdateStrategiesImpl,
} from "./operations";
import {
Operations,
Fleets,
FleetMembers,
UpdateRuns,
FleetUpdateStrategies
FleetUpdateStrategies,
} from "./operationsInterfaces";
import { ContainerServiceFleetClientOptionalParams } from "./models";

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

const packageDetails = `azsdk-js-arm-containerservicefleet/1.0.1`;
Expand All @@ -72,20 +72,21 @@ export class ContainerServiceFleetClient 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 @@ -95,7 +96,7 @@ export class ContainerServiceFleetClient extends coreClient.ServiceClient {
!bearerTokenAuthenticationPolicyFound
) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
Expand All @@ -105,9 +106,9 @@ export class ContainerServiceFleetClient extends coreClient.ServiceClient {
`${optionsWithDefaults.endpoint}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
coreClient.authorizeRequestOnClaimChallenge,
},
}),
);
}
// Parameter assignments
Expand All @@ -133,7 +134,7 @@ export class ContainerServiceFleetClient 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 @@ -147,7 +148,7 @@ export class ContainerServiceFleetClient 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/containerservice/arm-containerservicefleet/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,
});
}
},
};
}
28 changes: 15 additions & 13 deletions sdk/containerservice/arm-containerservicefleet/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ export enum KnownOrigin {
/** System */
System = "system",
/** UserSystem */
UserSystem = "user,system"
UserSystem = "user,system",
}

/**
Expand All @@ -683,7 +683,7 @@ export type Origin = string;
/** Known values of {@link ActionType} that the service accepts. */
export enum KnownActionType {
/** Internal */
Internal = "Internal"
Internal = "Internal",
}

/**
Expand All @@ -708,7 +708,7 @@ export enum KnownFleetProvisioningState {
/** The provisioning state of a fleet being updated. */
Updating = "Updating",
/** The provisioning state of a fleet being deleted. */
Deleting = "Deleting"
Deleting = "Deleting",
}

/**
Expand All @@ -734,7 +734,7 @@ export enum KnownManagedServiceIdentityType {
/** UserAssigned */
UserAssigned = "UserAssigned",
/** SystemAssignedUserAssigned */
SystemAssignedUserAssigned = "SystemAssigned, UserAssigned"
SystemAssignedUserAssigned = "SystemAssigned, UserAssigned",
}

/**
Expand All @@ -758,7 +758,7 @@ export enum KnownCreatedByType {
/** ManagedIdentity */
ManagedIdentity = "ManagedIdentity",
/** Key */
Key = "Key"
Key = "Key",
}

/**
Expand Down Expand Up @@ -786,7 +786,7 @@ export enum KnownFleetMemberProvisioningState {
/** The provisioning state of a member leaving a fleet. */
Leaving = "Leaving",
/** The provisioning state of a member being updated. */
Updating = "Updating"
Updating = "Updating",
}

/**
Expand All @@ -810,7 +810,7 @@ export enum KnownUpdateRunProvisioningState {
/** Resource creation failed. */
Failed = "Failed",
/** Resource creation was canceled. */
Canceled = "Canceled"
Canceled = "Canceled",
}

/**
Expand All @@ -829,7 +829,7 @@ export enum KnownManagedClusterUpgradeType {
/** Full upgrades the control plane and all agent pools of the target ManagedClusters. */
Full = "Full",
/** NodeImageOnly upgrades only the node images of the target ManagedClusters. */
NodeImageOnly = "NodeImageOnly"
NodeImageOnly = "NodeImageOnly",
}

/**
Expand All @@ -847,7 +847,7 @@ export enum KnownNodeImageSelectionType {
/** Use the latest image version when upgrading nodes. Clusters may use different image versions (e.g., 'AKSUbuntu-1804gen2containerd-2021.10.12' and 'AKSUbuntu-1804gen2containerd-2021.10.19') because, for example, the latest available version is different in different regions. */
Latest = "Latest",
/** The image versions to upgrade nodes to are selected as described below: for each node pool in managed clusters affected by the update run, the system selects the latest image version such that it is available across all other node pools (in all other clusters) of the same image type. As a result, all node pools of the same image type will be upgraded to the same image version. For example, if the latest image version for image type 'AKSUbuntu-1804gen2containerd' is 'AKSUbuntu-1804gen2containerd-2021.10.12' for a node pool in cluster A in region X, and is 'AKSUbuntu-1804gen2containerd-2021.10.17' for a node pool in cluster B in region Y, the system will upgrade both node pools to image version 'AKSUbuntu-1804gen2containerd-2021.10.12'. */
Consistent = "Consistent"
Consistent = "Consistent",
}

/**
Expand Down Expand Up @@ -875,7 +875,7 @@ export enum KnownUpdateState {
/** The state of an UpdateRun\/UpdateStage\/UpdateGroup\/MemberUpdate that has failed. */
Failed = "Failed",
/** The state of an UpdateRun\/UpdateStage\/UpdateGroup\/MemberUpdate that has completed. */
Completed = "Completed"
Completed = "Completed",
}

/**
Expand All @@ -900,7 +900,7 @@ export enum KnownFleetUpdateStrategyProvisioningState {
/** Resource creation failed. */
Failed = "Failed",
/** Resource creation was canceled. */
Canceled = "Canceled"
Canceled = "Canceled",
}

/**
Expand Down Expand Up @@ -1153,7 +1153,8 @@ export interface FleetUpdateStrategiesListByFleetOptionalParams
extends coreClient.OperationOptions {}

/** Contains response data for the listByFleet operation. */
export type FleetUpdateStrategiesListByFleetResponse = FleetUpdateStrategyListResult;
export type FleetUpdateStrategiesListByFleetResponse =
FleetUpdateStrategyListResult;

/** Optional parameters. */
export interface FleetUpdateStrategiesGetOptionalParams
Expand Down Expand Up @@ -1194,7 +1195,8 @@ export interface FleetUpdateStrategiesListByFleetNextOptionalParams
extends coreClient.OperationOptions {}

/** Contains response data for the listByFleetNext operation. */
export type FleetUpdateStrategiesListByFleetNextResponse = FleetUpdateStrategyListResult;
export type FleetUpdateStrategiesListByFleetNextResponse =
FleetUpdateStrategyListResult;

/** Optional parameters. */
export interface ContainerServiceFleetClientOptionalParams
Expand Down
Loading

0 comments on commit f8a4ac8

Please sign in to comment.