diff --git a/sdk/avs/arm-avs/src/avsClient.ts b/sdk/avs/arm-avs/src/avsClient.ts index bf4837286853..ddc844d84920 100644 --- a/sdk/avs/arm-avs/src/avsClient.ts +++ b/sdk/avs/arm-avs/src/avsClient.ts @@ -21,11 +21,13 @@ class AvsClient extends AvsClientContext { locations: operations.Locations; privateClouds: operations.PrivateClouds; clusters: operations.Clusters; + hcxEnterpriseSites: operations.HcxEnterpriseSites; + authorizations: operations.Authorizations; /** * Initializes a new instance of the AvsClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Unique identifier for the Azure subscription + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AvsClientOptions) { @@ -34,6 +36,8 @@ class AvsClient extends AvsClientContext { this.locations = new operations.Locations(this); this.privateClouds = new operations.PrivateClouds(this); this.clusters = new operations.Clusters(this); + this.hcxEnterpriseSites = new operations.HcxEnterpriseSites(this); + this.authorizations = new operations.Authorizations(this); } } diff --git a/sdk/avs/arm-avs/src/avsClientContext.ts b/sdk/avs/arm-avs/src/avsClientContext.ts index a17ce9fad890..22506ce174f5 100644 --- a/sdk/avs/arm-avs/src/avsClientContext.ts +++ b/sdk/avs/arm-avs/src/avsClientContext.ts @@ -17,13 +17,13 @@ const packageVersion = "0.1.0"; export class AvsClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; - subscriptionId: string; apiVersion?: string; + subscriptionId: string; /** * Initializes a new instance of the AvsClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Unique identifier for the Azure subscription + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AvsClientOptions) { @@ -44,7 +44,7 @@ export class AvsClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2019-08-09-preview'; + this.apiVersion = '2020-03-20'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/avs/arm-avs/src/models/authorizationsMappers.ts b/sdk/avs/arm-avs/src/models/authorizationsMappers.ts new file mode 100644 index 000000000000..e05ac88a10b2 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/authorizationsMappers.ts @@ -0,0 +1,27 @@ +/* + * 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 { + BaseResource, + Circuit, + CloudError, + Cluster, + ClusterUpdateProperties, + Endpoints, + ErrorAdditionalInfo, + ErrorResponse, + ExpressRouteAuthorization, + ExpressRouteAuthorizationList, + HcxEnterpriseSite, + IdentitySource, + ManagementCluster, + PrivateCloud, + Resource, + Sku, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/clustersMappers.ts b/sdk/avs/arm-avs/src/models/clustersMappers.ts index 730bdd10cdc7..124b77e9e04d 100644 --- a/sdk/avs/arm-avs/src/models/clustersMappers.ts +++ b/sdk/avs/arm-avs/src/models/clustersMappers.ts @@ -7,19 +7,21 @@ */ export { - ApiError, - ApiErrorBase, BaseResource, Circuit, + CloudError, Cluster, ClusterList, - ClusterProperties, - DefaultClusterProperties, + ClusterUpdate, + ClusterUpdateProperties, Endpoints, + ErrorAdditionalInfo, + ErrorResponse, ExpressRouteAuthorization, + HcxEnterpriseSite, IdentitySource, + ManagementCluster, PrivateCloud, - PrivateCloudProperties, Resource, Sku, TrackedResource diff --git a/sdk/avs/arm-avs/src/models/hcxEnterpriseSitesMappers.ts b/sdk/avs/arm-avs/src/models/hcxEnterpriseSitesMappers.ts new file mode 100644 index 000000000000..874d20947675 --- /dev/null +++ b/sdk/avs/arm-avs/src/models/hcxEnterpriseSitesMappers.ts @@ -0,0 +1,27 @@ +/* + * 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 { + BaseResource, + Circuit, + CloudError, + Cluster, + ClusterUpdateProperties, + Endpoints, + ErrorAdditionalInfo, + ErrorResponse, + ExpressRouteAuthorization, + HcxEnterpriseSite, + HcxEnterpriseSiteList, + IdentitySource, + ManagementCluster, + PrivateCloud, + Resource, + Sku, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/index.ts b/sdk/avs/arm-avs/src/models/index.ts index 0cd5281f0e3c..4cb27bb5029a 100644 --- a/sdk/avs/arm-avs/src/models/index.ts +++ b/sdk/avs/arm-avs/src/models/index.ts @@ -19,7 +19,7 @@ export interface Trial { * Trial status. Possible values include: 'TrialAvailable', 'TrialUsed', 'TrialDisabled' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly status?: Status; + readonly status?: TrialStatus; /** * Number of trial hosts available * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -38,8 +38,9 @@ export interface Quota { readonly hostsRemaining?: { [propertyName: string]: number }; /** * Host quota is active for current subscription. Possible values include: 'Enabled', 'Disabled' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - quotaEnabled?: QuotaEnabled; + readonly quotaEnabled?: QuotaEnabled; } /** @@ -78,27 +79,50 @@ export interface TrackedResource extends Resource { } /** - * Api error. + * The resource management error additional info. */ -export interface ApiErrorBase { +export interface ErrorAdditionalInfo { /** - * Error code + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - code?: string; + readonly type?: string; /** - * Error message + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - message?: string; + readonly info?: any; } /** - * API error response + * The resource management error response. */ -export interface ApiError { +export interface ErrorResponse { /** - * An error returned by the API + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - error?: ApiErrorBase; + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorResponse[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; } /** @@ -144,23 +168,25 @@ export interface Operation { } /** - * Authorization for an ExpressRoute + * ExpressRoute Circuit Authorization */ -export interface ExpressRouteAuthorization { +export interface ExpressRouteAuthorization extends Resource { /** - * The name of the ExpressRoute + * The state of the ExpressRoute Circuit Authorization provisioning. Possible values include: + * 'Succeeded', 'Failed', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - name?: string; + readonly provisioningState?: ExpressRouteAuthorizationProvisioningState; /** - * The ID of the ExpressRoute + * The ID of the ExpressRoute Circuit Authorization * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly id?: string; + readonly expressRouteAuthorizationId?: string; /** - * The key of the ExpressRoute + * The key of the ExpressRoute Circuit Authorization * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly key?: string; + readonly expressRouteAuthorizationKey?: string; } /** @@ -178,16 +204,12 @@ export interface Circuit { */ readonly secondarySubnet?: string; /** - * Identifier of the ExpressRoute (Microsoft Colo only) + * Identifier of the ExpressRoute Circuit (Microsoft Colo only) * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly expressRouteID?: string; /** - * Authorizations for the ExpressRoute (Microsoft Colo only) - */ - authorizations?: ExpressRouteAuthorization[]; - /** - * ExpressRoute private peering identifier + * ExpressRoute Circuit private peering identifier * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly expressRoutePrivatePeeringID?: string; @@ -207,6 +229,11 @@ export interface Endpoints { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly vcsa?: string; + /** + * Endpoint for the HCX Cloud Manager + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hcxCloudManager?: string; } /** @@ -269,32 +296,29 @@ export interface Sku { } /** - * The properties of a default cluster + * A private cloud resource */ -export interface DefaultClusterProperties { +export interface PrivateCloud extends TrackedResource { /** - * The identity - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * The private cloud SKU */ - readonly clusterId?: number; + sku: Sku; /** - * The cluster size + * The default cluster used for management */ - clusterSize?: number; + managementCluster?: ManagementCluster; /** - * The hosts - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * Connectivity to internet is enabled or disabled. Possible values include: 'Enabled', + * 'Disabled' */ - readonly hosts?: string[]; -} - -/** - * The properties of a private cloud resource - */ -export interface PrivateCloudProperties { + internet?: InternetEnum; + /** + * vCenter Single Sign On Identity Sources + */ + identitySources?: IdentitySource[]; /** * The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Cancelled', - * 'Pending', 'Building', 'Updating' + * 'Pending', 'Building', 'Deleting', 'Updating' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: PrivateCloudProvisioningState; @@ -302,35 +326,17 @@ export interface PrivateCloudProperties { * An ExpressRoute Circuit */ circuit?: Circuit; - /** - * The default cluster used for management - */ - cluster?: DefaultClusterProperties; - /** - * The clusters - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly clusters?: string[]; /** * The endpoints * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly endpoints?: Endpoints; - /** - * Connectivity to internet is enabled or disabled. Possible values include: 'Enabled', - * 'Disabled' - */ - internet?: InternetEnum; - /** - * vCenter Single Sign On Identity Sources - */ - identitySources?: IdentitySource[]; /** * The block of addresses should be unique across VNet in your subscription as well as * on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 * and 255, and X is between 0 and 22 */ - networkBlock?: string; + networkBlock: string; /** * Network used to access vCenter Server and NSX-T Manager * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -367,39 +373,88 @@ export interface PrivateCloudProperties { } /** - * A private cloud resource + * The properties of a cluster that may be updated */ -export interface PrivateCloud extends TrackedResource { +export interface ClusterUpdateProperties { /** - * The private cloud SKU + * The cluster size + */ + clusterSize?: number; +} + +/** + * The properties of a default cluster + */ +export interface ManagementCluster extends ClusterUpdateProperties { + /** + * The identity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clusterId?: number; + /** + * The hosts + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - sku?: Sku; + readonly hosts?: string[]; +} + +/** + * An update to a private cloud resource + */ +export interface PrivateCloudUpdate { /** - * The properties of a private cloud resource + * The default cluster used for management + */ + managementCluster?: ManagementCluster; + /** + * Connectivity to internet is enabled or disabled. Possible values include: 'Enabled', + * 'Disabled' */ - properties?: PrivateCloudProperties; + internet?: InternetEnum; + /** + * vCenter Single Sign On Identity Sources + */ + identitySources?: IdentitySource[]; } /** - * The properties of a cluster + * A cluster resource */ -export interface ClusterProperties extends DefaultClusterProperties { +export interface Cluster extends Resource { + /** + * The cluster SKU + */ + sku: Sku; + /** + * The cluster size + */ + clusterSize?: number; + /** + * The identity + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clusterId?: number; + /** + * The hosts + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly hosts?: string[]; /** * The state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', - * 'Cancelled', 'Updating' + * 'Cancelled', 'Deleting', 'Updating' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: ClusterProvisioningState; } /** - * A cluster resource + * An update of a cluster resource */ -export interface Cluster extends Resource { +export interface ClusterUpdate { /** - * The properties of a cluster resource + * The cluster size */ - properties?: ClusterProperties; + clusterSize?: number; } /** @@ -429,33 +484,30 @@ export interface AdminCredentials { } /** - * Optional Parameters. + * An HCX Enterprise Site resource */ -export interface ClustersCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface HcxEnterpriseSite extends Resource { /** - * The properties of a cluster resource + * The activation key + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - properties?: ClusterProperties; -} - -/** - * Optional Parameters. - */ -export interface ClustersUpdateOptionalParams extends msRest.RequestOptionsBase { + readonly activationKey?: string; /** - * The properties of a cluster resource + * The status of the HCX Enterprise Site. Possible values include: 'Available', 'Consumed', + * 'Deactivated', 'Deleted' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - properties?: ClusterProperties; + readonly status?: HcxEnterpriseSiteStatus; } /** * Optional Parameters. */ -export interface ClustersBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface ClustersUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * The properties of a cluster resource + * The cluster size */ - properties?: ClusterProperties; + clusterSize?: number; } /** @@ -463,9 +515,9 @@ export interface ClustersBeginCreateOrUpdateOptionalParams extends msRest.Reques */ export interface ClustersBeginUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * The properties of a cluster resource + * The cluster size */ - properties?: ClusterProperties; + clusterSize?: number; } /** @@ -514,6 +566,40 @@ export interface ClusterList extends Array { readonly nextLink?: string; } +/** + * @interface + * A paged list of HCX Enterprise Sites + * @extends Array + */ +export interface HcxEnterpriseSiteList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A paged list of ExpressRoute Circuit Authorizations + * @extends Array + */ +export interface ExpressRouteAuthorizationList extends Array { + /** + * URL to get the next page if any + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Defines values for TrialStatus. + * Possible values include: 'TrialAvailable', 'TrialUsed', 'TrialDisabled' + * @readonly + * @enum {string} + */ +export type TrialStatus = 'TrialAvailable' | 'TrialUsed' | 'TrialDisabled'; + /** * Defines values for QuotaEnabled. * Possible values include: 'Enabled', 'Disabled' @@ -522,6 +608,14 @@ export interface ClusterList extends Array { */ export type QuotaEnabled = 'Enabled' | 'Disabled'; +/** + * Defines values for ExpressRouteAuthorizationProvisioningState. + * Possible values include: 'Succeeded', 'Failed', 'Updating' + * @readonly + * @enum {string} + */ +export type ExpressRouteAuthorizationProvisioningState = 'Succeeded' | 'Failed' | 'Updating'; + /** * Defines values for SslEnum. * Possible values include: 'Enabled', 'Disabled' @@ -532,11 +626,12 @@ export type SslEnum = 'Enabled' | 'Disabled'; /** * Defines values for PrivateCloudProvisioningState. - * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Building', 'Updating' + * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Building', 'Deleting', + * 'Updating' * @readonly * @enum {string} */ -export type PrivateCloudProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Pending' | 'Building' | 'Updating'; +export type PrivateCloudProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Pending' | 'Building' | 'Deleting' | 'Updating'; /** * Defines values for InternetEnum. @@ -548,19 +643,19 @@ export type InternetEnum = 'Enabled' | 'Disabled'; /** * Defines values for ClusterProvisioningState. - * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Updating' + * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Deleting', 'Updating' * @readonly * @enum {string} */ -export type ClusterProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Updating'; +export type ClusterProvisioningState = 'Succeeded' | 'Failed' | 'Cancelled' | 'Deleting' | 'Updating'; /** - * Defines values for Status. - * Possible values include: 'TrialAvailable', 'TrialUsed', 'TrialDisabled' + * Defines values for HcxEnterpriseSiteStatus. + * Possible values include: 'Available', 'Consumed', 'Deactivated', 'Deleted' * @readonly * @enum {string} */ -export type Status = 'TrialAvailable' | 'TrialUsed' | 'TrialDisabled'; +export type HcxEnterpriseSiteStatus = 'Available' | 'Consumed' | 'Deactivated' | 'Deleted'; /** * Contains response data for the list operation. @@ -981,3 +1076,183 @@ export type ClustersListNextResponse = ClusterList & { parsedBody: ClusterList; }; }; + +/** + * Contains response data for the list operation. + */ +export type HcxEnterpriseSitesListResponse = HcxEnterpriseSiteList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HcxEnterpriseSiteList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type HcxEnterpriseSitesGetResponse = HcxEnterpriseSite & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HcxEnterpriseSite; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type HcxEnterpriseSitesCreateOrUpdateResponse = HcxEnterpriseSite & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HcxEnterpriseSite; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type HcxEnterpriseSitesListNextResponse = HcxEnterpriseSiteList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HcxEnterpriseSiteList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type AuthorizationsListResponse = ExpressRouteAuthorizationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExpressRouteAuthorizationList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type AuthorizationsGetResponse = ExpressRouteAuthorization & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExpressRouteAuthorization; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type AuthorizationsCreateOrUpdateResponse = ExpressRouteAuthorization & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExpressRouteAuthorization; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type AuthorizationsBeginCreateOrUpdateResponse = ExpressRouteAuthorization & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExpressRouteAuthorization; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type AuthorizationsListNextResponse = ExpressRouteAuthorizationList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ExpressRouteAuthorizationList; + }; +}; diff --git a/sdk/avs/arm-avs/src/models/locationsMappers.ts b/sdk/avs/arm-avs/src/models/locationsMappers.ts index f5e242fadc39..42d375510a29 100644 --- a/sdk/avs/arm-avs/src/models/locationsMappers.ts +++ b/sdk/avs/arm-avs/src/models/locationsMappers.ts @@ -7,8 +7,9 @@ */ export { - ApiError, - ApiErrorBase, + CloudError, + ErrorAdditionalInfo, + ErrorResponse, Quota, Trial } from "../models/mappers"; diff --git a/sdk/avs/arm-avs/src/models/mappers.ts b/sdk/avs/arm-avs/src/models/mappers.ts index 3951f30781e9..1a84214f1798 100644 --- a/sdk/avs/arm-avs/src/models/mappers.ts +++ b/sdk/avs/arm-avs/src/models/mappers.ts @@ -55,6 +55,7 @@ export const Quota: msRest.CompositeMapper = { } }, quotaEnabled: { + readOnly: true, serializedName: "quotaEnabled", type: { name: "String" @@ -123,39 +124,81 @@ export const TrackedResource: msRest.CompositeMapper = { } }; -export const ApiErrorBase: msRest.CompositeMapper = { - serializedName: "ApiErrorBase", +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", type: { name: "Composite", - className: "ApiErrorBase", + className: "ErrorAdditionalInfo", modelProperties: { - code: { - serializedName: "code", + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } }, - message: { - serializedName: "message", + info: { + readOnly: true, + serializedName: "info", type: { - name: "String" + name: "Object" } } } } }; -export const ApiError: msRest.CompositeMapper = { - serializedName: "ApiError", +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", type: { name: "Composite", - className: "ApiError", + className: "ErrorResponse", modelProperties: { - error: { - serializedName: "error", + code: { + readOnly: true, + serializedName: "code", type: { - name: "Composite", - className: "ApiErrorBase" + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } } } } @@ -231,22 +274,24 @@ export const ExpressRouteAuthorization: msRest.CompositeMapper = { name: "Composite", className: "ExpressRouteAuthorization", modelProperties: { - name: { - serializedName: "name", + ...Resource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", type: { name: "String" } }, - id: { + expressRouteAuthorizationId: { readOnly: true, - serializedName: "id", + serializedName: "properties.expressRouteAuthorizationId", type: { name: "String" } }, - key: { + expressRouteAuthorizationKey: { readOnly: true, - serializedName: "key", + serializedName: "properties.expressRouteAuthorizationKey", type: { name: "String" } @@ -282,18 +327,6 @@ export const Circuit: msRest.CompositeMapper = { name: "String" } }, - authorizations: { - serializedName: "authorizations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ExpressRouteAuthorization" - } - } - } - }, expressRoutePrivatePeeringID: { readOnly: true, serializedName: "expressRoutePrivatePeeringID", @@ -324,6 +357,13 @@ export const Endpoints: msRest.CompositeMapper = { type: { name: "String" } + }, + hcxCloudManager: { + readOnly: true, + serializedName: "hcxCloudManager", + type: { + name: "String" + } } } } @@ -416,155 +456,118 @@ export const Sku: msRest.CompositeMapper = { } }; -export const DefaultClusterProperties: msRest.CompositeMapper = { - serializedName: "DefaultClusterProperties", +export const PrivateCloud: msRest.CompositeMapper = { + serializedName: "PrivateCloud", type: { name: "Composite", - className: "DefaultClusterProperties", + className: "PrivateCloud", modelProperties: { - clusterId: { - readOnly: true, - serializedName: "clusterId", + ...TrackedResource.type.modelProperties, + sku: { + required: true, + serializedName: "sku", type: { - name: "Number" + name: "Composite", + className: "Sku" } }, - clusterSize: { - serializedName: "clusterSize", + managementCluster: { + serializedName: "properties.managementCluster", type: { - name: "Number" + name: "Composite", + className: "ManagementCluster" } }, - hosts: { - readOnly: true, - serializedName: "hosts", + internet: { + serializedName: "properties.internet", + type: { + name: "String" + } + }, + identitySources: { + serializedName: "properties.identitySources", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "IdentitySource" } } } - } - } - } -}; - -export const PrivateCloudProperties: msRest.CompositeMapper = { - serializedName: "PrivateCloudProperties", - type: { - name: "Composite", - className: "PrivateCloudProperties", - modelProperties: { + }, provisioningState: { readOnly: true, - serializedName: "provisioningState", + serializedName: "properties.provisioningState", type: { name: "String" } }, circuit: { - serializedName: "circuit", + serializedName: "properties.circuit", type: { name: "Composite", className: "Circuit" } }, - cluster: { - serializedName: "cluster", - type: { - name: "Composite", - className: "DefaultClusterProperties" - } - }, - clusters: { - readOnly: true, - serializedName: "clusters", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, endpoints: { readOnly: true, - serializedName: "endpoints", + serializedName: "properties.endpoints", type: { name: "Composite", className: "Endpoints" } }, - internet: { - serializedName: "internet", - type: { - name: "String" - } - }, - identitySources: { - serializedName: "identitySources", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IdentitySource" - } - } - } - }, networkBlock: { - serializedName: "networkBlock", + required: true, + serializedName: "properties.networkBlock", type: { name: "String" } }, managementNetwork: { readOnly: true, - serializedName: "managementNetwork", + serializedName: "properties.managementNetwork", type: { name: "String" } }, provisioningNetwork: { readOnly: true, - serializedName: "provisioningNetwork", + serializedName: "properties.provisioningNetwork", type: { name: "String" } }, vmotionNetwork: { readOnly: true, - serializedName: "vmotionNetwork", + serializedName: "properties.vmotionNetwork", type: { name: "String" } }, vcenterPassword: { - serializedName: "vcenterPassword", + serializedName: "properties.vcenterPassword", type: { name: "String" } }, nsxtPassword: { - serializedName: "nsxtPassword", + serializedName: "properties.nsxtPassword", type: { name: "String" } }, vcenterCertificateThumbprint: { readOnly: true, - serializedName: "vcenterCertificateThumbprint", + serializedName: "properties.vcenterCertificateThumbprint", type: { name: "String" } }, nsxtCertificateThumbprint: { readOnly: true, - serializedName: "nsxtCertificateThumbprint", + serializedName: "properties.nsxtCertificateThumbprint", type: { name: "String" } @@ -573,44 +576,82 @@ export const PrivateCloudProperties: msRest.CompositeMapper = { } }; -export const PrivateCloud: msRest.CompositeMapper = { - serializedName: "PrivateCloud", +export const ClusterUpdateProperties: msRest.CompositeMapper = { + serializedName: "ClusterUpdateProperties", type: { name: "Composite", - className: "PrivateCloud", + className: "ClusterUpdateProperties", modelProperties: { - ...TrackedResource.type.modelProperties, - sku: { - serializedName: "sku", + clusterSize: { + serializedName: "clusterSize", type: { - name: "Composite", - className: "Sku" + name: "Number" + } + } + } + } +}; + +export const ManagementCluster: msRest.CompositeMapper = { + serializedName: "ManagementCluster", + type: { + name: "Composite", + className: "ManagementCluster", + modelProperties: { + ...ClusterUpdateProperties.type.modelProperties, + clusterId: { + readOnly: true, + serializedName: "clusterId", + type: { + name: "Number" } }, - properties: { - serializedName: "properties", + hosts: { + readOnly: true, + serializedName: "hosts", type: { - name: "Composite", - className: "PrivateCloudProperties" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const ClusterProperties: msRest.CompositeMapper = { - serializedName: "ClusterProperties", +export const PrivateCloudUpdate: msRest.CompositeMapper = { + serializedName: "PrivateCloudUpdate", type: { name: "Composite", - className: "ClusterProperties", + className: "PrivateCloudUpdate", modelProperties: { - ...DefaultClusterProperties.type.modelProperties, - provisioningState: { - readOnly: true, - serializedName: "provisioningState", + managementCluster: { + serializedName: "properties.managementCluster", + type: { + name: "Composite", + className: "ManagementCluster" + } + }, + internet: { + serializedName: "properties.internet", type: { name: "String" } + }, + identitySources: { + serializedName: "properties.identitySources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IdentitySource" + } + } + } } } } @@ -623,11 +664,60 @@ export const Cluster: msRest.CompositeMapper = { className: "Cluster", modelProperties: { ...Resource.type.modelProperties, - properties: { - serializedName: "properties", + sku: { + required: true, + serializedName: "sku", type: { name: "Composite", - className: "ClusterProperties" + className: "Sku" + } + }, + clusterSize: { + serializedName: "properties.clusterSize", + type: { + name: "Number" + } + }, + clusterId: { + readOnly: true, + serializedName: "properties.clusterId", + type: { + name: "Number" + } + }, + hosts: { + readOnly: true, + serializedName: "properties.hosts", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterUpdate: msRest.CompositeMapper = { + serializedName: "ClusterUpdate", + type: { + name: "Composite", + className: "ClusterUpdate", + modelProperties: { + clusterSize: { + serializedName: "properties.clusterSize", + type: { + name: "Number" } } } @@ -672,6 +762,31 @@ export const AdminCredentials: msRest.CompositeMapper = { } }; +export const HcxEnterpriseSite: msRest.CompositeMapper = { + serializedName: "HcxEnterpriseSite", + type: { + name: "Composite", + className: "HcxEnterpriseSite", + modelProperties: { + ...Resource.type.modelProperties, + activationKey: { + readOnly: true, + serializedName: "properties.activationKey", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "String" + } + } + } + } +}; + export const OperationList: msRest.CompositeMapper = { serializedName: "OperationList", type: { @@ -761,3 +876,63 @@ export const ClusterList: msRest.CompositeMapper = { } } }; + +export const HcxEnterpriseSiteList: msRest.CompositeMapper = { + serializedName: "HcxEnterpriseSiteList", + type: { + name: "Composite", + className: "HcxEnterpriseSiteList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HcxEnterpriseSite" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ExpressRouteAuthorizationList: msRest.CompositeMapper = { + serializedName: "ExpressRouteAuthorizationList", + type: { + name: "Composite", + className: "ExpressRouteAuthorizationList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRouteAuthorization" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/avs/arm-avs/src/models/operationsMappers.ts b/sdk/avs/arm-avs/src/models/operationsMappers.ts index b694633c9b26..0a19c814cee4 100644 --- a/sdk/avs/arm-avs/src/models/operationsMappers.ts +++ b/sdk/avs/arm-avs/src/models/operationsMappers.ts @@ -7,8 +7,9 @@ */ export { - ApiError, - ApiErrorBase, + CloudError, + ErrorAdditionalInfo, + ErrorResponse, Operation, OperationDisplay, OperationList diff --git a/sdk/avs/arm-avs/src/models/parameters.ts b/sdk/avs/arm-avs/src/models/parameters.ts index 7e139c882955..a6e0588f1cac 100644 --- a/sdk/avs/arm-avs/src/models/parameters.ts +++ b/sdk/avs/arm-avs/src/models/parameters.ts @@ -25,6 +25,19 @@ export const apiVersion: msRest.OperationQueryParameter = { mapper: { required: true, serializedName: "api-version", + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const authorizationName: msRest.OperationURLParameter = { + parameterPath: "authorizationName", + mapper: { + required: true, + serializedName: "authorizationName", type: { name: "String" } @@ -40,6 +53,16 @@ export const clusterName: msRest.OperationURLParameter = { } } }; +export const hcxEnterpriseSiteName: msRest.OperationURLParameter = { + parameterPath: "hcxEnterpriseSiteName", + mapper: { + required: true, + serializedName: "hcxEnterpriseSiteName", + type: { + name: "String" + } + } +}; export const location: msRest.OperationURLParameter = { parameterPath: "location", mapper: { @@ -76,6 +99,11 @@ export const resourceGroupName: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "resourceGroupName", + constraints: { + MaxLength: 90, + MinLength: 1, + Pattern: /^[-\w\._\(\)]+$/ + }, type: { name: "String" } @@ -86,6 +114,9 @@ export const subscriptionId: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, type: { name: "String" } diff --git a/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts b/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts index cfaee30705e1..edfebca08ab4 100644 --- a/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts +++ b/sdk/avs/arm-avs/src/models/privateCloudsMappers.ts @@ -8,19 +8,21 @@ export { AdminCredentials, - ApiError, - ApiErrorBase, BaseResource, Circuit, + CloudError, Cluster, - ClusterProperties, - DefaultClusterProperties, + ClusterUpdateProperties, Endpoints, + ErrorAdditionalInfo, + ErrorResponse, ExpressRouteAuthorization, + HcxEnterpriseSite, IdentitySource, + ManagementCluster, PrivateCloud, PrivateCloudList, - PrivateCloudProperties, + PrivateCloudUpdate, Resource, Sku, TrackedResource diff --git a/sdk/avs/arm-avs/src/operations/authorizations.ts b/sdk/avs/arm-avs/src/operations/authorizations.ts new file mode 100644 index 000000000000..6111185333ad --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/authorizations.ts @@ -0,0 +1,333 @@ +/* + * 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 msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/authorizationsMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a Authorizations. */ +export class Authorizations { + private readonly client: AvsClientContext; + + /** + * Create a Authorizations. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * @summary List ExpressRoute Circuit Authorizations in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Get an ExpressRoute Circuit Authorization by name in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, authorizationName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, authorizationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + authorizationName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Create or update an ExpressRoute Circuit Authorization in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @param authorization An ExpressRoute Circuit Authorization + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, privateCloudName: string, authorizationName: string, authorization: any, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,authorizationName,authorization,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * @summary Delete an ExpressRoute Circuit Authorization in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,privateCloudName,authorizationName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * @summary Create or update an ExpressRoute Circuit Authorization in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @param authorization An ExpressRoute Circuit Authorization + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, authorizationName: string, authorization: any, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + authorizationName, + authorization, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * @summary Delete an ExpressRoute Circuit Authorization in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param authorizationName Name of the ExpressRoute Circuit Authorization in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, privateCloudName: string, authorizationName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + privateCloudName, + authorizationName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * @summary List ExpressRoute Circuit Authorizations in a private cloud + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExpressRouteAuthorizationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.authorizationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExpressRouteAuthorization + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.authorizationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "authorization", + mapper: { + required: true, + serializedName: "authorization", + type: { + name: "Object" + } + } + }, + responses: { + 200: { + bodyMapper: Mappers.ExpressRouteAuthorization + }, + 201: { + bodyMapper: Mappers.ExpressRouteAuthorization + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/authorizations/{authorizationName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.authorizationName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ExpressRouteAuthorizationList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/clusters.ts b/sdk/avs/arm-avs/src/operations/clusters.ts index 55d15ba781df..2c005ebadd1c 100644 --- a/sdk/avs/arm-avs/src/operations/clusters.ts +++ b/sdk/avs/arm-avs/src/operations/clusters.ts @@ -29,20 +29,20 @@ export class Clusters { /** * @summary List clusters in a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param [options] The optional parameters * @returns Promise */ list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param callback The callback */ list(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param options The optional parameters * @param callback The callback @@ -61,7 +61,7 @@ export class Clusters { /** * @summary Get a cluster by name in a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param clusterName Name of the cluster in the private cloud * @param [options] The optional parameters @@ -69,14 +69,14 @@ export class Clusters { */ get(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param clusterName Name of the cluster in the private cloud * @param callback The callback */ get(resourceGroupName: string, privateCloudName: string, clusterName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param clusterName Name of the cluster in the private cloud * @param options The optional parameters @@ -97,20 +97,21 @@ export class Clusters { /** * @summary Create or update a cluster in a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName The name of the private cloud. * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: Models.ClustersCreateOrUpdateOptionalParams): Promise { - return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,clusterName,options) + createOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, cluster: Models.Cluster, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,privateCloudName,clusterName,cluster,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * @summary Update a cluster in a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param clusterName Name of the cluster in the private cloud * @param [options] The optional parameters @@ -123,7 +124,7 @@ export class Clusters { /** * @summary Delete a cluster in a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param clusterName Name of the cluster in the private cloud * @param [options] The optional parameters @@ -136,18 +137,20 @@ export class Clusters { /** * @summary Create or update a cluster in a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName The name of the private cloud. * @param clusterName Name of the cluster in the private cloud + * @param cluster A cluster in the private cloud * @param [options] The optional parameters * @returns Promise */ - beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, options?: Models.ClustersBeginCreateOrUpdateOptionalParams): Promise { + beginCreateOrUpdate(resourceGroupName: string, privateCloudName: string, clusterName: string, cluster: Models.Cluster, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, privateCloudName, clusterName, + cluster, options }, beginCreateOrUpdateOperationSpec, @@ -156,7 +159,7 @@ export class Clusters { /** * @summary Update a cluster in a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param clusterName Name of the cluster in the private cloud * @param [options] The optional parameters @@ -176,7 +179,7 @@ export class Clusters { /** * @summary Delete a cluster in a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param clusterName Name of the cluster in the private cloud * @param [options] The optional parameters @@ -244,7 +247,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ClusterList }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -270,7 +273,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Cluster }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -292,12 +295,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: { - properties: [ - "options", - "properties" - ] - }, + parameterPath: "cluster", mapper: { ...Mappers.Cluster, required: true @@ -311,7 +309,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Cluster }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -334,13 +332,13 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { ], requestBody: { parameterPath: { - properties: [ + clusterSize: [ "options", - "properties" + "clusterSize" ] }, mapper: { - ...Mappers.Cluster, + ...Mappers.ClusterUpdate, required: true } }, @@ -352,7 +350,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Cluster }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -378,7 +376,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -399,7 +397,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ClusterList }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer diff --git a/sdk/avs/arm-avs/src/operations/hcxEnterpriseSites.ts b/sdk/avs/arm-avs/src/operations/hcxEnterpriseSites.ts new file mode 100644 index 000000000000..ed9205e69420 --- /dev/null +++ b/sdk/avs/arm-avs/src/operations/hcxEnterpriseSites.ts @@ -0,0 +1,338 @@ +/* + * 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/hcxEnterpriseSitesMappers"; +import * as Parameters from "../models/parameters"; +import { AvsClientContext } from "../avsClientContext"; + +/** Class representing a HcxEnterpriseSites. */ +export class HcxEnterpriseSites { + private readonly client: AvsClientContext; + + /** + * Create a HcxEnterpriseSites. + * @param {AvsClientContext} client Reference to the service client. + */ + constructor(client: AvsClientContext) { + this.client = client; + } + + /** + * @summary List HCX Enterprise Sites in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, privateCloudName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * @summary Get an HCX Enterprise Site by name in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * @summary Create or update an HCX Enterprise Site in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @param hcxEnterpriseSite The HCX Enterprise Site + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, hcxEnterpriseSite: any, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @param hcxEnterpriseSite The HCX Enterprise Site + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, hcxEnterpriseSite: any, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName The name of the private cloud. + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @param hcxEnterpriseSite The HCX Enterprise Site + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, hcxEnterpriseSite: any, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, hcxEnterpriseSite: any, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + hcxEnterpriseSite, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * @summary Delete an HCX Enterprise Site in a private cloud + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param privateCloudName Name of the private cloud + * @param hcxEnterpriseSiteName Name of the HCX Enterprise Site in the private cloud + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, privateCloudName: string, hcxEnterpriseSiteName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + privateCloudName, + hcxEnterpriseSiteName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * @summary List HCX Enterprise Sites in a private cloud + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.HcxEnterpriseSiteList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.hcxEnterpriseSiteName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.HcxEnterpriseSite + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.hcxEnterpriseSiteName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "hcxEnterpriseSite", + mapper: { + required: true, + serializedName: "hcxEnterpriseSite", + type: { + name: "Object" + } + } + }, + responses: { + 200: { + bodyMapper: Mappers.HcxEnterpriseSite + }, + 201: { + bodyMapper: Mappers.HcxEnterpriseSite + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/hcxEnterpriseSites/{hcxEnterpriseSiteName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.privateCloudName, + Parameters.hcxEnterpriseSiteName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.HcxEnterpriseSiteList + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/avs/arm-avs/src/operations/index.ts b/sdk/avs/arm-avs/src/operations/index.ts index 71fd92df1663..41167f64dfff 100644 --- a/sdk/avs/arm-avs/src/operations/index.ts +++ b/sdk/avs/arm-avs/src/operations/index.ts @@ -12,3 +12,5 @@ export * from "./operations"; export * from "./locations"; export * from "./privateClouds"; export * from "./clusters"; +export * from "./hcxEnterpriseSites"; +export * from "./authorizations"; diff --git a/sdk/avs/arm-avs/src/operations/locations.ts b/sdk/avs/arm-avs/src/operations/locations.ts index f9ba99a45921..7ff1fa9c7351 100644 --- a/sdk/avs/arm-avs/src/operations/locations.ts +++ b/sdk/avs/arm-avs/src/operations/locations.ts @@ -103,7 +103,7 @@ const checkTrialAvailabilityOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Trial }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -127,7 +127,7 @@ const checkQuotaAvailabilityOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Quota }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer diff --git a/sdk/avs/arm-avs/src/operations/operations.ts b/sdk/avs/arm-avs/src/operations/operations.ts index 44d5e10114eb..af15d66d1a93 100644 --- a/sdk/avs/arm-avs/src/operations/operations.ts +++ b/sdk/avs/arm-avs/src/operations/operations.ts @@ -95,7 +95,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationList }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -116,7 +116,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationList }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer diff --git a/sdk/avs/arm-avs/src/operations/privateClouds.ts b/sdk/avs/arm-avs/src/operations/privateClouds.ts index 2d7f1b92ca09..eebc9d8ac564 100644 --- a/sdk/avs/arm-avs/src/operations/privateClouds.ts +++ b/sdk/avs/arm-avs/src/operations/privateClouds.ts @@ -29,18 +29,18 @@ export class PrivateClouds { /** * @summary List private clouds in a resource group - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ list(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ list(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -81,20 +81,20 @@ export class PrivateClouds { /** * @summary Get a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param callback The callback */ get(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param options The optional parameters * @param callback The callback @@ -113,7 +113,7 @@ export class PrivateClouds { /** * @summary Create or update a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param privateCloud The private cloud * @param [options] The optional parameters @@ -126,20 +126,20 @@ export class PrivateClouds { /** * @summary Update a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud - * @param privateCloud The private cloud + * @param privateCloudUpdate The private cloud properties to be updated * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, privateCloudName: string, privateCloud: Models.PrivateCloud, options?: msRest.RequestOptionsBase): Promise { - return this.beginUpdate(resourceGroupName,privateCloudName,privateCloud,options) + update(resourceGroupName: string, privateCloudName: string, privateCloudUpdate: Models.PrivateCloudUpdate, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdate(resourceGroupName,privateCloudName,privateCloudUpdate,options) .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * @summary Delete a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param [options] The optional parameters * @returns Promise @@ -151,20 +151,20 @@ export class PrivateClouds { /** * @summary List the admin credentials for the private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param [options] The optional parameters * @returns Promise */ listAdminCredentials(resourceGroupName: string, privateCloudName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param callback The callback */ listAdminCredentials(resourceGroupName: string, privateCloudName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param options The optional parameters * @param callback The callback @@ -183,7 +183,7 @@ export class PrivateClouds { /** * @summary Create or update a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param privateCloud The private cloud * @param [options] The optional parameters @@ -203,18 +203,18 @@ export class PrivateClouds { /** * @summary Update a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud - * @param privateCloud The private cloud + * @param privateCloudUpdate The private cloud properties to be updated * @param [options] The optional parameters * @returns Promise */ - beginUpdate(resourceGroupName: string, privateCloudName: string, privateCloud: Models.PrivateCloud, options?: msRest.RequestOptionsBase): Promise { + beginUpdate(resourceGroupName: string, privateCloudName: string, privateCloudUpdate: Models.PrivateCloudUpdate, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, privateCloudName, - privateCloud, + privateCloudUpdate, options }, beginUpdateOperationSpec, @@ -223,7 +223,7 @@ export class PrivateClouds { /** * @summary Delete a private cloud - * @param resourceGroupName Name of the resource group within the Azure subscription + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param privateCloudName Name of the private cloud * @param [options] The optional parameters * @returns Promise @@ -316,7 +316,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateCloudList }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -339,7 +339,7 @@ const listInSubscriptionOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateCloudList }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -364,7 +364,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateCloud }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -389,7 +389,7 @@ const listAdminCredentialsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AdminCredentials }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -424,7 +424,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateCloud }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -445,9 +445,9 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: "privateCloud", + parameterPath: "privateCloudUpdate", mapper: { - ...Mappers.PrivateCloud, + ...Mappers.PrivateCloudUpdate, required: true } }, @@ -459,7 +459,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateCloud }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -484,7 +484,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -505,7 +505,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateCloudList }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer @@ -526,7 +526,7 @@ const listInSubscriptionNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.PrivateCloudList }, default: { - bodyMapper: Mappers.ApiError + bodyMapper: Mappers.CloudError } }, serializer