diff --git a/eng/pipelines/typespec-ci.yml b/eng/pipelines/typespec-ci.yml index bbe7b1245eae..c70128a41647 100644 --- a/eng/pipelines/typespec-ci.yml +++ b/eng/pipelines/typespec-ci.yml @@ -18,6 +18,7 @@ pr: - specification/cognitiveservices - specification/containerservice - specification/servicenetworking + - specification/sphere - specification/translation jobs: @@ -79,6 +80,11 @@ jobs: Folder: specification/servicenetworking/ServiceNetworking.Management DisplayName: Microsoft.ServiceNetworking + - template: templates/steps/typespec-ci.yml + parameters: + Folder: specification/sphere/Sphere.Management + DisplayName: Sphere.Management + - template: templates/steps/typespec-ci.yml parameters: Folder: specification/translation/Azure.AI.TextTranslation diff --git a/specification/sphere/Sphere.Management/cadl-project.yaml b/specification/sphere/Sphere.Management/cadl-project.yaml deleted file mode 100644 index 6999a4d007a4..000000000000 --- a/specification/sphere/Sphere.Management/cadl-project.yaml +++ /dev/null @@ -1,19 +0,0 @@ -emit: [ - "@azure-tools/cadl-autorest", - "@azure-tools/cadl-python", - "@azure-tools/cadl-csharp", -] -options: - "@azure-tools/cadl-python": - "basic-setup-py": true - "package-version": 3.0.0b6 - "package-name": azure-sphere - "@azure-tools/cadl-autorest": - examples-directory: ./examples - output-file: azuresphere.json - azure-resource-provider-folder: ../../../../resource-manager - "@azure-tools/cadl-csharp": - save-inputs: false - clear-output-folder: true - namespace: Azure.Sphere - model-namespace: false \ No newline at end of file diff --git a/specification/sphere/Sphere.Management/catalog.cadl b/specification/sphere/Sphere.Management/catalog.tsp similarity index 77% rename from specification/sphere/Sphere.Management/catalog.cadl rename to specification/sphere/Sphere.Management/catalog.tsp index 03bab20f6218..323df81cda7f 100644 --- a/specification/sphere/Sphere.Management/catalog.cadl +++ b/specification/sphere/Sphere.Management/catalog.tsp @@ -1,12 +1,12 @@ -import "@cadl-lang/rest"; -import "@cadl-lang/versioning"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; -import "@azure-tools/cadl-azure-resource-manager"; - -using Cadl.Http; -using Cadl.Rest; -using Cadl.Versioning; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-autorest"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; @@ -26,7 +26,6 @@ model Catalog is TrackedResource { @doc("Catalog properties") model CatalogProperties { - @visibility("read") @doc("The status of the last operation.") provisioningState?: ProvisioningState; @@ -39,7 +38,6 @@ model ListDeviceGroupsRequest { } @doc("Device insight report.") model DeviceInsight { - @doc("Device ID") deviceId: string; @@ -47,10 +45,10 @@ model DeviceInsight { description: string; @doc("Event start timestamp") - startTimestampUtc: zonedDateTime; - + startTimestampUtc: utcDateTime; + @doc("Event end timestamp") - endTimestampUtc: zonedDateTime; + endTimestampUtc: utcDateTime; @doc("Event category") eventCategory: string; @@ -66,21 +64,24 @@ model DeviceInsight { } @armResourceOperations -interface Catalogs extends Azure.ResourceManager.ResourceOperations { - +interface Catalogs + extends Azure.ResourceManager.TrackedResourceOperations< + Catalog, + CatalogProperties + > { @autoRoute @doc("Counts devices in catalog.") @armResourceAction(Catalog) @post - op countDevices( - ...ResourceInstanceParameters, + countDevices( + ...ResourceInstanceParameters ): ArmResponse | ErrorResponse; @autoRoute @doc("Lists device insights for catalog.") @armResourceAction(Catalog) @post - op listDeviceInsights( + listDeviceInsights( ...ResourceInstanceParameters, ...ListQueryParameters ): ArmResponse> | ErrorResponse; @@ -89,7 +90,7 @@ interface Catalogs extends Azure.ResourceManager.ResourceOperations, ...ListQueryParameters ): ArmResponse> | ErrorResponse; @@ -98,7 +99,7 @@ interface Catalogs extends Azure.ResourceManager.ResourceOperations, ...ListQueryParameters ): ArmResponse> | ErrorResponse; @@ -107,13 +108,12 @@ interface Catalogs extends Azure.ResourceManager.ResourceOperations, ...ListQueryParameters, + @doc("List device groups for catalog.") - @body listDeviceGroupsRequest: ListDeviceGroupsRequest + @body + listDeviceGroupsRequest: ListDeviceGroupsRequest ): ArmResponse> | ErrorResponse; } - - - diff --git a/specification/sphere/Sphere.Management/certificate.cadl b/specification/sphere/Sphere.Management/certificate.tsp similarity index 77% rename from specification/sphere/Sphere.Management/certificate.cadl rename to specification/sphere/Sphere.Management/certificate.tsp index 56b4d485a0d5..062bb548003b 100644 --- a/specification/sphere/Sphere.Management/certificate.cadl +++ b/specification/sphere/Sphere.Management/certificate.tsp @@ -1,12 +1,12 @@ -import "@cadl-lang/rest"; -import "@cadl-lang/versioning"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; -import "@azure-tools/cadl-azure-resource-manager"; - -using Cadl.Http; -using Cadl.Rest; -using Cadl.Versioning; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-autorest"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; @@ -25,24 +25,26 @@ model Certificate is ProxyResource { } @armResourceOperations -interface Certificates extends ProxyResourceOperationsReadList { - +interface Certificates + extends ProxyResourceOperationsReadList { @autoRoute @doc("Retrieves cert chain.") @armResourceAction(Certificate) @post - op retrieveCertChain( - ...ResourceInstanceParameters, + retrieveCertChain( + ...ResourceInstanceParameters ): ArmResponse | ErrorResponse; @autoRoute @armResourceAction(Certificate) @post @doc("Gets the proof of possession nonce.") - op retrieveProofOfPossessionNonce( - ...ResourceInstanceParameters, + retrieveProofOfPossessionNonce( + ...ResourceInstanceParameters, + @doc("Proof of possession nonce request body ") - @body proofOfPossessionNonceRequest: ProofOfPossessionNonceRequest + @body + proofOfPossessionNonceRequest: ProofOfPossessionNonceRequest ): ArmResponse | ErrorResponse; } @@ -66,11 +68,11 @@ model CertificateProperties { @visibility("read") @doc("The certificate expiry date.") - expiryUtc?: zonedDateTime; + expiryUtc?: utcDateTime; @visibility("read") @doc("The certificate not before date.") - notBeforeUtc?: zonedDateTime; + notBeforeUtc?: utcDateTime; @visibility("read") @doc("The status of the last operation.") diff --git a/specification/sphere/Sphere.Management/common.cadl b/specification/sphere/Sphere.Management/common.cadl deleted file mode 100644 index 19c473974c2c..000000000000 --- a/specification/sphere/Sphere.Management/common.cadl +++ /dev/null @@ -1,146 +0,0 @@ -import "@cadl-lang/openapi"; -import "@cadl-lang/rest"; -import "@cadl-lang/versioning"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; -import "@azure-tools/cadl-azure-resource-manager"; - -using Cadl.Http; -using Cadl.Rest; -using Cadl.Versioning; -using Azure.ResourceManager.Foundations; -using Azure.Core; -using Azure.ResourceManager; -using OpenAPI; - -namespace Microsoft.AzureSphere; - -interface Operations extends Azure.ResourceManager.Operations {} - -// Common models -@lroStatus -enum ProvisioningState { - ...ResourceProvisioningState, - Provisioning, - Updating, - Deleting, - Accepted, -} - -@doc("Regional data boundary values.") -enum RegionalDataBoundary { - None, - EU -} - -@doc("Allow crash dumps values.") -enum AllowCrashDumpCollection { - Enabled, - Disabled -} - -@doc("Certificate status values.") -enum CertificateStatus { - Active, - Inactive, - Expired, - Revoked -} - -@doc("Provides the custom '$filter' query parameter for list operations") -model CustomFilterQueryParameter { - @query("$filter") - @doc("Filter the result list using the given expression") - filter?: string; -} - -@doc("Provides the custom '$top' query parameter for list operations.") -model CustomTopQueryParameter { - @query("$top") - @doc("The number of result items to return.") - top?: int32; -} - -@doc("Provides the custom '$skip' query parameter for list operations.") -model CustomSkipQueryParameter { - @query("$skip") - @doc("The number of result items to skip.") - skip?: int32; -} - -@doc("Provides the custom '$maxpagesize' query parameter for list operations.") -model CustomMaxPageSizeQueryParameter { - @query("$maxpagesize") - @doc("The maximum number of result items per page.") - maxpagesize?: int32; -} - -@doc("Provides the most common query parameters for list operations.") -model StandardListQueryParametersWithCorrectNames { - ...CustomTopQueryParameter; - ...CustomSkipQueryParameter; - ...CustomMaxPageSizeQueryParameter; -} - -@doc("Response to the action call for count devices in a catalog.") -model CountDeviceResponse extends CountElementsResponse {} - -@doc("Response of the count for elements.") -model CountElementsResponse { - @doc("Number of children resources in parent resource.") - value: int32; -} - -@doc("Parameters for paginated APIs") -model ListQueryParameters { - ...CustomFilterQueryParameter; - ...StandardListQueryParametersWithCorrectNames; -} - -// Templates -interface ProxyResourceOperationsReadList< - TResource extends ArmResource, - TListParameters extends object = {}> - extends Azure.ResourceManager.ResourceRead, - ResourceListByParent> {} - -interface ProxyResourceOperationsReadListCreateDelete< - TResource extends ArmResource, - TListParameters extends object = {}> - extends Azure.ResourceManager.ResourceRead, - ResourceListByParent>, - ResourceCreate, - Azure.ResourceManager.ResourceDelete{} - -// Custom update operations -@armResourceOperations -interface CustomUpdateOperations{ - @autoRoute - @doc("Update a {name}", TResource) - @extension("x-ms-long-running-operation", true) - @extension( - "x-ms-long-running-operation-options", - { - "final-state-via": "location", - } - ) - @armResourceUpdate(TResource) - @patch - op ArmCustomPatchAsyncWithLocation< - TResource extends ArmResource, - TPatchModel extends object = TagsUpdateModel, - TBaseParameters = BaseParameters - >( - ...ResourceInstanceParameters, - - @doc("The resource properties to be updated.") - @body - properties: TPatchModel - ): ArmResponse | ArmAcceptedResponse<"Resource update request accepted."> | ErrorResponse; -} - -alias CustomArmResourcePatchAsync< - TResource extends ArmResource, - TProperties extends object, - TBaseParameters = BaseParameters -> = CustomUpdateOperations.ArmCustomPatchAsyncWithLocation, TBaseParameters>; \ No newline at end of file diff --git a/specification/sphere/Sphere.Management/common.tsp b/specification/sphere/Sphere.Management/common.tsp new file mode 100644 index 000000000000..f815ed133129 --- /dev/null +++ b/specification/sphere/Sphere.Management/common.tsp @@ -0,0 +1,170 @@ +import "@typespec/openapi"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-autorest"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using OpenAPI; + +namespace Microsoft.AzureSphere; + +interface Operations extends Azure.ResourceManager.Operations {} + +// Common models +/** Provisioning state of the resource. */ +@lroStatus +enum ProvisioningState { + ...ResourceProvisioningState, + /** The resource is being provisioned */ + Provisioning, + /** The resource is being updated */ + Updating, + /** The resource is being deleted */ + Deleting, + /** The resource create request has been accepted */ + Accepted, +} + +@doc("Regional data boundary values.") +enum RegionalDataBoundary { + /** No data boundary */ + None, + /** EU data boundary */ + EU, +} + +@doc("Allow crash dumps values.") +enum AllowCrashDumpCollection { + /** Crash dump collection enabled */ + Enabled, + /** Crash dump collection disabled */ + Disabled, +} + +@doc("Certificate status values.") +enum CertificateStatus { + /** Certificate is active */ + Active, + /** Certificate is inactive */ + Inactive, + /** Certificate has expired */ + Expired, + /** Certificate has been revoked */ + Revoked, +} + +@doc("Provides the custom '$filter' query parameter for list operations") +model CustomFilterQueryParameter { + @query("$filter") + @doc("Filter the result list using the given expression") + filter?: string; +} + +@doc("Provides the custom '$top' query parameter for list operations.") +model CustomTopQueryParameter { + @query("$top") + @doc("The number of result items to return.") + top?: int32; +} + +@doc("Provides the custom '$skip' query parameter for list operations.") +model CustomSkipQueryParameter { + @query("$skip") + @doc("The number of result items to skip.") + skip?: int32; +} + +@doc("Provides the custom '$maxpagesize' query parameter for list operations.") +model CustomMaxPageSizeQueryParameter { + @query("$maxpagesize") + @doc("The maximum number of result items per page.") + maxpagesize?: int32; +} + +// @doc("Provides the most common query parameters for list operations.") +alias StandardListQueryParametersWithCorrectNames = { + ...CustomTopQueryParameter; + ...CustomSkipQueryParameter; + ...CustomMaxPageSizeQueryParameter; +}; + +@doc("Response to the action call for count devices in a catalog.") +model CountDeviceResponse extends CountElementsResponse {} + +@doc("Response of the count for elements.") +model CountElementsResponse { + @doc("Number of children resources in parent resource.") + value: int32; +} + +alias ListQueryParameters = { + ...CustomFilterQueryParameter; + ...StandardListQueryParametersWithCorrectNames; +}; + +// Templates +interface ProxyResourceOperationsReadList< + TResource extends ArmResource, + TListParameters extends {} = {} +> + extends Azure.ResourceManager.ResourceRead, + ResourceListByParent< + TResource, + TListParameters & BaseParameters + > {} + +interface ProxyResourceOperationsReadListCreateDelete< + TResource extends ArmResource, + TListParameters extends {} = {} +> + extends Azure.ResourceManager.ResourceRead, + ResourceListByParent< + TResource, + TListParameters & BaseParameters + >, + ResourceCreate, + Azure.ResourceManager.ResourceDelete {} + +// Custom update operations +@armResourceOperations +interface CustomUpdateOperations { + @autoRoute + @doc("Update a {name}", TResource) + @extension("x-ms-long-running-operation", true) + @extension( + "x-ms-long-running-operation-options", + { + `final-state-via`: "location", + } + ) + @armResourceUpdate(TResource) + @patch + ArmCustomPatchAsyncWithLocation< + TResource extends ArmResource, + TPatchModel extends TagsUpdateModel, + TBaseParameters = BaseParameters + >( + ...ResourceInstanceParameters, + + @doc("The resource properties to be updated.") + @body + properties: TPatchModel + ): ArmResponse | ArmAcceptedResponse<"Resource update request accepted."> | ErrorResponse; +} + +alias CustomArmResourcePatchAsync< + TResource extends ArmResource, + TProperties extends {}, + TBaseParameters = BaseParameters +> = CustomUpdateOperations.ArmCustomPatchAsyncWithLocation< + TResource, + ResourceUpdateModel, + TBaseParameters +>; diff --git a/specification/sphere/Sphere.Management/deployment.cadl b/specification/sphere/Sphere.Management/deployment.cadl deleted file mode 100644 index 8c705a661387..000000000000 --- a/specification/sphere/Sphere.Management/deployment.cadl +++ /dev/null @@ -1,61 +0,0 @@ -import "@cadl-lang/rest"; -import "@cadl-lang/versioning"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; -import "@azure-tools/cadl-azure-resource-manager"; - -using Cadl.Http; -using Cadl.Rest; -using Cadl.Versioning; -using Azure.ResourceManager.Foundations; -using Azure.Core; -using Azure.ResourceManager; - -namespace Microsoft.AzureSphere; - -// Deployment -@doc("An deployment resource belonging to a device group resource.") -@parentResource(DeviceGroup) -model Deployment is ProxyResource { - @doc("Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.") - @key("deploymentName") - @path - @segment("deployments") - name: string; -} - -interface ProxyResourceOperationsDeployments< - TResource extends ArmResource, - TListParameters extends object = {}>{ - @doc("Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - get is ArmResourceRead; - @doc("List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - list is ArmResourceListByParent>; - @doc("Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; - @doc("Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - delete is ArmResourceDeleteAsync; - } - -@armResourceOperations -interface Deployments extends ProxyResourceOperationsDeployments {} - -@doc("The properties of deployment") -model DeploymentProperties { - - @visibility("create", "read") - @doc("Deployment ID") - deploymentId?: string; - - @doc("Images deployed") - @visibility("create", "read") - deployedImages?: Image[]; - - @doc("Deployment date UTC") - @visibility("read") - deploymentDateUtc?: zonedDateTime; - - @visibility("read") - @doc("The status of the last operation.") - provisioningState?: ProvisioningState; -} \ No newline at end of file diff --git a/specification/sphere/Sphere.Management/deployment.tsp b/specification/sphere/Sphere.Management/deployment.tsp new file mode 100644 index 000000000000..c3384f59a98f --- /dev/null +++ b/specification/sphere/Sphere.Management/deployment.tsp @@ -0,0 +1,64 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-autorest"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; + +namespace Microsoft.AzureSphere; + +// Deployment +@doc("An deployment resource belonging to a device group resource.") +@parentResource(DeviceGroup) +model Deployment is ProxyResource { + @doc("Deployment name. Use .default for deployment creation and to get the current deployment for the associated device group.") + @key("deploymentName") + @path + @segment("deployments") + name: string; +} + +interface ProxyResourceOperationsDeployments< + TResource extends ArmResource, + TListParameters extends {} = {} +> { + @doc("Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + get is ArmResourceRead; + @doc("List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + list is ArmResourceListByParent< + TResource, + ListQueryParameters & BaseParameters + >; + @doc("Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + delete is ArmResourceDeleteAsync; +} + +@armResourceOperations +interface Deployments extends ProxyResourceOperationsDeployments {} + +@doc("The properties of deployment") +model DeploymentProperties { + @visibility("create", "read") + @doc("Deployment ID") + deploymentId?: string; + + @doc("Images deployed") + @visibility("create", "read") + deployedImages?: Image[]; + + @doc("Deployment date UTC") + @visibility("read") + deploymentDateUtc?: utcDateTime; + + @visibility("read") + @doc("The status of the last operation.") + provisioningState?: ProvisioningState; +} diff --git a/specification/sphere/Sphere.Management/device.cadl b/specification/sphere/Sphere.Management/device.tsp similarity index 58% rename from specification/sphere/Sphere.Management/device.cadl rename to specification/sphere/Sphere.Management/device.tsp index 2e31dc2475df..89536c47e1b1 100644 --- a/specification/sphere/Sphere.Management/device.cadl +++ b/specification/sphere/Sphere.Management/device.tsp @@ -1,13 +1,13 @@ -import "@cadl-lang/rest"; -import "@cadl-lang/openapi"; -import "@cadl-lang/versioning"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; -import "@azure-tools/cadl-azure-resource-manager"; - -using Cadl.Http; -using Cadl.Rest; -using Cadl.Versioning; +import "@typespec/rest"; +import "@typespec/openapi"; +import "@typespec/versioning"; +import "@azure-tools/typespec-autorest"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; @@ -28,21 +28,25 @@ model Device is ProxyResource { } interface ProxyResourceOperationsDevice< - TResource extends ArmResource, - TListParameters extends object = {}>{ - @doc("Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.") - get is ArmResourceRead; - @doc("Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; - @doc("List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - list is ArmResourceListByParent>; - delete is ArmResourceDeleteAsync; - @doc("Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.") - update is CustomArmResourcePatchAsync; - } + TResource extends ArmResource, + TListParameters extends {} = {} +> { + @doc("Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.") + get is ArmResourceRead; + @doc("Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + list is ArmResourceListByParent< + TResource, + TListParameters & BaseParameters + >; + delete is ArmResourceDeleteAsync; + @doc("Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.") + update is CustomArmResourcePatchAsync; +} @armResourceOperations -interface Devices extends ProxyResourceOperationsDevice{ +interface Devices extends ProxyResourceOperationsDevice { @autoRoute @armResourceAction(Device) @post @@ -51,19 +55,20 @@ interface Devices extends ProxyResourceOperationsDevice{ @extension( "x-ms-long-running-operation-options", { - "final-state-via": "location", + `final-state-via`: "location", } ) - op generateCapabilityImage( - ...ResourceInstanceParameters, + generateCapabilityImage( + ...ResourceInstanceParameters, + @doc("Generate capability image request body.") - @body generateDeviceCapabilityRequest: GenerateCapabilityImageRequest + @body + generateDeviceCapabilityRequest: GenerateCapabilityImageRequest ): ArmResponse | ArmAcceptedResponse | ErrorResponse; } @doc("The properties of device") model DeviceProperties { - @doc("Device ID") @visibility("create", "read") deviceId?: string; @@ -82,11 +87,11 @@ model DeviceProperties { @doc("Time when update requested and new OS version available") @visibility("read") - lastOsUpdateUtc?: zonedDateTime; + lastOsUpdateUtc?: utcDateTime; @doc("Time when update was last requested") @visibility("read") - lastUpdateRequestUtc?: zonedDateTime; + lastUpdateRequestUtc?: utcDateTime; @visibility("read") @doc("The status of the last operation.") @@ -109,12 +114,14 @@ model SignedCapabilityImageResponse { @doc("Capability image type") enum CapabilityType { + /** Application development capability */ ApplicationDevelopment, - FieldServicing + /** Field servicing capability */ + FieldServicing, } @doc("The properties of device patch") model DevicePatchProperties { @doc("Device group id") deviceGroupId: string; -} \ No newline at end of file +} diff --git a/specification/sphere/Sphere.Management/deviceGroup.cadl b/specification/sphere/Sphere.Management/deviceGroup.tsp similarity index 54% rename from specification/sphere/Sphere.Management/deviceGroup.cadl rename to specification/sphere/Sphere.Management/deviceGroup.tsp index 992c932344ed..681d8089125e 100644 --- a/specification/sphere/Sphere.Management/deviceGroup.cadl +++ b/specification/sphere/Sphere.Management/deviceGroup.tsp @@ -1,13 +1,13 @@ -import "@cadl-lang/rest"; -import "@cadl-lang/openapi"; -import "@cadl-lang/versioning"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; -import "@azure-tools/cadl-azure-resource-manager"; - -using Cadl.Http; -using Cadl.Rest; -using Cadl.Versioning; +import "@typespec/rest"; +import "@typespec/openapi"; +import "@typespec/versioning"; +import "@azure-tools/typespec-autorest"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; @@ -27,28 +27,36 @@ model DeviceGroup is ProxyResource { } interface ProxyResourceOperationsDeviceGroups< - TResource extends ArmResource, - TListParameters extends object = {}>{ - @doc("List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - list is ArmResourceListByParent>; - @doc("Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - get is ArmResourceRead; - @doc("Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; - @doc("Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - delete is ArmResourceDeleteAsync; - @doc("Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - update is ArmResourcePatchAsync; - } + TResource extends ArmResource, + TListParameters extends {} = {} +> { + @doc("List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + list is ArmResourceListByParent< + TResource, + TListParameters & BaseParameters + >; + @doc("Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + get is ArmResourceRead; + @doc("Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + delete is ArmResourceDeleteAsync; + @doc("Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") + update is ArmResourcePatchAsync; +} @armResourceOperations -interface DeviceGroups extends ProxyResourceOperationsDeviceGroups { +interface DeviceGroups + extends ProxyResourceOperationsDeviceGroups< + DeviceGroup, + ListQueryParameters + > { @autoRoute @doc("Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") @armResourceAction(DeviceGroup) @post - op countDevices( - ...ResourceInstanceParameters, + countDevices( + ...ResourceInstanceParameters ): ArmResponse | ErrorResponse; @autoRoute @@ -56,16 +64,18 @@ interface DeviceGroups extends ProxyResourceOperationsDeviceGroups, + claimDevices( + ...ResourceInstanceParameters, + @doc("Bulk claim devices request body.") - @body claimDevicesRequest: ClaimDevicesRequest + @body + claimDevicesRequest: ClaimDevicesRequest ): ArmAcceptedResponse | ErrorResponse; } @@ -82,7 +92,7 @@ model DeviceGroupProperties { @doc("Flag to define if the user allows for crash dump collection.") allowCrashDumpsCollection?: AllowCrashDumpCollection; - + @doc("Regional data boundary for the device group.") regionalDataBoundary?: RegionalDataBoundary; @@ -97,14 +107,18 @@ model DeviceGroupProperties { @doc("OS feed type values.") enum OSFeedType { + /** Retail OS feed type. */ Retail, - RetailEval + /** Retail evaluation OS feed type. */ + RetailEval, } @doc("Update policy values.") enum UpdatePolicy { + /** Update all policy. */ UpdateAll, - No3rdPartyAppUpdates + /** No update for 3rd party app policy. */ + No3rdPartyAppUpdates, } // Device group models @@ -112,5 +126,5 @@ enum UpdatePolicy { @doc("Request to the action call to bulk claim devices.") model ClaimDevicesRequest { @doc("Device identifiers of the devices to be claimed.") - deviceIdentifiers: string[] + deviceIdentifiers: string[]; } diff --git a/specification/sphere/Sphere.Management/image.cadl b/specification/sphere/Sphere.Management/image.tsp similarity index 57% rename from specification/sphere/Sphere.Management/image.cadl rename to specification/sphere/Sphere.Management/image.tsp index f621c0745e90..e81af9ef1001 100644 --- a/specification/sphere/Sphere.Management/image.cadl +++ b/specification/sphere/Sphere.Management/image.tsp @@ -1,13 +1,12 @@ -import "@cadl-lang/rest"; -import "@cadl-lang/versioning"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; -import "@azure-tools/cadl-azure-resource-manager"; - - -using Cadl.Http; -using Cadl.Rest; -using Cadl.Versioning; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-autorest"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; @@ -26,22 +25,25 @@ model Image is ProxyResource { } @armResourceOperations -interface Images extends ProxyResourceOperationsReadListCreateDelete {} +interface Images + extends ProxyResourceOperationsReadListCreateDelete< + Image, + ListQueryParameters + > {} @doc("The properties of image") model ImageProperties { - @doc("Image as a UTF-8 encoded base 64 string on image create. This field contains the image URI on image reads.") @visibility("create", "read") - image?: string, + image?: string; @doc("Image ID") @visibility("create", "read") - imageId?: string, + imageId?: string; @doc("Image name") @visibility("read") - imageName?: string, + imageName?: string; @doc("Regional data boundary for an image") @visibility("create", "read") @@ -71,33 +73,57 @@ model ImageProperties { @doc("Image upload request body.") model ImageUploadRequestBody { @doc(".") - images: string + images: string; } @doc("Image type values.") enum ImageType { + /** Invalid image. */ InvalidImageType, + /** One Bl image type */ OneBl, + /** Pluton image type */ PlutonRuntime, + /** Wifi firmware image type */ WifiFirmware, + /** Security monitor image type */ SecurityMonitor, + /** Normal world loader image type */ NormalWorldLoader, + /** Normal world dtb image type */ NormalWorldDtb, + /** Normal world kernel image type */ NormalWorldKernel, + /** Root FS image type */ RootFs, + /** Services image type */ Services, + /** Applications image type */ Applications, + /** FW config image type */ FwConfig, + /** Boot manifest image type */ BootManifest, + /** Nwfs image type */ Nwfs, + /** Trusted key store image type */ TrustedKeystore, + /** Policy image type */ Policy, + /** Customer board config image type */ CustomerBoardConfig, + /** Update certificate store image type */ UpdateCertStore, + /** Base system update manifest image type */ BaseSystemUpdateManifest, + /** Firmware update manifest image type */ FirmwareUpdateManifest, + /** Customer update manifest image type */ CustomerUpdateManifest, + /** Recovery manifest image type */ RecoveryManifest, + /** manifest set image type */ ManifestSet, - Other -} \ No newline at end of file + /** Other image type */ + Other, +} diff --git a/specification/sphere/Sphere.Management/main.cadl b/specification/sphere/Sphere.Management/main.cadl deleted file mode 100644 index f344197026e0..000000000000 --- a/specification/sphere/Sphere.Management/main.cadl +++ /dev/null @@ -1,32 +0,0 @@ -import "./common.cadl"; -import "./catalog.cadl"; -import "./image.cadl"; -import "./deviceGroup.cadl"; -import "./certificate.cadl"; -import "./deployment.cadl"; -import "./device.cadl"; -import "./deviceGroup.cadl"; -import "./product.cadl"; -import "@cadl-lang/rest"; -import "@cadl-lang/versioning"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; -import "@azure-tools/cadl-azure-resource-manager"; - -using Cadl.Http; -using Cadl.Rest; -using Cadl.Versioning; -using Azure.ResourceManager.Foundations; -using Azure.Core; -using Azure.ResourceManager; - -@versionedDependency(Azure.Core.Versions.v1_0_Preview_1) - -@armProviderNamespace -@service({ - title: "AzureSphereProviderClient", - version: "2022-09-01-preview", -}) -@doc("Azure Sphere resource management API.") -@versionedDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) -namespace Microsoft.AzureSphere; \ No newline at end of file diff --git a/specification/sphere/Sphere.Management/main.tsp b/specification/sphere/Sphere.Management/main.tsp new file mode 100644 index 000000000000..01f4e3479ca9 --- /dev/null +++ b/specification/sphere/Sphere.Management/main.tsp @@ -0,0 +1,31 @@ +import "./common.tsp"; +import "./catalog.tsp"; +import "./image.tsp"; +import "./deviceGroup.tsp"; +import "./certificate.tsp"; +import "./deployment.tsp"; +import "./device.tsp"; +import "./deviceGroup.tsp"; +import "./product.tsp"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-autorest"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; + +@armProviderNamespace +@service({ + title: "AzureSphereProviderClient", + version: "2022-09-01-preview", +}) +@doc("Azure Sphere resource management API.") +@useDependency(Azure.Core.Versions.v1_0_Preview_1) +@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) +namespace Microsoft.AzureSphere; diff --git a/specification/sphere/Sphere.Management/package.json b/specification/sphere/Sphere.Management/package.json deleted file mode 100644 index 79da4d20c0ea..000000000000 --- a/specification/sphere/Sphere.Management/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "azure-rest-api-specs-tests", - "private": true, - "author": { - "name": "Microsoft Corporation", - "email": "azsdkteam@microsoft.com", - "url": "https://github.com/azure/azure-rest-api-specs" - }, - "version": "0.1.0", - "description": "Tests for Azure REST API Specifications", - "license": "MIT", - "homepage": "https://github.com/azure/azure-rest-api-specs", - "repository": { - "type": "git", - "url": "git@github.com:azure/azure-rest-api-specs.git" - }, - "bugs": { - "url": "http://github.com/azure/azure-rest-api-specs/issues" - }, - "scripts": { - "postinstall": "tsc", - "test": "tsc && mocha -t 500000 --reporter min", - "prettier-check": "ts-node ./scripts/prettier-check.ts", - "prettier-fix": "prettier --write specification/**/*.json", - "prettier": "prettier", - "tsc": "tsc", - "multiapi": "ts-node ./scripts/multiapi.ts" - }, - "dependencies": { - "@azure-tools/cadl-autorest": "^0.25.0", - "@azure-tools/cadl-azure-core": "^0.25.0", - "@azure-tools/cadl-azure-resource-manager": "^0.25.0", - "@azure-tools/cadl-providerhub": "^0.25.0", - "@cadl-lang/openapi3": "^0.39.0", - "@cadl-lang/rest": "^0.39.0" - } -} diff --git a/specification/sphere/Sphere.Management/product.cadl b/specification/sphere/Sphere.Management/product.tsp similarity index 50% rename from specification/sphere/Sphere.Management/product.cadl rename to specification/sphere/Sphere.Management/product.tsp index f24b613e6c56..8e3035ace295 100644 --- a/specification/sphere/Sphere.Management/product.cadl +++ b/specification/sphere/Sphere.Management/product.tsp @@ -1,12 +1,12 @@ -import "@cadl-lang/rest"; -import "@cadl-lang/versioning"; -import "@azure-tools/cadl-autorest"; -import "@azure-tools/cadl-azure-core"; -import "@azure-tools/cadl-azure-resource-manager"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-autorest"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; -using Cadl.Http; -using Cadl.Rest; -using Cadl.Versioning; +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; using Azure.ResourceManager.Foundations; using Azure.Core; using Azure.ResourceManager; @@ -26,36 +26,39 @@ model Product is ProxyResource { } interface ProxyResourceOperationsProducts< - TResource extends ArmResource, - TListParameters extends object = {}> - extends ResourceListByParent>{ - @doc("Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - get is ArmResourceRead; - @doc("Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; - @doc("Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'") - delete is ArmResourceDeleteAsync; - @doc("Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - update is ArmResourcePatchAsync; - } + TResource extends ArmResource, + TListParameters extends {} = {} +> + extends ResourceListByParent< + TResource, + TListParameters & BaseParameters + > { + @doc("Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + get is ArmResourceRead; + @doc("Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'") + delete is ArmResourceDeleteAsync; + @doc("Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") + update is ArmResourcePatchAsync; +} @armResourceOperations interface Products extends ProxyResourceOperationsProducts { - @autoRoute @doc("Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") @armResourceAction(Product) @post - op generateDefaultDeviceGroups( - ...ResourceInstanceParameters, + generateDefaultDeviceGroups( + ...ResourceInstanceParameters ): ArmResponse> | ErrorResponse; @autoRoute @doc("Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") @armResourceAction(Product) @post - op countDevices( - ...ResourceInstanceParameters, + countDevices( + ...ResourceInstanceParameters ): ArmResponse | ErrorResponse; } @@ -67,4 +70,4 @@ model ProductProperties { @visibility("read") @doc("The status of the last operation.") provisioningState?: ProvisioningState; -} \ No newline at end of file +} diff --git a/specification/sphere/Sphere.Management/tspconfig.yaml b/specification/sphere/Sphere.Management/tspconfig.yaml new file mode 100644 index 000000000000..dc225dbf530f --- /dev/null +++ b/specification/sphere/Sphere.Management/tspconfig.yaml @@ -0,0 +1,17 @@ +emit: + - '@azure-tools/typespec-autorest' +options: + '@azure-tools/typespec-autorest': + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/azuresphere.json" + examples-directory: "{project-root}/examples" + "@azure-tools/cadl-python": + "basic-setup-py": true + "package-version": 3.0.0b6 + "package-name": azure-sphere + "@azure-tools/cadl-csharp": + save-inputs: false + clear-output-folder: true + namespace: Azure.Sphere + model-namespace: false \ No newline at end of file diff --git a/specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json b/specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json index eacd313b26ef..aa20184550d6 100644 --- a/specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json +++ b/specification/sphere/resource-manager/Microsoft.AzureSphere/preview/2022-09-01-preview/azuresphere.json @@ -4,9 +4,9 @@ "title": "AzureSphereProviderClient", "version": "2022-09-01-preview", "description": "Azure Sphere resource management API.", - "x-cadl-generated": [ + "x-typespec-generated": [ { - "emitter": "@azure-tools/cadl-autorest" + "emitter": "@azure-tools/typespec-autorest" } ] }, @@ -204,8 +204,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" } ], "responses": { @@ -249,8 +249,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "resource", @@ -320,8 +320,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "properties", @@ -374,8 +374,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" } ], "responses": { @@ -389,6 +389,10 @@ "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": "integer", "format": "int32" + }, + "Location": { + "description": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": "string" } } }, @@ -408,7 +412,7 @@ } }, "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "final-state-via": "location" }, "x-ms-long-running-operation": true } @@ -447,8 +451,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" } ], "responses": { @@ -497,8 +501,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "serialNumber", @@ -551,8 +555,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "serialNumber", @@ -605,8 +609,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "serialNumber", @@ -668,8 +672,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" } ], "responses": { @@ -727,8 +731,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" } ], "responses": { @@ -777,8 +781,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "imageName", @@ -829,8 +833,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "imageName", @@ -907,8 +911,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "imageName", @@ -929,6 +933,10 @@ "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": "integer", "format": "int32" + }, + "Location": { + "description": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": "string" } } }, @@ -948,7 +956,7 @@ } }, "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "final-state-via": "location" }, "x-ms-long-running-operation": true } @@ -975,8 +983,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "$ref": "#/parameters/CustomFilterQueryParameter" @@ -1037,8 +1045,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "$ref": "#/parameters/CustomFilterQueryParameter" @@ -1108,8 +1116,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "$ref": "#/parameters/CustomFilterQueryParameter" @@ -1170,8 +1178,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "$ref": "#/parameters/CustomFilterQueryParameter" @@ -1232,8 +1240,8 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" } ], "responses": { @@ -1282,16 +1290,16 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" } ], "responses": { @@ -1335,16 +1343,16 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "resource", @@ -1414,16 +1422,16 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" } ], "responses": { @@ -1437,6 +1445,10 @@ "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": "integer", "format": "int32" + }, + "Location": { + "description": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": "string" } } }, @@ -1456,7 +1468,7 @@ } }, "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "final-state-via": "location" }, "x-ms-long-running-operation": true }, @@ -1481,16 +1493,16 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "properties", @@ -1516,6 +1528,10 @@ "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": "integer", "format": "int32" + }, + "Location": { + "description": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": "string" } } }, @@ -1532,7 +1548,7 @@ } }, "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "final-state-via": "location" }, "x-ms-long-running-operation": true } @@ -1559,16 +1575,16 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" } ], "responses": { @@ -1626,16 +1642,16 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" } ], "responses": { @@ -1684,24 +1700,24 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" } ], "responses": { @@ -1745,24 +1761,24 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" }, { "name": "resource", @@ -1832,24 +1848,24 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" } ], "responses": { @@ -1863,6 +1879,10 @@ "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": "integer", "format": "int32" + }, + "Location": { + "description": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": "string" } } }, @@ -1882,7 +1902,7 @@ } }, "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "final-state-via": "location" }, "x-ms-long-running-operation": true }, @@ -1907,24 +1927,24 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" }, { "name": "properties", @@ -1950,6 +1970,10 @@ "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": "integer", "format": "int32" + }, + "Location": { + "description": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": "string" } } }, @@ -1966,7 +1990,7 @@ } }, "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "final-state-via": "location" }, "x-ms-long-running-operation": true } @@ -1993,24 +2017,24 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" }, { "name": "claimDevicesRequest", @@ -2073,24 +2097,24 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" } ], "responses": { @@ -2148,24 +2172,24 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" } ], "responses": { @@ -2214,24 +2238,24 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" }, { "name": "deploymentName", @@ -2282,24 +2306,24 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" }, { "name": "deploymentName", @@ -2376,24 +2400,24 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" }, { "name": "deploymentName", @@ -2414,6 +2438,10 @@ "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": "integer", "format": "int32" + }, + "Location": { + "description": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": "string" } } }, @@ -2433,7 +2461,7 @@ } }, "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "final-state-via": "location" }, "x-ms-long-running-operation": true } @@ -2460,24 +2488,24 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" } ], "responses": { @@ -2526,32 +2554,32 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceName", "in": "path", "required": true, "description": "Device name", - "pattern": "^[a-zA-Z0-9-]{128}$", - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9-]{128}$" } ], "responses": { @@ -2595,32 +2623,32 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceName", "in": "path", "required": true, "description": "Device name", - "pattern": "^[a-zA-Z0-9-]{128}$", - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9-]{128}$" }, { "name": "resource", @@ -2690,32 +2718,32 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceName", "in": "path", "required": true, "description": "Device name", - "pattern": "^[a-zA-Z0-9-]{128}$", - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9-]{128}$" } ], "responses": { @@ -2729,6 +2757,10 @@ "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": "integer", "format": "int32" + }, + "Location": { + "description": "The Location header contains the URL where the status of the long running operation can be checked.", + "type": "string" } } }, @@ -2748,7 +2780,7 @@ } }, "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "final-state-via": "location" }, "x-ms-long-running-operation": true }, @@ -2773,32 +2805,32 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceName", "in": "path", "required": true, "description": "Device name", - "pattern": "^[a-zA-Z0-9-]{128}$", - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9-]{128}$" }, { "name": "properties", @@ -2867,32 +2899,32 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceGroupName", "in": "path", "required": true, "description": "Name of device group.", - "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9]{1,2}$|^[A-Za-z0-9][A-Za-z0-9\\s]{1,48}[A-Za-z0-9]$|^\\.default$|^\\.unassigned$" }, { "name": "deviceName", "in": "path", "required": true, "description": "Device name", - "pattern": "^[a-zA-Z0-9-]{128}$", - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z0-9-]{128}$" }, { "name": "generateDeviceCapabilityRequest", @@ -2961,16 +2993,16 @@ "in": "path", "required": true, "description": "Name of catalog", - "pattern": "^[A-Za-z0-9_-]{1,50}$", - "type": "string" + "type": "string", + "pattern": "^[A-Za-z0-9_-]{1,50}$" }, { "name": "productName", "in": "path", "required": true, "description": "Name of product.", - "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$", - "type": "string" + "type": "string", + "pattern": "^[\\w][\\w\\s]{1,48}[\\w]$|^\\.default$|^\\.unassigned$" } ], "responses": { @@ -3008,7 +3040,19 @@ ], "x-ms-enum": { "name": "AllowCrashDumpCollection", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "Crash dump collection enabled" + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "Crash dump collection disabled" + } + ] } }, "CapabilityType": { @@ -3020,7 +3064,19 @@ ], "x-ms-enum": { "name": "CapabilityType", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "name": "ApplicationDevelopment", + "value": "ApplicationDevelopment", + "description": "Application development capability" + }, + { + "name": "FieldServicing", + "value": "FieldServicing", + "description": "Field servicing capability" + } + ] } }, "Catalog": { @@ -3051,14 +3107,14 @@ "items": { "$ref": "#/definitions/Catalog" }, - "x-cadl-name": "Catalog[]", - "description": "The Catalog items on this page" + "description": "The Catalog items on this page", + "x-typespec-name": "Catalog[]" }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items", - "x-cadl-name": "Rest.ResourceLocation" + "x-typespec-name": "TypeSpec.Rest.ResourceLocation" } }, "description": "The response of a Catalog list operation.", @@ -3085,8 +3141,8 @@ "additionalProperties": { "type": "string" }, - "x-cadl-name": "Record", - "description": "Resource tags." + "description": "Resource tags.", + "x-typespec-name": "Record" } }, "description": "The type used for update operations of the Catalog." @@ -3130,14 +3186,14 @@ "items": { "$ref": "#/definitions/Certificate" }, - "x-cadl-name": "Certificate[]", - "description": "The Certificate items on this page" + "description": "The Certificate items on this page", + "x-typespec-name": "Certificate[]" }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items", - "x-cadl-name": "Rest.ResourceLocation" + "x-typespec-name": "TypeSpec.Rest.ResourceLocation" } }, "description": "The response of a Certificate list operation.", @@ -3199,7 +3255,29 @@ ], "x-ms-enum": { "name": "CertificateStatus", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "name": "Active", + "value": "Active", + "description": "Certificate is active" + }, + { + "name": "Inactive", + "value": "Inactive", + "description": "Certificate is inactive" + }, + { + "name": "Expired", + "value": "Expired", + "description": "Certificate has expired" + }, + { + "name": "Revoked", + "value": "Revoked", + "description": "Certificate has been revoked" + } + ] } }, "ClaimDevicesRequest": { @@ -3210,8 +3288,8 @@ "items": { "type": "string" }, - "x-cadl-name": "string[]", - "description": "Device identifiers of the devices to be claimed." + "description": "Device identifiers of the devices to be claimed.", + "x-typespec-name": "string[]" } }, "description": "Request to the action call to bulk claim devices.", @@ -3243,26 +3321,6 @@ "value" ] }, - "CustomFilterQueryParameter": { - "type": "object", - "properties": {}, - "description": "Provides the custom '$filter' query parameter for list operations" - }, - "CustomMaxPageSizeQueryParameter": { - "type": "object", - "properties": {}, - "description": "Provides the custom '$maxpagesize' query parameter for list operations." - }, - "CustomSkipQueryParameter": { - "type": "object", - "properties": {}, - "description": "Provides the custom '$skip' query parameter for list operations." - }, - "CustomTopQueryParameter": { - "type": "object", - "properties": {}, - "description": "Provides the custom '$top' query parameter for list operations." - }, "Deployment": { "type": "object", "properties": { @@ -3291,14 +3349,14 @@ "items": { "$ref": "#/definitions/Deployment" }, - "x-cadl-name": "Deployment[]", - "description": "The Deployment items on this page" + "description": "The Deployment items on this page", + "x-typespec-name": "Deployment[]" }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items", - "x-cadl-name": "Rest.ResourceLocation" + "x-typespec-name": "TypeSpec.Rest.ResourceLocation" } }, "description": "The response of a Deployment list operation.", @@ -3322,8 +3380,8 @@ "items": { "$ref": "#/definitions/Image" }, - "x-cadl-name": "Image[]", "description": "Images deployed", + "x-typespec-name": "Image[]", "x-ms-mutability": [ "read", "create" @@ -3391,14 +3449,14 @@ "items": { "$ref": "#/definitions/DeviceGroup" }, - "x-cadl-name": "DeviceGroup[]", - "description": "The DeviceGroup items on this page" + "description": "The DeviceGroup items on this page", + "x-typespec-name": "DeviceGroup[]" }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items", - "x-cadl-name": "Rest.ResourceLocation" + "x-typespec-name": "TypeSpec.Rest.ResourceLocation" } }, "description": "The response of a DeviceGroup list operation.", @@ -3537,14 +3595,14 @@ "items": { "$ref": "#/definitions/Device" }, - "x-cadl-name": "Device[]", - "description": "The Device items on this page" + "description": "The Device items on this page", + "x-typespec-name": "Device[]" }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items", - "x-cadl-name": "Rest.ResourceLocation" + "x-typespec-name": "TypeSpec.Rest.ResourceLocation" } }, "description": "The response of a Device list operation.", @@ -3639,8 +3697,8 @@ "items": { "$ref": "#/definitions/CapabilityType" }, - "x-cadl-name": "CapabilityType[]", - "description": "List of capabilities to create" + "description": "List of capabilities to create", + "x-typespec-name": "CapabilityType[]" } }, "description": "Request of the action to create a signed device capability image", @@ -3676,14 +3734,14 @@ "items": { "$ref": "#/definitions/Image" }, - "x-cadl-name": "Image[]", - "description": "The Image items on this page" + "description": "The Image items on this page", + "x-typespec-name": "Image[]" }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items", - "x-cadl-name": "Rest.ResourceLocation" + "x-typespec-name": "TypeSpec.Rest.ResourceLocation" } }, "description": "The response of a Image list operation.", @@ -3782,7 +3840,129 @@ ], "x-ms-enum": { "name": "ImageType", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "name": "InvalidImageType", + "value": "InvalidImageType", + "description": "Invalid image." + }, + { + "name": "OneBl", + "value": "OneBl", + "description": "One Bl image type" + }, + { + "name": "PlutonRuntime", + "value": "PlutonRuntime", + "description": "Pluton image type" + }, + { + "name": "WifiFirmware", + "value": "WifiFirmware", + "description": "Wifi firmware image type" + }, + { + "name": "SecurityMonitor", + "value": "SecurityMonitor", + "description": "Security monitor image type" + }, + { + "name": "NormalWorldLoader", + "value": "NormalWorldLoader", + "description": "Normal world loader image type" + }, + { + "name": "NormalWorldDtb", + "value": "NormalWorldDtb", + "description": "Normal world dtb image type" + }, + { + "name": "NormalWorldKernel", + "value": "NormalWorldKernel", + "description": "Normal world kernel image type" + }, + { + "name": "RootFs", + "value": "RootFs", + "description": "Root FS image type" + }, + { + "name": "Services", + "value": "Services", + "description": "Services image type" + }, + { + "name": "Applications", + "value": "Applications", + "description": "Applications image type" + }, + { + "name": "FwConfig", + "value": "FwConfig", + "description": "FW config image type" + }, + { + "name": "BootManifest", + "value": "BootManifest", + "description": "Boot manifest image type" + }, + { + "name": "Nwfs", + "value": "Nwfs", + "description": "Nwfs image type" + }, + { + "name": "TrustedKeystore", + "value": "TrustedKeystore", + "description": "Trusted key store image type" + }, + { + "name": "Policy", + "value": "Policy", + "description": "Policy image type" + }, + { + "name": "CustomerBoardConfig", + "value": "CustomerBoardConfig", + "description": "Customer board config image type" + }, + { + "name": "UpdateCertStore", + "value": "UpdateCertStore", + "description": "Update certificate store image type" + }, + { + "name": "BaseSystemUpdateManifest", + "value": "BaseSystemUpdateManifest", + "description": "Base system update manifest image type" + }, + { + "name": "FirmwareUpdateManifest", + "value": "FirmwareUpdateManifest", + "description": "Firmware update manifest image type" + }, + { + "name": "CustomerUpdateManifest", + "value": "CustomerUpdateManifest", + "description": "Customer update manifest image type" + }, + { + "name": "RecoveryManifest", + "value": "RecoveryManifest", + "description": "Recovery manifest image type" + }, + { + "name": "ManifestSet", + "value": "ManifestSet", + "description": "manifest set image type" + }, + { + "name": "Other", + "value": "Other", + "description": "Other image type" + } + ] } }, "ImageUploadRequestBody": { @@ -3808,11 +3988,6 @@ }, "description": "Request of the action to list device groups for a catalog." }, - "ListQueryParameters": { - "type": "object", - "properties": {}, - "description": "Parameters for paginated APIs" - }, "OSFeedType": { "type": "string", "description": "OS feed type values.", @@ -3822,7 +3997,19 @@ ], "x-ms-enum": { "name": "OSFeedType", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "name": "Retail", + "value": "Retail", + "description": "Retail OS feed type." + }, + { + "name": "RetailEval", + "value": "RetailEval", + "description": "Retail evaluation OS feed type." + } + ] } }, "PagedDeviceInsight": { @@ -3834,14 +4021,14 @@ "$ref": "#/definitions/DeviceInsight" }, "x-ms-identifiers": [], - "x-cadl-name": "DeviceInsight[]", - "description": "The DeviceInsight items on this page" + "description": "The DeviceInsight items on this page", + "x-typespec-name": "DeviceInsight[]" }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items", - "x-cadl-name": "Rest.ResourceLocation" + "x-typespec-name": "TypeSpec.Rest.ResourceLocation" } }, "description": "Paged collection of DeviceInsight items", @@ -3877,14 +4064,14 @@ "items": { "$ref": "#/definitions/Product" }, - "x-cadl-name": "Product[]", - "description": "The Product items on this page" + "description": "The Product items on this page", + "x-typespec-name": "Product[]" }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items", - "x-cadl-name": "Rest.ResourceLocation" + "x-typespec-name": "TypeSpec.Rest.ResourceLocation" } }, "description": "The response of a Product list operation.", @@ -3955,6 +4142,7 @@ }, "ProvisioningState": { "type": "string", + "description": "Provisioning state of the resource.", "enum": [ "Succeeded", "Failed", @@ -3966,7 +4154,44 @@ ], "x-ms-enum": { "name": "ProvisioningState", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was canceled." + }, + { + "name": "Provisioning", + "value": "Provisioning", + "description": "The resource is being provisioned" + }, + { + "name": "Updating", + "value": "Updating", + "description": "The resource is being updated" + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "The resource is being deleted" + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "The resource create request has been accepted" + } + ] } }, "RegionalDataBoundary": { @@ -3978,7 +4203,19 @@ ], "x-ms-enum": { "name": "RegionalDataBoundary", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "name": "None", + "value": "None", + "description": "No data boundary" + }, + { + "name": "EU", + "value": "EU", + "description": "EU data boundary" + } + ] } }, "SignedCapabilityImageResponse": { @@ -3992,11 +4229,6 @@ }, "description": "Signed device capability image response" }, - "StandardListQueryParametersWithCorrectNames": { - "type": "object", - "properties": {}, - "description": "Provides the most common query parameters for list operations." - }, "UpdatePolicy": { "type": "string", "description": "Update policy values.", @@ -4006,7 +4238,19 @@ ], "x-ms-enum": { "name": "UpdatePolicy", - "modelAsString": true + "modelAsString": true, + "values": [ + { + "name": "UpdateAll", + "value": "UpdateAll", + "description": "Update all policy." + }, + { + "name": "No3rdPartyAppUpdates", + "value": "No3rdPartyAppUpdates", + "description": "No update for 3rd party app policy." + } + ] } } },