Skip to content

Commit

Permalink
CodeGen from PR 18543 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge c3c30786aee07f72a2f19b2eb6bbd89aa8b94fd1 into 12aa4dd9607f82bdc1087f24b91cec7d5c4499c2
  • Loading branch information
SDKAuto committed Apr 5, 2022
1 parent 429a952 commit d777fcf
Show file tree
Hide file tree
Showing 17 changed files with 367 additions and 53 deletions.
14 changes: 7 additions & 7 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 18 additions & 11 deletions sdk/consumption/arm-consumption/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# Release History

## 9.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes


## 10.0.0 (2022-04-05)

**Features**

- Added operation LotsOperations.listByCustomer
- Added Interface LotsListByCustomerNextOptionalParams
- Added Interface LotsListByCustomerOptionalParams
- Added Type Alias LotsListByCustomerNextResponse
- Added Type Alias LotsListByCustomerResponse
- Type Alias LegacyUsageDetail has a new parameter benefitId
- Type Alias LegacyUsageDetail has a new parameter benefitName

**Breaking Changes**

- Interface BudgetFilter no longer has parameter not


## 9.0.0 (2021-12-16)

The package of @azure/arm-consumption is using our next generation design principles since version 9.0.0, which contains breaking changes.
Expand Down
2 changes: 1 addition & 1 deletion sdk/consumption/arm-consumption/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021 Microsoft
Copyright (c) 2022 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
7 changes: 4 additions & 3 deletions sdk/consumption/arm-consumption/_meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"commit": "d600759c3516b61a7c353bc8682bccbab85a6f65",
"commit": "76c641c5f75c5c62657740c26e4946758fbad8b3",
"readme": "specification/consumption/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/consumption/resource-manager/readme.md --use=@autorest/[email protected].20211207.1",
"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/consumption/resource-manager/readme.md --use=@autorest/[email protected].20220105.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"use": "@autorest/[email protected]"
"release_tool": "@azure-tools/[email protected]",
"use": "@autorest/[email protected]"
}
25 changes: 19 additions & 6 deletions sdk/consumption/arm-consumption/api-extractor.json
Original file line number Diff line number Diff line change
@@ -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-consumption.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"
}
}
}
}
}
8 changes: 4 additions & 4 deletions sdk/consumption/arm-consumption/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ConsumptionManagementClient.",
"version": "9.0.1",
"version": "10.0.0",
"engines": {
"node": ">=12.0.0"
},
Expand All @@ -27,12 +27,12 @@
"types": "./types/arm-consumption.d.ts",
"devDependencies": {
"@microsoft/api-extractor": "^7.18.11",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-commonjs": "11.0.2",
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-multi-entry": "^3.0.0",
"@rollup/plugin-node-resolve": "^8.0.0",
"mkdirp": "^1.0.4",
"rollup": "^2.0.0",
"rollup": "^1.16.3",
"rollup-plugin-sourcemaps": "^0.4.2",
"typescript": "~4.2.0",
"uglify-js": "^3.4.9",
Expand Down Expand Up @@ -97,4 +97,4 @@
},
"sideEffects": false,
"autoPublish": true
}
}
20 changes: 19 additions & 1 deletion sdk/consumption/arm-consumption/review/arm-consumption.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export interface BudgetComparisonExpression {
export interface BudgetFilter {
and?: BudgetFilterProperties[];
dimensions?: BudgetComparisonExpression;
not?: BudgetFilterProperties;
tags?: BudgetComparisonExpression;
}

Expand Down Expand Up @@ -746,6 +745,8 @@ export type LegacyUsageDetail = UsageDetail & {
readonly chargeType?: string;
readonly frequency?: string;
readonly payGPrice?: number;
readonly benefitId?: string;
readonly benefitName?: string;
readonly pricingModel?: PricingModelType;
};

Expand Down Expand Up @@ -788,10 +789,27 @@ export interface LotsListByBillingProfileOptionalParams extends coreClient.Opera
// @public
export type LotsListByBillingProfileResponse = Lots;

// @public
export interface LotsListByCustomerNextOptionalParams extends coreClient.OperationOptions {
filter?: string;
}

// @public
export type LotsListByCustomerNextResponse = Lots;

// @public
export interface LotsListByCustomerOptionalParams extends coreClient.OperationOptions {
filter?: string;
}

// @public
export type LotsListByCustomerResponse = Lots;

// @public
export interface LotsOperations {
listByBillingAccount(billingAccountId: string, options?: LotsListByBillingAccountOptionalParams): PagedAsyncIterableIterator<LotSummary>;
listByBillingProfile(billingAccountId: string, billingProfileId: string, options?: LotsListByBillingProfileOptionalParams): PagedAsyncIterableIterator<LotSummary>;
listByCustomer(billingAccountId: string, customerId: string, options?: LotsListByCustomerOptionalParams): PagedAsyncIterableIterator<LotSummary>;
}

// @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class ConsumptionManagementClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-consumption/9.0.0`;
const packageDetails = `azsdk-js-arm-consumption/10.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down
32 changes: 30 additions & 2 deletions sdk/consumption/arm-consumption/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ export interface BudgetTimePeriod {
export interface BudgetFilter {
/** The logical "AND" expression. Must have at least 2 items. */
and?: BudgetFilterProperties[];
/** The logical "NOT" expression. */
not?: BudgetFilterProperties;
/** Has comparison expression for a dimension */
dimensions?: BudgetComparisonExpression;
/** Has comparison expression for a tag */
Expand Down Expand Up @@ -2121,6 +2119,16 @@ export type LegacyUsageDetail = UsageDetail & {
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly payGPrice?: number;
/**
* Unique identifier for the applicable benefit.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly benefitId?: string;
/**
* Name of the applicable benefit.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly benefitName?: string;
/**
* Identifier that indicates how the meter is priced.
* NOTE: This property will not be serialized. It can only be populated by the server.
Expand Down Expand Up @@ -3586,6 +3594,16 @@ export interface LotsListByBillingAccountOptionalParams
/** Contains response data for the listByBillingAccount operation. */
export type LotsListByBillingAccountResponse = Lots;

/** Optional parameters. */
export interface LotsListByCustomerOptionalParams
extends coreClient.OperationOptions {
/** May be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. Tag filter is a key value pair string where key and value is separated by a colon (:). */
filter?: string;
}

/** Contains response data for the listByCustomer operation. */
export type LotsListByCustomerResponse = Lots;

/** Optional parameters. */
export interface LotsListByBillingProfileNextOptionalParams
extends coreClient.OperationOptions {}
Expand All @@ -3603,6 +3621,16 @@ export interface LotsListByBillingAccountNextOptionalParams
/** Contains response data for the listByBillingAccountNext operation. */
export type LotsListByBillingAccountNextResponse = Lots;

/** Optional parameters. */
export interface LotsListByCustomerNextOptionalParams
extends coreClient.OperationOptions {
/** May be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. Tag filter is a key value pair string where key and value is separated by a colon (:). */
filter?: string;
}

/** Contains response data for the listByCustomerNext operation. */
export type LotsListByCustomerNextResponse = Lots;

/** Optional parameters. */
export interface CreditsGetOptionalParams extends coreClient.OperationOptions {}

Expand Down
22 changes: 14 additions & 8 deletions sdk/consumption/arm-consumption/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,6 @@ export const BudgetFilter: coreClient.CompositeMapper = {
}
}
},
not: {
serializedName: "not",
type: {
name: "Composite",
className: "BudgetFilterProperties"
}
},
dimensions: {
serializedName: "dimensions",
type: {
Expand Down Expand Up @@ -3023,7 +3016,6 @@ export const ReservationTransaction: coreClient.CompositeMapper = {
};

export const ModernReservationTransaction: coreClient.CompositeMapper = {
serializedName: "Modern",
type: {
name: "Composite",
className: "ModernReservationTransaction",
Expand Down Expand Up @@ -3542,6 +3534,20 @@ export const LegacyUsageDetail: coreClient.CompositeMapper = {
name: "Number"
}
},
benefitId: {
serializedName: "properties.benefitId",
readOnly: true,
type: {
name: "String"
}
},
benefitName: {
serializedName: "properties.benefitName",
readOnly: true,
type: {
name: "String"
}
},
pricingModel: {
serializedName: "properties.pricingModel",
readOnly: true,
Expand Down
11 changes: 11 additions & 0 deletions sdk/consumption/arm-consumption/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,14 @@ export const endDate1: OperationQueryParameter = {
}
}
};

export const customerId: OperationURLParameter = {
parameterPath: "customerId",
mapper: {
serializedName: "customerId",
required: true,
type: {
name: "String"
}
}
};
Loading

0 comments on commit d777fcf

Please sign in to comment.