From f0b5d32d4be1592491c20dd152f158b1226eff70 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 15 Apr 2022 02:38:54 +0000 Subject: [PATCH] CodeGen from PR 18646 in Azure/azure-rest-api-specs Adding new input enum value to Microsoft.Capacity version 2022-03-01 (#18646) --- .../arm-reservations/CHANGELOG.md | 24 +++ sdk/reservations/arm-reservations/README.md | 3 +- sdk/reservations/arm-reservations/_meta.json | 7 +- .../arm-reservations/api-extractor.json | 25 ++- .../arm-reservations/package.json | 33 ++- .../review/arm-reservations.api.md | 25 ++- .../src/azureReservationAPI.ts | 7 +- .../arm-reservations/src/models/index.ts | 146 +++++++++---- .../arm-reservations/src/models/mappers.ts | 198 +++++++++++++----- .../arm-reservations/src/models/parameters.ts | 32 ++- .../arm-reservations/src/operations/quota.ts | 20 +- .../arm-reservations/tsconfig.json | 19 +- sdk/reservations/ci.mgmt.yml | 7 +- 13 files changed, 397 insertions(+), 149 deletions(-) diff --git a/sdk/reservations/arm-reservations/CHANGELOG.md b/sdk/reservations/arm-reservations/CHANGELOG.md index c2b1b167d394..567070e6946c 100644 --- a/sdk/reservations/arm-reservations/CHANGELOG.md +++ b/sdk/reservations/arm-reservations/CHANGELOG.md @@ -1,5 +1,29 @@ # Release History +## 7.1.0 (2022-04-15) + +**Features** + + - Interface CurrentQuotaLimit has a new optional parameter id + - Interface CurrentQuotaLimit has a new optional parameter name + - Interface CurrentQuotaLimit has a new optional parameter type + - Interface CurrentQuotaLimitBase has a new optional parameter id + - Interface CurrentQuotaLimitBase has a new optional parameter name + - Interface CurrentQuotaLimitBase has a new optional parameter type + - Interface GetCatalogOptionalParams has a new optional parameter offerId + - Interface GetCatalogOptionalParams has a new optional parameter planId + - Interface GetCatalogOptionalParams has a new optional parameter publisherId + - Interface QuotaRequestOneResourceSubmitResponse has a new optional parameter idPropertiesId + - Interface QuotaRequestOneResourceSubmitResponse has a new optional parameter namePropertiesName + - Interface QuotaRequestOneResourceSubmitResponse has a new optional parameter typePropertiesType + - Interface ReservationOrderResponse has a new optional parameter benefitStartTime + - Interface ReservationsProperties has a new optional parameter benefitStartTime + - Interface ReservationSummary has a new optional parameter processingCount + - Enum KnownDisplayProvisioningState has a new value Processing + - Enum KnownReservationStatusCode has a new value Processing + - Enum KnownReservedResourceType has a new value VirtualMachineSoftware + + ## 7.0.0 (2022-01-21) The package of @azure/arm-reservations is using our next generation design principles since version 7.0.0, which contains breaking changes. diff --git a/sdk/reservations/arm-reservations/README.md b/sdk/reservations/arm-reservations/README.md index c829de0fd94c..d93dec6fc892 100644 --- a/sdk/reservations/arm-reservations/README.md +++ b/sdk/reservations/arm-reservations/README.md @@ -49,7 +49,8 @@ For more information about how to create an Azure AD Application check out [this ```javascript const { AzureReservationAPI } = require("@azure/arm-reservations"); const { DefaultAzureCredential } = require("@azure/identity"); -const client = new AzureReservationAPI(new DefaultAzureCredential()); +const subscriptionId = "00000000-0000-0000-0000-000000000000"; +const client = new AzureReservationAPI(new DefaultAzureCredential(), subscriptionId); ``` diff --git a/sdk/reservations/arm-reservations/_meta.json b/sdk/reservations/arm-reservations/_meta.json index d5a3fef24022..13920cbf7b19 100644 --- a/sdk/reservations/arm-reservations/_meta.json +++ b/sdk/reservations/arm-reservations/_meta.json @@ -1,7 +1,8 @@ { - "commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb", + "commit": "256b8ec7d045dbe2daf91030b0d6b7f09c8e42d9", "readme": "specification/reservations/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/reservations/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220114.1 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/reservations/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20220114.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/reservations/arm-reservations/api-extractor.json b/sdk/reservations/arm-reservations/api-extractor.json index 4e853dfd7c0e..f58ddad8a978 100644 --- a/sdk/reservations/arm-reservations/api-extractor.json +++ b/sdk/reservations/arm-reservations/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-reservations.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/reservations/arm-reservations/package.json b/sdk/reservations/arm-reservations/package.json index b33764a7a20f..0bc95377aca3 100644 --- a/sdk/reservations/arm-reservations/package.json +++ b/sdk/reservations/arm-reservations/package.json @@ -3,8 +3,10 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureReservationAPI.", - "version": "7.0.0", - "engines": { "node": ">=12.0.0" }, + "version": "7.1.0", + "engines": { + "node": ">=12.0.0" + }, "dependencies": { "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", @@ -14,7 +16,13 @@ "@azure/core-rest-pipeline": "^1.1.0", "tslib": "^2.2.0" }, - "keywords": ["node", "azure", "typescript", "browser", "isomorphic"], + "keywords": [ + "node", + "azure", + "typescript", + "browser", + "isomorphic" + ], "license": "MIT", "main": "./dist/index.js", "module": "./dist-esm/src/index.js", @@ -41,7 +49,9 @@ "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" }, - "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, "files": [ "dist/**/*.js", "dist/**/*.js.map", @@ -88,16 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { "path": "src/AzureReservationAPI.ts", "prefix": "packageDetails" } - ] - }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": ["azure"], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-reservations?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/reservations/arm-reservations/review/arm-reservations.api.md b/sdk/reservations/arm-reservations/review/arm-reservations.api.md index 4e74f67b6a0a..37c8ae5c2215 100644 --- a/sdk/reservations/arm-reservations/review/arm-reservations.api.md +++ b/sdk/reservations/arm-reservations/review/arm-reservations.api.md @@ -231,14 +231,20 @@ export interface CreateGenericQuotaRequestParameters { // @public export interface CurrentQuotaLimit { + readonly id?: string; readonly message?: string; + readonly name?: string; properties?: QuotaProperties; readonly provisioningState?: QuotaRequestState; + readonly type?: string; } // @public export interface CurrentQuotaLimitBase { + readonly id?: string; + readonly name?: string; properties?: QuotaProperties; + readonly type?: string; } // @public @@ -366,6 +372,9 @@ export type GetAppliedReservationListResponse = AppliedReservations; // @public export interface GetCatalogOptionalParams extends coreClient.OperationOptions { location?: string; + offerId?: string; + planId?: string; + publisherId?: string; reservedResourceType?: string; } @@ -420,6 +429,8 @@ export enum KnownDisplayProvisioningState { // (undocumented) Pending = "Pending", // (undocumented) + Processing = "Processing", + // (undocumented) Succeeded = "Succeeded" } @@ -704,6 +715,8 @@ export enum KnownReservationStatusCode { // (undocumented) Pending = "Pending", // (undocumented) + Processing = "Processing", + // (undocumented) PurchaseError = "PurchaseError", // (undocumented) Split = "Split", @@ -772,6 +785,8 @@ export enum KnownReservedResourceType { // (undocumented) VirtualMachines = "VirtualMachines", // (undocumented) + VirtualMachineSoftware = "VirtualMachineSoftware", + // (undocumented) VMwareCloudSimple = "VMwareCloudSimple" } @@ -963,7 +978,7 @@ export interface QuotaCreateOrUpdateOptionalParams extends coreClient.OperationO } // @public -export type QuotaCreateOrUpdateResponse = QuotaRequestOneResourceSubmitResponse; +export type QuotaCreateOrUpdateResponse = CurrentQuotaLimitBase; // @public export interface QuotaGetHeaders { @@ -1044,12 +1059,15 @@ export interface QuotaRequestDetailsList { // @public export interface QuotaRequestOneResourceSubmitResponse { readonly id?: string; + readonly idPropertiesId?: string; readonly message?: string; readonly name?: string; + readonly namePropertiesName?: string; properties?: QuotaProperties; readonly provisioningState?: QuotaRequestState; readonly requestSubmitTime?: Date; readonly type?: string; + readonly typePropertiesType?: string; } // @public @@ -1120,7 +1138,7 @@ export interface QuotaUpdateOptionalParams extends coreClient.OperationOptions { } // @public -export type QuotaUpdateResponse = QuotaRequestOneResourceSubmitResponse; +export type QuotaUpdateResponse = CurrentQuotaLimitBase; // @public (undocumented) export interface RenewPropertiesResponse { @@ -1329,6 +1347,7 @@ export type ReservationOrderPurchaseResponse = ReservationOrderResponse; // @public (undocumented) export interface ReservationOrderResponse { + benefitStartTime?: Date; billingPlan?: ReservationBillingPlan; createdDateTime?: Date; displayName?: string; @@ -1389,6 +1408,7 @@ export interface ReservationsProperties { appliedScopes?: string[]; appliedScopeType?: AppliedScopeType; archived?: boolean; + benefitStartTime?: Date; billingPlan?: ReservationBillingPlan; billingScopeId?: string; capabilities?: string; @@ -1436,6 +1456,7 @@ export interface ReservationSummary { readonly expiringCount?: number; readonly failedCount?: number; readonly pendingCount?: number; + readonly processingCount?: number; readonly succeededCount?: number; } diff --git a/sdk/reservations/arm-reservations/src/azureReservationAPI.ts b/sdk/reservations/arm-reservations/src/azureReservationAPI.ts index 37d3da80f33d..bbd726d96e35 100644 --- a/sdk/reservations/arm-reservations/src/azureReservationAPI.ts +++ b/sdk/reservations/arm-reservations/src/azureReservationAPI.ts @@ -61,7 +61,7 @@ export class AzureReservationAPI extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-reservations/7.0.0`; + const packageDetails = `azsdk-js-arm-reservations/7.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -152,7 +152,10 @@ const getCatalogOperationSpec: coreClient.OperationSpec = { queryParameters: [ Parameters.apiVersion, Parameters.reservedResourceType, - Parameters.location + Parameters.location, + Parameters.publisherId, + Parameters.offerId, + Parameters.planId ], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], diff --git a/sdk/reservations/arm-reservations/src/models/index.ts b/sdk/reservations/arm-reservations/src/models/index.ts index 46cce6a15a26..e8b08f3fba83 100644 --- a/sdk/reservations/arm-reservations/src/models/index.ts +++ b/sdk/reservations/arm-reservations/src/models/index.ts @@ -282,6 +282,8 @@ export interface ReservationOrderResponse { createdDateTime?: Date; /** This is the date when the Reservation will expire. */ expiryDate?: Date; + /** This is the DateTime when the reservation benefit started. */ + benefitStartTime?: Date; /** Total Quantity of the SKUs purchased in the Reservation. */ originalQuantity?: number; /** Represent the term of Reservation. */ @@ -361,6 +363,8 @@ export interface ReservationsProperties { provisioningState?: ProvisioningState; /** DateTime of the Reservation starting when this version is effective from. */ effectiveDateTime?: Date; + /** This is the DateTime when the reservation benefit started. */ + benefitStartTime?: Date; /** * DateTime of the last time the Reservation was updated. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -774,6 +778,11 @@ export interface ReservationSummary { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly cancelledCount?: number; + /** + * The number of reservation in Processing state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly processingCount?: number; } /** Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. */ @@ -827,6 +836,21 @@ export interface ChangeDirectoryResult { /** Quota properties. */ export interface CurrentQuotaLimitBase { + /** + * The quota request ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the quota request. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Type of resource. "Microsoft.Capacity/ServiceLimits" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; /** Quota properties for the resource. */ properties?: QuotaProperties; } @@ -899,42 +923,6 @@ export interface ServiceErrorDetail { readonly message?: string; } -/** Response for the quota submission request. */ -export interface QuotaRequestOneResourceSubmitResponse { - /** - * The quota request ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the quota request. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Type of resource. "Microsoft.Capacity/ServiceLimits" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * The quota request status. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: QuotaRequestState; - /** - * User friendly status message. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * The time when the quota request was submitted using format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requestSubmitTime?: Date; - /** Quota properties for the resource. */ - properties?: QuotaProperties; -} - /** Response with request ID that the quota request was accepted. */ export interface QuotaRequestSubmitResponse201 { /** @@ -1073,6 +1061,21 @@ export interface CurrentQuotaLimit { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly message?: string; + /** + * The quota request ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the quota request. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Type of resource. "Microsoft.Capacity/ServiceLimits" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; /** Quota properties for the resource. */ properties?: QuotaProperties; } @@ -1091,6 +1094,57 @@ export interface CreateGenericQuotaRequestParameters { value?: CurrentQuotaLimitBase[]; } +/** Response for the quota submission request. */ +export interface QuotaRequestOneResourceSubmitResponse { + /** + * The quota request ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the quota request. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Type of resource. "Microsoft.Capacity/ServiceLimits" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The quota request status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: QuotaRequestState; + /** + * User friendly status message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * The time when the quota request was submitted using format: yyyy-MM-ddTHH:mm:ssZ as specified by the ISO 8601 standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requestSubmitTime?: Date; + /** + * The quota request ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly idPropertiesId?: string; + /** + * The name of the quota request. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly namePropertiesName?: string; + /** + * Type of resource. "Microsoft.Capacity/ServiceLimits" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly typePropertiesType?: string; + /** Quota properties for the resource. */ + properties?: QuotaProperties; +} + /** Response for the quota submission request. */ export interface QuotaRequestSubmitResponse { /** @@ -1334,7 +1388,8 @@ export enum KnownReservedResourceType { DataFactory = "DataFactory", NetAppStorage = "NetAppStorage", AzureFiles = "AzureFiles", - SqlEdge = "SqlEdge" + SqlEdge = "SqlEdge", + VirtualMachineSoftware = "VirtualMachineSoftware" } /** @@ -1366,7 +1421,8 @@ export enum KnownReservedResourceType { * **DataFactory** \ * **NetAppStorage** \ * **AzureFiles** \ - * **SqlEdge** + * **SqlEdge** \ + * **VirtualMachineSoftware** */ export type ReservedResourceType = string; @@ -1426,6 +1482,7 @@ export type PaymentStatus = string; export enum KnownReservationStatusCode { None = "None", Pending = "Pending", + Processing = "Processing", Active = "Active", PurchaseError = "PurchaseError", PaymentInstrumentError = "PaymentInstrumentError", @@ -1442,6 +1499,7 @@ export enum KnownReservationStatusCode { * ### Known values supported by the service * **None** \ * **Pending** \ + * **Processing** \ * **Active** \ * **PurchaseError** \ * **PaymentInstrumentError** \ @@ -1682,6 +1740,7 @@ export enum KnownDisplayProvisioningState { Expiring = "Expiring", Expired = "Expired", Pending = "Pending", + Processing = "Processing", Cancelled = "Cancelled", Failed = "Failed" } @@ -1695,6 +1754,7 @@ export enum KnownDisplayProvisioningState { * **Expiring** \ * **Expired** \ * **Pending** \ + * **Processing** \ * **Cancelled** \ * **Failed** */ @@ -1876,6 +1936,12 @@ export interface GetCatalogOptionalParams extends coreClient.OperationOptions { reservedResourceType?: string; /** Filters the skus based on the location specified in this parameter. This can be an azure region or global */ location?: string; + /** Publisher id used to get the third party products */ + publisherId?: string; + /** Offer id used to get the third party products */ + offerId?: string; + /** Plan id used to get the third party products */ + planId?: string; } /** Contains response data for the getCatalog operation. */ @@ -1992,7 +2058,7 @@ export interface QuotaCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type QuotaCreateOrUpdateResponse = QuotaRequestOneResourceSubmitResponse; +export type QuotaCreateOrUpdateResponse = CurrentQuotaLimitBase; /** Optional parameters. */ export interface QuotaUpdateOptionalParams extends coreClient.OperationOptions { @@ -2003,7 +2069,7 @@ export interface QuotaUpdateOptionalParams extends coreClient.OperationOptions { } /** Contains response data for the update operation. */ -export type QuotaUpdateResponse = QuotaRequestOneResourceSubmitResponse; +export type QuotaUpdateResponse = CurrentQuotaLimitBase; /** Optional parameters. */ export interface QuotaListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/reservations/arm-reservations/src/models/mappers.ts b/sdk/reservations/arm-reservations/src/models/mappers.ts index 81339b6fe638..d1f8f6680547 100644 --- a/sdk/reservations/arm-reservations/src/models/mappers.ts +++ b/sdk/reservations/arm-reservations/src/models/mappers.ts @@ -854,6 +854,12 @@ export const ReservationOrderResponse: coreClient.CompositeMapper = { name: "Date" } }, + benefitStartTime: { + serializedName: "properties.benefitStartTime", + type: { + name: "DateTime" + } + }, originalQuantity: { serializedName: "properties.originalQuantity", type: { @@ -1082,6 +1088,12 @@ export const ReservationsProperties: coreClient.CompositeMapper = { name: "DateTime" } }, + benefitStartTime: { + serializedName: "benefitStartTime", + type: { + name: "DateTime" + } + }, lastUpdatedDateTime: { serializedName: "lastUpdatedDateTime", readOnly: true, @@ -2319,6 +2331,13 @@ export const ReservationSummary: coreClient.CompositeMapper = { type: { name: "Number" } + }, + processingCount: { + serializedName: "processingCount", + readOnly: true, + type: { + name: "Number" + } } } } @@ -2451,6 +2470,27 @@ export const CurrentQuotaLimitBase: coreClient.CompositeMapper = { name: "Composite", className: "CurrentQuotaLimitBase", modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, properties: { serializedName: "properties", type: { @@ -2612,64 +2652,6 @@ export const ServiceErrorDetail: coreClient.CompositeMapper = { } }; -export const QuotaRequestOneResourceSubmitResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "QuotaRequestOneResourceSubmitResponse", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - message: { - serializedName: "properties.message", - readOnly: true, - type: { - name: "String" - } - }, - requestSubmitTime: { - serializedName: "properties.requestSubmitTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - properties: { - serializedName: "properties.properties.properties", - type: { - name: "Composite", - className: "QuotaProperties" - } - } - } - } -}; - export const QuotaRequestSubmitResponse201: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2946,6 +2928,27 @@ export const CurrentQuotaLimit: coreClient.CompositeMapper = { name: "String" } }, + id: { + serializedName: "quotaInformation.id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "quotaInformation.name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "quotaInformation.type", + readOnly: true, + type: { + name: "String" + } + }, properties: { serializedName: "quotaInformation.properties", type: { @@ -3005,6 +3008,85 @@ export const CreateGenericQuotaRequestParameters: coreClient.CompositeMapper = { } }; +export const QuotaRequestOneResourceSubmitResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "QuotaRequestOneResourceSubmitResponse", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + message: { + serializedName: "properties.message", + readOnly: true, + type: { + name: "String" + } + }, + requestSubmitTime: { + serializedName: "properties.requestSubmitTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + idPropertiesId: { + serializedName: "properties.properties.id", + readOnly: true, + type: { + name: "String" + } + }, + namePropertiesName: { + serializedName: "properties.properties.name", + readOnly: true, + type: { + name: "String" + } + }, + typePropertiesType: { + serializedName: "properties.properties.type", + readOnly: true, + type: { + name: "String" + } + }, + properties: { + serializedName: "properties.properties.properties", + type: { + name: "Composite", + className: "QuotaProperties" + } + } + } + } +}; + export const QuotaRequestSubmitResponse: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/reservations/arm-reservations/src/models/parameters.ts b/sdk/reservations/arm-reservations/src/models/parameters.ts index 011b341129a9..11d71905e1af 100644 --- a/sdk/reservations/arm-reservations/src/models/parameters.ts +++ b/sdk/reservations/arm-reservations/src/models/parameters.ts @@ -89,7 +89,7 @@ export const reservationId: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-07-01", + defaultValue: "2022-03-01", isConstant: true, serializedName: "api-version", type: { @@ -226,6 +226,36 @@ export const location: OperationQueryParameter = { } }; +export const publisherId: OperationQueryParameter = { + parameterPath: ["options", "publisherId"], + mapper: { + serializedName: "publisherId", + type: { + name: "String" + } + } +}; + +export const offerId: OperationQueryParameter = { + parameterPath: ["options", "offerId"], + mapper: { + serializedName: "offerId", + type: { + name: "String" + } + } +}; + +export const planId: OperationQueryParameter = { + parameterPath: ["options", "planId"], + mapper: { + serializedName: "planId", + type: { + name: "String" + } + } +}; + export const body3: OperationParameter = { parameterPath: "body", mapper: PurchaseRequestMapper diff --git a/sdk/reservations/arm-reservations/src/operations/quota.ts b/sdk/reservations/arm-reservations/src/operations/quota.ts index fd7cf412c2f9..e321090aa366 100644 --- a/sdk/reservations/arm-reservations/src/operations/quota.ts +++ b/sdk/reservations/arm-reservations/src/operations/quota.ts @@ -231,7 +231,7 @@ export class QuotaImpl implements Quota { return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + lroResourceLocationConfig: "original-uri" }); } @@ -355,7 +355,7 @@ export class QuotaImpl implements Quota { return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + lroResourceLocationConfig: "original-uri" }); } @@ -470,16 +470,16 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse + bodyMapper: Mappers.CurrentQuotaLimitBase }, 201: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse + bodyMapper: Mappers.CurrentQuotaLimitBase }, 202: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse + bodyMapper: Mappers.CurrentQuotaLimitBase }, 204: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse + bodyMapper: Mappers.CurrentQuotaLimitBase }, default: { bodyMapper: Mappers.ExceptionResponse @@ -504,16 +504,16 @@ const updateOperationSpec: coreClient.OperationSpec = { httpMethod: "PATCH", responses: { 200: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse + bodyMapper: Mappers.CurrentQuotaLimitBase }, 201: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse + bodyMapper: Mappers.CurrentQuotaLimitBase }, 202: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse + bodyMapper: Mappers.CurrentQuotaLimitBase }, 204: { - bodyMapper: Mappers.QuotaRequestOneResourceSubmitResponse + bodyMapper: Mappers.CurrentQuotaLimitBase }, default: { bodyMapper: Mappers.ExceptionResponse diff --git a/sdk/reservations/arm-reservations/tsconfig.json b/sdk/reservations/arm-reservations/tsconfig.json index c743e7574f63..3e6ae96443f3 100644 --- a/sdk/reservations/arm-reservations/tsconfig.json +++ b/sdk/reservations/arm-reservations/tsconfig.json @@ -9,12 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { "@azure/arm-reservations": ["./src/index"] } + "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/reservations/ci.mgmt.yml b/sdk/reservations/ci.mgmt.yml index 38db12873fb0..9e047fa0e68d 100644 --- a/sdk/reservations/ci.mgmt.yml +++ b/sdk/reservations/ci.mgmt.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -10,6 +10,7 @@ trigger: include: - sdk/reservations/ci.mgmt.yml - sdk/reservations/arm-reservations/ + - sdk/reservations/arm-reservations pr: branches: include: @@ -23,11 +24,11 @@ pr: include: - sdk/reservations/ci.mgmt.yml - sdk/reservations/arm-reservations/ - + - sdk/reservations/arm-reservations extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: reservations Artifacts: - name: azure-arm-reservations - safeName: azurearmreservations \ No newline at end of file + safeName: azurearmreservations