diff --git a/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts b/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts index 4e5cad89ba86..d122446b9d02 100644 --- a/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts +++ b/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts @@ -18,7 +18,6 @@ class CommunicationServiceManagementClient extends CommunicationServiceManagemen // Operation groups operations: operations.Operations; communicationService: operations.CommunicationService; - operationStatuses: operations.OperationStatuses; /** * Initializes a new instance of the CommunicationServiceManagementClient class. @@ -30,7 +29,6 @@ class CommunicationServiceManagementClient extends CommunicationServiceManagemen super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.communicationService = new operations.CommunicationService(this); - this.operationStatuses = new operations.OperationStatuses(this); } } diff --git a/sdk/communication/arm-communication/src/communicationServiceManagementClientContext.ts b/sdk/communication/arm-communication/src/communicationServiceManagementClientContext.ts index ffb1a34ea68c..e5f90ebf154f 100644 --- a/sdk/communication/arm-communication/src/communicationServiceManagementClientContext.ts +++ b/sdk/communication/arm-communication/src/communicationServiceManagementClientContext.ts @@ -36,7 +36,7 @@ export class CommunicationServiceManagementClientContext extends msRestAzure.Azu if (!options) { options = {}; } - if (!options.userAgent) { + if(!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -51,10 +51,10 @@ export class CommunicationServiceManagementClientContext extends msRestAzure.Azu this.credentials = credentials; this.subscriptionId = subscriptionId; - if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/communication/arm-communication/src/models/index.ts b/sdk/communication/arm-communication/src/models/index.ts index ee60ae75365c..d726a4cada21 100644 --- a/sdk/communication/arm-communication/src/models/index.ts +++ b/sdk/communication/arm-communication/src/models/index.ts @@ -68,101 +68,6 @@ export interface LinkedNotificationHub { resourceId?: string; } -/** - * The resource management error additional info. - */ -export interface ErrorAdditionalInfo { - /** - * The additional info type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * The additional info. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly info?: any; -} - -/** - * The error detail. - */ -export interface ErrorDetail { - /** - * 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.** - */ - readonly target?: string; - /** - * The error details. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly details?: ErrorDetail[]; - /** - * The error additional info. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly additionalInfo?: ErrorAdditionalInfo[]; -} - -/** - * Common error response for all Azure Resource Manager APIs to return error details for failed - * operations. (This also follows the OData error response format.). - * @summary Error response - */ -export interface ErrorResponse { - /** - * The error object. - */ - error?: ErrorDetail; -} - -/** - * The current status of an async operation - */ -export interface OperationStatus { - /** - * Fully qualified ID for the operation status. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Provisioning state of the resource. Possible values include: 'Succeeded', 'Failed', - * 'Canceled', 'Creating', 'Deleting', 'Moving' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly status?: Status; - /** - * The start time of the operation - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly startTime?: Date; - /** - * The end time of the operation - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly endTime?: Date; - /** - * Percent of the operation that is complete - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly percentComplete?: number; - /** - * The error object. - */ - error?: ErrorDetail; -} - /** * Metadata pertaining to creation and last modification of the resource. */ @@ -371,6 +276,65 @@ export interface AzureEntityResource extends Resource { readonly etag?: string; } +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + +/** + * The error detail. + */ +export interface ErrorDetail { + /** + * 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.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.). + * @summary Error response + */ +export interface ErrorResponse { + /** + * The error object. + */ + error?: ErrorDetail; +} + /** * Localized display information for this particular operation. */ @@ -541,14 +505,6 @@ export interface CommunicationServiceResourceList extends Array - */ - get(location: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param location The Azure region - * @param operationId The ID of an ongoing async operation - * @param callback The callback - */ - get(location: string, operationId: string, callback: msRest.ServiceCallback): void; - /** - * @param location The Azure region - * @param operationId The ID of an ongoing async operation - * @param options The optional parameters - * @param callback The callback - */ - get(location: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(location: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - location, - operationId, - options - }, - getOperationSpec, - callback) as Promise; - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "providers/Microsoft.Communication/locations/{location}/operationStatuses/{operationId}", - urlParameters: [ - Parameters.location, - Parameters.operationId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -};