diff --git a/sdk/iotcentral/arm-iotcentral/LICENSE.txt b/sdk/iotcentral/arm-iotcentral/LICENSE.txt index a70e8cf66038..b73b4a1293c3 100644 --- a/sdk/iotcentral/arm-iotcentral/LICENSE.txt +++ b/sdk/iotcentral/arm-iotcentral/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/iotcentral/arm-iotcentral/README.md b/sdk/iotcentral/arm-iotcentral/README.md index c127a127f409..2a8a59cfb89c 100644 --- a/sdk/iotcentral/arm-iotcentral/README.md +++ b/sdk/iotcentral/arm-iotcentral/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for IotCentralClient. ### How to Install -``` +```bash npm install @azure/arm-iotcentral ``` @@ -19,13 +19,13 @@ npm install @azure/arm-iotcentral ##### Install @azure/ms-rest-nodeauth -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -49,7 +49,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -99,5 +99,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fiotcentral%2Farm-iotcentral%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/iotcentral/arm-iotcentral/README.png) diff --git a/sdk/iotcentral/arm-iotcentral/package.json b/sdk/iotcentral/arm-iotcentral/package.json index 2d5161bd1c57..792737d8bee5 100644 --- a/sdk/iotcentral/arm-iotcentral/package.json +++ b/sdk/iotcentral/arm-iotcentral/package.json @@ -4,8 +4,8 @@ "description": "IotCentralClient Library with typescript type definitions for node.js and browser.", "version": "2.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.3.2", + "@azure/ms-rest-js": "^1.8.1", "tslib": "^1.9.3" }, "keywords": [ @@ -23,15 +23,16 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/iotcentral/arm-iotcentral", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/iotcentral/arm-iotcentral", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } diff --git a/sdk/iotcentral/arm-iotcentral/rollup.config.js b/sdk/iotcentral/arm-iotcentral/rollup.config.js index c2695e9d6fa1..5867cd5ab746 100644 --- a/sdk/iotcentral/arm-iotcentral/rollup.config.js +++ b/sdk/iotcentral/arm-iotcentral/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/iotCentralClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/iotCentralClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-iotcentral.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config; diff --git a/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts b/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts index 5f37b9da45dd..2fd9d4e530e7 100644 --- a/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts +++ b/sdk/iotcentral/arm-iotcentral/src/iotCentralClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-iotcentral"; -const packageVersion = "0.1.0"; +const packageVersion = "2.1.0"; export class IotCentralClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/iotcentral/arm-iotcentral/src/models/appsMappers.ts b/sdk/iotcentral/arm-iotcentral/src/models/appsMappers.ts index 5f2f87479734..0ca3c3547cf9 100644 --- a/sdk/iotcentral/arm-iotcentral/src/models/appsMappers.ts +++ b/sdk/iotcentral/arm-iotcentral/src/models/appsMappers.ts @@ -1,23 +1,22 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { App, - Resource, - BaseResource, + AppAvailabilityInfo, + AppListResult, + AppPatch, AppSkuInfo, + AppTemplate, + AppTemplatesResult, + BaseResource, ErrorDetails, ErrorResponseBody, - AppPatch, - AppListResult, OperationInputs, - AppAvailabilityInfo + Resource } from "../models/mappers"; - diff --git a/sdk/iotcentral/arm-iotcentral/src/models/index.ts b/sdk/iotcentral/arm-iotcentral/src/models/index.ts index 4430cc8c4dc4..82e09d21316a 100644 --- a/sdk/iotcentral/arm-iotcentral/src/models/index.ts +++ b/sdk/iotcentral/arm-iotcentral/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,343 +11,317 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing AppSkuInfo. * Information about the SKU of the IoT Central application. - * */ export interface AppSkuInfo { /** - * @member {AppSku} name The name of the SKU. Possible values include: 'F1', - * 'S1' + * The name of the SKU. Possible values include: 'F1', 'S1', 'ST0', 'ST1', 'ST2' */ name: AppSku; } /** - * @interface - * An interface representing Resource. * The common properties of an ARM resource. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] The ARM resource identifier. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The ARM resource identifier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The ARM resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The ARM resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] The resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} location The resource location. + * The resource location. */ location: string; /** - * @member {{ [propertyName: string]: string }} [tags] The resource tags. + * The resource tags. */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing App. * The IoT Central application. - * - * @extends Resource */ export interface App extends Resource { /** - * @member {string} [applicationId] The ID of the application. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The ID of the application. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly applicationId?: string; /** - * @member {string} [displayName] The display name of the application. + * The display name of the application. */ displayName?: string; /** - * @member {string} [subdomain] The subdomain of the application. + * The subdomain of the application. */ subdomain?: string; /** - * @member {string} [template] The ID of the application template, which is a - * blueprint that defines the characteristics and behaviors of an - * application. Optional; if not specified, defaults to a blank blueprint and + * The ID of the application template, which is a blueprint that defines the characteristics and + * behaviors of an application. Optional; if not specified, defaults to a blank blueprint and * allows the application to be defined from scratch. */ template?: string; /** - * @member {AppSkuInfo} sku A valid instance SKU. + * A valid instance SKU. */ sku: AppSkuInfo; } /** - * @interface - * An interface representing AppPatch. * The description of the IoT Central application. - * */ export interface AppPatch { /** - * @member {{ [propertyName: string]: string }} [tags] Instance tags + * Instance tags */ tags?: { [propertyName: string]: string }; /** - * @member {string} [applicationId] The ID of the application. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The ID of the application. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly applicationId?: string; /** - * @member {string} [displayName] The display name of the application. + * The display name of the application. */ displayName?: string; /** - * @member {string} [subdomain] The subdomain of the application. + * The subdomain of the application. */ subdomain?: string; /** - * @member {string} [template] The ID of the application template, which is a - * blueprint that defines the characteristics and behaviors of an - * application. Optional; if not specified, defaults to a blank blueprint and + * The ID of the application template, which is a blueprint that defines the characteristics and + * behaviors of an application. Optional; if not specified, defaults to a blank blueprint and * allows the application to be defined from scratch. */ template?: string; } /** - * @interface - * An interface representing ErrorResponseBody. * Details of error response. - * */ export interface ErrorResponseBody { /** - * @member {string} [code] The error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly code?: string; /** - * @member {string} [message] The error message. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; /** - * @member {string} [target] The target of the particular error. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The target of the particular error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly target?: string; /** - * @member {ErrorResponseBody[]} [details] A list of additional details about - * the error. + * A list of additional details about the error. */ details?: ErrorResponseBody[]; } /** - * @interface - * An interface representing ErrorDetails. * Error details. - * */ export interface ErrorDetails { /** - * @member {string} [code] The error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly code?: string; /** - * @member {string} [message] The error message. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; /** - * @member {string} [target] The target of the particular error. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The target of the particular error. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly target?: string; /** - * @member {ErrorResponseBody[]} [details] A list of additional details about - * the error. + * A list of additional details about the error. */ details?: ErrorResponseBody[]; } /** - * @interface - * An interface representing OperationDisplay. * The object that represents the operation. - * */ export interface OperationDisplay { /** - * @member {string} [provider] Service provider: Microsoft IoT Central - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Service provider: Microsoft IoT Central + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provider?: string; /** - * @member {string} [resource] Resource Type: IoT Central - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Type: IoT Central + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resource?: string; /** - * @member {string} [operation] Name of the operation - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Name of the operation + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly operation?: string; /** - * @member {string} [description] Friendly description for the operation, - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Friendly description for the operation, + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly description?: string; } /** - * @interface - * An interface representing Operation. * IoT Central REST API operation - * */ export interface Operation { /** - * @member {string} [name] Operation name: {provider}/{resource}/{read | - * write | action | delete} - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Operation name: {provider}/{resource}/{read | write | action | delete} + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {OperationDisplay} [display] The object that represents the - * operation. + * The object that represents the operation. */ display?: OperationDisplay; } /** - * @interface - * An interface representing OperationInputs. * Input values. - * */ export interface OperationInputs { /** - * @member {string} name The name of the IoT Central application instance to - * check. + * The name of the IoT Central application instance to check. */ name: string; /** - * @member {string} [type] The type of the IoT Central resource to query. - * Default value: 'IoTApps' . + * The type of the IoT Central resource to query. Default value: 'IoTApps'. */ type?: string; } /** - * @interface - * An interface representing AppAvailabilityInfo. - * The properties indicating whether a given IoT Central application name or - * subdomain is available. - * + * The properties indicating whether a given IoT Central application name or subdomain is + * available. */ export interface AppAvailabilityInfo { /** - * @member {boolean} [nameAvailable] The value which indicates whether the - * provided name is available. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The value which indicates whether the provided name is available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nameAvailable?: boolean; /** - * @member {string} [reason] The reason for unavailability. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The reason for unavailability. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reason?: string; /** - * @member {string} [message] The detailed reason message. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The detailed reason message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; } /** - * @interface - * An interface representing IotCentralClientOptions. - * @extends AzureServiceClientOptions + * IoT Central Application Template. */ -export interface IotCentralClientOptions extends AzureServiceClientOptions { +export interface AppTemplate { /** - * @member {string} [baseUri] + * The ID of the template. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - baseUri?: string; + readonly manifestId?: string; + /** + * The version of the template. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly manifestVersion?: string; + /** + * The name of the template. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly appTemplateName?: string; + /** + * The title of the template. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly title?: string; + /** + * The order of the template in the templates list. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly order?: number; + /** + * The description of the template. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; } +/** + * An interface representing IotCentralClientOptions. + */ +export interface IotCentralClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} /** * @interface - * An interface representing the AppListResult. * A list of IoT Central Applications with a next link. - * * @extends Array */ export interface AppListResult extends Array { /** - * @member {string} [nextLink] The link used to get the next page of IoT - * Central Applications. + * The link used to get the next page of IoT Central Applications. */ nextLink?: string; } /** * @interface - * An interface representing the OperationListResult. - * A list of IoT Central operations. It contains a list of operations and a URL - * link to get the next set of results. - * + * A list of IoT Central Application Templates with a next link. + * @extends Array + */ +export interface AppTemplatesResult extends Array { + /** + * The link used to get the next page of IoT Central application templates. + */ + nextLink?: string; +} + +/** + * @interface + * A list of IoT Central operations. It contains a list of operations and a URL link to get the + * next set of results. * @extends Array */ export interface OperationListResult extends Array { /** - * @member {string} [nextLink] The link used to get the next page of IoT - * Central description objects. + * The link used to get the next page of IoT Central description objects. */ nextLink?: string; } /** * Defines values for AppSku. - * Possible values include: 'F1', 'S1' + * Possible values include: 'F1', 'S1', 'ST0', 'ST1', 'ST2' * @readonly * @enum {string} */ -export type AppSku = 'F1' | 'S1'; +export type AppSku = 'F1' | 'S1' | 'ST0' | 'ST1' | 'ST2'; /** * Contains response data for the get operation. @@ -363,6 +335,7 @@ export type AppsGetResponse = App & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -382,6 +355,7 @@ export type AppsCreateOrUpdateResponse = App & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -401,6 +375,7 @@ export type AppsUpdateResponse = App & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -420,6 +395,7 @@ export type AppsListBySubscriptionResponse = AppListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -439,6 +415,7 @@ export type AppsListByResourceGroupResponse = AppListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -458,6 +435,7 @@ export type AppsCheckNameAvailabilityResponse = AppAvailabilityInfo & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -477,6 +455,7 @@ export type AppsCheckSubdomainAvailabilityResponse = AppAvailabilityInfo & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -484,6 +463,26 @@ export type AppsCheckSubdomainAvailabilityResponse = AppAvailabilityInfo & { }; }; +/** + * Contains response data for the listTemplates operation. + */ +export type AppsListTemplatesResponse = AppTemplatesResult & { + /** + * 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: AppTemplatesResult; + }; +}; + /** * Contains response data for the beginCreateOrUpdate operation. */ @@ -496,6 +495,7 @@ export type AppsBeginCreateOrUpdateResponse = App & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -515,6 +515,7 @@ export type AppsBeginUpdateResponse = App & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -534,6 +535,7 @@ export type AppsListBySubscriptionNextResponse = AppListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -553,6 +555,7 @@ export type AppsListByResourceGroupNextResponse = AppListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -560,6 +563,26 @@ export type AppsListByResourceGroupNextResponse = AppListResult & { }; }; +/** + * Contains response data for the listTemplatesNext operation. + */ +export type AppsListTemplatesNextResponse = AppTemplatesResult & { + /** + * 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: AppTemplatesResult; + }; +}; + /** * Contains response data for the list operation. */ @@ -572,6 +595,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -591,6 +615,7 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/iotcentral/arm-iotcentral/src/models/mappers.ts b/sdk/iotcentral/arm-iotcentral/src/models/mappers.ts index 18603c7057d8..87cb4bb297e5 100644 --- a/sdk/iotcentral/arm-iotcentral/src/models/mappers.ts +++ b/sdk/iotcentral/arm-iotcentral/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -391,6 +389,58 @@ export const AppAvailabilityInfo: msRest.CompositeMapper = { } }; +export const AppTemplate: msRest.CompositeMapper = { + serializedName: "AppTemplate", + type: { + name: "Composite", + className: "AppTemplate", + modelProperties: { + manifestId: { + readOnly: true, + serializedName: "manifestId", + type: { + name: "String" + } + }, + manifestVersion: { + readOnly: true, + serializedName: "manifestVersion", + type: { + name: "String" + } + }, + appTemplateName: { + readOnly: true, + serializedName: "appTemplateName", + type: { + name: "String" + } + }, + title: { + readOnly: true, + serializedName: "title", + type: { + name: "String" + } + }, + order: { + readOnly: true, + serializedName: "order", + type: { + name: "Number" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + export const AppListResult: msRest.CompositeMapper = { serializedName: "AppListResult", type: { @@ -419,6 +469,35 @@ export const AppListResult: msRest.CompositeMapper = { } }; +export const AppTemplatesResult: msRest.CompositeMapper = { + serializedName: "AppTemplatesResult", + type: { + name: "Composite", + className: "AppTemplatesResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AppTemplate" + } + } + } + } + } + } +}; + export const OperationListResult: msRest.CompositeMapper = { serializedName: "OperationListResult", type: { diff --git a/sdk/iotcentral/arm-iotcentral/src/models/operationsMappers.ts b/sdk/iotcentral/arm-iotcentral/src/models/operationsMappers.ts index ddb8dd74b309..363b65312aec 100644 --- a/sdk/iotcentral/arm-iotcentral/src/models/operationsMappers.ts +++ b/sdk/iotcentral/arm-iotcentral/src/models/operationsMappers.ts @@ -1,18 +1,15 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + ErrorDetails, + ErrorResponseBody, Operation, OperationDisplay, - ErrorDetails, - ErrorResponseBody + OperationListResult } from "../models/mappers"; - diff --git a/sdk/iotcentral/arm-iotcentral/src/operations/apps.ts b/sdk/iotcentral/arm-iotcentral/src/operations/apps.ts index c5d2ed7934eb..3c7c4d9d028a 100644 --- a/sdk/iotcentral/arm-iotcentral/src/operations/apps.ts +++ b/sdk/iotcentral/arm-iotcentral/src/operations/apps.ts @@ -222,6 +222,30 @@ export class Apps { callback) as Promise; } + /** + * Get all available application templates. + * @param [options] The optional parameters + * @returns Promise + */ + listTemplates(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listTemplates(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listTemplates(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listTemplates(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listTemplatesOperationSpec, + callback) as Promise; + } + /** * Create or update the metadata of an IoT Central application. The usual pattern to modify a * property is to retrieve the IoT Central application metadata and security metadata, and then @@ -340,6 +364,34 @@ export class Apps { listByResourceGroupNextOperationSpec, callback) as Promise; } + + /** + * Get all available application templates. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listTemplatesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listTemplatesNext(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 + */ + listTemplatesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listTemplatesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listTemplatesNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -476,6 +528,29 @@ const checkSubdomainAvailabilityOperationSpec: msRest.OperationSpec = { serializer }; +const listTemplatesOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/appTemplates", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AppTemplatesResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +}; + const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps/{resourceName}", @@ -611,3 +686,24 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listTemplatesNextOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AppTemplatesResult + }, + default: { + bodyMapper: Mappers.ErrorDetails + } + }, + serializer +};