Skip to content

Commit

Permalink
CodeGen from PR 13923 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
dns t2 readme config (Azure#13923)
  • Loading branch information
SDKAuto committed Apr 14, 2021
1 parent b8c4ac2 commit 88be5b6
Show file tree
Hide file tree
Showing 15 changed files with 162 additions and 66 deletions.
2 changes: 1 addition & 1 deletion sdk/dns/arm-dns/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Microsoft
Copyright (c) 2021 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
9 changes: 4 additions & 5 deletions sdk/dns/arm-dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-dns

### How to use

#### nodejs - Authentication, client creation and get recordSets as an example written in TypeScript.
#### nodejs - client creation and get recordSets as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

Expand All @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0"

##### Sample code

While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { DnsManagementClient, DnsManagementModels, DnsManagementMappers } from "@azure/arm-dns";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { DnsManagementClient } = require("@azure/arm-dns");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/dns/arm-dns/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const config = {
"@azure/ms-rest-azure-js": "msRestAzure"
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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.
Expand Down
5 changes: 2 additions & 3 deletions sdk/dns/arm-dns/src/dnsManagementClient.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down
5 changes: 2 additions & 3 deletions sdk/dns/arm-dns/src/dnsManagementClientContext.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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.
Expand Down
78 changes: 76 additions & 2 deletions sdk/dns/arm-dns/src/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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.
Expand Down Expand Up @@ -310,6 +310,12 @@ export interface Zone extends Resource {
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly maxNumberOfRecordSets?: number;
/**
* The maximum number of records per record set that can be created in this DNS zone. This is a
* read-only property and any attempt to set this value will be ignored.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly maxNumberOfRecordsPerRecordSet?: number;
/**
* The current number of record sets in this DNS zone. This is a read-only property and any
* attempt to set this value will be ignored.
Expand Down Expand Up @@ -470,6 +476,54 @@ export interface RecordSetsListAllByDnsZoneOptionalParams extends msRest.Request
recordSetNameSuffix?: string;
}

/**
* Optional Parameters.
*/
export interface RecordSetsListByTypeNextOptionalParams extends msRest.RequestOptionsBase {
/**
* The maximum number of record sets to return. If not specified, returns up to 100 record sets.
*/
top?: number;
/**
* The suffix label of the record set name that has to be used to filter the record set
* enumerations. If this parameter is specified, Enumeration will return only records that end
* with .<recordSetNameSuffix>
*/
recordsetnamesuffix?: string;
}

/**
* Optional Parameters.
*/
export interface RecordSetsListByDnsZoneNextOptionalParams extends msRest.RequestOptionsBase {
/**
* The maximum number of record sets to return. If not specified, returns up to 100 record sets.
*/
top?: number;
/**
* The suffix label of the record set name that has to be used to filter the record set
* enumerations. If this parameter is specified, Enumeration will return only records that end
* with .<recordSetNameSuffix>
*/
recordsetnamesuffix?: string;
}

/**
* Optional Parameters.
*/
export interface RecordSetsListAllByDnsZoneNextOptionalParams extends msRest.RequestOptionsBase {
/**
* The maximum number of record sets to return. If not specified, returns up to 100 record sets.
*/
top?: number;
/**
* The suffix label of the record set name that has to be used to filter the record set
* enumerations. If this parameter is specified, Enumeration will return only records that end
* with .<recordSetNameSuffix>
*/
recordSetNameSuffix?: string;
}

/**
* Optional Parameters.
*/
Expand Down Expand Up @@ -539,6 +593,26 @@ export interface ZonesBeginDeleteMethodOptionalParams extends msRest.RequestOpti
ifMatch?: string;
}

/**
* Optional Parameters.
*/
export interface ZonesListByResourceGroupNextOptionalParams extends msRest.RequestOptionsBase {
/**
* The maximum number of record sets to return. If not specified, returns up to 100 record sets.
*/
top?: number;
}

/**
* Optional Parameters.
*/
export interface ZonesListNextOptionalParams extends msRest.RequestOptionsBase {
/**
* The maximum number of DNS zones to return. If not specified, returns up to 100 zones.
*/
top?: number;
}

/**
* An interface representing DnsManagementClientOptions.
*/
Expand Down
11 changes: 9 additions & 2 deletions sdk/dns/arm-dns/src/models/mappers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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.
Expand Down Expand Up @@ -536,6 +536,13 @@ export const Zone: msRest.CompositeMapper = {
name: "Number"
}
},
maxNumberOfRecordsPerRecordSet: {
readOnly: true,
serializedName: "properties.maxNumberOfRecordsPerRecordSet",
type: {
name: "Number"
}
},
numberOfRecordSets: {
readOnly: true,
serializedName: "properties.numberOfRecordSets",
Expand Down
29 changes: 14 additions & 15 deletions sdk/dns/arm-dns/src/models/parameters.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down Expand Up @@ -65,6 +64,18 @@ export const nextPageLink: msRest.OperationURLParameter = {
},
skipEncoding: true
};
export const recordsetnamesuffix: msRest.OperationQueryParameter = {
parameterPath: [
"options",
"recordsetnamesuffix"
],
mapper: {
serializedName: "$recordsetnamesuffix",
type: {
name: "String"
}
}
};
export const recordSetNameSuffix: msRest.OperationQueryParameter = {
parameterPath: [
"options",
Expand Down Expand Up @@ -99,18 +110,6 @@ export const recordType: msRest.OperationURLParameter = {
}
}
};
export const recordsetnamesuffix: msRest.OperationQueryParameter = {
parameterPath: [
"options",
"recordsetnamesuffix"
],
mapper: {
serializedName: "$recordsetnamesuffix",
type: {
name: "String"
}
}
};
export const relativeRecordSetName: msRest.OperationURLParameter = {
parameterPath: "relativeRecordSetName",
mapper: {
Expand Down
4 changes: 2 additions & 2 deletions sdk/dns/arm-dns/src/models/recordSetsMappers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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.
Expand Down
4 changes: 2 additions & 2 deletions sdk/dns/arm-dns/src/models/zonesMappers.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down
5 changes: 2 additions & 3 deletions sdk/dns/arm-dns/src/operations/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down
38 changes: 26 additions & 12 deletions sdk/dns/arm-dns/src/operations/recordSets.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* 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
Expand Down Expand Up @@ -321,7 +320,7 @@ export class RecordSets {
* @param [options] The optional parameters
* @returns Promise<Models.RecordSetsListByTypeNextResponse>
*/
listByTypeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.RecordSetsListByTypeNextResponse>;
listByTypeNext(nextPageLink: string, options?: Models.RecordSetsListByTypeNextOptionalParams): Promise<Models.RecordSetsListByTypeNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
Expand All @@ -332,8 +331,8 @@ export class RecordSets {
* @param options The optional parameters
* @param callback The callback
*/
listByTypeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.RecordSetListResult>): void;
listByTypeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.RecordSetListResult>, callback?: msRest.ServiceCallback<Models.RecordSetListResult>): Promise<Models.RecordSetsListByTypeNextResponse> {
listByTypeNext(nextPageLink: string, options: Models.RecordSetsListByTypeNextOptionalParams, callback: msRest.ServiceCallback<Models.RecordSetListResult>): void;
listByTypeNext(nextPageLink: string, options?: Models.RecordSetsListByTypeNextOptionalParams | msRest.ServiceCallback<Models.RecordSetListResult>, callback?: msRest.ServiceCallback<Models.RecordSetListResult>): Promise<Models.RecordSetsListByTypeNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
Expand All @@ -349,7 +348,7 @@ export class RecordSets {
* @param [options] The optional parameters
* @returns Promise<Models.RecordSetsListByDnsZoneNextResponse>
*/
listByDnsZoneNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.RecordSetsListByDnsZoneNextResponse>;
listByDnsZoneNext(nextPageLink: string, options?: Models.RecordSetsListByDnsZoneNextOptionalParams): Promise<Models.RecordSetsListByDnsZoneNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
Expand All @@ -360,8 +359,8 @@ export class RecordSets {
* @param options The optional parameters
* @param callback The callback
*/
listByDnsZoneNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.RecordSetListResult>): void;
listByDnsZoneNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.RecordSetListResult>, callback?: msRest.ServiceCallback<Models.RecordSetListResult>): Promise<Models.RecordSetsListByDnsZoneNextResponse> {
listByDnsZoneNext(nextPageLink: string, options: Models.RecordSetsListByDnsZoneNextOptionalParams, callback: msRest.ServiceCallback<Models.RecordSetListResult>): void;
listByDnsZoneNext(nextPageLink: string, options?: Models.RecordSetsListByDnsZoneNextOptionalParams | msRest.ServiceCallback<Models.RecordSetListResult>, callback?: msRest.ServiceCallback<Models.RecordSetListResult>): Promise<Models.RecordSetsListByDnsZoneNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
Expand All @@ -377,7 +376,7 @@ export class RecordSets {
* @param [options] The optional parameters
* @returns Promise<Models.RecordSetsListAllByDnsZoneNextResponse>
*/
listAllByDnsZoneNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.RecordSetsListAllByDnsZoneNextResponse>;
listAllByDnsZoneNext(nextPageLink: string, options?: Models.RecordSetsListAllByDnsZoneNextOptionalParams): Promise<Models.RecordSetsListAllByDnsZoneNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
Expand All @@ -388,8 +387,8 @@ export class RecordSets {
* @param options The optional parameters
* @param callback The callback
*/
listAllByDnsZoneNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.RecordSetListResult>): void;
listAllByDnsZoneNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.RecordSetListResult>, callback?: msRest.ServiceCallback<Models.RecordSetListResult>): Promise<Models.RecordSetsListAllByDnsZoneNextResponse> {
listAllByDnsZoneNext(nextPageLink: string, options: Models.RecordSetsListAllByDnsZoneNextOptionalParams, callback: msRest.ServiceCallback<Models.RecordSetListResult>): void;
listAllByDnsZoneNext(nextPageLink: string, options?: Models.RecordSetsListAllByDnsZoneNextOptionalParams | msRest.ServiceCallback<Models.RecordSetListResult>, callback?: msRest.ServiceCallback<Models.RecordSetListResult>): Promise<Models.RecordSetsListAllByDnsZoneNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
Expand Down Expand Up @@ -619,6 +618,11 @@ const listByTypeNextOperationSpec: msRest.OperationSpec = {
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.top,
Parameters.recordsetnamesuffix,
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
Expand All @@ -640,6 +644,11 @@ const listByDnsZoneNextOperationSpec: msRest.OperationSpec = {
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.top,
Parameters.recordsetnamesuffix,
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
Expand All @@ -661,6 +670,11 @@ const listAllByDnsZoneNextOperationSpec: msRest.OperationSpec = {
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.top,
Parameters.recordSetNameSuffix,
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
Expand Down
Loading

0 comments on commit 88be5b6

Please sign in to comment.