diff --git a/sdk/iotcentral/arm-iotcentral/LICENSE.txt b/sdk/iotcentral/arm-iotcentral/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/iotcentral/arm-iotcentral/LICENSE.txt +++ b/sdk/iotcentral/arm-iotcentral/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts b/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts index a3740ec2610b..8efbdbef2c43 100644 --- a/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts +++ b/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts @@ -37,7 +37,7 @@ export class IotCentralClientContext extends msRestAzure.AzureServiceClient { if (!options) { options = {}; } - if (!options.userAgent) { + if(!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -52,10 +52,10 @@ export class IotCentralClientContext extends msRestAzure.AzureServiceClient { 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/iotcentral/arm-iotcentral/src/models/appsMappers.ts b/sdk/iotcentral/arm-iotcentral/src/models/appsMappers.ts index 0ca3c3547cf9..776c85ab7f40 100644 --- a/sdk/iotcentral/arm-iotcentral/src/models/appsMappers.ts +++ b/sdk/iotcentral/arm-iotcentral/src/models/appsMappers.ts @@ -15,8 +15,7 @@ export { AppTemplate, AppTemplatesResult, BaseResource, - ErrorDetails, - ErrorResponseBody, + CloudError, OperationInputs, Resource } from "../models/mappers"; diff --git a/sdk/iotcentral/arm-iotcentral/src/models/index.ts b/sdk/iotcentral/arm-iotcentral/src/models/index.ts index 82e09d21316a..4b766a4a3126 100644 --- a/sdk/iotcentral/arm-iotcentral/src/models/index.ts +++ b/sdk/iotcentral/arm-iotcentral/src/models/index.ts @@ -111,7 +111,7 @@ export interface AppPatch { /** * Details of error response. */ -export interface ErrorResponseBody { +export interface CloudErrorBody { /** * The error code. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -130,32 +130,7 @@ export interface ErrorResponseBody { /** * A list of additional details about the error. */ - details?: ErrorResponseBody[]; -} - -/** - * Error details. - */ -export interface ErrorDetails { - /** - * 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 target of the particular error. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly target?: string; - /** - * A list of additional details about the error. - */ - details?: ErrorResponseBody[]; + details?: CloudErrorBody[]; } /** diff --git a/sdk/iotcentral/arm-iotcentral/src/models/mappers.ts b/sdk/iotcentral/arm-iotcentral/src/models/mappers.ts index 87cb4bb297e5..a663ce14915e 100644 --- a/sdk/iotcentral/arm-iotcentral/src/models/mappers.ts +++ b/sdk/iotcentral/arm-iotcentral/src/models/mappers.ts @@ -97,18 +97,12 @@ export const App: msRest.CompositeMapper = { }, displayName: { serializedName: "properties.displayName", - constraints: { - Pattern: /^.{1,200}$/ - }, type: { name: "String" } }, subdomain: { serializedName: "properties.subdomain", - constraints: { - Pattern: /^[a-z0-9-]{1,63}$/ - }, type: { name: "String" } @@ -157,18 +151,12 @@ export const AppPatch: msRest.CompositeMapper = { }, displayName: { serializedName: "properties.displayName", - constraints: { - Pattern: /^.{1,200}$/ - }, type: { name: "String" } }, subdomain: { serializedName: "properties.subdomain", - constraints: { - Pattern: /^[a-z0-9-]{1,63}$/ - }, type: { name: "String" } @@ -183,11 +171,11 @@ export const AppPatch: msRest.CompositeMapper = { } }; -export const ErrorResponseBody: msRest.CompositeMapper = { - serializedName: "ErrorResponseBody", +export const CloudErrorBody: msRest.CompositeMapper = { + serializedName: "CloudErrorBody", type: { name: "Composite", - className: "ErrorResponseBody", + className: "CloudErrorBody", modelProperties: { code: { readOnly: true, @@ -217,50 +205,7 @@ export const ErrorResponseBody: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ErrorResponseBody" - } - } - } - } - } - } -}; - -export const ErrorDetails: msRest.CompositeMapper = { - serializedName: "ErrorDetails", - type: { - name: "Composite", - className: "ErrorDetails", - modelProperties: { - code: { - readOnly: true, - serializedName: "error.code", - type: { - name: "String" - } - }, - message: { - readOnly: true, - serializedName: "error.message", - type: { - name: "String" - } - }, - target: { - readOnly: true, - serializedName: "error.target", - type: { - name: "String" - } - }, - details: { - serializedName: "error.details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ErrorResponseBody" + className: "CloudErrorBody" } } } @@ -340,9 +285,6 @@ export const OperationInputs: msRest.CompositeMapper = { name: { required: true, serializedName: "name", - constraints: { - Pattern: /^[a-z0-9-]{1,63}$/ - }, type: { name: "String" } diff --git a/sdk/iotcentral/arm-iotcentral/src/models/operationsMappers.ts b/sdk/iotcentral/arm-iotcentral/src/models/operationsMappers.ts index 363b65312aec..689688180be7 100644 --- a/sdk/iotcentral/arm-iotcentral/src/models/operationsMappers.ts +++ b/sdk/iotcentral/arm-iotcentral/src/models/operationsMappers.ts @@ -7,8 +7,7 @@ */ export { - ErrorDetails, - ErrorResponseBody, + CloudError, Operation, OperationDisplay, OperationListResult diff --git a/sdk/iotcentral/arm-iotcentral/src/operations/apps.ts b/sdk/iotcentral/arm-iotcentral/src/operations/apps.ts index 3c7c4d9d028a..285a08a55209 100644 --- a/sdk/iotcentral/arm-iotcentral/src/operations/apps.ts +++ b/sdk/iotcentral/arm-iotcentral/src/operations/apps.ts @@ -415,7 +415,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.App }, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer @@ -438,7 +438,7 @@ const listBySubscriptionOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AppListResult }, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer @@ -462,7 +462,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AppListResult }, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer @@ -492,7 +492,7 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AppAvailabilityInfo }, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer @@ -522,7 +522,7 @@ const checkSubdomainAvailabilityOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AppAvailabilityInfo }, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer @@ -545,7 +545,7 @@ const listTemplatesOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AppTemplatesResult }, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer @@ -581,7 +581,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { }, 202: {}, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer @@ -614,7 +614,7 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { }, 202: {}, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer @@ -639,7 +639,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer @@ -660,7 +660,7 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AppListResult }, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer @@ -681,7 +681,7 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AppListResult }, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer @@ -702,7 +702,7 @@ const listTemplatesNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.AppTemplatesResult }, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer diff --git a/sdk/iotcentral/arm-iotcentral/src/operations/operations.ts b/sdk/iotcentral/arm-iotcentral/src/operations/operations.ts index 1aa32aa10bce..7b892c7a1307 100644 --- a/sdk/iotcentral/arm-iotcentral/src/operations/operations.ts +++ b/sdk/iotcentral/arm-iotcentral/src/operations/operations.ts @@ -95,7 +95,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer @@ -116,7 +116,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.ErrorDetails + bodyMapper: Mappers.CloudError } }, serializer