From e97f45d82e11111a7584d1a0c4eff58e0d84f2dc Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 25 Aug 2021 02:36:21 +0000 Subject: [PATCH] CodeGen from PR 15763 in Azure/azure-rest-api-specs [Hub Generated] Public private branch 'raonon-MixedReality-UpdateResourceResponse' (#15763) * Updated response payload to include missing properties * Reverted Identity property * Updated stable/2020_05_01/proxy.json to include missing object properties Co-authored-by: Raymond Ononiwu --- sdk/mixedreality/arm-mixedreality/README.md | 9 +- .../arm-mixedreality/package.json | 2 +- .../src/mixedRealityClient.ts | 2 + .../src/mixedRealityClientContext.ts | 4 +- .../arm-mixedreality/src/models/index.ts | 281 +++++++- .../arm-mixedreality/src/models/mappers.ts | 176 +++++ .../models/objectAnchorsAccountsMappers.ts | 31 + .../models/remoteRenderingAccountsMappers.ts | 2 + .../models/spatialAnchorsAccountsMappers.ts | 2 + .../arm-mixedreality/src/operations/index.ts | 1 + .../src/operations/objectAnchorsAccounts.ts | 609 ++++++++++++++++++ 11 files changed, 1108 insertions(+), 11 deletions(-) create mode 100644 sdk/mixedreality/arm-mixedreality/src/models/objectAnchorsAccountsMappers.ts create mode 100644 sdk/mixedreality/arm-mixedreality/src/operations/objectAnchorsAccounts.ts diff --git a/sdk/mixedreality/arm-mixedreality/README.md b/sdk/mixedreality/arm-mixedreality/README.md index ecdbf28cee8b..7105f20bdbcf 100644 --- a/sdk/mixedreality/arm-mixedreality/README.md +++ b/sdk/mixedreality/arm-mixedreality/README.md @@ -1,11 +1,11 @@ ## Azure MixedRealityClient SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for MixedRealityClient. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for MixedRealityClient. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-mixedreality @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code @@ -51,7 +49,6 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; // Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. const creds = new DefaultAzureCredential(); const client = new MixedRealityClient(creds, subscriptionId); - client.operations.list().then((result) => { console.log("The result is:"); console.log(result); @@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmMixedreality.MixedRealityClient(creds, subscriptionId); client.operations.list().then((result) => { diff --git a/sdk/mixedreality/arm-mixedreality/package.json b/sdk/mixedreality/arm-mixedreality/package.json index d3dda5559013..4ff0a2917b55 100644 --- a/sdk/mixedreality/arm-mixedreality/package.json +++ b/sdk/mixedreality/arm-mixedreality/package.json @@ -27,7 +27,7 @@ "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/mixedreality/arm-mixedreality", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/mixedreality/arm-mixedreality", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts b/sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts index 50e339d54004..356a82e67844 100644 --- a/sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts +++ b/sdk/mixedreality/arm-mixedreality/src/mixedRealityClient.ts @@ -21,6 +21,7 @@ class MixedRealityClient extends MixedRealityClientContext { operations: operations.Operations; spatialAnchorsAccounts: operations.SpatialAnchorsAccounts; remoteRenderingAccounts: operations.RemoteRenderingAccounts; + objectAnchorsAccounts: operations.ObjectAnchorsAccounts; /** * Initializes a new instance of the MixedRealityClient class. @@ -39,6 +40,7 @@ class MixedRealityClient extends MixedRealityClientContext { this.operations = new operations.Operations(this); this.spatialAnchorsAccounts = new operations.SpatialAnchorsAccounts(this); this.remoteRenderingAccounts = new operations.RemoteRenderingAccounts(this); + this.objectAnchorsAccounts = new operations.ObjectAnchorsAccounts(this); } /** diff --git a/sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts b/sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts index 56ce67a22013..23cdff482c67 100644 --- a/sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts +++ b/sdk/mixedreality/arm-mixedreality/src/mixedRealityClientContext.ts @@ -9,8 +9,8 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-mixedreality"; const packageVersion = "3.1.1"; @@ -50,7 +50,7 @@ export class MixedRealityClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2021-01-01'; + this.apiVersion = '2021-03-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/mixedreality/arm-mixedreality/src/models/index.ts b/sdk/mixedreality/arm-mixedreality/src/models/index.ts index 4e28b8df1c98..97c75e59d0d3 100644 --- a/sdk/mixedreality/arm-mixedreality/src/models/index.ts +++ b/sdk/mixedreality/arm-mixedreality/src/models/index.ts @@ -99,6 +99,10 @@ export interface MetricDimension { * Internal name of the dimension. */ internalName?: string; + /** + * Flag to indicate export for Shoebox + */ + toBeExportedForShoebox?: boolean; } /** @@ -125,6 +129,38 @@ export interface MetricSpecification { * Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. */ aggregationType?: string; + /** + * Supported aggregation types. Valid values: Average, Minimum, Maximum, Total, Count. + */ + supportedAggregationTypes?: string[]; + /** + * Supported time grains. Valid values: PT1M, PT5M, PT15M, PT30M, PT1H, PT6H, PT12H, P1D + */ + supportedTimeGrainTypes?: string[]; + /** + * Flag to indicate use of regional Mdm accounts + */ + enableRegionalMdmAccount?: boolean; + /** + * Source mdm account + */ + sourceMdmAccount?: string; + /** + * Source mdm namespace + */ + sourceMdmNamespace?: string; + /** + * Metric filter regex pattern + */ + metricFilterPattern?: string; + /** + * Flag to determine is Zero is returned for time duration where no metric is emitted + */ + fillGapWithZero?: boolean; + /** + * Metric category + */ + category?: string; /** * Internal metric name. */ @@ -133,6 +169,10 @@ export interface MetricSpecification { * Dimensions of the metric */ dimensions?: MetricDimension[]; + /** + * Locked aggregation type of the metric + */ + lockedAggregationType?: string; } /** @@ -263,7 +303,7 @@ export interface SystemData { */ lastModifiedByType?: CreatedByType; /** - * The type of identity that last modified the resource. + * The timestamp of resource last modification (UTC) */ lastModifiedAt?: Date; } @@ -492,7 +532,7 @@ export interface AccountKeys { */ export interface AccountKeyRegenerateRequest { /** - * serial of key to be regenerated. Default value: 1. + * Serial of key to be regenerated. Default value: 1. */ serial?: number; } @@ -537,6 +577,50 @@ export interface RemoteRenderingAccount extends TrackedResource { systemData?: SystemData; } +/** + * An interface representing ObjectAnchorsAccountIdentity. + */ +export interface ObjectAnchorsAccountIdentity extends Identity { +} + +/** + * ObjectAnchorsAccount Response. + */ +export interface ObjectAnchorsAccount extends TrackedResource { + identity?: ObjectAnchorsAccountIdentity; + /** + * The name of the storage account associated with this accountId + */ + storageAccountName?: string; + /** + * unique id of certain account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountId?: string; + /** + * Correspond domain name of certain Spatial Anchors Account + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly accountDomain?: string; + /** + * The plan associated with this account + */ + plan?: Identity; + /** + * The sku associated with this account + */ + sku?: Sku; + /** + * The kind of account, if supported + */ + kind?: Sku; + /** + * The system metadata related to an object anchors account. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; +} + /** * An interface representing MixedRealityClientOptions. */ @@ -583,6 +667,19 @@ export interface RemoteRenderingAccountPage extends Array + */ +export interface ObjectAnchorsAccountPage extends Array { + /** + * URL to get the next set of resource list results if there are any. + */ + nextLink?: string; +} + /** * Defines values for NameUnavailableReason. * Possible values include: 'Invalid', 'AlreadyExists' @@ -1034,3 +1131,183 @@ export type RemoteRenderingAccountsListByResourceGroupNextResponse = RemoteRende parsedBody: RemoteRenderingAccountPage; }; }; + +/** + * Contains response data for the listBySubscription operation. + */ +export type ObjectAnchorsAccountsListBySubscriptionResponse = ObjectAnchorsAccountPage & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ObjectAnchorsAccountPage; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. + */ +export type ObjectAnchorsAccountsListByResourceGroupResponse = ObjectAnchorsAccountPage & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ObjectAnchorsAccountPage; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type ObjectAnchorsAccountsGetResponse = ObjectAnchorsAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ObjectAnchorsAccount; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type ObjectAnchorsAccountsUpdateResponse = ObjectAnchorsAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ObjectAnchorsAccount; + }; +}; + +/** + * Contains response data for the create operation. + */ +export type ObjectAnchorsAccountsCreateResponse = ObjectAnchorsAccount & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ObjectAnchorsAccount; + }; +}; + +/** + * Contains response data for the listKeys operation. + */ +export type ObjectAnchorsAccountsListKeysResponse = AccountKeys & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AccountKeys; + }; +}; + +/** + * Contains response data for the regenerateKeys operation. + */ +export type ObjectAnchorsAccountsRegenerateKeysResponse = AccountKeys & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: AccountKeys; + }; +}; + +/** + * Contains response data for the listBySubscriptionNext operation. + */ +export type ObjectAnchorsAccountsListBySubscriptionNextResponse = ObjectAnchorsAccountPage & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ObjectAnchorsAccountPage; + }; +}; + +/** + * Contains response data for the listByResourceGroupNext operation. + */ +export type ObjectAnchorsAccountsListByResourceGroupNextResponse = ObjectAnchorsAccountPage & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ObjectAnchorsAccountPage; + }; +}; diff --git a/sdk/mixedreality/arm-mixedreality/src/models/mappers.ts b/sdk/mixedreality/arm-mixedreality/src/models/mappers.ts index 9d6736c499e9..6d080c4f767c 100644 --- a/sdk/mixedreality/arm-mixedreality/src/models/mappers.ts +++ b/sdk/mixedreality/arm-mixedreality/src/models/mappers.ts @@ -154,6 +154,12 @@ export const MetricDimension: msRest.CompositeMapper = { type: { name: "String" } + }, + toBeExportedForShoebox: { + serializedName: "toBeExportedForShoebox", + type: { + name: "Boolean" + } } } } @@ -195,6 +201,64 @@ export const MetricSpecification: msRest.CompositeMapper = { name: "String" } }, + supportedAggregationTypes: { + serializedName: "supportedAggregationTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + supportedTimeGrainTypes: { + serializedName: "supportedTimeGrainTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + enableRegionalMdmAccount: { + serializedName: "enableRegionalMdmAccount", + type: { + name: "Boolean" + } + }, + sourceMdmAccount: { + serializedName: "sourceMdmAccount", + type: { + name: "String" + } + }, + sourceMdmNamespace: { + serializedName: "sourceMdmNamespace", + type: { + name: "String" + } + }, + metricFilterPattern: { + serializedName: "metricFilterPattern", + type: { + name: "String" + } + }, + fillGapWithZero: { + serializedName: "fillGapWithZero", + type: { + name: "Boolean" + } + }, + category: { + serializedName: "category", + type: { + name: "String" + } + }, internalMetricName: { serializedName: "internalMetricName", type: { @@ -212,6 +276,12 @@ export const MetricSpecification: msRest.CompositeMapper = { } } } + }, + lockedAggregationType: { + serializedName: "lockedAggregationType", + type: { + name: "String" + } } } } @@ -865,6 +935,84 @@ export const RemoteRenderingAccount: msRest.CompositeMapper = { } }; +export const ObjectAnchorsAccountIdentity: msRest.CompositeMapper = { + serializedName: "ObjectAnchorsAccount_identity", + type: { + name: "Composite", + className: "ObjectAnchorsAccountIdentity", + modelProperties: { + ...Identity.type.modelProperties + } + } +}; + +export const ObjectAnchorsAccount: msRest.CompositeMapper = { + serializedName: "ObjectAnchorsAccount", + type: { + name: "Composite", + className: "ObjectAnchorsAccount", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ObjectAnchorsAccountIdentity" + } + }, + storageAccountName: { + serializedName: "properties.storageAccountName", + type: { + name: "String" + } + }, + accountId: { + readOnly: true, + serializedName: "properties.accountId", + type: { + name: "String" + } + }, + accountDomain: { + readOnly: true, + serializedName: "properties.accountDomain", + type: { + name: "String" + } + }, + plan: { + serializedName: "plan", + type: { + name: "Composite", + className: "Identity" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + kind: { + serializedName: "kind", + type: { + name: "Composite", + className: "Sku" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + export const OperationPage: msRest.CompositeMapper = { serializedName: "OperationPage", type: { @@ -948,3 +1096,31 @@ export const RemoteRenderingAccountPage: msRest.CompositeMapper = { } } }; + +export const ObjectAnchorsAccountPage: msRest.CompositeMapper = { + serializedName: "ObjectAnchorsAccountPage", + type: { + name: "Composite", + className: "ObjectAnchorsAccountPage", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ObjectAnchorsAccount" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/mixedreality/arm-mixedreality/src/models/objectAnchorsAccountsMappers.ts b/sdk/mixedreality/arm-mixedreality/src/models/objectAnchorsAccountsMappers.ts new file mode 100644 index 000000000000..58890aceca94 --- /dev/null +++ b/sdk/mixedreality/arm-mixedreality/src/models/objectAnchorsAccountsMappers.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AccountKeyRegenerateRequest, + AccountKeys, + AzureEntityResource, + BaseResource, + CloudError, + Identity, + ObjectAnchorsAccount, + ObjectAnchorsAccountIdentity, + ObjectAnchorsAccountPage, + Plan, + ProxyResource, + RemoteRenderingAccount, + Resource, + ResourceModelWithAllowedPropertySet, + ResourceModelWithAllowedPropertySetIdentity, + ResourceModelWithAllowedPropertySetPlan, + ResourceModelWithAllowedPropertySetSku, + Sku, + SpatialAnchorsAccount, + SystemData, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/mixedreality/arm-mixedreality/src/models/remoteRenderingAccountsMappers.ts b/sdk/mixedreality/arm-mixedreality/src/models/remoteRenderingAccountsMappers.ts index 37f1f372255f..06a5901d65f3 100644 --- a/sdk/mixedreality/arm-mixedreality/src/models/remoteRenderingAccountsMappers.ts +++ b/sdk/mixedreality/arm-mixedreality/src/models/remoteRenderingAccountsMappers.ts @@ -13,6 +13,8 @@ export { BaseResource, CloudError, Identity, + ObjectAnchorsAccount, + ObjectAnchorsAccountIdentity, Plan, ProxyResource, RemoteRenderingAccount, diff --git a/sdk/mixedreality/arm-mixedreality/src/models/spatialAnchorsAccountsMappers.ts b/sdk/mixedreality/arm-mixedreality/src/models/spatialAnchorsAccountsMappers.ts index 9ca78538adc7..a1fc252edf40 100644 --- a/sdk/mixedreality/arm-mixedreality/src/models/spatialAnchorsAccountsMappers.ts +++ b/sdk/mixedreality/arm-mixedreality/src/models/spatialAnchorsAccountsMappers.ts @@ -13,6 +13,8 @@ export { BaseResource, CloudError, Identity, + ObjectAnchorsAccount, + ObjectAnchorsAccountIdentity, Plan, ProxyResource, RemoteRenderingAccount, diff --git a/sdk/mixedreality/arm-mixedreality/src/operations/index.ts b/sdk/mixedreality/arm-mixedreality/src/operations/index.ts index 12d483f65a2f..7e7eea14b016 100644 --- a/sdk/mixedreality/arm-mixedreality/src/operations/index.ts +++ b/sdk/mixedreality/arm-mixedreality/src/operations/index.ts @@ -10,3 +10,4 @@ export * from "./operations"; export * from "./spatialAnchorsAccounts"; export * from "./remoteRenderingAccounts"; +export * from "./objectAnchorsAccounts"; diff --git a/sdk/mixedreality/arm-mixedreality/src/operations/objectAnchorsAccounts.ts b/sdk/mixedreality/arm-mixedreality/src/operations/objectAnchorsAccounts.ts new file mode 100644 index 000000000000..aedbbf50f7bb --- /dev/null +++ b/sdk/mixedreality/arm-mixedreality/src/operations/objectAnchorsAccounts.ts @@ -0,0 +1,609 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/objectAnchorsAccountsMappers"; +import * as Parameters from "../models/parameters"; +import { MixedRealityClientContext } from "../mixedRealityClientContext"; + +/** Class representing a ObjectAnchorsAccounts. */ +export class ObjectAnchorsAccounts { + private readonly client: MixedRealityClientContext; + + /** + * Create a ObjectAnchorsAccounts. + * @param {MixedRealityClientContext} client Reference to the service client. + */ + constructor(client: MixedRealityClientContext) { + this.client = client; + } + + /** + * List Object Anchors Accounts by Subscription + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * List Resources by Resource Group + * @param resourceGroupName Name of an Azure resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Delete an Object Anchors Account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Retrieve an Object Anchors Account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updating an Object Anchors Account + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, accountName: string, objectAnchorsAccount: Models.ObjectAnchorsAccount, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, objectAnchorsAccount: Models.ObjectAnchorsAccount, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, accountName: string, objectAnchorsAccount: Models.ObjectAnchorsAccount, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, accountName: string, objectAnchorsAccount: Models.ObjectAnchorsAccount, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + objectAnchorsAccount, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Creating or Updating an object anchors Account. + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @param [options] The optional parameters + * @returns Promise + */ + create(resourceGroupName: string, accountName: string, objectAnchorsAccount: Models.ObjectAnchorsAccount, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, objectAnchorsAccount: Models.ObjectAnchorsAccount, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param objectAnchorsAccount Object Anchors Account parameter. + * @param options The optional parameters + * @param callback The callback + */ + create(resourceGroupName: string, accountName: string, objectAnchorsAccount: Models.ObjectAnchorsAccount, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + create(resourceGroupName: string, accountName: string, objectAnchorsAccount: Models.ObjectAnchorsAccount, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + objectAnchorsAccount, + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * List Both of the 2 Keys of an object anchors Account + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param [options] The optional parameters + * @returns Promise + */ + listKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param callback The callback + */ + listKeys(resourceGroupName: string, accountName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param options The optional parameters + * @param callback The callback + */ + listKeys(resourceGroupName: string, accountName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listKeys(resourceGroupName: string, accountName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + options + }, + listKeysOperationSpec, + callback) as Promise; + } + + /** + * Regenerate specified Key of an object anchors Account + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @param [options] The optional parameters + * @returns Promise + */ + regenerateKeys(resourceGroupName: string, accountName: string, regenerate: Models.AccountKeyRegenerateRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @param callback The callback + */ + regenerateKeys(resourceGroupName: string, accountName: string, regenerate: Models.AccountKeyRegenerateRequest, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName Name of an Azure resource group. + * @param accountName Name of an Mixed Reality Account. + * @param regenerate Required information for key regeneration. + * @param options The optional parameters + * @param callback The callback + */ + regenerateKeys(resourceGroupName: string, accountName: string, regenerate: Models.AccountKeyRegenerateRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + regenerateKeys(resourceGroupName: string, accountName: string, regenerate: Models.AccountKeyRegenerateRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + regenerate, + options + }, + regenerateKeysOperationSpec, + callback) as Promise; + } + + /** + * List Object Anchors Accounts by Subscription + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + callback) as Promise; + } + + /** + * List Resources by Resource Group + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/objectAnchorsAccounts", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ObjectAnchorsAccountPage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ObjectAnchorsAccountPage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ObjectAnchorsAccount + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "objectAnchorsAccount", + mapper: { + ...Mappers.ObjectAnchorsAccount, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ObjectAnchorsAccount + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts/{accountName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "objectAnchorsAccount", + mapper: { + ...Mappers.ObjectAnchorsAccount, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.ObjectAnchorsAccount + }, + 201: { + bodyMapper: Mappers.ObjectAnchorsAccount + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts/{accountName}/listKeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AccountKeys + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const regenerateKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/objectAnchorsAccounts/{accountName}/regenerateKeys", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "regenerate", + mapper: { + ...Mappers.AccountKeyRegenerateRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.AccountKeys + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ObjectAnchorsAccountPage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ObjectAnchorsAccountPage + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +};