From 8c0e0a4311c2b227496d766adf12b4e86274b88d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 29 Oct 2021 05:47:25 +0000 Subject: [PATCH] CodeGen from PR 16472 in Azure/azure-rest-api-specs Merge bfd97ebfa7efc0d0b75d8daf4be20a4db4d4d43f into 69eacf00a36d565d3220d5dd6f4a5293664f1ae9 --- .../arm-trafficmanager/README.md | 8 +-- .../arm-trafficmanager/package.json | 2 +- .../arm-trafficmanager/src/models/index.ts | 8 +++ .../src/models/parameters.ts | 7 +- .../src/operations/endpoints.ts | 68 +++++++++++-------- 5 files changed, 59 insertions(+), 34 deletions(-) diff --git a/sdk/trafficmanager/arm-trafficmanager/README.md b/sdk/trafficmanager/arm-trafficmanager/README.md index 72d87a5e5739..9fe368b9acbe 100644 --- a/sdk/trafficmanager/arm-trafficmanager/README.md +++ b/sdk/trafficmanager/arm-trafficmanager/README.md @@ -1,11 +1,11 @@ ## Azure TrafficManagerManagementClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for TrafficManagerManagementClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for TrafficManagerManagementClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -51,7 +51,7 @@ const creds = new DefaultAzureCredential(); const client = new TrafficManagerManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const profileName = "testprofileName"; -const endpointType = "testendpointType"; +const endpointType = "AzureEndpoints"; const endpointName = "testendpointName"; client.endpoints.get(resourceGroupName, profileName, endpointType, endpointName).then((result) => { console.log("The result is:"); @@ -92,7 +92,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const client = new Azure.ArmTrafficmanager.TrafficManagerManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const profileName = "testprofileName"; - const endpointType = "testendpointType"; + const endpointType = "AzureEndpoints"; const endpointName = "testendpointName"; client.endpoints.get(resourceGroupName, profileName, endpointType, endpointName).then((result) => { console.log("The result is:"); diff --git a/sdk/trafficmanager/arm-trafficmanager/package.json b/sdk/trafficmanager/arm-trafficmanager/package.json index 6ad100ce779b..53defa3988e6 100644 --- a/sdk/trafficmanager/arm-trafficmanager/package.json +++ b/sdk/trafficmanager/arm-trafficmanager/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/trafficmanager/arm-trafficmanager", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/trafficmanager/arm-trafficmanager", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/trafficmanager/arm-trafficmanager/src/models/index.ts b/sdk/trafficmanager/arm-trafficmanager/src/models/index.ts index 33650bcd99cf..4f7e98bced50 100644 --- a/sdk/trafficmanager/arm-trafficmanager/src/models/index.ts +++ b/sdk/trafficmanager/arm-trafficmanager/src/models/index.ts @@ -561,6 +561,14 @@ export type TrafficViewEnrollmentStatus = 'Enabled' | 'Disabled'; */ export type AllowedEndpointRecordType = 'DomainName' | 'IPv4Address' | 'IPv6Address' | 'Any'; +/** + * Defines values for EndpointType. + * Possible values include: 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' + * @readonly + * @enum {string} + */ +export type EndpointType = 'AzureEndpoints' | 'ExternalEndpoints' | 'NestedEndpoints'; + /** * Contains response data for the update operation. */ diff --git a/sdk/trafficmanager/arm-trafficmanager/src/models/parameters.ts b/sdk/trafficmanager/arm-trafficmanager/src/models/parameters.ts index 1b2b07e257c7..8acc11999454 100644 --- a/sdk/trafficmanager/arm-trafficmanager/src/models/parameters.ts +++ b/sdk/trafficmanager/arm-trafficmanager/src/models/parameters.ts @@ -67,7 +67,12 @@ export const endpointType: msRest.OperationURLParameter = { required: true, serializedName: "endpointType", type: { - name: "String" + name: "Enum", + allowedValues: [ + "AzureEndpoints", + "ExternalEndpoints", + "NestedEndpoints" + ] } } }; diff --git a/sdk/trafficmanager/arm-trafficmanager/src/operations/endpoints.ts b/sdk/trafficmanager/arm-trafficmanager/src/operations/endpoints.ts index 6a73995ea38c..b37c80676957 100644 --- a/sdk/trafficmanager/arm-trafficmanager/src/operations/endpoints.ts +++ b/sdk/trafficmanager/arm-trafficmanager/src/operations/endpoints.ts @@ -30,35 +30,38 @@ export class Endpoints { * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint * to be updated. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be updated. + * @param endpointType The type of the Traffic Manager endpoint to be updated. Possible values + * include: 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' * @param endpointName The name of the Traffic Manager endpoint to be updated. * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, parameters: Models.Endpoint, options?: msRest.RequestOptionsBase): Promise; + update(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, parameters: Models.Endpoint, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint * to be updated. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be updated. + * @param endpointType The type of the Traffic Manager endpoint to be updated. Possible values + * include: 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' * @param endpointName The name of the Traffic Manager endpoint to be updated. * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. * @param callback The callback */ - update(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, parameters: Models.Endpoint, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, parameters: Models.Endpoint, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint * to be updated. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be updated. + * @param endpointType The type of the Traffic Manager endpoint to be updated. Possible values + * include: 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' * @param endpointName The name of the Traffic Manager endpoint to be updated. * @param parameters The Traffic Manager endpoint parameters supplied to the Update operation. * @param options The optional parameters * @param callback The callback */ - update(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, parameters: Models.Endpoint, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, parameters: Models.Endpoint, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, parameters: Models.Endpoint, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, parameters: Models.Endpoint, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -76,30 +79,33 @@ export class Endpoints { * Gets a Traffic Manager endpoint. * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointType The type of the Traffic Manager endpoint. Possible values include: + * 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' * @param endpointName The name of the Traffic Manager endpoint. * @param [options] The optional parameters * @returns Promise */ - get(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, options?: msRest.RequestOptionsBase): Promise; + get(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointType The type of the Traffic Manager endpoint. Possible values include: + * 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' * @param endpointName The name of the Traffic Manager endpoint. * @param callback The callback */ - get(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint. + * @param endpointType The type of the Traffic Manager endpoint. Possible values include: + * 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' * @param endpointName The name of the Traffic Manager endpoint. * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -117,38 +123,41 @@ export class Endpoints { * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint * to be created or updated. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be created or updated. + * @param endpointType The type of the Traffic Manager endpoint to be created or updated. Possible + * values include: 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' * @param endpointName The name of the Traffic Manager endpoint to be created or updated. * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate * operation. * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, parameters: Models.Endpoint, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, parameters: Models.Endpoint, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint * to be created or updated. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be created or updated. + * @param endpointType The type of the Traffic Manager endpoint to be created or updated. Possible + * values include: 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' * @param endpointName The name of the Traffic Manager endpoint to be created or updated. * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate * operation. * @param callback The callback */ - createOrUpdate(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, parameters: Models.Endpoint, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, parameters: Models.Endpoint, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint * to be created or updated. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be created or updated. + * @param endpointType The type of the Traffic Manager endpoint to be created or updated. Possible + * values include: 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' * @param endpointName The name of the Traffic Manager endpoint to be created or updated. * @param parameters The Traffic Manager endpoint parameters supplied to the CreateOrUpdate * operation. * @param options The optional parameters * @param callback The callback */ - createOrUpdate(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, parameters: Models.Endpoint, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, parameters: Models.Endpoint, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, parameters: Models.Endpoint, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, parameters: Models.Endpoint, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -167,32 +176,35 @@ export class Endpoints { * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint * to be deleted. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be deleted. + * @param endpointType The type of the Traffic Manager endpoint to be deleted. Possible values + * include: 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' * @param endpointName The name of the Traffic Manager endpoint to be deleted. * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, options?: msRest.RequestOptionsBase): Promise; + deleteMethod(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint * to be deleted. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be deleted. + * @param endpointType The type of the Traffic Manager endpoint to be deleted. Possible values + * include: 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' * @param endpointName The name of the Traffic Manager endpoint to be deleted. * @param callback The callback */ - deleteMethod(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group containing the Traffic Manager endpoint * to be deleted. * @param profileName The name of the Traffic Manager profile. - * @param endpointType The type of the Traffic Manager endpoint to be deleted. + * @param endpointType The type of the Traffic Manager endpoint to be deleted. Possible values + * include: 'AzureEndpoints', 'ExternalEndpoints', 'NestedEndpoints' * @param endpointName The name of the Traffic Manager endpoint to be deleted. * @param options The optional parameters * @param callback The callback */ - deleteMethod(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, profileName: string, endpointType: string, endpointName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + deleteMethod(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, profileName: string, endpointType: Models.EndpointType, endpointName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName,