diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0ddde8fe88ff..43ed123b3ce6 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -621,6 +621,9 @@ # PRLabel: %Mgmt /sdk/templatespecs/arm-templatespecs @qiaozha @dw511214992 +# PRLabel: %Mgmt +/sdk/quota/arm-quota @qiaozha @dw511214992 + # PRLabel: %Monitor /sdk/monitor/ @hectorhdzg @applicationinsights-js-owners /sdk/monitor/monitor-query @KarishmaGhiya @maorleger diff --git a/sdk/quota/arm-quota/CHANGELOG.md b/sdk/quota/arm-quota/CHANGELOG.md index 397c3f0ee3f2..6e2e3c05dbd4 100644 --- a/sdk/quota/arm-quota/CHANGELOG.md +++ b/sdk/quota/arm-quota/CHANGELOG.md @@ -1,15 +1,20 @@ -## Release History +## 1.0.0-beta.2 (2021-11-01) + +**Features** -### 1.0.0-beta.2 (Unreleased) + - Added operation group QuotaOperation + - Added Interface QuotaOperationListNextOptionalParams + - Added Interface QuotaOperationListOptionalParams + - Added Type Alias LimitObject + - Added Type Alias QuotaOperationListNextResponse + - Added Type Alias QuotaOperationListResponse + - Class AzureQuotaExtensionAPI has a new parameter quotaOperation -#### Features Added +**Breaking Changes** -#### Breaking Changes - -#### Bugs Fixed - -#### Other Changes - -### 1.0.0-beta.1 (2021-09-28) + - Removed operation group Operation + - Class AzureQuotaExtensionAPI no longer has parameter operation + +## 1.0.0-beta.1 (2021-09-28) - Initial Release diff --git a/sdk/quota/arm-quota/_meta.json b/sdk/quota/arm-quota/_meta.json index 494149f8fe57..199bf2a388e9 100644 --- a/sdk/quota/arm-quota/_meta.json +++ b/sdk/quota/arm-quota/_meta.json @@ -1,5 +1,5 @@ { - "commit": "a8e6d89a08f7b872be9da82b735274bc84199e8e", + "commit": "4a2c1e8f277dd11a0da89d56eab8ff1a922d3a69", "readme": "specification/quota/resource-manager/readme.md", "autorest_command": "autorest --version=3.1.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/quota/resource-manager/readme.md --use=@autorest/typescript@6.0.0-beta.13", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", diff --git a/sdk/quota/arm-quota/package.json b/sdk/quota/arm-quota/package.json index 62022bd09ef0..00aacdf0fbc3 100644 --- a/sdk/quota/arm-quota/package.json +++ b/sdk/quota/arm-quota/package.json @@ -4,9 +4,7 @@ "author": "Microsoft Corporation", "description": "A generated SDK for AzureQuotaExtensionAPI.", "version": "1.0.0-beta.2", - "engines": { - "node": ">=12.0.0" - }, + "engines": { "node": ">=12.0.0" }, "dependencies": { "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", @@ -16,13 +14,7 @@ "@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", @@ -48,9 +40,7 @@ "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", diff --git a/sdk/quota/arm-quota/review/arm-quota.api.md b/sdk/quota/arm-quota/review/arm-quota.api.md index 193694b98d54..fcf7819e2bba 100644 --- a/sdk/quota/arm-quota/review/arm-quota.api.md +++ b/sdk/quota/arm-quota/review/arm-quota.api.md @@ -14,10 +14,10 @@ import { PollOperationState } from '@azure/core-lro'; export class AzureQuotaExtensionAPI extends AzureQuotaExtensionAPIContext { constructor(credentials: coreAuth.TokenCredential, options?: AzureQuotaExtensionAPIOptionalParams); // (undocumented) - operation: Operation; - // (undocumented) quota: Quota; // (undocumented) + quotaOperation: QuotaOperation; + // (undocumented) quotaRequestStatus: QuotaRequestStatus; // (undocumented) usages: Usages; @@ -114,27 +114,17 @@ export interface LimitJsonObject { } // @public (undocumented) -export type LimitJsonObjectUnion = LimitJsonObject | LimitValue; - -// @public -export interface LimitObject { - limitObjectType?: LimitType; - limitType?: QuotaLimitTypes; - value: number; -} - -// @public -export type LimitType = string; +export type LimitJsonObjectUnion = LimitJsonObject | LimitObject; // @public -export type LimitValue = LimitJsonObject & LimitObject & { +export type LimitObject = LimitJsonObject & { limitObjectType: "LimitValue"; + value: number; + limitType?: QuotaLimitTypes; }; // @public -export interface Operation { - list(options?: OperationListOptionalParams): PagedAsyncIterableIterator; -} +export type LimitType = string; // @public (undocumented) export interface OperationDisplay { @@ -151,20 +141,6 @@ export interface OperationList { value?: OperationResponse[]; } -// @public -export interface OperationListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationListNextResponse = OperationList; - -// @public -export interface OperationListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationListResponse = OperationList; - // @public (undocumented) export interface OperationResponse { // (undocumented) @@ -245,6 +221,25 @@ export interface QuotaListOptionalParams extends coreClient.OperationOptions { // @public export type QuotaListResponse = QuotaListHeaders & QuotaLimits; +// @public +export interface QuotaOperation { + list(options?: QuotaOperationListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface QuotaOperationListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QuotaOperationListNextResponse = OperationList; + +// @public +export interface QuotaOperationListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QuotaOperationListResponse = OperationList; + // @public export interface QuotaProperties { readonly isQuotaApplicable?: boolean; diff --git a/sdk/quota/arm-quota/src/azureQuotaExtensionAPI.ts b/sdk/quota/arm-quota/src/azureQuotaExtensionAPI.ts index b4d063c3a969..fa6f90d395c0 100644 --- a/sdk/quota/arm-quota/src/azureQuotaExtensionAPI.ts +++ b/sdk/quota/arm-quota/src/azureQuotaExtensionAPI.ts @@ -11,13 +11,13 @@ import { UsagesImpl, QuotaImpl, QuotaRequestStatusImpl, - OperationImpl + QuotaOperationImpl } from "./operations"; import { Usages, Quota, QuotaRequestStatus, - Operation + QuotaOperation } from "./operationsInterfaces"; import { AzureQuotaExtensionAPIContext } from "./azureQuotaExtensionAPIContext"; import { AzureQuotaExtensionAPIOptionalParams } from "./models"; @@ -36,11 +36,11 @@ export class AzureQuotaExtensionAPI extends AzureQuotaExtensionAPIContext { this.usages = new UsagesImpl(this); this.quota = new QuotaImpl(this); this.quotaRequestStatus = new QuotaRequestStatusImpl(this); - this.operation = new OperationImpl(this); + this.quotaOperation = new QuotaOperationImpl(this); } usages: Usages; quota: Quota; quotaRequestStatus: QuotaRequestStatus; - operation: Operation; + quotaOperation: QuotaOperation; } diff --git a/sdk/quota/arm-quota/src/azureQuotaExtensionAPIContext.ts b/sdk/quota/arm-quota/src/azureQuotaExtensionAPIContext.ts index 688da9f72579..468df4cc1914 100644 --- a/sdk/quota/arm-quota/src/azureQuotaExtensionAPIContext.ts +++ b/sdk/quota/arm-quota/src/azureQuotaExtensionAPIContext.ts @@ -36,7 +36,7 @@ export class AzureQuotaExtensionAPIContext extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-quota/1.0.0-beta.1`; + const packageDetails = `azsdk-js-arm-quota/1.0.0-beta.2`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` diff --git a/sdk/quota/arm-quota/src/models/index.ts b/sdk/quota/arm-quota/src/models/index.ts index d003075a0a75..c0f37b8cfeea 100644 --- a/sdk/quota/arm-quota/src/models/index.ts +++ b/sdk/quota/arm-quota/src/models/index.ts @@ -8,7 +8,7 @@ import * as coreClient from "@azure/core-client"; -export type LimitJsonObjectUnion = LimitJsonObject | LimitValue; +export type LimitJsonObjectUnion = LimitJsonObject | LimitObject; /** Resource usage. */ export interface CurrentUsagesBase { @@ -343,16 +343,6 @@ export interface CreateGenericQuotaRequestParameters { value?: CurrentQuotaLimitBase[]; } -/** The resource quota limit value. */ -export interface LimitObject { - /** The quota/limit value */ - value: number; - /** The limit object type. */ - limitObjectType?: LimitType; - /** The quota or usages limit types. */ - limitType?: QuotaLimitTypes; -} - /** Quota request response. */ export interface QuotaRequestOneResourceSubmitResponse { /** @@ -487,12 +477,15 @@ export interface QuotaRequestSubmitResponse202 { properties?: Record; } -/** The resource quota limit. */ -export type LimitValue = LimitJsonObject & - LimitObject & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - limitObjectType: "LimitValue"; - }; +/** The resource quota limit value. */ +export type LimitObject = LimitJsonObject & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + limitObjectType: "LimitValue"; + /** The quota/limit value */ + value: number; + /** The quota or usages limit types. */ + limitType?: QuotaLimitTypes; +}; /** Defines headers for Usages_get operation. */ export interface UsagesGetHeaders { @@ -711,18 +704,18 @@ export interface QuotaRequestStatusListNextOptionalParams export type QuotaRequestStatusListNextResponse = QuotaRequestDetailsList; /** Optional parameters. */ -export interface OperationListOptionalParams +export interface QuotaOperationListOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type OperationListResponse = OperationList; +export type QuotaOperationListResponse = OperationList; /** Optional parameters. */ -export interface OperationListNextOptionalParams +export interface QuotaOperationListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type OperationListNextResponse = OperationList; +export type QuotaOperationListNextResponse = OperationList; /** Optional parameters. */ export interface AzureQuotaExtensionAPIOptionalParams diff --git a/sdk/quota/arm-quota/src/models/mappers.ts b/sdk/quota/arm-quota/src/models/mappers.ts index 9417b5a4f3b0..77e0c3fb3058 100644 --- a/sdk/quota/arm-quota/src/models/mappers.ts +++ b/sdk/quota/arm-quota/src/models/mappers.ts @@ -757,34 +757,6 @@ export const CreateGenericQuotaRequestParameters: coreClient.CompositeMapper = { } }; -export const LimitObject: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LimitObject", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Number" - } - }, - limitObjectType: { - serializedName: "limitObjectType", - type: { - name: "String" - } - }, - limitType: { - serializedName: "limitType", - type: { - name: "String" - } - } - } - } -}; - export const QuotaRequestOneResourceSubmitResponse: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1018,16 +990,28 @@ export const QuotaRequestSubmitResponse202: coreClient.CompositeMapper = { } }; -export const LimitValue: coreClient.CompositeMapper = { +export const LimitObject: coreClient.CompositeMapper = { serializedName: "LimitValue", type: { name: "Composite", - className: "LimitValue", + className: "LimitObject", uberParent: "LimitJsonObject", polymorphicDiscriminator: LimitJsonObject.type.polymorphicDiscriminator, modelProperties: { ...LimitJsonObject.type.modelProperties, - ...LimitObject.type.modelProperties + value: { + serializedName: "value", + required: true, + type: { + name: "Number" + } + }, + limitType: { + serializedName: "limitType", + type: { + name: "String" + } + } } } }; @@ -1124,5 +1108,5 @@ export const QuotaListNextHeaders: coreClient.CompositeMapper = { export let discriminators = { LimitJsonObject: LimitJsonObject, - "LimitJsonObject.LimitValue": LimitValue + "LimitJsonObject.LimitValue": LimitObject }; diff --git a/sdk/quota/arm-quota/src/operations/index.ts b/sdk/quota/arm-quota/src/operations/index.ts index 94c54b2fb240..3c991fd4c4fa 100644 --- a/sdk/quota/arm-quota/src/operations/index.ts +++ b/sdk/quota/arm-quota/src/operations/index.ts @@ -9,4 +9,4 @@ export * from "./usages"; export * from "./quota"; export * from "./quotaRequestStatus"; -export * from "./operation"; +export * from "./quotaOperation"; diff --git a/sdk/quota/arm-quota/src/operations/operation.ts b/sdk/quota/arm-quota/src/operations/quotaOperation.ts similarity index 82% rename from sdk/quota/arm-quota/src/operations/operation.ts rename to sdk/quota/arm-quota/src/operations/quotaOperation.ts index b593bf9690f1..cb164bb59ab7 100644 --- a/sdk/quota/arm-quota/src/operations/operation.ts +++ b/sdk/quota/arm-quota/src/operations/quotaOperation.ts @@ -7,26 +7,26 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation } from "../operationsInterfaces"; +import { QuotaOperation } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { AzureQuotaExtensionAPIContext } from "../azureQuotaExtensionAPIContext"; import { OperationResponse, - OperationListNextOptionalParams, - OperationListOptionalParams, - OperationListResponse, - OperationListNextResponse + QuotaOperationListNextOptionalParams, + QuotaOperationListOptionalParams, + QuotaOperationListResponse, + QuotaOperationListNextResponse } from "../models"; /// -/** Class containing Operation operations. */ -export class OperationImpl implements Operation { +/** Class containing QuotaOperation operations. */ +export class QuotaOperationImpl implements QuotaOperation { private readonly client: AzureQuotaExtensionAPIContext; /** - * Initialize a new instance of the class Operation class. + * Initialize a new instance of the class QuotaOperation class. * @param client Reference to the service client */ constructor(client: AzureQuotaExtensionAPIContext) { @@ -38,7 +38,7 @@ export class OperationImpl implements Operation { * @param options The options parameters. */ public list( - options?: OperationListOptionalParams + options?: QuotaOperationListOptionalParams ): PagedAsyncIterableIterator { const iter = this.listPagingAll(options); return { @@ -55,7 +55,7 @@ export class OperationImpl implements Operation { } private async *listPagingPage( - options?: OperationListOptionalParams + options?: QuotaOperationListOptionalParams ): AsyncIterableIterator { let result = await this._list(options); yield result.value || []; @@ -68,7 +68,7 @@ export class OperationImpl implements Operation { } private async *listPagingAll( - options?: OperationListOptionalParams + options?: QuotaOperationListOptionalParams ): AsyncIterableIterator { for await (const page of this.listPagingPage(options)) { yield* page; @@ -80,8 +80,8 @@ export class OperationImpl implements Operation { * @param options The options parameters. */ private _list( - options?: OperationListOptionalParams - ): Promise { + options?: QuotaOperationListOptionalParams + ): Promise { return this.client.sendOperationRequest({ options }, listOperationSpec); } @@ -92,8 +92,8 @@ export class OperationImpl implements Operation { */ private _listNext( nextLink: string, - options?: OperationListNextOptionalParams - ): Promise { + options?: QuotaOperationListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { nextLink, options }, listNextOperationSpec diff --git a/sdk/quota/arm-quota/src/operationsInterfaces/index.ts b/sdk/quota/arm-quota/src/operationsInterfaces/index.ts index 94c54b2fb240..3c991fd4c4fa 100644 --- a/sdk/quota/arm-quota/src/operationsInterfaces/index.ts +++ b/sdk/quota/arm-quota/src/operationsInterfaces/index.ts @@ -9,4 +9,4 @@ export * from "./usages"; export * from "./quota"; export * from "./quotaRequestStatus"; -export * from "./operation"; +export * from "./quotaOperation"; diff --git a/sdk/quota/arm-quota/src/operationsInterfaces/operation.ts b/sdk/quota/arm-quota/src/operationsInterfaces/quotaOperation.ts similarity index 72% rename from sdk/quota/arm-quota/src/operationsInterfaces/operation.ts rename to sdk/quota/arm-quota/src/operationsInterfaces/quotaOperation.ts index 76f522d80216..97446b6b53f9 100644 --- a/sdk/quota/arm-quota/src/operationsInterfaces/operation.ts +++ b/sdk/quota/arm-quota/src/operationsInterfaces/quotaOperation.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { OperationResponse, OperationListOptionalParams } from "../models"; +import { OperationResponse, QuotaOperationListOptionalParams } from "../models"; /// -/** Interface representing a Operation. */ -export interface Operation { +/** Interface representing a QuotaOperation. */ +export interface QuotaOperation { /** * List all the operations supported by the Microsoft.Quota resource provider. * @param options The options parameters. */ list( - options?: OperationListOptionalParams + options?: QuotaOperationListOptionalParams ): PagedAsyncIterableIterator; }