Skip to content

Commit

Permalink
CodeGen from PR 21599 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Update readme.python.md (Azure#21599)
  • Loading branch information
SDKAuto committed Nov 18, 2022
1 parent abec1c8 commit eb11c9c
Show file tree
Hide file tree
Showing 14 changed files with 504 additions and 382 deletions.
17 changes: 8 additions & 9 deletions common/config/rush/pnpm-lock.yaml

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

28 changes: 20 additions & 8 deletions sdk/networkfunction/arm-networkfunction/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
# Release History

## 2.0.0 (2022-11-18)

**Features**

## 1.0.1 (Unreleased)
- Added operation CollectorPolicies.updateTags
- Added Interface CollectorPoliciesUpdateTagsOptionalParams
- Added Type Alias ApiVersionParameter
- Added Type Alias CollectorPoliciesUpdateTagsResponse
- Interface CollectorPoliciesCreateOrUpdateOptionalParams has a new optional parameter tags
- Added Enum KnownApiVersionParameter

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
**Breaking Changes**

- Operation AzureTrafficCollectors.beginCreateOrUpdate has a new signature
- Operation AzureTrafficCollectors.beginCreateOrUpdateAndWait has a new signature
- Operation CollectorPolicies.beginCreateOrUpdate has a new signature
- Operation CollectorPolicies.beginCreateOrUpdateAndWait has a new signature
- Interface AzureTrafficCollectorsCreateOrUpdateOptionalParams no longer has parameter collectorPolicies
- Interface AzureTrafficCollectorsCreateOrUpdateOptionalParams no longer has parameter location
- Parameter location of interface TrackedResource is now required


## 1.0.0 (2022-07-13)

The package of @azure/arm-networkfunction is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
8 changes: 4 additions & 4 deletions sdk/networkfunction/arm-networkfunction/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "96c6e14d4dfd2aef59a69a43185308567fec8c07",
"commit": "4f8a52119114fdc8159fcc556ec580b090241f33",
"readme": "specification/networkfunction/resource-manager/readme.md",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\networkfunction\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1 --generate-sample=true",
"autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --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/networkfunction/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.2",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.0",
"use": "@autorest/typescript@6.0.0-rc.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.5.1",
"use": "@autorest/typescript@6.0.0-rc.2"
}
16 changes: 4 additions & 12 deletions sdk/networkfunction/arm-networkfunction/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 AzureTrafficCollectorClient.",
"version": "1.0.1",
"version": "2.0.0",
"engines": {
"node": ">=14.0.0"
},
Expand Down Expand Up @@ -36,7 +36,7 @@
"mkdirp": "^1.0.4",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.2.0",
"typescript": "~4.6.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"@azure/identity": "^2.0.1",
Expand Down Expand Up @@ -109,13 +109,5 @@
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-networkfunction?view=azure-node-preview"
}
}
"autoPublish": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging';
import { PollerLike } from '@azure/core-lro';
import { PollOperationState } from '@azure/core-lro';

// @public
export type ApiVersionParameter = string;

