Skip to content

Commit

Permalink
CodeGen from PR 23978 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge bd3a3dadfc4293fc038733d00987d7b3e9813ebf into 1fa1f7bf030a0a5370d9cbf61d68b7d753a2b4c3
  • Loading branch information
SDKAuto committed May 25, 2023
1 parent ceddbec commit cb02858
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 51 deletions.
16 changes: 11 additions & 5 deletions common/config/rush/pnpm-lock.yaml

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

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

## 32.0.0 (2023-05-25)

**Features**

## 31.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed
- Added Type Alias AdminState
- Interface DdosProtectionPlan has a new optional parameter publicIpAddresses
- Interface VirtualNetworkGateway has a new optional parameter adminState
- Added Enum KnownAdminState

### Other Changes
**Breaking Changes**

- Interface DdosProtectionPlan no longer has parameter publicIPAddresses


## 31.0.0 (2023-05-19)

**Features**
Expand Down
8 changes: 4 additions & 4 deletions sdk/network/arm-network/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "ec1dd632841c121d2e2eac3d9e5e24a0428fa741",
"commit": "71a586feb524b691231daa75fbc462ecca3b158e",
"readme": "specification/network/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.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\\network\\resource-manager\\readme.md --use=@autorest/[email protected].2 --generate-sample=true",
"autorest_command": "autorest --version=3.9.3 --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/network/resource-manager/readme.md --use=@autorest/[email protected].0-rc.10",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
"use": "@autorest/[email protected].2"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.0",
"use": "@autorest/[email protected].0-rc.10"
}
18 changes: 5 additions & 13 deletions sdk/network/arm-network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for NetworkManagementClient.",
"version": "31.0.1",
"version": "32.0.0",
"engines": {
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.5.3",
"@azure/core-lro": "^2.5.0",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
Expand Down Expand Up @@ -36,7 +36,7 @@
"mkdirp": "^2.1.2",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~5.0.0",
"typescript": "~4.8.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"dotenv": "^16.0.0",
Expand Down Expand Up @@ -111,13 +111,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-network?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/network/arm-network"
}
12 changes: 11 additions & 1 deletion sdk/network/arm-network/review/arm-network.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@ export interface AdminRulesListOptionalParams extends coreClient.OperationOption
// @public
export type AdminRulesListResponse = AdminRuleListResult;

// @public
export type AdminState = string;

