From 1e80a0a40580040585a6a20895bdab2e69a436a0 Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2019 15:08:57 +0000 Subject: [PATCH] Generated from 18e8f73649a26d6acdba575f35b0e3af6fe3cd8c (#4528) Problem: in previous pr #6665 we modify accessModes and applicationType to enum, this will bring breaking change in java sdk. Solution: remove the two enum, change it to string type --- sdk/hdinsight/arm-hdinsight/package.json | 6 +- .../src/models/applicationsMappers.ts | 5 + .../src/models/clustersMappers.ts | 5 + .../arm-hdinsight/src/models/index.ts | 399 +++++++++- .../src/models/locationsMappers.ts | 15 +- .../arm-hdinsight/src/models/mappers.ts | 689 ++++++++++++++++++ .../arm-hdinsight/src/operations/locations.ts | 110 ++- sdk/hdinsight/arm-hdinsight/tsconfig.json | 2 +- 8 files changed, 1222 insertions(+), 9 deletions(-) diff --git a/sdk/hdinsight/arm-hdinsight/package.json b/sdk/hdinsight/arm-hdinsight/package.json index 0a8c63e3cfb4..be200c2b4656 100644 --- a/sdk/hdinsight/arm-hdinsight/package.json +++ b/sdk/hdinsight/arm-hdinsight/package.json @@ -4,9 +4,9 @@ "description": "HDInsightManagementClient Library with typescript type definitions for node.js and browser.", "version": "0.14.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.0", + "@azure/ms-rest-js": "^2.0.3", + "tslib": "^1.10.0" }, "keywords": [ "node", diff --git a/sdk/hdinsight/arm-hdinsight/src/models/applicationsMappers.ts b/sdk/hdinsight/arm-hdinsight/src/models/applicationsMappers.ts index 9e4d011634ff..abef6ef057e7 100644 --- a/sdk/hdinsight/arm-hdinsight/src/models/applicationsMappers.ts +++ b/sdk/hdinsight/arm-hdinsight/src/models/applicationsMappers.ts @@ -12,6 +12,11 @@ export { ApplicationGetHttpsEndpoint, ApplicationListResult, ApplicationProperties, + Autoscale, + AutoscaleCapacity, + AutoscaleRecurrence, + AutoscaleSchedule, + AutoscaleTimeAndCapacity, BaseResource, Cluster, ClusterDefinition, diff --git a/sdk/hdinsight/arm-hdinsight/src/models/clustersMappers.ts b/sdk/hdinsight/arm-hdinsight/src/models/clustersMappers.ts index 5a79d1d53c27..94986db631b3 100644 --- a/sdk/hdinsight/arm-hdinsight/src/models/clustersMappers.ts +++ b/sdk/hdinsight/arm-hdinsight/src/models/clustersMappers.ts @@ -11,6 +11,11 @@ export { ApplicationGetEndpoint, ApplicationGetHttpsEndpoint, ApplicationProperties, + Autoscale, + AutoscaleCapacity, + AutoscaleRecurrence, + AutoscaleSchedule, + AutoscaleTimeAndCapacity, BaseResource, Cluster, ClusterCreateParametersExtended, diff --git a/sdk/hdinsight/arm-hdinsight/src/models/index.ts b/sdk/hdinsight/arm-hdinsight/src/models/index.ts index 02328c2995da..93a988e3179c 100644 --- a/sdk/hdinsight/arm-hdinsight/src/models/index.ts +++ b/sdk/hdinsight/arm-hdinsight/src/models/index.ts @@ -76,6 +76,81 @@ export interface SecurityProfile { msiResourceId?: string; } +/** + * Time and capacity request parameters + */ +export interface AutoscaleTimeAndCapacity { + /** + * 24-hour time in the form xx:xx + */ + time?: string; + /** + * The minimum instance count of the cluster + */ + minInstanceCount?: number; + /** + * The maximum instance count of the cluster + */ + maxInstanceCount?: number; +} + +/** + * Parameters for a schedule-based autoscale rule, consisting of an array of days + a time and + * capacity + */ +export interface AutoscaleSchedule { + /** + * Days of the week for a schedule-based autoscale rule + */ + days?: DaysOfWeek[]; + /** + * Time and capacity for a schedule-based autoscale rule + */ + timeAndCapacity?: AutoscaleTimeAndCapacity; +} + +/** + * The load-based autoscale request parameters + */ +export interface AutoscaleCapacity { + /** + * The minimum instance count of the cluster + */ + minInstanceCount?: number; + /** + * The maximum instance count of the cluster + */ + maxInstanceCount?: number; +} + +/** + * Schedule-based autoscale request parameters + */ +export interface AutoscaleRecurrence { + /** + * The time zone for the autoscale schedule times + */ + timeZone?: string; + /** + * Array of schedule-based autoscale rules + */ + schedule?: AutoscaleSchedule[]; +} + +/** + * The autoscale request parameters + */ +export interface Autoscale { + /** + * Parameters for load-based autoscale + */ + capacity?: AutoscaleCapacity; + /** + * Parameters for schedule-based autoscale + */ + recurrence?: AutoscaleRecurrence; +} + /** * The hardware profile. */ @@ -202,6 +277,10 @@ export interface Role { * The instance count of the cluster. */ targetInstanceCount?: number; + /** + * The autoscale configurations. + */ + autoscaleConfiguration?: Autoscale; /** * The hardware profile. */ @@ -833,7 +912,7 @@ export interface ApplicationGetHttpsEndpoint { */ publicPort?: number; /** - * The subDomainSuffix of the application. + * The subdomain suffix of the application. */ subDomainSuffix?: string; /** @@ -932,6 +1011,154 @@ export interface Application extends ProxyResource { properties?: ApplicationProperties; } +/** + * The version properties. + */ +export interface VersionSpec { + /** + * The friendly name + */ + friendlyName?: string; + /** + * The display name + */ + displayName?: string; + /** + * Whether or not the version is the default version. + */ + isDefault?: string; + /** + * The component version property. + */ + componentVersions?: { [propertyName: string]: string }; +} + +/** + * The version capability. + */ +export interface VersionsCapability { + /** + * The list of version capabilities. + */ + available?: VersionSpec[]; +} + +/** + * The regions capability. + */ +export interface RegionsCapability { + /** + * The list of region capabilities. + */ + available?: string[]; +} + +/** + * The virtual machine sizes capability. + */ +export interface VmSizesCapability { + /** + * The list of virtual machine size capabilities. + */ + available?: string[]; +} + +/** + * The virtual machine type compatibility filter. + */ +export interface VmSizeCompatibilityFilter { + /** + * The mode for the filter. + */ + filterMode?: string; + /** + * The list of regions. + */ + regions?: string[]; + /** + * The list of cluster types available. + */ + clusterFlavors?: string[]; + /** + * The list of node types. + */ + nodeTypes?: string[]; + /** + * The list of cluster versions. + */ + clusterVersions?: string[]; + /** + * The list of virtual machine sizes. + */ + vmsizes?: string[]; +} + +/** + * The regional quota capacity. + */ +export interface RegionalQuotaCapability { + /** + * The region name. + */ + regionName?: string; + /** + * The number of cores used in the region. + */ + coresUsed?: number; + /** + * The number of cores available in the region. + */ + coresAvailable?: number; +} + +/** + * The regional quota capability. + */ +export interface QuotaCapability { + /** + * The number of cores used in the subscription. + */ + coresUsed?: number; + /** + * The number of cores that the subscription allowed. + */ + maxCoresAllowed?: number; + /** + * The list of region quota capabilities. + */ + regionalQuotas?: RegionalQuotaCapability[]; +} + +/** + * The Get Capabilities operation response. + */ +export interface CapabilitiesResult { + /** + * The version capability. + */ + versions?: { [propertyName: string]: VersionsCapability }; + /** + * The virtual machine size compatibility features. + */ + regions?: { [propertyName: string]: RegionsCapability }; + /** + * The virtual machine sizes. + */ + vmSizes?: { [propertyName: string]: VmSizesCapability }; + /** + * The virtual machine size compatibility filters. + */ + vmSizeFilters?: VmSizeCompatibilityFilter[]; + /** + * The capability features. + */ + features?: string[]; + /** + * The quota capability. + */ + quota?: QuotaCapability; +} + /** * The details about the localizable name of a type of usage. */ @@ -978,6 +1205,119 @@ export interface UsagesListResult { value?: Usage[]; } +/** + * This class represent a single filter object that defines a multidimensional set. The dimensions + * of this set are Regions, ClusterFlavors, NodeTypes and ClusterVersions. The constraint should be + * defined based on the following: FilterMode (Exclude vs Include), VMSizes (the vm sizes in affect + * of exclusion/inclusion) and the ordering of the Filters. Later filters override previous + * settings if conflicted. + */ +export interface VmSizeCompatibilityFilterV2 { + /** + * The filtering mode. Effectively this can enabling or disabling the VM sizes in a particular + * set. Possible values include: 'Exclude', 'Include' + */ + filterMode?: FilterMode; + /** + * The list of regions under the effect of the filter. + */ + regions?: string[]; + /** + * The list of cluster flavors under the effect of the filter. + */ + clusterFlavors?: string[]; + /** + * The list of node types affected by the filter. + */ + nodeTypes?: string[]; + /** + * The list of cluster versions affected in Major.Minor format. + */ + clusterVersions?: string[]; + /** + * The OSType affected, Windows or Linux. + */ + osType?: OSType[]; + /** + * The list of virtual machine sizes to include or exclude. + */ + vmSizes?: string[]; +} + +/** + * The billing meters. + */ +export interface BillingMeters { + /** + * The virtual machine sizes. + */ + meterParameter?: string; + /** + * The HDInsight meter guid. + */ + meter?: string; + /** + * The unit of meter, VMHours or CoreHours. + */ + unit?: string; +} + +/** + * The disk billing meters. + */ +export interface DiskBillingMeters { + /** + * The managed disk meter guid. + */ + diskRpMeter?: string; + /** + * The managed disk billing sku, P30 or S30. + */ + sku?: string; + /** + * The managed disk billing tier, Standard or Premium. Possible values include: 'Standard', + * 'Premium' + */ + tier?: Tier; +} + +/** + * The billing resources. + */ +export interface BillingResources { + /** + * The region or location. + */ + region?: string; + /** + * The billing meter information. + */ + billingMeters?: BillingMeters[]; + /** + * The managed disk billing information. + */ + diskBillingMeters?: DiskBillingMeters[]; +} + +/** + * The response for the operation to get regional billingSpecs for a subscription. + */ +export interface BillingResponseListResult { + /** + * The virtual machine sizes to include or exclude. + */ + vmSizes?: string[]; + /** + * The virtual machine filtering mode. Effectively this can enabling or disabling the virtual + * machine sizes in a particular set. + */ + vmSizeFilters?: VmSizeCompatibilityFilterV2[]; + /** + * The billing and managed disk billing resources for a region. + */ + billingResources?: BillingResources[]; +} + /** * The configuration object for the specified cluster. */ @@ -1169,6 +1509,15 @@ export interface OperationListResult extends Array { */ export type DirectoryType = 'ActiveDirectory'; +/** + * Defines values for DaysOfWeek. + * Possible values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', + * 'Sunday' + * @readonly + * @enum {string} + */ +export type DaysOfWeek = 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday'; + /** * Defines values for OSType. * Possible values include: 'Windows', 'Linux' @@ -1218,6 +1567,14 @@ export type HDInsightClusterProvisioningState = 'InProgress' | 'Failed' | 'Succe */ export type AsyncOperationState = 'InProgress' | 'Succeeded' | 'Failed'; +/** + * Defines values for FilterMode. + * Possible values include: 'Exclude', 'Include' + * @readonly + * @enum {string} + */ +export type FilterMode = 'Exclude' | 'Include'; + /** * Contains response data for the create operation. */ @@ -1498,6 +1855,26 @@ export type ApplicationsListByClusterNextResponse = ApplicationListResult & { }; }; +/** + * Contains response data for the getCapabilities operation. + */ +export type LocationsGetCapabilitiesResponse = CapabilitiesResult & { + /** + * 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: CapabilitiesResult; + }; +}; + /** * Contains response data for the listUsages operation. */ @@ -1518,6 +1895,26 @@ export type LocationsListUsagesResponse = UsagesListResult & { }; }; +/** + * Contains response data for the listBillingSpecs operation. + */ +export type LocationsListBillingSpecsResponse = BillingResponseListResult & { + /** + * 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: BillingResponseListResult; + }; +}; + /** * Contains response data for the list operation. */ diff --git a/sdk/hdinsight/arm-hdinsight/src/models/locationsMappers.ts b/sdk/hdinsight/arm-hdinsight/src/models/locationsMappers.ts index 7cc1406ffa0c..38927fcfbd4f 100644 --- a/sdk/hdinsight/arm-hdinsight/src/models/locationsMappers.ts +++ b/sdk/hdinsight/arm-hdinsight/src/models/locationsMappers.ts @@ -7,8 +7,21 @@ */ export { + BillingMeters, + BillingResources, + BillingResponseListResult, + CapabilitiesResult, + DiskBillingMeters, ErrorResponse, LocalizedName, + QuotaCapability, + RegionalQuotaCapability, + RegionsCapability, Usage, - UsagesListResult + UsagesListResult, + VersionsCapability, + VersionSpec, + VmSizeCompatibilityFilter, + VmSizeCompatibilityFilterV2, + VmSizesCapability } from "../models/mappers"; diff --git a/sdk/hdinsight/arm-hdinsight/src/models/mappers.ts b/sdk/hdinsight/arm-hdinsight/src/models/mappers.ts index d66b4a988aa2..523187c18e27 100644 --- a/sdk/hdinsight/arm-hdinsight/src/models/mappers.ts +++ b/sdk/hdinsight/arm-hdinsight/src/models/mappers.ts @@ -128,6 +128,145 @@ export const SecurityProfile: msRest.CompositeMapper = { } }; +export const AutoscaleTimeAndCapacity: msRest.CompositeMapper = { + serializedName: "AutoscaleTimeAndCapacity", + type: { + name: "Composite", + className: "AutoscaleTimeAndCapacity", + modelProperties: { + time: { + serializedName: "time", + type: { + name: "String" + } + }, + minInstanceCount: { + serializedName: "minInstanceCount", + type: { + name: "Number" + } + }, + maxInstanceCount: { + serializedName: "maxInstanceCount", + type: { + name: "Number" + } + } + } + } +}; + +export const AutoscaleSchedule: msRest.CompositeMapper = { + serializedName: "AutoscaleSchedule", + type: { + name: "Composite", + className: "AutoscaleSchedule", + modelProperties: { + days: { + serializedName: "days", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ] + } + } + } + }, + timeAndCapacity: { + serializedName: "timeAndCapacity", + type: { + name: "Composite", + className: "AutoscaleTimeAndCapacity" + } + } + } + } +}; + +export const AutoscaleCapacity: msRest.CompositeMapper = { + serializedName: "AutoscaleCapacity", + type: { + name: "Composite", + className: "AutoscaleCapacity", + modelProperties: { + minInstanceCount: { + serializedName: "minInstanceCount", + type: { + name: "Number" + } + }, + maxInstanceCount: { + serializedName: "maxInstanceCount", + type: { + name: "Number" + } + } + } + } +}; + +export const AutoscaleRecurrence: msRest.CompositeMapper = { + serializedName: "AutoscaleRecurrence", + type: { + name: "Composite", + className: "AutoscaleRecurrence", + modelProperties: { + timeZone: { + serializedName: "timeZone", + type: { + name: "String" + } + }, + schedule: { + serializedName: "schedule", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AutoscaleSchedule" + } + } + } + } + } + } +}; + +export const Autoscale: msRest.CompositeMapper = { + serializedName: "Autoscale", + type: { + name: "Composite", + className: "Autoscale", + modelProperties: { + capacity: { + serializedName: "capacity", + type: { + name: "Composite", + className: "AutoscaleCapacity" + } + }, + recurrence: { + serializedName: "recurrence", + type: { + name: "Composite", + className: "AutoscaleRecurrence" + } + } + } + } +}; + export const HardwareProfile: msRest.CompositeMapper = { serializedName: "HardwareProfile", type: { @@ -335,6 +474,13 @@ export const Role: msRest.CompositeMapper = { name: "Number" } }, + autoscaleConfiguration: { + serializedName: "autoscale", + type: { + name: "Composite", + className: "Autoscale" + } + }, hardwareProfile: { serializedName: "hardwareProfile", type: { @@ -1626,6 +1772,318 @@ export const Application: msRest.CompositeMapper = { } }; +export const VersionSpec: msRest.CompositeMapper = { + serializedName: "VersionSpec", + type: { + name: "Composite", + className: "VersionSpec", + modelProperties: { + friendlyName: { + serializedName: "friendlyName", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + isDefault: { + serializedName: "isDefault", + type: { + name: "String" + } + }, + componentVersions: { + serializedName: "componentVersions", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const VersionsCapability: msRest.CompositeMapper = { + serializedName: "VersionsCapability", + type: { + name: "Composite", + className: "VersionsCapability", + modelProperties: { + available: { + serializedName: "available", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VersionSpec" + } + } + } + } + } + } +}; + +export const RegionsCapability: msRest.CompositeMapper = { + serializedName: "RegionsCapability", + type: { + name: "Composite", + className: "RegionsCapability", + modelProperties: { + available: { + serializedName: "available", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const VmSizesCapability: msRest.CompositeMapper = { + serializedName: "VmSizesCapability", + type: { + name: "Composite", + className: "VmSizesCapability", + modelProperties: { + available: { + serializedName: "available", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const VmSizeCompatibilityFilter: msRest.CompositeMapper = { + serializedName: "VmSizeCompatibilityFilter", + type: { + name: "Composite", + className: "VmSizeCompatibilityFilter", + modelProperties: { + filterMode: { + serializedName: "FilterMode", + type: { + name: "String" + } + }, + regions: { + serializedName: "Regions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clusterFlavors: { + serializedName: "ClusterFlavors", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + nodeTypes: { + serializedName: "NodeTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clusterVersions: { + serializedName: "ClusterVersions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + vmsizes: { + serializedName: "vmsizes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RegionalQuotaCapability: msRest.CompositeMapper = { + serializedName: "RegionalQuotaCapability", + type: { + name: "Composite", + className: "RegionalQuotaCapability", + modelProperties: { + regionName: { + serializedName: "region_name", + type: { + name: "String" + } + }, + coresUsed: { + serializedName: "cores_used", + type: { + name: "Number" + } + }, + coresAvailable: { + serializedName: "cores_available", + type: { + name: "Number" + } + } + } + } +}; + +export const QuotaCapability: msRest.CompositeMapper = { + serializedName: "QuotaCapability", + type: { + name: "Composite", + className: "QuotaCapability", + modelProperties: { + coresUsed: { + serializedName: "cores_used", + type: { + name: "Number" + } + }, + maxCoresAllowed: { + serializedName: "max_cores_allowed", + type: { + name: "Number" + } + }, + regionalQuotas: { + serializedName: "regionalQuotas", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegionalQuotaCapability" + } + } + } + } + } + } +}; + +export const CapabilitiesResult: msRest.CompositeMapper = { + serializedName: "CapabilitiesResult", + type: { + name: "Composite", + className: "CapabilitiesResult", + modelProperties: { + versions: { + serializedName: "versions", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "VersionsCapability" + } + } + } + }, + regions: { + serializedName: "regions", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "RegionsCapability" + } + } + } + }, + vmSizes: { + serializedName: "vmSizes", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "VmSizesCapability" + } + } + } + }, + vmSizeFilters: { + serializedName: "vmSize_filters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VmSizeCompatibilityFilter" + } + } + } + }, + features: { + serializedName: "features", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + quota: { + serializedName: "quota", + type: { + name: "Composite", + className: "QuotaCapability" + } + } + } + } +}; + export const LocalizedName: msRest.CompositeMapper = { serializedName: "LocalizedName", type: { @@ -1705,6 +2163,237 @@ export const UsagesListResult: msRest.CompositeMapper = { } }; +export const VmSizeCompatibilityFilterV2: msRest.CompositeMapper = { + serializedName: "VmSizeCompatibilityFilterV2", + type: { + name: "Composite", + className: "VmSizeCompatibilityFilterV2", + modelProperties: { + filterMode: { + serializedName: "filterMode", + type: { + name: "String" + } + }, + regions: { + serializedName: "regions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clusterFlavors: { + serializedName: "clusterFlavors", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + nodeTypes: { + serializedName: "nodeTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + clusterVersions: { + serializedName: "clusterVersions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + osType: { + serializedName: "osType", + type: { + name: "Sequence", + element: { + type: { + name: "Enum", + allowedValues: [ + "Windows", + "Linux" + ] + } + } + } + }, + vmSizes: { + serializedName: "vmSizes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const BillingMeters: msRest.CompositeMapper = { + serializedName: "BillingMeters", + type: { + name: "Composite", + className: "BillingMeters", + modelProperties: { + meterParameter: { + serializedName: "meterParameter", + type: { + name: "String" + } + }, + meter: { + serializedName: "meter", + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + } + } + } +}; + +export const DiskBillingMeters: msRest.CompositeMapper = { + serializedName: "DiskBillingMeters", + type: { + name: "Composite", + className: "DiskBillingMeters", + modelProperties: { + diskRpMeter: { + serializedName: "diskRpMeter", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "String" + } + }, + tier: { + serializedName: "tier", + type: { + name: "Enum", + allowedValues: [ + "Standard", + "Premium" + ] + } + } + } + } +}; + +export const BillingResources: msRest.CompositeMapper = { + serializedName: "BillingResources", + type: { + name: "Composite", + className: "BillingResources", + modelProperties: { + region: { + serializedName: "region", + type: { + name: "String" + } + }, + billingMeters: { + serializedName: "billingMeters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingMeters" + } + } + } + }, + diskBillingMeters: { + serializedName: "diskBillingMeters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiskBillingMeters" + } + } + } + } + } + } +}; + +export const BillingResponseListResult: msRest.CompositeMapper = { + serializedName: "BillingResponseListResult", + type: { + name: "Composite", + className: "BillingResponseListResult", + modelProperties: { + vmSizes: { + serializedName: "vmSizes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + vmSizeFilters: { + serializedName: "vmSizeFilters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VmSizeCompatibilityFilterV2" + } + } + } + }, + billingResources: { + serializedName: "billingResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BillingResources" + } + } + } + } + } + } +}; + export const ClusterConfigurations: msRest.CompositeMapper = { serializedName: "ClusterConfigurations", type: { diff --git a/sdk/hdinsight/arm-hdinsight/src/operations/locations.ts b/sdk/hdinsight/arm-hdinsight/src/operations/locations.ts index 9baa0166ffad..7770e558b4aa 100644 --- a/sdk/hdinsight/arm-hdinsight/src/operations/locations.ts +++ b/sdk/hdinsight/arm-hdinsight/src/operations/locations.ts @@ -26,20 +26,48 @@ export class Locations { this.client = client; } + /** + * Gets the capabilities for the specified location. + * @param location The Azure location (region) for which to make the request. + * @param [options] The optional parameters + * @returns Promise + */ + getCapabilities(location: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The Azure location (region) for which to make the request. + * @param callback The callback + */ + getCapabilities(location: string, callback: msRest.ServiceCallback): void; + /** + * @param location The Azure location (region) for which to make the request. + * @param options The optional parameters + * @param callback The callback + */ + getCapabilities(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getCapabilities(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + options + }, + getCapabilitiesOperationSpec, + callback) as Promise; + } + /** * Lists the usages for the specified location. - * @param location The location to get capabilities for. + * @param location The Azure location (region) for which to make the request. * @param [options] The optional parameters * @returns Promise */ listUsages(location: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param location The location to get capabilities for. + * @param location The Azure location (region) for which to make the request. * @param callback The callback */ listUsages(location: string, callback: msRest.ServiceCallback): void; /** - * @param location The location to get capabilities for. + * @param location The Azure location (region) for which to make the request. * @param options The optional parameters * @param callback The callback */ @@ -53,10 +81,62 @@ export class Locations { listUsagesOperationSpec, callback) as Promise; } + + /** + * Lists the billingSpecs for the specified subscription and location. + * @param location The Azure location (region) for which to make the request. + * @param [options] The optional parameters + * @returns Promise + */ + listBillingSpecs(location: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The Azure location (region) for which to make the request. + * @param callback The callback + */ + listBillingSpecs(location: string, callback: msRest.ServiceCallback): void; + /** + * @param location The Azure location (region) for which to make the request. + * @param options The optional parameters + * @param callback The callback + */ + listBillingSpecs(location: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBillingSpecs(location: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + options + }, + listBillingSpecsOperationSpec, + callback) as Promise; + } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); +const getCapabilitiesOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/capabilities", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CapabilitiesResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const listUsagesOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/usages", @@ -80,3 +160,27 @@ const listUsagesOperationSpec: msRest.OperationSpec = { }, serializer }; + +const listBillingSpecsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/billingSpecs", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.BillingResponseListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/hdinsight/arm-hdinsight/tsconfig.json b/sdk/hdinsight/arm-hdinsight/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/hdinsight/arm-hdinsight/tsconfig.json +++ b/sdk/hdinsight/arm-hdinsight/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true