Skip to content

Commit

Permalink
quota-track2 (#18453)
Browse files Browse the repository at this point in the history
* quota-track2

* update

* update
  • Loading branch information
colawwj authored Nov 2, 2021
1 parent 1fa2da5 commit c29b7b1
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 134 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 15 additions & 10 deletions sdk/quota/arm-quota/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion sdk/quota/arm-quota/_meta.json
Original file line number Diff line number Diff line change
@@ -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/[email protected]",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
Expand Down
16 changes: 3 additions & 13 deletions sdk/quota/arm-quota/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
57 changes: 26 additions & 31 deletions sdk/quota/arm-quota/review/arm-quota.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<OperationResponse>;
}
export type LimitType = string;

// @public (undocumented)
export interface OperationDisplay {
Expand All @@ -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)
Expand Down Expand Up @@ -245,6 +221,25 @@ export interface QuotaListOptionalParams extends coreClient.OperationOptions {
// @public
export type QuotaListResponse = QuotaListHeaders & QuotaLimits;

// @public
export interface QuotaOperation {
list(options?: QuotaOperationListOptionalParams): PagedAsyncIterableIterator<OperationResponse>;
}

// @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;
Expand Down
8 changes: 4 additions & 4 deletions sdk/quota/arm-quota/src/azureQuotaExtensionAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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;
}
2 changes: 1 addition & 1 deletion sdk/quota/arm-quota/src/azureQuotaExtensionAPIContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down
35 changes: 14 additions & 21 deletions sdk/quota/arm-quota/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
/**
Expand Down Expand Up @@ -487,12 +477,15 @@ export interface QuotaRequestSubmitResponse202 {
properties?: Record<string, unknown>;
}

/** 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 {
Expand Down Expand Up @@ -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
Expand Down
48 changes: 16 additions & 32 deletions sdk/quota/arm-quota/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
}
}
}
};
Expand Down Expand Up @@ -1124,5 +1108,5 @@ export const QuotaListNextHeaders: coreClient.CompositeMapper = {

export let discriminators = {
LimitJsonObject: LimitJsonObject,
"LimitJsonObject.LimitValue": LimitValue
"LimitJsonObject.LimitValue": LimitObject
};
2 changes: 1 addition & 1 deletion sdk/quota/arm-quota/src/operations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
export * from "./usages";
export * from "./quota";
export * from "./quotaRequestStatus";
export * from "./operation";
export * from "./quotaOperation";
Loading

0 comments on commit c29b7b1

Please sign in to comment.