// @public
export interface ApplicationGateway extends Resource {
authenticationCertificates?: ApplicationGatewayAuthenticationCertificate[];
Expand Down Expand Up @@ -2951,7 +2954,7 @@ export interface DdosProtectionPlan {
location?: string;
readonly name?: string;
readonly provisioningState?: ProvisioningState;
readonly publicIPAddresses?: SubResource[];
readonly publicIpAddresses?: SubResource[];
readonly resourceGuid?: string;
tags?: {
[propertyName: string]: string;
Expand Down Expand Up @@ -5949,6 +5952,12 @@ export enum KnownAdminRuleKind {
Default = "Default"
}

// @public
export enum KnownAdminState {
Disabled = "Disabled",
Enabled = "Enabled"
}

// @public
export enum KnownApplicationGatewayBackendHealthServerHealth {
Down = "Down",
Expand Down Expand Up @@ -13583,6 +13592,7 @@ export type VirtualNetworkEncryptionEnforcement = string;
// @public
export interface VirtualNetworkGateway extends Resource {
active?: boolean;
adminState?: AdminState;
allowRemoteVnetTraffic?: boolean;
allowVirtualWanTraffic?: boolean;
bgpSettings?: BgpSettings;
Expand Down
32 changes: 26 additions & 6 deletions sdk/network/arm-network/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1221,15 +1221,15 @@ export interface DdosProtectionPlan {
*/
readonly provisioningState?: ProvisioningState;
/**
* The list of public IPs associated with the DDoS protection plan resource. This list is read-only.
* The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly publicIPAddresses?: SubResource[];
readonly virtualNetworks?: SubResource[];
/**
* The list of virtual networks associated with the DDoS protection plan resource. This list is read-only.
* The list of public IPs associated with the DDoS protection plan resource. This list is read-only.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly virtualNetworks?: SubResource[];
readonly publicIpAddresses?: SubResource[];
}

/** A list of DDoS protection plans. */
Expand Down Expand Up @@ -2614,9 +2614,9 @@ export interface VirtualApplianceNicProperties {

/** Network Virtual Appliance Additional NIC properties. */
export interface VirtualApplianceAdditionalNicProperties {
/** Customer Name for additional nic */
/** Name of additional nic */
name?: string;
/** Customer Intent for Public Ip on additional nic */
/** Flag (true alse) for Intent for Public Ip on additional nic */
hasPublicIp?: boolean;
}

Expand Down Expand Up @@ -10424,6 +10424,8 @@ export interface VirtualNetworkGateway extends Resource {
allowVirtualWanTraffic?: boolean;
/** Configure this gateway to accept traffic from other Azure Virtual Networks. This configuration does not support connectivity to Azure Virtual WAN. */
allowRemoteVnetTraffic?: boolean;
/** Property to indicate if the Express Route Gateway serves traffic when there are multiple Express Route Gateways in the vnet */
adminState?: AdminState;
}

/** A common class for general resource information. */
Expand Down Expand Up @@ -15183,6 +15185,24 @@ export enum KnownVpnNatRuleMode {
*/
export type VpnNatRuleMode = string;

/** Known values of {@link AdminState} that the service accepts. */
export enum KnownAdminState {
/** Enabled */
Enabled = "Enabled",
/** Disabled */
Disabled = "Disabled"
}

/**
* Defines values for AdminState. \
* {@link KnownAdminState} can be used interchangeably with AdminState,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Enabled** \
* **Disabled**
*/
export type AdminState = string;

/** Known values of {@link VirtualNetworkGatewayConnectionType} that the service accepts. */
export enum KnownVirtualNetworkGatewayConnectionType {
/** IPsec */
Expand Down
14 changes: 10 additions & 4 deletions sdk/network/arm-network/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3317,8 +3317,8 @@ export const DdosProtectionPlan: coreClient.CompositeMapper = {
name: "String"
}
},
publicIPAddresses: {
serializedName: "properties.publicIPAddresses",
virtualNetworks: {
serializedName: "properties.virtualNetworks",
readOnly: true,
type: {
name: "Sequence",
Expand All @@ -3330,8 +3330,8 @@ export const DdosProtectionPlan: coreClient.CompositeMapper = {
}
}
},
virtualNetworks: {
serializedName: "properties.virtualNetworks",
publicIpAddresses: {
serializedName: "properties.publicIpAddresses",
readOnly: true,
type: {
name: "Sequence",
Expand Down Expand Up @@ -27829,6 +27829,12 @@ export const VirtualNetworkGateway: coreClient.CompositeMapper = {
type: {
name: "Boolean"
}
},
adminState: {
serializedName: "properties.adminState",
type: {
name: "String"
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/network/arm-network/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export const applicationGatewayName: OperationURLParameter = {
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2022-11-01",
defaultValue: "2023-02-01",
isConstant: true,
serializedName: "api-version",
type: {
Expand Down
2 changes: 1 addition & 1 deletion sdk/network/arm-network/src/networkManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-network/31.0.1`;
const packageDetails = `azsdk-js-arm-network/32.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down
43 changes: 43 additions & 0 deletions sdk/network/arm-network/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

import {
Recorder,
RecorderStartOptions,
env
} from "@azure-tools/test-recorder";
import { assert } from "chai";
import { Context } from "mocha";

const replaceableVariables: Record<string, string> = {
AZURE_CLIENT_ID: "azure_client_id",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
SUBSCRIPTION_ID: "azure_subscription_id"
};

const recorderOptions: RecorderStartOptions = {
envSetupForPlayback: replaceableVariables
};

describe("My test", () => {
let recorder: Recorder;

beforeEach(async function(this: Context) {
recorder = new Recorder(this.currentTest);
await recorder.start(recorderOptions);
});

afterEach(async function() {
await recorder.stop();
});

it("sample test", async function() {
console.log("Hi, I'm a test!");
});
});
10 changes: 2 additions & 8 deletions sdk/network/arm-network/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@
],
"declaration": true,
"outDir": "./dist-esm",
"importHelpers": true,
"paths": {
"@azure/arm-network": [
"./src/index"
]
}
"importHelpers": true
},
"include": [
"./src/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
"./test/**/*.ts"
],
"exclude": [
"node_modules"
Expand Down

0 comments on commit cb02858

Please sign in to comment.