// @public
export interface AzureTrafficCollector extends TrackedResource {
collectorPolicies?: CollectorPolicy[];
readonly collectorPolicies?: ResourceReference[];
readonly etag?: string;
readonly provisioningState?: ProvisioningState;
virtualHub?: ResourceReference;
Expand Down Expand Up @@ -54,8 +57,8 @@ export interface AzureTrafficCollectorListResult {

// @public
export interface AzureTrafficCollectors {
beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<AzureTrafficCollectorsCreateOrUpdateResponse>, AzureTrafficCollectorsCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<AzureTrafficCollectorsCreateOrUpdateResponse>;
beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<AzureTrafficCollectorsCreateOrUpdateResponse>, AzureTrafficCollectorsCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<AzureTrafficCollectorsCreateOrUpdateResponse>;
beginDelete(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsDeleteOptionalParams): Promise<void>;
get(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsGetOptionalParams): Promise<AzureTrafficCollectorsGetResponse>;
Expand Down Expand Up @@ -102,8 +105,6 @@ export type AzureTrafficCollectorsBySubscriptionListResponse = AzureTrafficColle

// @public
export interface AzureTrafficCollectorsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
collectorPolicies?: CollectorPolicy[];
location?: string;
resumeFrom?: string;
tags?: {
[propertyName: string]: string;
Expand Down Expand Up @@ -150,19 +151,23 @@ export interface CloudErrorBody {

// @public
export interface CollectorPolicies {
beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<CollectorPoliciesCreateOrUpdateResponse>, CollectorPoliciesCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<CollectorPoliciesCreateOrUpdateResponse>;
beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<CollectorPoliciesCreateOrUpdateResponse>, CollectorPoliciesCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<CollectorPoliciesCreateOrUpdateResponse>;
beginDelete(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesDeleteOptionalParams): Promise<void>;
get(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesGetOptionalParams): Promise<CollectorPoliciesGetResponse>;
list(resourceGroupName: string, azureTrafficCollectorName: string, options?: CollectorPoliciesListOptionalParams): PagedAsyncIterableIterator<CollectorPolicy>;
updateTags(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, parameters: TagsObject, options?: CollectorPoliciesUpdateTagsOptionalParams): Promise<CollectorPoliciesUpdateTagsResponse>;
}

// @public
export interface CollectorPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
emissionPolicies?: EmissionPoliciesPropertiesFormat[];
ingestionPolicy?: IngestionPolicyPropertiesFormat;
resumeFrom?: string;
tags?: {
[propertyName: string]: string;
};
updateIntervalInMs?: number;
}

Expand Down Expand Up @@ -197,12 +202,18 @@ export interface CollectorPoliciesListOptionalParams extends coreClient.Operatio
export type CollectorPoliciesListResponse = CollectorPolicyListResult;

// @public
export interface CollectorPolicy extends ProxyResource {
export interface CollectorPoliciesUpdateTagsOptionalParams extends coreClient.OperationOptions {
}

// @public
export type CollectorPoliciesUpdateTagsResponse = CollectorPolicy;

// @public
export interface CollectorPolicy extends TrackedResource {
emissionPolicies?: EmissionPoliciesPropertiesFormat[];
readonly etag?: string;
ingestionPolicy?: IngestionPolicyPropertiesFormat;
readonly provisioningState?: ProvisioningState;
readonly systemData?: CollectorPolicySystemData;
}

// @public
Expand All @@ -211,10 +222,6 @@ export interface CollectorPolicyListResult {
value?: CollectorPolicy[];
}

// @public
export interface CollectorPolicySystemData extends SystemData {
}

// @public
export type CreatedByType = string;

Expand Down Expand Up @@ -250,6 +257,13 @@ export interface IngestionSourcesPropertiesFormat {
// @public
export type IngestionType = string;

// @public
export enum KnownApiVersionParameter {
TwoThousandTwentyTwo0501 = "2022-05-01",
TwoThousandTwentyTwo0801 = "2022-08-01",
TwoThousandTwentyTwo1101 = "2022-11-01"
}

// @public
export enum KnownCreatedByType {
Application = "Application",
Expand Down Expand Up @@ -357,7 +371,7 @@ export interface TagsObject {
// @public
export interface TrackedResource {
readonly id?: string;
location?: string;
location: string;
readonly name?: string;
readonly systemData?: TrackedResourceSystemData;
tags?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class AzureTrafficCollectorClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-networkfunction/1.0.1`;
const packageDetails = `azsdk-js-arm-networkfunction/2.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand All @@ -82,34 +82,41 @@ export class AzureTrafficCollectorClient extends coreClient.ServiceClient {
};
super(optionsWithDefaults);

let bearerTokenAuthenticationPolicyFound: boolean = false;
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
(pipelinePolicy) =>
pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName
);
if (!bearerTokenAuthenticationPolicyFound) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
scopes: `${optionsWithDefaults.baseUri}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
}
}
if (
!options ||
!options.pipeline ||
options.pipeline.getOrderedPolicies().length == 0 ||
!bearerTokenAuthenticationPolicyFound
) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
credential: credentials,
scopes: `${optionsWithDefaults.credentialScopes}`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
}
// Parameter assignments
this.subscriptionId = subscriptionId;

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2022-05-01";
this.apiVersion = options.apiVersion || "2022-11-01";
this.networkFunction = new NetworkFunctionImpl(this);
this.azureTrafficCollectorsBySubscription = new AzureTrafficCollectorsBySubscriptionImpl(
this
Expand Down
Loading

0 comments on commit eb11c9c

Please sign in to comment.