Skip to content

Commit

Permalink
CodeGen from PR 25320 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 76beafbe96c121f2560e476036650eeb889a21a5 into 895c9c994480fb8e9d34b0d1973d57717ab0c979
  • Loading branch information
SDKAuto committed Aug 16, 2023
1 parent e61abe4 commit 1bb0cc9
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 80 deletions.
11 changes: 7 additions & 4 deletions common/config/rush/pnpm-lock.yaml

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

37 changes: 3 additions & 34 deletions sdk/iothub/arm-iothub/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
# Release History

## 6.3.0-beta.3 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 6.3.0-beta.2 (2023-04-06)

## 6.3.0-beta.3 (2023-08-16)

**Features**

Expand All @@ -30,35 +20,14 @@
- Interface IotHubProperties has a new optional parameter encryption
- Interface IotHubProperties has a new optional parameter ipVersion
- Interface IotHubProperties has a new optional parameter rootCertificate
- Interface RoutingEndpoints has a new optional parameter cosmosDBSqlCollections
- Interface RoutingEndpoints has a new optional parameter cosmosDBSqlContainers
- Add parameters of IotHubResourceUpdateHeaders to TypeAlias IotHubResourceUpdateResponse
- Added Enum KnownIpVersion
- Enum KnownRoutingSource has a new value DigitalTwinChangeEvents
- Enum KnownRoutingSource has a new value MqttBrokerMessages
- Added function getContinuationToken

## 6.3.0-beta.1 (2022-12-06)

**Features**

- Added Interface EncryptionPropertiesDescription
- Added Interface IotHubPropertiesDeviceStreams
- Added Interface IotHubResourceCreateOrUpdateHeaders
- Added Interface IotHubResourceDeleteHeaders
- Added Interface IotHubResourceUpdateHeaders
- Added Interface KeyVaultKeyProperties
- Added Interface PrivateEndpointConnectionsDeleteHeaders
- Added Interface PrivateEndpointConnectionsUpdateHeaders
- Added Interface RootCertificateProperties
- Added Interface RoutingCosmosDBSqlApiProperties
- Interface IotHubProperties has a new optional parameter deviceStreams
- Interface IotHubProperties has a new optional parameter encryption
- Interface IotHubProperties has a new optional parameter rootCertificate
- Interface RoutingEndpoints has a new optional parameter cosmosDBSqlCollections
- Add parameters of IotHubResourceUpdateHeaders to TypeAlias IotHubResourceUpdateResponse
- Enum KnownRoutingSource has a new value DigitalTwinChangeEvents
- Enum KnownRoutingSource has a new value MqttBrokerMessages

## 6.2.0 (2022-08-18)

