diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/customizationPoliciesMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/customizationPoliciesMappers.ts new file mode 100644 index 000000000000..22673300850d --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/customizationPoliciesMappers.ts @@ -0,0 +1,21 @@ +/* + * 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 { + CSRPError, + CSRPErrorBody, + CustomizationHostName, + CustomizationIdentity, + CustomizationIdentityUserData, + CustomizationIPAddress, + CustomizationIPSettings, + CustomizationNicSetting, + CustomizationPoliciesListResponse, + CustomizationPolicy, + CustomizationSpecification +} from "../models/mappers"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudNodesMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudNodesMappers.ts index 8b005aeb58c3..54bd1053c1a4 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudNodesMappers.ts +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudNodesMappers.ts @@ -15,6 +15,8 @@ export { DedicatedCloudNodesCreateOrUpdateHeaders, DedicatedCloudNodesDeleteHeaders, DedicatedCloudService, + GuestOSCustomization, + GuestOSNICCustomization, PatchPayload, ResourcePool, Sku, diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudServicesMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudServicesMappers.ts index 6d74b8b49d43..dadd569b0c00 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudServicesMappers.ts +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/dedicatedCloudServicesMappers.ts @@ -14,6 +14,8 @@ export { DedicatedCloudService, DedicatedCloudServiceListResponse, DedicatedCloudServicesDeleteHeaders, + GuestOSCustomization, + GuestOSNICCustomization, PatchPayload, ResourcePool, Sku, diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/index.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/index.ts index 04eef82dbff0..41f2e603f723 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/index.ts +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/index.ts @@ -131,6 +131,161 @@ export interface CSRPError { error?: CSRPErrorBody; } +/** + * Host name model + */ +export interface CustomizationHostName { + /** + * Hostname + */ + name?: string; + /** + * Type of host name. Possible values include: 'USER_DEFINED', 'PREFIX_BASED', 'FIXED', + * 'VIRTUAL_MACHINE_NAME', 'CUSTOM_NAME' + */ + type?: Type; +} + +/** + * An interface representing CustomizationIPAddress. + */ +export interface CustomizationIPAddress { + /** + * Argument when Custom ip type is selected + */ + argument?: string; + /** + * Defined Ip Address when Fixed ip type is selected + */ + ipAddress?: string; + /** + * Customization Specification ip type. Possible values include: 'CUSTOM', 'DHCP_IP', 'FIXED_IP', + * 'USER_DEFINED' + */ + type?: Type1; +} + +/** + * An interface representing CustomizationIPSettings. + */ +export interface CustomizationIPSettings { + /** + * The list of gateways + */ + gateway?: string[]; + /** + * Ip address customization settings + */ + ip?: CustomizationIPAddress; + /** + * Adapter subnet mask + */ + subnetMask?: string; +} + +/** + * Windows Identity. User data customization + */ +export interface CustomizationIdentityUserData { + /** + * Is password predefined in customization policy. Default value: false. + */ + isPasswordPredefined?: boolean; +} + +/** + * An interface representing CustomizationIdentity. + */ +export interface CustomizationIdentity { + /** + * Windows Text Identity. Prepared data + */ + data?: string; + /** + * Virtual machine host name settings + */ + hostName?: CustomizationHostName; + /** + * Identity type. Possible values include: 'WINDOWS_TEXT', 'WINDOWS', 'LINUX' + */ + type?: Type2; + /** + * Windows Identity. User data customization + */ + userData?: CustomizationIdentityUserData; +} + +/** + * An interface representing CustomizationNicSetting. + */ +export interface CustomizationNicSetting { + /** + * The list of adapters' settings + */ + adapter?: CustomizationIPSettings; + /** + * NIC mac address + */ + macAddress?: string; +} + +/** + * The specification for Customization Policy + */ +export interface CustomizationSpecification { + /** + * Customization Identity. It contains data about user and hostname + */ + identity?: CustomizationIdentity; + /** + * Network interface settings + */ + nicSettings?: CustomizationNicSetting[]; +} + +/** + * The virtual machine customization policy + */ +export interface CustomizationPolicy { + /** + * Customization policy azure id + */ + id?: string; + /** + * Azure region + */ + location?: string; + /** + * Customization policy name + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Policy description + */ + description?: string; + /** + * The Private cloud id + */ + privateCloudId?: string; + /** + * Detailed customization policy specification + */ + specification?: CustomizationSpecification; + /** + * The type of customization (Linux or Windows). Possible values include: 'LINUX', 'WINDOWS' + */ + customizationPolicyPropertiesType?: CustomizationPolicyPropertiesType; + /** + * Policy version + */ + version?: string; + /** + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + /** * The purchase SKU for CloudSimple paid resources */ @@ -292,12 +447,14 @@ export interface DedicatedCloudService extends BaseResource { readonly isAccountOnboarded?: OnboardingStatus; /** * total nodes purchased + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nodes?: number; + readonly nodes?: number; /** * link to a service management web portal + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - serviceURL?: string; + readonly serviceURL?: string; /** * The list of tags */ @@ -309,6 +466,66 @@ export interface DedicatedCloudService extends BaseResource { readonly type?: string; } +/** + * Guest OS Customization properties + */ +export interface GuestOSCustomization { + /** + * List of dns servers to use + */ + dnsServers?: string[]; + /** + * Virtual Machine hostname + */ + hostName?: string; + /** + * Password for login + */ + password?: string; + /** + * id of customization policy + */ + policyId?: string; + /** + * Username for login + */ + username?: string; +} + +/** + * Guest OS nic customization + */ +export interface GuestOSNICCustomization { + /** + * IP address allocation method. Possible values include: 'static', 'dynamic' + */ + allocation?: Allocation; + /** + * List of dns servers to use + */ + dnsServers?: string[]; + /** + * Gateway addresses assigned to nic + */ + gateway?: string[]; + /** + * Static ip address for nic + */ + ipAddress?: string; + /** + * Network mask for nic + */ + mask?: string; + /** + * primary WINS server for Windows + */ + primaryWinsServer?: string; + /** + * secondary WINS server for Windows + */ + secondaryWinsServer?: string; +} + /** * Operation error model */ @@ -496,6 +713,10 @@ export interface VirtualNetwork { * Virtual NIC model */ export interface VirtualNic { + /** + * guest OS customization for nic + */ + customization?: GuestOSNICCustomization; /** * NIC ip address */ @@ -834,6 +1055,10 @@ export interface VirtualMachine extends BaseResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly controllers?: VirtualDiskController[]; + /** + * Virtual machine properties + */ + customization?: GuestOSCustomization; /** * The list of Virtual Disks */ @@ -871,7 +1096,7 @@ export interface VirtualMachine extends BaseResource { */ numberOfCores: number; /** - * Password for login + * Password for login. Deprecated - use customization property */ password?: string; /** @@ -903,7 +1128,7 @@ export interface VirtualMachine extends BaseResource { */ templateId?: string; /** - * Username for login + * Username for login. Deprecated - use customization property */ username?: string; /** @@ -1044,6 +1269,17 @@ export interface SkusAvailabilityListOptionalParams extends msRest.RequestOption skuId?: string; } +/** + * Optional Parameters. + */ +export interface CustomizationPoliciesListOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the list operation. only type is allowed here as a filter e.g. + * $filter=type eq 'xxxx' + */ + filter?: string; +} + /** * Optional Parameters. */ @@ -1279,6 +1515,18 @@ export interface PrivateCloudList extends Array { nextLink?: string; } +/** + * @interface + * List of customization polices response model + * @extends Array + */ +export interface CustomizationPoliciesListResponse extends Array { + /** + * Link for next list of the Customization policy + */ + nextLink?: string; +} + /** * @interface * List of resource pools response model @@ -1429,6 +1677,47 @@ export type VirtualMachineStatus = 'running' | 'suspended' | 'poweredoff' | 'upd */ export type StopMode = 'reboot' | 'suspend' | 'shutdown' | 'poweroff'; +/** + * Defines values for Type. + * Possible values include: 'USER_DEFINED', 'PREFIX_BASED', 'FIXED', 'VIRTUAL_MACHINE_NAME', + * 'CUSTOM_NAME' + * @readonly + * @enum {string} + */ +export type Type = 'USER_DEFINED' | 'PREFIX_BASED' | 'FIXED' | 'VIRTUAL_MACHINE_NAME' | 'CUSTOM_NAME'; + +/** + * Defines values for Type1. + * Possible values include: 'CUSTOM', 'DHCP_IP', 'FIXED_IP', 'USER_DEFINED' + * @readonly + * @enum {string} + */ +export type Type1 = 'CUSTOM' | 'DHCP_IP' | 'FIXED_IP' | 'USER_DEFINED'; + +/** + * Defines values for Type2. + * Possible values include: 'WINDOWS_TEXT', 'WINDOWS', 'LINUX' + * @readonly + * @enum {string} + */ +export type Type2 = 'WINDOWS_TEXT' | 'WINDOWS' | 'LINUX'; + +/** + * Defines values for CustomizationPolicyPropertiesType. + * Possible values include: 'LINUX', 'WINDOWS' + * @readonly + * @enum {string} + */ +export type CustomizationPolicyPropertiesType = 'LINUX' | 'WINDOWS'; + +/** + * Defines values for Allocation. + * Possible values include: 'static', 'dynamic' + * @readonly + * @enum {string} + */ +export type Allocation = 'static' | 'dynamic'; + /** * Contains response data for the list operation. */ @@ -1909,6 +2198,66 @@ export type PrivateCloudsListNextResponse = PrivateCloudList & { }; }; +/** + * Contains response data for the list operation. + */ +export type CustomizationPoliciesListResponse2 = CustomizationPoliciesListResponse & { + /** + * 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: CustomizationPoliciesListResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type CustomizationPoliciesGetResponse = CustomizationPolicy & { + /** + * 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: CustomizationPolicy; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type CustomizationPoliciesListNextResponse = CustomizationPoliciesListResponse & { + /** + * 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: CustomizationPoliciesListResponse; + }; +}; + /** * Contains response data for the list operation. */ diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/mappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/mappers.ts index 8f0066f574ee..2580b22499f2 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/mappers.ts +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/mappers.ts @@ -225,6 +225,262 @@ export const CSRPError: msRest.CompositeMapper = { } }; +export const CustomizationHostName: msRest.CompositeMapper = { + serializedName: "CustomizationHostName", + type: { + name: "Composite", + className: "CustomizationHostName", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const CustomizationIPAddress: msRest.CompositeMapper = { + serializedName: "CustomizationIPAddress", + type: { + name: "Composite", + className: "CustomizationIPAddress", + modelProperties: { + argument: { + serializedName: "argument", + type: { + name: "String" + } + }, + ipAddress: { + serializedName: "ipAddress", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const CustomizationIPSettings: msRest.CompositeMapper = { + serializedName: "CustomizationIPSettings", + type: { + name: "Composite", + className: "CustomizationIPSettings", + modelProperties: { + gateway: { + serializedName: "gateway", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + ip: { + serializedName: "ip", + type: { + name: "Composite", + className: "CustomizationIPAddress" + } + }, + subnetMask: { + serializedName: "subnetMask", + type: { + name: "String" + } + } + } + } +}; + +export const CustomizationIdentityUserData: msRest.CompositeMapper = { + serializedName: "CustomizationIdentity_userData", + type: { + name: "Composite", + className: "CustomizationIdentityUserData", + modelProperties: { + isPasswordPredefined: { + serializedName: "isPasswordPredefined", + defaultValue: false, + type: { + name: "Boolean" + } + } + } + } +}; + +export const CustomizationIdentity: msRest.CompositeMapper = { + serializedName: "CustomizationIdentity", + type: { + name: "Composite", + className: "CustomizationIdentity", + modelProperties: { + data: { + serializedName: "data", + type: { + name: "String" + } + }, + hostName: { + serializedName: "hostName", + type: { + name: "Composite", + className: "CustomizationHostName" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + userData: { + serializedName: "userData", + type: { + name: "Composite", + className: "CustomizationIdentityUserData" + } + } + } + } +}; + +export const CustomizationNicSetting: msRest.CompositeMapper = { + serializedName: "CustomizationNicSetting", + type: { + name: "Composite", + className: "CustomizationNicSetting", + modelProperties: { + adapter: { + serializedName: "adapter", + type: { + name: "Composite", + className: "CustomizationIPSettings" + } + }, + macAddress: { + serializedName: "macAddress", + type: { + name: "String" + } + } + } + } +}; + +export const CustomizationSpecification: msRest.CompositeMapper = { + serializedName: "CustomizationSpecification", + type: { + name: "Composite", + className: "CustomizationSpecification", + modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "CustomizationIdentity" + } + }, + nicSettings: { + serializedName: "nicSettings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CustomizationNicSetting" + } + } + } + } + } + } +}; + +export const CustomizationPolicy: msRest.CompositeMapper = { + serializedName: "CustomizationPolicy", + type: { + name: "Composite", + className: "CustomizationPolicy", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + privateCloudId: { + serializedName: "properties.privateCloudId", + type: { + name: "String" + } + }, + specification: { + serializedName: "properties.specification", + type: { + name: "Composite", + className: "CustomizationSpecification" + } + }, + customizationPolicyPropertiesType: { + serializedName: "properties.type", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + export const Sku: msRest.CompositeMapper = { serializedName: "Sku", type: { @@ -290,7 +546,7 @@ export const DedicatedCloudNode: msRest.CompositeMapper = { readOnly: true, serializedName: "name", constraints: { - Pattern: /^[-a-zA-Z0-9]+$/ + Pattern: /^[a-zA-Z0-9]([-_.a-zA-Z0-9]*[a-zA-Z0-9])?$/ }, type: { name: "String" @@ -458,7 +714,7 @@ export const DedicatedCloudService: msRest.CompositeMapper = { readOnly: true, serializedName: "name", constraints: { - Pattern: /^[-a-zA-Z0-9]+$/ + Pattern: /^[a-zA-Z0-9]([-_.a-zA-Z0-9]*[a-zA-Z0-9])?$/ }, type: { name: "String" @@ -485,12 +741,14 @@ export const DedicatedCloudService: msRest.CompositeMapper = { } }, nodes: { + readOnly: true, serializedName: "properties.nodes", type: { name: "Number" } }, serviceURL: { + readOnly: true, serializedName: "properties.serviceURL", type: { name: "String" @@ -518,6 +776,113 @@ export const DedicatedCloudService: msRest.CompositeMapper = { } }; +export const GuestOSCustomization: msRest.CompositeMapper = { + serializedName: "GuestOSCustomization", + type: { + name: "Composite", + className: "GuestOSCustomization", + modelProperties: { + dnsServers: { + serializedName: "dnsServers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + hostName: { + serializedName: "hostName", + type: { + name: "String" + } + }, + password: { + serializedName: "password", + type: { + name: "String" + } + }, + policyId: { + serializedName: "policyId", + type: { + name: "String" + } + }, + username: { + serializedName: "username", + type: { + name: "String" + } + } + } + } +}; + +export const GuestOSNICCustomization: msRest.CompositeMapper = { + serializedName: "GuestOSNICCustomization", + type: { + name: "Composite", + className: "GuestOSNICCustomization", + modelProperties: { + allocation: { + serializedName: "allocation", + type: { + name: "String" + } + }, + dnsServers: { + serializedName: "dnsServers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + gateway: { + serializedName: "gateway", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + ipAddress: { + serializedName: "ipAddress", + type: { + name: "String" + } + }, + mask: { + serializedName: "mask", + type: { + name: "String" + } + }, + primaryWinsServer: { + serializedName: "primaryWinsServer", + type: { + name: "String" + } + }, + secondaryWinsServer: { + serializedName: "secondaryWinsServer", + type: { + name: "String" + } + } + } + } +}; + export const OperationError: msRest.CompositeMapper = { serializedName: "OperationError", type: { @@ -810,6 +1175,13 @@ export const VirtualNic: msRest.CompositeMapper = { name: "Composite", className: "VirtualNic", modelProperties: { + customization: { + serializedName: "customization", + type: { + name: "Composite", + className: "GuestOSNICCustomization" + } + }, ipAddresses: { serializedName: "ipAddresses", type: { @@ -1382,7 +1754,7 @@ export const VirtualMachine: msRest.CompositeMapper = { readOnly: true, serializedName: "name", constraints: { - Pattern: /^[-a-zA-Z0-9]+$/ + Pattern: /^[a-zA-Z0-9]([-_.a-zA-Z0-9]*[a-zA-Z0-9])?$/ }, type: { name: "String" @@ -1408,6 +1780,13 @@ export const VirtualMachine: msRest.CompositeMapper = { } } }, + customization: { + serializedName: "properties.customization", + type: { + name: "Composite", + className: "GuestOSCustomization" + } + }, disks: { serializedName: "properties.disks", type: { @@ -1954,6 +2333,34 @@ export const PrivateCloudList: msRest.CompositeMapper = { } }; +export const CustomizationPoliciesListResponse: msRest.CompositeMapper = { + serializedName: "CustomizationPoliciesListResponse", + type: { + name: "Composite", + className: "CustomizationPoliciesListResponse", + modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CustomizationPolicy" + } + } + } + } + } + } +}; + export const ResourcePoolsListResponse: msRest.CompositeMapper = { serializedName: "ResourcePoolsListResponse", type: { diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/parameters.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/parameters.ts index d81f0d06d134..8519cf2278c5 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/parameters.ts +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/parameters.ts @@ -30,13 +30,23 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; +export const customizationPolicyName: msRest.OperationURLParameter = { + parameterPath: "customizationPolicyName", + mapper: { + required: true, + serializedName: "customizationPolicyName", + type: { + name: "String" + } + } +}; export const dedicatedCloudNodeName: msRest.OperationURLParameter = { parameterPath: "dedicatedCloudNodeName", mapper: { required: true, serializedName: "dedicatedCloudNodeName", constraints: { - Pattern: /^[-a-zA-Z0-9]+$/ + Pattern: /^[a-zA-Z0-9]([-_.a-zA-Z0-9]*[a-zA-Z0-9])?$/ }, type: { name: "String" @@ -59,7 +69,7 @@ export const dedicatedCloudServiceName1: msRest.OperationURLParameter = { required: true, serializedName: "dedicatedCloudServiceName", constraints: { - Pattern: /^[-a-zA-Z0-9]+$/ + Pattern: /^[a-zA-Z0-9]([-_.a-zA-Z0-9]*[a-zA-Z0-9])?$/ }, type: { name: "String" @@ -229,7 +239,7 @@ export const virtualMachineName1: msRest.OperationURLParameter = { required: true, serializedName: "virtualMachineName", constraints: { - Pattern: /^[-a-zA-Z0-9]+$/ + Pattern: /^[a-zA-Z0-9]([-_.a-zA-Z0-9]*[a-zA-Z0-9])?$/ }, type: { name: "String" diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/privateCloudsMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/privateCloudsMappers.ts index b6b92e662c0b..b1fedf62e74c 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/privateCloudsMappers.ts +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/privateCloudsMappers.ts @@ -9,6 +9,7 @@ export { CSRPError, CSRPErrorBody, + GuestOSNICCustomization, PrivateCloud, PrivateCloudList, ResourcePool, diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachineTemplatesMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachineTemplatesMappers.ts index 73000267eb20..f1461bf15aef 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachineTemplatesMappers.ts +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachineTemplatesMappers.ts @@ -9,6 +9,7 @@ export { CSRPError, CSRPErrorBody, + GuestOSNICCustomization, VirtualDisk, VirtualDiskController, VirtualMachineTemplate, diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachinesMappers.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachinesMappers.ts index 02ff89614a14..5086aff9a6ce 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachinesMappers.ts +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/models/virtualMachinesMappers.ts @@ -12,6 +12,8 @@ export { CSRPErrorBody, DedicatedCloudNode, DedicatedCloudService, + GuestOSCustomization, + GuestOSNICCustomization, PatchPayload, ResourcePool, Sku, diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/customizationPolicies.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/customizationPolicies.ts new file mode 100644 index 000000000000..00e824f9965f --- /dev/null +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/customizationPolicies.ts @@ -0,0 +1,202 @@ +/* + * 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/customizationPoliciesMappers"; +import * as Parameters from "../models/parameters"; +import { VMwareCloudSimpleClientContext } from "../vMwareCloudSimpleClientContext"; + +/** Class representing a CustomizationPolicies. */ +export class CustomizationPolicies { + private readonly client: VMwareCloudSimpleClientContext; + + /** + * Create a CustomizationPolicies. + * @param {VMwareCloudSimpleClientContext} client Reference to the service client. + */ + constructor(client: VMwareCloudSimpleClientContext) { + this.client = client; + } + + /** + * Returns list of customization policies in region for private cloud + * @summary Implements get of customization policies list + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param [options] The optional parameters + * @returns Promise + */ + list(regionId: string, pcName: string, options?: Models.CustomizationPoliciesListOptionalParams): Promise; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param callback The callback + */ + list(regionId: string, pcName: string, callback: msRest.ServiceCallback): void; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param options The optional parameters + * @param callback The callback + */ + list(regionId: string, pcName: string, options: Models.CustomizationPoliciesListOptionalParams, callback: msRest.ServiceCallback): void; + list(regionId: string, pcName: string, options?: Models.CustomizationPoliciesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regionId, + pcName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Returns customization policy by its name + * @summary Implements get of customization policy + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param customizationPolicyName customization policy name + * @param [options] The optional parameters + * @returns Promise + */ + get(regionId: string, pcName: string, customizationPolicyName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param customizationPolicyName customization policy name + * @param callback The callback + */ + get(regionId: string, pcName: string, customizationPolicyName: string, callback: msRest.ServiceCallback): void; + /** + * @param regionId The region Id (westus, eastus) + * @param pcName The private cloud name + * @param customizationPolicyName customization policy name + * @param options The optional parameters + * @param callback The callback + */ + get(regionId: string, pcName: string, customizationPolicyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(regionId: string, pcName: string, customizationPolicyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + regionId, + pcName, + customizationPolicyName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Returns list of customization policies in region for private cloud + * @summary Implements get of customization policies list + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(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 + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/customizationPolicies", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regionId, + Parameters.pcName + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.filter + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomizationPoliciesListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.VMwareCloudSimple/locations/{regionId}/privateClouds/{pcName}/customizationPolicies/{customizationPolicyName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.regionId, + Parameters.pcName, + Parameters.customizationPolicyName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomizationPolicy + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CustomizationPoliciesListResponse + }, + default: { + bodyMapper: Mappers.CSRPError + } + }, + serializer +}; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/index.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/index.ts index 8b0e0e5096b4..86943a954c41 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/index.ts +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/operations/index.ts @@ -13,6 +13,7 @@ export * from "./dedicatedCloudNodes"; export * from "./dedicatedCloudServices"; export * from "./skusAvailability"; export * from "./privateClouds"; +export * from "./customizationPolicies"; export * from "./resourcePools"; export * from "./virtualMachineTemplates"; export * from "./virtualNetworks"; diff --git a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClient.ts b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClient.ts index dfebce6d20b3..79a3a10c8d53 100644 --- a/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClient.ts +++ b/sdk/vmwarecloudsimple/arm-vmwarecloudsimple/src/vMwareCloudSimpleClient.ts @@ -22,6 +22,7 @@ class VMwareCloudSimpleClient extends VMwareCloudSimpleClientContext { dedicatedCloudServices: operations.DedicatedCloudServices; skusAvailability: operations.SkusAvailability; privateClouds: operations.PrivateClouds; + customizationPolicies: operations.CustomizationPolicies; resourcePools: operations.ResourcePools; virtualMachineTemplates: operations.VirtualMachineTemplates; virtualNetworks: operations.VirtualNetworks; @@ -42,6 +43,7 @@ class VMwareCloudSimpleClient extends VMwareCloudSimpleClientContext { this.dedicatedCloudServices = new operations.DedicatedCloudServices(this); this.skusAvailability = new operations.SkusAvailability(this); this.privateClouds = new operations.PrivateClouds(this); + this.customizationPolicies = new operations.CustomizationPolicies(this); this.resourcePools = new operations.ResourcePools(this); this.virtualMachineTemplates = new operations.VirtualMachineTemplates(this); this.virtualNetworks = new operations.VirtualNetworks(this);