From 121989bfed5c50c5e30c60efd6b34d27bb2c07fa Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 24 Feb 2020 20:36:32 +0000 Subject: [PATCH] Generated from 497f37d011e45d90e7a5f190b1326ec89e2719c8 Merge pull request #6 from Khushboo-Baheti/master merge --- .../src/azureStackManagementClient.ts | 2 + .../src/models/cloudManifestFileMappers.ts | 25 ++++ .../models/customerSubscriptionsMappers.ts | 3 + .../arm-azurestack/src/models/index.ts | 96 +++++++++++++ .../arm-azurestack/src/models/mappers.ts | 75 +++++++++++ .../arm-azurestack/src/models/parameters.ts | 22 +++ .../src/models/productsMappers.ts | 3 + .../src/models/registrationsMappers.ts | 3 + .../src/operations/cloudManifestFile.ts | 126 ++++++++++++++++++ .../arm-azurestack/src/operations/index.ts | 1 + 10 files changed, 356 insertions(+) create mode 100644 sdk/azurestack/arm-azurestack/src/models/cloudManifestFileMappers.ts create mode 100644 sdk/azurestack/arm-azurestack/src/operations/cloudManifestFile.ts diff --git a/sdk/azurestack/arm-azurestack/src/azureStackManagementClient.ts b/sdk/azurestack/arm-azurestack/src/azureStackManagementClient.ts index 04f21ebf7bfd..9730c15f3e39 100644 --- a/sdk/azurestack/arm-azurestack/src/azureStackManagementClient.ts +++ b/sdk/azurestack/arm-azurestack/src/azureStackManagementClient.ts @@ -18,6 +18,7 @@ import { AzureStackManagementClientContext } from "./azureStackManagementClientC class AzureStackManagementClient extends AzureStackManagementClientContext { // Operation groups operations: operations.Operations; + cloudManifestFile: operations.CloudManifestFile; products: operations.Products; registrations: operations.Registrations; customerSubscriptions: operations.CustomerSubscriptions; @@ -32,6 +33,7 @@ class AzureStackManagementClient extends AzureStackManagementClientContext { constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureStackManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); + this.cloudManifestFile = new operations.CloudManifestFile(this); this.products = new operations.Products(this); this.registrations = new operations.Registrations(this); this.customerSubscriptions = new operations.CustomerSubscriptions(this); diff --git a/sdk/azurestack/arm-azurestack/src/models/cloudManifestFileMappers.ts b/sdk/azurestack/arm-azurestack/src/models/cloudManifestFileMappers.ts new file mode 100644 index 000000000000..a082252d52f0 --- /dev/null +++ b/sdk/azurestack/arm-azurestack/src/models/cloudManifestFileMappers.ts @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * 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. + */ + +export { + BaseResource, + CloudManifestFileDeploymentData, + CloudManifestFileProperties, + CloudManifestFileResponse, + Compatibility, + CustomerSubscription, + ErrorDetails, + ErrorResponse, + IconUris, + Product, + ProductLink, + ProductProperties, + Registration, + Resource, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/azurestack/arm-azurestack/src/models/customerSubscriptionsMappers.ts b/sdk/azurestack/arm-azurestack/src/models/customerSubscriptionsMappers.ts index 3fac26f64b26..4ec21e8e7e6e 100644 --- a/sdk/azurestack/arm-azurestack/src/models/customerSubscriptionsMappers.ts +++ b/sdk/azurestack/arm-azurestack/src/models/customerSubscriptionsMappers.ts @@ -9,6 +9,9 @@ export { BaseResource, CloudError, + CloudManifestFileDeploymentData, + CloudManifestFileProperties, + CloudManifestFileResponse, Compatibility, CustomerSubscription, CustomerSubscriptionList, diff --git a/sdk/azurestack/arm-azurestack/src/models/index.ts b/sdk/azurestack/arm-azurestack/src/models/index.ts index bc6c459c0000..62fced251908 100644 --- a/sdk/azurestack/arm-azurestack/src/models/index.ts +++ b/sdk/azurestack/arm-azurestack/src/models/index.ts @@ -107,6 +107,52 @@ export interface Operation { origin?: string; } +/** + * Cloud specific manifest data for AzureStack deployment. + */ +export interface CloudManifestFileDeploymentData { + /** + * Dsms external certificates. + */ + externalDsmsCertificates?: string; + /** + * Signing verification public key. + */ + customCloudVerificationKey?: string; + /** + * ARM endpoint. + */ + customCloudArmEndpoint?: string; + /** + * Dsms endpoint. + */ + externalDsmsEndpoint?: string; +} + +/** + * Cloud specific manifest JSON properties. + */ +export interface CloudManifestFileProperties { + /** + * Cloud specific manifest data. + */ + deploymentData?: CloudManifestFileDeploymentData; + /** + * Signature of the cloud specific manifest data. + */ + signature?: string; +} + +/** + * Cloud specific manifest GET response. + */ +export interface CloudManifestFileResponse extends Resource { + /** + * Cloud specific manifest data. + */ + properties?: CloudManifestFileProperties; +} + /** * The details of the error. */ @@ -604,6 +650,16 @@ export interface CustomerSubscription extends Resource { tenantId?: string; } +/** + * Optional Parameters. + */ +export interface CloudManifestFileGetOptionalParams extends msRest.RequestOptionsBase { + /** + * Signing verification key version creation date. + */ + versionCreationDate?: string; +} + /** * An interface representing AzureStackManagementClientOptions. */ @@ -751,6 +807,46 @@ export type OperationsListNextResponse = OperationList & { }; }; +/** + * Contains response data for the list operation. + */ +export type CloudManifestFileListResponse = CloudManifestFileResponse & { + /** + * 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: CloudManifestFileResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type CloudManifestFileGetResponse = CloudManifestFileResponse & { + /** + * 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: CloudManifestFileResponse; + }; +}; + /** * Contains response data for the list operation. */ diff --git a/sdk/azurestack/arm-azurestack/src/models/mappers.ts b/sdk/azurestack/arm-azurestack/src/models/mappers.ts index 0a241079ca23..2c6715cb5287 100644 --- a/sdk/azurestack/arm-azurestack/src/models/mappers.ts +++ b/sdk/azurestack/arm-azurestack/src/models/mappers.ts @@ -169,6 +169,81 @@ export const Operation: msRest.CompositeMapper = { } }; +export const CloudManifestFileDeploymentData: msRest.CompositeMapper = { + serializedName: "CloudManifestFileDeploymentData", + type: { + name: "Composite", + className: "CloudManifestFileDeploymentData", + modelProperties: { + externalDsmsCertificates: { + serializedName: "externalDsmsCertificates", + type: { + name: "String" + } + }, + customCloudVerificationKey: { + serializedName: "customCloudVerificationKey", + type: { + name: "String" + } + }, + customCloudArmEndpoint: { + serializedName: "customEnvironmentEndpoints.customCloudArmEndpoint", + type: { + name: "String" + } + }, + externalDsmsEndpoint: { + serializedName: "customEnvironmentEndpoints.externalDsmsEndpoint", + type: { + name: "String" + } + } + } + } +}; + +export const CloudManifestFileProperties: msRest.CompositeMapper = { + serializedName: "CloudManifestFileProperties", + type: { + name: "Composite", + className: "CloudManifestFileProperties", + modelProperties: { + deploymentData: { + serializedName: "deploymentData", + type: { + name: "Composite", + className: "CloudManifestFileDeploymentData" + } + }, + signature: { + serializedName: "signature", + type: { + name: "String" + } + } + } + } +}; + +export const CloudManifestFileResponse: msRest.CompositeMapper = { + serializedName: "CloudManifestFileResponse", + type: { + name: "Composite", + className: "CloudManifestFileResponse", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "CloudManifestFileProperties" + } + } + } + } +}; + export const ErrorDetails: msRest.CompositeMapper = { serializedName: "ErrorDetails", type: { diff --git a/sdk/azurestack/arm-azurestack/src/models/parameters.ts b/sdk/azurestack/arm-azurestack/src/models/parameters.ts index e13086b4e5df..077923517894 100644 --- a/sdk/azurestack/arm-azurestack/src/models/parameters.ts +++ b/sdk/azurestack/arm-azurestack/src/models/parameters.ts @@ -92,3 +92,25 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; +export const verificationVersion: msRest.OperationURLParameter = { + parameterPath: "verificationVersion", + mapper: { + required: true, + serializedName: "verificationVersion", + type: { + name: "String" + } + } +}; +export const versionCreationDate: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "versionCreationDate" + ], + mapper: { + serializedName: "versionCreationDate", + type: { + name: "String" + } + } +}; diff --git a/sdk/azurestack/arm-azurestack/src/models/productsMappers.ts b/sdk/azurestack/arm-azurestack/src/models/productsMappers.ts index 8690235a808d..bb83093e168b 100644 --- a/sdk/azurestack/arm-azurestack/src/models/productsMappers.ts +++ b/sdk/azurestack/arm-azurestack/src/models/productsMappers.ts @@ -9,6 +9,9 @@ export { BaseResource, CloudError, + CloudManifestFileDeploymentData, + CloudManifestFileProperties, + CloudManifestFileResponse, Compatibility, CustomerSubscription, DataDiskImage, diff --git a/sdk/azurestack/arm-azurestack/src/models/registrationsMappers.ts b/sdk/azurestack/arm-azurestack/src/models/registrationsMappers.ts index e9cf05e71ce8..55f8241aa747 100644 --- a/sdk/azurestack/arm-azurestack/src/models/registrationsMappers.ts +++ b/sdk/azurestack/arm-azurestack/src/models/registrationsMappers.ts @@ -10,6 +10,9 @@ export { ActivationKeyResult, BaseResource, CloudError, + CloudManifestFileDeploymentData, + CloudManifestFileProperties, + CloudManifestFileResponse, Compatibility, CustomerSubscription, ErrorDetails, diff --git a/sdk/azurestack/arm-azurestack/src/operations/cloudManifestFile.ts b/sdk/azurestack/arm-azurestack/src/operations/cloudManifestFile.ts new file mode 100644 index 000000000000..291281674a01 --- /dev/null +++ b/sdk/azurestack/arm-azurestack/src/operations/cloudManifestFile.ts @@ -0,0 +1,126 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/cloudManifestFileMappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackManagementClientContext } from "../azureStackManagementClientContext"; + +/** Class representing a CloudManifestFile. */ +export class CloudManifestFile { + private readonly client: AzureStackManagementClientContext; + + /** + * Create a CloudManifestFile. + * @param {AzureStackManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureStackManagementClientContext) { + this.client = client; + } + + /** + * Returns a cloud specific manifest JSON file with latest version. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Returns a cloud specific manifest JSON file. + * @param verificationVersion Signing verification key version. + * @param [options] The optional parameters + * @returns Promise + */ + get(verificationVersion: string, options?: Models.CloudManifestFileGetOptionalParams): Promise; + /** + * @param verificationVersion Signing verification key version. + * @param callback The callback + */ + get(verificationVersion: string, callback: msRest.ServiceCallback): void; + /** + * @param verificationVersion Signing verification key version. + * @param options The optional parameters + * @param callback The callback + */ + get(verificationVersion: string, options: Models.CloudManifestFileGetOptionalParams, callback: msRest.ServiceCallback): void; + get(verificationVersion: string, options?: Models.CloudManifestFileGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + verificationVersion, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.AzureStack/cloudManifestFiles", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CloudManifestFileResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.AzureStack/cloudManifestFiles/{verificationVersion}", + urlParameters: [ + Parameters.verificationVersion + ], + queryParameters: [ + Parameters.versionCreationDate, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CloudManifestFileResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/azurestack/arm-azurestack/src/operations/index.ts b/sdk/azurestack/arm-azurestack/src/operations/index.ts index 1babd06f2711..1fe7807eb6b7 100644 --- a/sdk/azurestack/arm-azurestack/src/operations/index.ts +++ b/sdk/azurestack/arm-azurestack/src/operations/index.ts @@ -9,6 +9,7 @@ */ export * from "./operations"; +export * from "./cloudManifestFile"; export * from "./products"; export * from "./registrations"; export * from "./customerSubscriptions";