**Features**
Expand Down
8 changes: 4 additions & 4 deletions sdk/iothub/arm-iothub/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "8725e0700974d2c8cba436b5696728ebc5a80f1b",
"commit": "bcddb87efe7168f472d73482e1185881857be47e",
"readme": "specification/iothub/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\\iothub\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.10 --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/iothub/resource-manager/readme.md --use=@autorest/typescript@^6.0.4",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
"use": "@autorest/typescript@6.0.0-rc.10"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.1",
"use": "@autorest/typescript@^6.0.4"
}
17 changes: 5 additions & 12 deletions sdk/iothub/arm-iothub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.5.0",
"@azure/core-lro": "^2.5.4",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/core-rest-pipeline": "^1.12.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand Down Expand Up @@ -48,6 +48,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^14.0.0",
"ts-node": "^10.0.0",
"@azure/dev-tool": "^1.0.0"
},
"repository": {
Expand Down Expand Up @@ -111,13 +112,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iothub/arm-iothub",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-iothub?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/iothub/arm-iothub"
}
4 changes: 2 additions & 2 deletions sdk/iothub/arm-iothub/review/arm-iothub.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ export interface RouteProperties {
// @public
export interface RoutingCosmosDBSqlApiProperties {
authenticationType?: AuthenticationType;
collectionName: string;
containerName: string;
databaseName: string;
endpointUri: string;
id?: string;
Expand All @@ -1186,7 +1186,7 @@ export interface RoutingCosmosDBSqlApiProperties {

// @public
export interface RoutingEndpoints {
cosmosDBSqlCollections?: RoutingCosmosDBSqlApiProperties[];
cosmosDBSqlContainers?: RoutingCosmosDBSqlApiProperties[];
eventHubs?: RoutingEventHubProperties[];
serviceBusQueues?: RoutingServiceBusQueueEndpointProperties[];
serviceBusTopics?: RoutingServiceBusTopicEndpointProperties[];
Expand Down
2 changes: 1 addition & 1 deletion sdk/iothub/arm-iothub/src/iotHubClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class IotHubClient extends coreClient.ServiceClient {

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2022-11-15-preview";
this.apiVersion = options.apiVersion || "2023-06-30-preview";
this.operations = new OperationsImpl(this);
this.iotHubResource = new IotHubResourceImpl(this);
this.resourceProviderCommon = new ResourceProviderCommonImpl(this);
Expand Down
20 changes: 10 additions & 10 deletions sdk/iothub/arm-iothub/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ export interface RoutingEndpoints {
eventHubs?: RoutingEventHubProperties[];
/** The list of storage container endpoints that IoT hub routes messages to, based on the routing rules. */
storageContainers?: RoutingStorageContainerProperties[];
/** The list of Cosmos DB collection endpoints that IoT hub routes messages to, based on the routing rules. */
cosmosDBSqlCollections?: RoutingCosmosDBSqlApiProperties[];
/** The list of Cosmos DB container endpoints that IoT hub routes messages to, based on the routing rules. */
cosmosDBSqlContainers?: RoutingCosmosDBSqlApiProperties[];
}

/** The properties related to service bus queue endpoint types. */
Expand Down Expand Up @@ -394,33 +394,33 @@ export interface RoutingStorageContainerProperties {
encoding?: RoutingStorageContainerPropertiesEncoding;
}

/** The properties related to a cosmos DB sql collection endpoint. */
/** The properties related to a cosmos DB sql container endpoint. */
export interface RoutingCosmosDBSqlApiProperties {
/** The name that identifies this endpoint. The name can only include alphanumeric characters, periods, underscores, hyphens and has a maximum length of 64 characters. The following names are reserved: events, fileNotifications, $default. Endpoint names must be unique across endpoint types. */
name: string;
/** Id of the cosmos DB sql collection endpoint */
/** Id of the cosmos DB sql container endpoint */
id?: string;
/** The subscription identifier of the cosmos DB account. */
subscriptionId?: string;
/** The name of the resource group of the cosmos DB account. */
resourceGroup?: string;
/** The url of the cosmos DB account. It must include the protocol https:// */
endpointUri: string;
/** Method used to authenticate against the cosmos DB sql collection endpoint */
/** Method used to authenticate against the cosmos DB sql container endpoint */
authenticationType?: AuthenticationType;
/** Managed identity properties of routing cosmos DB collection endpoint. */
/** Managed identity properties of routing cosmos DB container endpoint. */
identity?: ManagedIdentity;
/** The primary key of the cosmos DB account. */
primaryKey?: string;
/** The secondary key of the cosmos DB account. */
secondaryKey?: string;
/** The name of the cosmos DB database in the cosmos DB account. */
databaseName: string;
/** The name of the cosmos DB sql collection in the cosmos DB database. */
collectionName: string;
/** The name of the partition key associated with this cosmos DB sql collection if one exists. This is an optional parameter. */
/** The name of the cosmos DB sql container in the cosmos DB database. */
containerName: string;
/** The name of the partition key associated with this cosmos DB sql container if one exists. This is an optional parameter. */
partitionKeyName?: string;
/** The template for generating a synthetic partition key value for use with this cosmos DB sql collection. The template must include at least one of the following placeholders: {iothub}, {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and non-placeholder components are arbitrary. This parameter is only required if PartitionKeyName is specified. */
/** The template for generating a synthetic partition key value for use with this cosmos DB sql container. The template must include at least one of the following placeholders: {iothub}, {deviceid}, {DD}, {MM}, and {YYYY}. Any one placeholder may be specified at most once, but order and non-placeholder components are arbitrary. This parameter is only required if PartitionKeyName is specified. */
partitionKeyTemplate?: string;
}

Expand Down
8 changes: 4 additions & 4 deletions sdk/iothub/arm-iothub/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,8 @@ export const RoutingEndpoints: coreClient.CompositeMapper = {
}
}
},
cosmosDBSqlCollections: {
serializedName: "cosmosDBSqlCollections",
cosmosDBSqlContainers: {
serializedName: "cosmosDBSqlContainers",
type: {
name: "Sequence",
element: {
Expand Down Expand Up @@ -1171,8 +1171,8 @@ export const RoutingCosmosDBSqlApiProperties: coreClient.CompositeMapper = {
name: "String"
}
},
collectionName: {
serializedName: "collectionName",
containerName: {
serializedName: "containerName",
required: true,
type: {
name: "String"
Expand Down
2 changes: 1 addition & 1 deletion sdk/iothub/arm-iothub/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const $host: OperationURLParameter = {
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2022-11-15-preview",
defaultValue: "2023-06-30-preview",
isConstant: true,
serializedName: "api-version",
type: {
Expand Down
43 changes: 43 additions & 0 deletions sdk/iothub/arm-iothub/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/iothub/arm-iothub/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-iothub": [
"./src/index"
]
}
"importHelpers": true
},
"include": [
"./src/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
"./test/**/*.ts"
],
"exclude": [
"node_modules"
Expand Down

0 comments on commit 1bb0cc9

Please sign in to comment.