From 34938329d1d8455de7cd225b4153d6f38e0cbf5f Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 28 May 2020 03:31:58 +0000 Subject: [PATCH] Generated from 6ab213bb1ac86c627c628f1a54943082e1f1e9b6 Fix case --- .../src/frontDoorManagementClient.ts | 118 +----------------- .../frontDoorNameAvailabilityMappers.ts | 14 +++ ...NameAvailabilityWithSubscriptionMappers.ts | 14 +++ .../arm-frontdoor/src/models/index.ts | 18 ++- .../arm-frontdoor/src/models/mappers.ts | 21 ++-- .../arm-frontdoor/src/models/parameters.ts | 2 +- .../operations/frontDoorNameAvailability.ts | 85 +++++++++++++ ...ontDoorNameAvailabilityWithSubscription.ts | 88 +++++++++++++ .../arm-frontdoor/src/operations/index.ts | 2 + 9 files changed, 235 insertions(+), 127 deletions(-) create mode 100644 sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityMappers.ts create mode 100644 sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityWithSubscriptionMappers.ts create mode 100644 sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailability.ts create mode 100644 sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailabilityWithSubscription.ts diff --git a/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts b/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts index 5388cb4f8e81..4b86e90664e9 100644 --- a/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts +++ b/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts @@ -11,7 +11,6 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; -import * as Parameters from "./models/parameters"; import * as operations from "./operations"; import { FrontDoorManagementClientContext } from "./frontDoorManagementClientContext"; @@ -22,6 +21,8 @@ class FrontDoorManagementClient extends FrontDoorManagementClientContext { preconfiguredEndpoints: operations.PreconfiguredEndpoints; experiments: operations.Experiments; reports: operations.Reports; + frontDoorNameAvailability: operations.FrontDoorNameAvailability; + frontDoorNameAvailabilityWithSubscription: operations.FrontDoorNameAvailabilityWithSubscription; frontDoors: operations.FrontDoors; frontendEndpoints: operations.FrontendEndpoints; endpoints: operations.Endpoints; @@ -42,6 +43,8 @@ class FrontDoorManagementClient extends FrontDoorManagementClientContext { this.preconfiguredEndpoints = new operations.PreconfiguredEndpoints(this); this.experiments = new operations.Experiments(this); this.reports = new operations.Reports(this); + this.frontDoorNameAvailability = new operations.FrontDoorNameAvailability(this); + this.frontDoorNameAvailabilityWithSubscription = new operations.FrontDoorNameAvailabilityWithSubscription(this); this.frontDoors = new operations.FrontDoors(this); this.frontendEndpoints = new operations.FrontendEndpoints(this); this.endpoints = new operations.Endpoints(this); @@ -49,122 +52,9 @@ class FrontDoorManagementClient extends FrontDoorManagementClientContext { this.policies = new operations.Policies(this); this.managedRuleSets = new operations.ManagedRuleSets(this); } - - /** - * Check the availability of a Front Door resource name. - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param [options] The optional parameters - * @returns Promise - */ - checkFrontDoorNameAvailability(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise; - /** - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param callback The callback - */ - checkFrontDoorNameAvailability(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback): void; - /** - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param options The optional parameters - * @param callback The callback - */ - checkFrontDoorNameAvailability(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkFrontDoorNameAvailability(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.sendOperationRequest( - { - checkFrontDoorNameAvailabilityInput, - options - }, - checkFrontDoorNameAvailabilityOperationSpec, - callback) as Promise; - } - - /** - * Check the availability of a Front Door subdomain. - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param [options] The optional parameters - * @returns Promise - */ - checkFrontDoorNameAvailabilityWithSubscription(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise; - /** - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param callback The callback - */ - checkFrontDoorNameAvailabilityWithSubscription(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback): void; - /** - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param options The optional parameters - * @param callback The callback - */ - checkFrontDoorNameAvailabilityWithSubscription(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkFrontDoorNameAvailabilityWithSubscription(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.sendOperationRequest( - { - checkFrontDoorNameAvailabilityInput, - options - }, - checkFrontDoorNameAvailabilityWithSubscriptionOperationSpec, - callback) as Promise; - } } // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const checkFrontDoorNameAvailabilityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.Network/checkFrontDoorNameAvailability", - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "checkFrontDoorNameAvailabilityInput", - mapper: { - ...Mappers.CheckNameAvailabilityInput, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CheckNameAvailabilityOutput - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const checkFrontDoorNameAvailabilityWithSubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Network/checkFrontDoorNameAvailability", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "checkFrontDoorNameAvailabilityInput", - mapper: { - ...Mappers.CheckNameAvailabilityInput, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CheckNameAvailabilityOutput - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; export { FrontDoorManagementClient, diff --git a/sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityMappers.ts new file mode 100644 index 000000000000..aba378a9e912 --- /dev/null +++ b/sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CheckNameAvailabilityInput, + CheckNameAvailabilityOutput, + ErrorResponse +} from "../models/mappers"; diff --git a/sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityWithSubscriptionMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityWithSubscriptionMappers.ts new file mode 100644 index 000000000000..aba378a9e912 --- /dev/null +++ b/sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityWithSubscriptionMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CheckNameAvailabilityInput, + CheckNameAvailabilityOutput, + ErrorResponse +} from "../models/mappers"; diff --git a/sdk/frontdoor/arm-frontdoor/src/models/index.ts b/sdk/frontdoor/arm-frontdoor/src/models/index.ts index 2a6e256159df..3ea79b64ae66 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/index.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/index.ts @@ -982,6 +982,16 @@ export interface Backend { * backend is 'Private' */ privateLinkAlias?: string; + /** + * The Resource Id of the Private Link resource. Populating this optional field indicates that + * this backend is 'Private' + */ + privateLinkResourceId?: string; + /** + * The location of the Private Link resource. Required only if 'privateLinkResourceId' is + * populated + */ + privateLinkLocation?: string; /** * The Approval status for the connection to the Private Link. Possible values include: * 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' @@ -2617,9 +2627,9 @@ export type ReportsGetTimeseriesResponse = Timeseries & { }; /** - * Contains response data for the checkFrontDoorNameAvailability operation. + * Contains response data for the check operation. */ -export type CheckFrontDoorNameAvailabilityResponse = CheckNameAvailabilityOutput & { +export type FrontDoorNameAvailabilityCheckResponse = CheckNameAvailabilityOutput & { /** * The underlying HTTP response. */ @@ -2637,9 +2647,9 @@ export type CheckFrontDoorNameAvailabilityResponse = CheckNameAvailabilityOutput }; /** - * Contains response data for the checkFrontDoorNameAvailabilityWithSubscription operation. + * Contains response data for the check operation. */ -export type CheckFrontDoorNameAvailabilityWithSubscriptionResponse = CheckNameAvailabilityOutput & { +export type FrontDoorNameAvailabilityWithSubscriptionCheckResponse = CheckNameAvailabilityOutput & { /** * The underlying HTTP response. */ diff --git a/sdk/frontdoor/arm-frontdoor/src/models/mappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/mappers.ts index cf91b00d42d1..6f146da1589a 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/mappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/mappers.ts @@ -1632,18 +1632,23 @@ export const Backend: msRest.CompositeMapper = { name: "String" } }, + privateLinkResourceId: { + serializedName: "privateLinkResourceId", + type: { + name: "String" + } + }, + privateLinkLocation: { + serializedName: "privateLinkLocation", + type: { + name: "String" + } + }, privateEndpointStatus: { readOnly: true, serializedName: "privateEndpointStatus", type: { - name: "Enum", - allowedValues: [ - "Pending", - "Approved", - "Rejected", - "Disconnected", - "Timeout" - ] + name: "String" } }, privateLinkApprovalMessage: { diff --git a/sdk/frontdoor/arm-frontdoor/src/models/parameters.ts b/sdk/frontdoor/arm-frontdoor/src/models/parameters.ts index 70836d18cf88..f2870862589f 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/parameters.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/parameters.ts @@ -48,7 +48,7 @@ export const apiVersion1: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2020-01-01', + defaultValue: '2020-05-01', type: { name: "String" } diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailability.ts b/sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailability.ts new file mode 100644 index 000000000000..7553161c7b48 --- /dev/null +++ b/sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailability.ts @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/frontDoorNameAvailabilityMappers"; +import * as Parameters from "../models/parameters"; +import { FrontDoorManagementClientContext } from "../frontDoorManagementClientContext"; + +/** Class representing a FrontDoorNameAvailability. */ +export class FrontDoorNameAvailability { + private readonly client: FrontDoorManagementClientContext; + + /** + * Create a FrontDoorNameAvailability. + * @param {FrontDoorManagementClientContext} client Reference to the service client. + */ + constructor(client: FrontDoorManagementClientContext) { + this.client = client; + } + + /** + * Check the availability of a Front Door resource name. + * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param [options] The optional parameters + * @returns Promise + */ + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param callback The callback + */ + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback): void; + /** + * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param options The optional parameters + * @param callback The callback + */ + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + checkFrontDoorNameAvailabilityInput, + options + }, + checkOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const checkOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Network/checkFrontDoorNameAvailability", + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "checkFrontDoorNameAvailabilityInput", + mapper: { + ...Mappers.CheckNameAvailabilityInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityOutput + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailabilityWithSubscription.ts b/sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailabilityWithSubscription.ts new file mode 100644 index 000000000000..79952064f2c1 --- /dev/null +++ b/sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailabilityWithSubscription.ts @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/frontDoorNameAvailabilityWithSubscriptionMappers"; +import * as Parameters from "../models/parameters"; +import { FrontDoorManagementClientContext } from "../frontDoorManagementClientContext"; + +/** Class representing a FrontDoorNameAvailabilityWithSubscription. */ +export class FrontDoorNameAvailabilityWithSubscription { + private readonly client: FrontDoorManagementClientContext; + + /** + * Create a FrontDoorNameAvailabilityWithSubscription. + * @param {FrontDoorManagementClientContext} client Reference to the service client. + */ + constructor(client: FrontDoorManagementClientContext) { + this.client = client; + } + + /** + * Check the availability of a Front Door subdomain. + * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param [options] The optional parameters + * @returns Promise + */ + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param callback The callback + */ + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback): void; + /** + * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param options The optional parameters + * @param callback The callback + */ + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + checkFrontDoorNameAvailabilityInput, + options + }, + checkOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const checkOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Network/checkFrontDoorNameAvailability", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "checkFrontDoorNameAvailabilityInput", + mapper: { + ...Mappers.CheckNameAvailabilityInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityOutput + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/index.ts b/sdk/frontdoor/arm-frontdoor/src/operations/index.ts index 3b7a5c55a765..d6da5750b0da 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/index.ts +++ b/sdk/frontdoor/arm-frontdoor/src/operations/index.ts @@ -12,6 +12,8 @@ export * from "./networkExperimentProfiles"; export * from "./preconfiguredEndpoints"; export * from "./experiments"; export * from "./reports"; +export * from "./frontDoorNameAvailability"; +export * from "./frontDoorNameAvailabilityWithSubscription"; export * from "./frontDoors"; export * from "./frontendEndpoints"; export * from "./endpoints";