From bad549bdd7647f0c8c9fb52f6b2e390942f343bd Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 27 Feb 2020 01:04:57 +0000 Subject: [PATCH] Generated from 375d1393a93f11a355d558c5a0290cac9d267a06 Remove readonly flag from microsoftSessionAddress properties in BgpSession; add an example for IxRs directPeeringType --- sdk/peering/arm-peering/LICENSE.txt | 2 +- sdk/peering/arm-peering/README.md | 8 +- sdk/peering/arm-peering/src/models/index.ts | 559 ++++++++++++++++-- .../src/models/legacyPeeringsMappers.ts | 7 +- sdk/peering/arm-peering/src/models/mappers.ts | 335 ++++++++++- .../arm-peering/src/models/parameters.ts | 56 ++ .../arm-peering/src/models/peerAsnsMappers.ts | 7 +- .../src/models/peeringLocationsMappers.ts | 7 +- .../models/peeringServiceCountriesMappers.ts | 39 ++ .../models/peeringServiceLocationsMappers.ts | 7 +- .../models/peeringServiceProvidersMappers.ts | 7 +- .../src/models/peeringServicesMappers.ts | 7 +- .../arm-peering/src/models/peeringsMappers.ts | 7 +- .../arm-peering/src/models/prefixesMappers.ts | 7 +- ...xesMappers.ts => registeredAsnsMappers.ts} | 8 +- .../src/models/registeredPrefixesMappers.ts | 39 ++ .../arm-peering/src/operations/index.ts | 4 +- .../src/operations/legacyPeerings.ts | 7 +- .../src/operations/peeringServiceCountries.ts | 126 ++++ .../src/operations/peeringServiceLocations.ts | 11 +- .../src/operations/peeringServicePrefixes.ts | 229 ------- .../arm-peering/src/operations/prefixes.ts | 231 +++++++- .../src/operations/registeredAsns.ts | 339 +++++++++++ .../src/operations/registeredPrefixes.ts | 339 +++++++++++ .../src/peeringManagementClient.ts | 8 +- .../src/peeringManagementClientContext.ts | 2 +- 26 files changed, 2056 insertions(+), 342 deletions(-) create mode 100644 sdk/peering/arm-peering/src/models/peeringServiceCountriesMappers.ts rename sdk/peering/arm-peering/src/models/{peeringServicePrefixesMappers.ts => registeredAsnsMappers.ts} (82%) create mode 100644 sdk/peering/arm-peering/src/models/registeredPrefixesMappers.ts create mode 100644 sdk/peering/arm-peering/src/operations/peeringServiceCountries.ts delete mode 100644 sdk/peering/arm-peering/src/operations/peeringServicePrefixes.ts create mode 100644 sdk/peering/arm-peering/src/operations/registeredAsns.ts create mode 100644 sdk/peering/arm-peering/src/operations/registeredPrefixes.ts diff --git a/sdk/peering/arm-peering/LICENSE.txt b/sdk/peering/arm-peering/LICENSE.txt index b73b4a1293c3..ea8fb1516028 100644 --- a/sdk/peering/arm-peering/LICENSE.txt +++ b/sdk/peering/arm-peering/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 Microsoft +Copyright (c) 2020 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 diff --git a/sdk/peering/arm-peering/README.md b/sdk/peering/arm-peering/README.md index 8cfb0a190945..8e236720b5c4 100644 --- a/sdk/peering/arm-peering/README.md +++ b/sdk/peering/arm-peering/README.md @@ -37,7 +37,8 @@ msRestNodeAuth.interactiveLogin().then((creds) => { const client = new PeeringManagementClient(creds, subscriptionId); const peeringLocation = "testpeeringLocation"; const kind = "Direct"; - client.legacyPeerings.list(peeringLocation, kind).then((result) => { + const asn = 1; + client.legacyPeerings.list(peeringLocation, kind, asn).then((result) => { console.log("The result is:"); console.log(result); }); @@ -82,7 +83,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to const client = new Azure.ArmPeering.PeeringManagementClient(res.creds, subscriptionId); const peeringLocation = "testpeeringLocation"; const kind = "Direct"; - client.legacyPeerings.list(peeringLocation, kind).then((result) => { + const asn = 1; + client.legacyPeerings.list(peeringLocation, kind, asn).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -100,4 +102,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fpeering%2Farm-peering%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/peering/arm-peering/README.png) diff --git a/sdk/peering/arm-peering/src/models/index.ts b/sdk/peering/arm-peering/src/models/index.ts index fd1be10962e1..4cd61c119255 100644 --- a/sdk/peering/arm-peering/src/models/index.ts +++ b/sdk/peering/arm-peering/src/models/index.ts @@ -16,11 +16,11 @@ export { BaseResource, CloudError }; */ export interface CheckServiceProviderAvailabilityInput { /** - * Gets or sets the PeeringServiceLocation + * Gets or sets the peering service location. */ peeringServiceLocation?: string; /** - * Gets or sets the PeeringServiceProvider + * Gets or sets the peering service provider. */ peeringServiceProvider?: string; } @@ -30,11 +30,9 @@ export interface CheckServiceProviderAvailabilityInput { */ export interface PeeringSku { /** - * The name of the peering SKU. Possible values include: 'Basic_Exchange_Free', - * 'Basic_Direct_Free', 'Premium_Direct_Free', 'Premium_Exchange_Metered', - * 'Premium_Direct_Metered', 'Premium_Direct_Unlimited' + * The name of the peering SKU. */ - name?: Name; + name?: string; /** * The tier of the peering SKU. Possible values include: 'Basic', 'Premium' */ @@ -63,14 +61,12 @@ export interface BgpSession { sessionPrefixV6?: string; /** * The IPv4 session address on Microsoft's end. - * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly microsoftSessionIPv4Address?: string; + microsoftSessionIPv4Address?: string; /** * The IPv6 session address on Microsoft's end. - * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - readonly microsoftSessionIPv6Address?: string; + microsoftSessionIPv6Address?: string; /** * The IPv4 session address on peer's end. */ @@ -117,8 +113,9 @@ export interface DirectConnection { bandwidthInMbps?: number; /** * The bandwidth that is actually provisioned. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - provisionedBandwidthInMbps?: number; + readonly provisionedBandwidthInMbps?: number; /** * The field indicating if Microsoft provides session ip addresses. Possible values include: * 'Microsoft', 'Peer' @@ -146,6 +143,11 @@ export interface DirectConnection { * The unique identifier (GUID) for the connection. */ connectionIdentifier?: string; + /** + * The error message related to the connection state, if any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errorMessage?: string; } /** @@ -168,14 +170,16 @@ export interface PeeringPropertiesDirect { connections?: DirectConnection[]; /** * The flag that indicates whether or not the peering is used for peering service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - useForPeeringService?: boolean; + readonly useForPeeringService?: boolean; /** * The reference of the peer ASN. */ peerAsn?: SubResource; /** - * The type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal' + * The type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal', + * 'Ix', 'IxRs' */ directPeeringType?: DirectPeeringType; } @@ -202,6 +206,11 @@ export interface ExchangeConnection { * The unique identifier (GUID) for the connection. */ connectionIdentifier?: string; + /** + * The error message related to the connection state, if any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errorMessage?: string; } /** @@ -328,17 +337,22 @@ export interface Operation { } /** - * The contact information of the peer. + * The contact detail class. */ -export interface ContactInfo { +export interface ContactDetail { /** - * The list of email addresses. + * The role of the contact. Possible values include: 'Noc', 'Policy', 'Technical', 'Service', + * 'Other' */ - emails?: string[]; + role?: Role; /** - * The list of contact numbers. + * The e-mail address of the contact. */ - phone?: string[]; + email?: string; + /** + * The phone number of the contact. + */ + phone?: string; } /** @@ -350,9 +364,9 @@ export interface PeerAsn extends Resource { */ peerAsn?: number; /** - * The contact information of the peer. + * The contact details of the peer. */ - peerContactInfo?: ContactInfo; + peerContactDetail?: ContactDetail[]; /** * The name of the peer. */ @@ -362,6 +376,11 @@ export interface PeerAsn extends Resource { * 'Pending', 'Approved', 'Failed' */ validationState?: ValidationState; + /** + * The error message for the validation state + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errorMessage?: string; } /** @@ -373,7 +392,8 @@ export interface DirectPeeringFacility { */ address?: string; /** - * The type of the direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal' + * The type of the direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal', + * 'Ix', 'IxRs' */ directPeeringType?: DirectPeeringType; /** @@ -493,6 +513,59 @@ export interface PeeringLocation extends Resource { azureRegion?: string; } +/** + * The customer's ASN that is registered by the peering service provider. + */ +export interface PeeringRegisteredAsn extends Resource { + /** + * The customer's ASN from which traffic originates. + */ + asn?: number; + /** + * The peering service prefix key that is to be shared with the customer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly peeringServicePrefixKey?: string; + /** + * The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; +} + +/** + * The customer's prefix that is registered by the peering service provider. + */ +export interface PeeringRegisteredPrefix extends Resource { + /** + * The customer's prefix from which traffic originates. + */ + prefix?: string; + /** + * The prefix validation state. Possible values include: 'None', 'Invalid', 'Verified', 'Failed', + * 'Pending', 'Warning', 'Unknown' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly prefixValidationState?: PrefixValidationState; + /** + * The peering service prefix key that is to be shared with the customer. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly peeringServicePrefixKey?: string; + /** + * The error message associated with the validation state, if any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly errorMessage?: string; + /** + * The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ProvisioningState; +} + /** * The resource tags. */ @@ -504,7 +577,13 @@ export interface ResourceTags { } /** - * PeeringService location + * The peering service country. + */ +export interface PeeringServiceCountry extends Resource { +} + +/** + * The peering service location. */ export interface PeeringServiceLocation extends Resource { /** @@ -521,23 +600,70 @@ export interface PeeringServiceLocation extends Resource { azureRegion?: string; } +/** + * The details of the event associated with a prefix. + */ +export interface PeeringServicePrefixEvent { + /** + * The timestamp of the event associated with a prefix. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eventTimestamp?: Date; + /** + * The type of the event associated with a prefix. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eventType?: string; + /** + * The summary of the event associated with a prefix. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eventSummary?: string; + /** + * The level of the event associated with a prefix. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eventLevel?: string; + /** + * The description of the event associated with a prefix. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly eventDescription?: string; +} + /** * The peering service prefix class. */ export interface PeeringServicePrefix extends Resource { /** - * Valid route prefix + * The prefix from which your traffic originates. */ prefix?: string; /** * The prefix validation state. Possible values include: 'None', 'Invalid', 'Verified', 'Failed', - * 'Pending', 'Unknown' + * 'Pending', 'Warning', 'Unknown' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly prefixValidationState?: PrefixValidationState; + /** + * The prefix learned type. Possible values include: 'None', 'ViaServiceProvider', 'ViaSession' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly learnedType?: LearnedType; + /** + * The error message for validation state + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - prefixValidationState?: PrefixValidationState; + readonly errorMessage?: string; /** - * The prefix learned type. Possible values include: 'None', 'ViaPartner', 'ViaSession' + * The list of events for peering service prefix + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - learnedType?: LearnedType; + readonly events?: PeeringServicePrefixEvent[]; + /** + * The peering service prefix key + */ + peeringServicePrefixKey?: string; /** * The provisioning state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' @@ -556,10 +682,24 @@ export interface PeeringServiceProvider extends Resource { serviceProviderName?: string; } +/** + * The SKU that defines the type of the peering service. + */ +export interface PeeringServiceSku { + /** + * The name of the peering service SKU. + */ + name?: string; +} + /** * Peering Service */ export interface PeeringService extends Resource { + /** + * The SKU that defines the type of the peering service. + */ + sku?: PeeringServiceSku; /** * The PeeringServiceLocation of the Customer. */ @@ -605,25 +745,56 @@ export interface ErrorResponse { */ export interface PeeringManagementClientCheckServiceProviderAvailabilityOptionalParams extends msRest.RequestOptionsBase { /** - * Gets or sets the PeeringServiceLocation + * Gets or sets the peering service location. */ peeringServiceLocation?: string; /** - * Gets or sets the PeeringServiceProvider + * Gets or sets the peering service provider. */ peeringServiceProvider?: string; } +/** + * Optional Parameters. + */ +export interface LegacyPeeringsListOptionalParams extends msRest.RequestOptionsBase { + /** + * The ASN number associated with a legacy peering. + */ + asn?: number; +} + /** * Optional Parameters. */ export interface PeeringLocationsListOptionalParams extends msRest.RequestOptionsBase { /** - * The type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal' + * The type of direct peering. Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal', + * 'Ix', 'IxRs' */ directPeeringType?: DirectPeeringType1; } +/** + * Optional Parameters. + */ +export interface RegisteredAsnsCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The customer's ASN from which traffic originates. + */ + asn?: number; +} + +/** + * Optional Parameters. + */ +export interface RegisteredPrefixesCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The customer's prefix from which traffic originates. + */ + prefix?: string; +} + /** * Optional Parameters. */ @@ -634,6 +805,50 @@ export interface PeeringsUpdateOptionalParams extends msRest.RequestOptionsBase tags?: { [propertyName: string]: string }; } +/** + * Optional Parameters. + */ +export interface PeeringServiceLocationsListOptionalParams extends msRest.RequestOptionsBase { + /** + * The country of interest, in which the locations are to be present. + */ + country?: string; +} + +/** + * Optional Parameters. + */ +export interface PrefixesGetOptionalParams extends msRest.RequestOptionsBase { + /** + * The properties to be expanded. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface PrefixesCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { + /** + * The prefix from which your traffic originates. + */ + prefix?: string; + /** + * The peering service prefix key + */ + peeringServicePrefixKey?: string; +} + +/** + * Optional Parameters. + */ +export interface PrefixesListByPeeringServiceOptionalParams extends msRest.RequestOptionsBase { + /** + * The properties to be expanded. + */ + expand?: string; +} + /** * Optional Parameters. */ @@ -699,6 +914,42 @@ export interface PeeringLocationListResult extends Array { nextLink?: string; } +/** + * @interface + * The paginated list of peering registered ASNs. + * @extends Array + */ +export interface PeeringRegisteredAsnListResult extends Array { + /** + * The link to fetch the next page of peering registered ASNs. + */ + nextLink?: string; +} + +/** + * @interface + * The paginated list of peering registered prefixes. + * @extends Array + */ +export interface PeeringRegisteredPrefixListResult extends Array { + /** + * The link to fetch the next page of peering registered prefixes. + */ + nextLink?: string; +} + +/** + * @interface + * The paginated list of peering service countries. + * @extends Array + */ +export interface PeeringServiceCountryListResult extends Array { + /** + * The link to fetch the next page of peering service countries. + */ + nextLink?: string; +} + /** * @interface * The paginated list of peering service locations. @@ -713,12 +964,12 @@ export interface PeeringServiceLocationListResult extends Array */ export interface PeeringServicePrefixListResult extends Array { /** - * The link to fetch the next page of [T]. + * The link to fetch the next page of peering service prefixes. */ nextLink?: string; } @@ -747,15 +998,6 @@ export interface PeeringServiceListResult extends Array { nextLink?: string; } -/** - * Defines values for Name. - * Possible values include: 'Basic_Exchange_Free', 'Basic_Direct_Free', 'Premium_Direct_Free', - * 'Premium_Exchange_Metered', 'Premium_Direct_Metered', 'Premium_Direct_Unlimited' - * @readonly - * @enum {string} - */ -export type Name = 'Basic_Exchange_Free' | 'Basic_Direct_Free' | 'Premium_Direct_Free' | 'Premium_Exchange_Metered' | 'Premium_Direct_Metered' | 'Premium_Direct_Unlimited'; - /** * Defines values for Tier. * Possible values include: 'Basic', 'Premium' @@ -825,11 +1067,11 @@ export type SessionStateV6 = 'None' | 'Idle' | 'Connect' | 'Active' | 'OpenSent' /** * Defines values for DirectPeeringType. - * Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal' + * Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal', 'Ix', 'IxRs' * @readonly * @enum {string} */ -export type DirectPeeringType = 'Edge' | 'Transit' | 'Cdn' | 'Internal'; +export type DirectPeeringType = 'Edge' | 'Transit' | 'Cdn' | 'Internal' | 'Ix' | 'IxRs'; /** * Defines values for ProvisioningState. @@ -839,6 +1081,14 @@ export type DirectPeeringType = 'Edge' | 'Transit' | 'Cdn' | 'Internal'; */ export type ProvisioningState = 'Succeeded' | 'Updating' | 'Deleting' | 'Failed'; +/** + * Defines values for Role. + * Possible values include: 'Noc', 'Policy', 'Technical', 'Service', 'Other' + * @readonly + * @enum {string} + */ +export type Role = 'Noc' | 'Policy' | 'Technical' | 'Service' | 'Other'; + /** * Defines values for ValidationState. * Possible values include: 'None', 'Pending', 'Approved', 'Failed' @@ -849,35 +1099,36 @@ export type ValidationState = 'None' | 'Pending' | 'Approved' | 'Failed'; /** * Defines values for PrefixValidationState. - * Possible values include: 'None', 'Invalid', 'Verified', 'Failed', 'Pending', 'Unknown' + * Possible values include: 'None', 'Invalid', 'Verified', 'Failed', 'Pending', 'Warning', + * 'Unknown' * @readonly * @enum {string} */ -export type PrefixValidationState = 'None' | 'Invalid' | 'Verified' | 'Failed' | 'Pending' | 'Unknown'; +export type PrefixValidationState = 'None' | 'Invalid' | 'Verified' | 'Failed' | 'Pending' | 'Warning' | 'Unknown'; /** * Defines values for LearnedType. - * Possible values include: 'None', 'ViaPartner', 'ViaSession' + * Possible values include: 'None', 'ViaServiceProvider', 'ViaSession' * @readonly * @enum {string} */ -export type LearnedType = 'None' | 'ViaPartner' | 'ViaSession'; +export type LearnedType = 'None' | 'ViaServiceProvider' | 'ViaSession'; /** * Defines values for DirectPeeringType1. - * Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal' + * Possible values include: 'Edge', 'Transit', 'Cdn', 'Internal', 'Ix', 'IxRs' * @readonly * @enum {string} */ -export type DirectPeeringType1 = 'Edge' | 'Transit' | 'Cdn' | 'Internal'; +export type DirectPeeringType1 = 'Edge' | 'Transit' | 'Cdn' | 'Internal' | 'Ix' | 'IxRs'; /** * Defines values for CheckServiceProviderAvailabilityOKResponse. - * Possible values include: 'Available', 'UnAvailable' + * Possible values include: 'Available', 'Unavailable' * @readonly * @enum {string} */ -export type CheckServiceProviderAvailabilityOKResponse = 'Available' | 'UnAvailable'; +export type CheckServiceProviderAvailabilityOKResponse = 'Available' | 'Unavailable'; /** * Defines values for Kind1. @@ -1120,6 +1371,166 @@ export type PeeringLocationsListNextResponse = PeeringLocationListResult & { }; }; +/** + * Contains response data for the get operation. + */ +export type RegisteredAsnsGetResponse = PeeringRegisteredAsn & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PeeringRegisteredAsn; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type RegisteredAsnsCreateOrUpdateResponse = PeeringRegisteredAsn & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PeeringRegisteredAsn; + }; +}; + +/** + * Contains response data for the listByPeering operation. + */ +export type RegisteredAsnsListByPeeringResponse = PeeringRegisteredAsnListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PeeringRegisteredAsnListResult; + }; +}; + +/** + * Contains response data for the listByPeeringNext operation. + */ +export type RegisteredAsnsListByPeeringNextResponse = PeeringRegisteredAsnListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PeeringRegisteredAsnListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type RegisteredPrefixesGetResponse = PeeringRegisteredPrefix & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PeeringRegisteredPrefix; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type RegisteredPrefixesCreateOrUpdateResponse = PeeringRegisteredPrefix & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PeeringRegisteredPrefix; + }; +}; + +/** + * Contains response data for the listByPeering operation. + */ +export type RegisteredPrefixesListByPeeringResponse = PeeringRegisteredPrefixListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PeeringRegisteredPrefixListResult; + }; +}; + +/** + * Contains response data for the listByPeeringNext operation. + */ +export type RegisteredPrefixesListByPeeringNextResponse = PeeringRegisteredPrefixListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PeeringRegisteredPrefixListResult; + }; +}; + /** * Contains response data for the get operation. */ @@ -1260,6 +1671,46 @@ export type PeeringsListBySubscriptionNextResponse = PeeringListResult & { }; }; +/** + * Contains response data for the list operation. + */ +export type PeeringServiceCountriesListResponse = PeeringServiceCountryListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PeeringServiceCountryListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type PeeringServiceCountriesListNextResponse = PeeringServiceCountryListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PeeringServiceCountryListResult; + }; +}; + /** * Contains response data for the list operation. */ @@ -1303,7 +1754,7 @@ export type PeeringServiceLocationsListNextResponse = PeeringServiceLocationList /** * Contains response data for the get operation. */ -export type PeeringServicePrefixesGetResponse = PeeringServicePrefix & { +export type PrefixesGetResponse = PeeringServicePrefix & { /** * The underlying HTTP response. */ @@ -1323,7 +1774,7 @@ export type PeeringServicePrefixesGetResponse = PeeringServicePrefix & { /** * Contains response data for the createOrUpdate operation. */ -export type PeeringServicePrefixesCreateOrUpdateResponse = PeeringServicePrefix & { +export type PrefixesCreateOrUpdateResponse = PeeringServicePrefix & { /** * The underlying HTTP response. */ diff --git a/sdk/peering/arm-peering/src/models/legacyPeeringsMappers.ts b/sdk/peering/arm-peering/src/models/legacyPeeringsMappers.ts index 147e9d528f40..26fdfd8fe765 100644 --- a/sdk/peering/arm-peering/src/models/legacyPeeringsMappers.ts +++ b/sdk/peering/arm-peering/src/models/legacyPeeringsMappers.ts @@ -9,7 +9,7 @@ export { BaseResource, BgpSession, - ContactInfo, + ContactDetail, DirectConnection, DirectPeeringFacility, ErrorResponse, @@ -24,10 +24,15 @@ export { PeeringLocationPropertiesExchange, PeeringPropertiesDirect, PeeringPropertiesExchange, + PeeringRegisteredAsn, + PeeringRegisteredPrefix, PeeringService, + PeeringServiceCountry, PeeringServiceLocation, PeeringServicePrefix, + PeeringServicePrefixEvent, PeeringServiceProvider, + PeeringServiceSku, PeeringSku, Resource, SubResource diff --git a/sdk/peering/arm-peering/src/models/mappers.ts b/sdk/peering/arm-peering/src/models/mappers.ts index 534d6d8012e8..071ff5f6b830 100644 --- a/sdk/peering/arm-peering/src/models/mappers.ts +++ b/sdk/peering/arm-peering/src/models/mappers.ts @@ -87,14 +87,12 @@ export const BgpSession: msRest.CompositeMapper = { } }, microsoftSessionIPv4Address: { - readOnly: true, serializedName: "microsoftSessionIPv4Address", type: { name: "String" } }, microsoftSessionIPv6Address: { - readOnly: true, serializedName: "microsoftSessionIPv6Address", type: { name: "String" @@ -161,6 +159,7 @@ export const DirectConnection: msRest.CompositeMapper = { } }, provisionedBandwidthInMbps: { + readOnly: true, serializedName: "provisionedBandwidthInMbps", type: { name: "Number" @@ -203,6 +202,13 @@ export const DirectConnection: msRest.CompositeMapper = { type: { name: "String" } + }, + errorMessage: { + readOnly: true, + serializedName: "errorMessage", + type: { + name: "String" + } } } } @@ -243,6 +249,7 @@ export const PeeringPropertiesDirect: msRest.CompositeMapper = { } }, useForPeeringService: { + readOnly: true, serializedName: "useForPeeringService", type: { name: "Boolean" @@ -296,6 +303,13 @@ export const ExchangeConnection: msRest.CompositeMapper = { type: { name: "String" } + }, + errorMessage: { + readOnly: true, + serializedName: "errorMessage", + type: { + name: "String" + } } } } @@ -502,32 +516,28 @@ export const Operation: msRest.CompositeMapper = { } }; -export const ContactInfo: msRest.CompositeMapper = { - serializedName: "ContactInfo", +export const ContactDetail: msRest.CompositeMapper = { + serializedName: "ContactDetail", type: { name: "Composite", - className: "ContactInfo", + className: "ContactDetail", modelProperties: { - emails: { - serializedName: "emails", + role: { + serializedName: "role", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" + } + }, + email: { + serializedName: "email", + type: { + name: "String" } }, phone: { serializedName: "phone", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } @@ -547,11 +557,16 @@ export const PeerAsn: msRest.CompositeMapper = { name: "Number" } }, - peerContactInfo: { - serializedName: "properties.peerContactInfo", + peerContactDetail: { + serializedName: "properties.peerContactDetail", type: { - name: "Composite", - className: "ContactInfo" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContactDetail" + } + } } }, peerName: { @@ -565,6 +580,13 @@ export const PeerAsn: msRest.CompositeMapper = { type: { name: "String" } + }, + errorMessage: { + readOnly: true, + serializedName: "properties.errorMessage", + type: { + name: "String" + } } } } @@ -789,6 +811,82 @@ export const PeeringLocation: msRest.CompositeMapper = { } }; +export const PeeringRegisteredAsn: msRest.CompositeMapper = { + serializedName: "PeeringRegisteredAsn", + type: { + name: "Composite", + className: "PeeringRegisteredAsn", + modelProperties: { + ...Resource.type.modelProperties, + asn: { + serializedName: "properties.asn", + type: { + name: "Number" + } + }, + peeringServicePrefixKey: { + readOnly: true, + serializedName: "properties.peeringServicePrefixKey", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const PeeringRegisteredPrefix: msRest.CompositeMapper = { + serializedName: "PeeringRegisteredPrefix", + type: { + name: "Composite", + className: "PeeringRegisteredPrefix", + modelProperties: { + ...Resource.type.modelProperties, + prefix: { + serializedName: "properties.prefix", + type: { + name: "String" + } + }, + prefixValidationState: { + readOnly: true, + serializedName: "properties.prefixValidationState", + type: { + name: "String" + } + }, + peeringServicePrefixKey: { + readOnly: true, + serializedName: "properties.peeringServicePrefixKey", + type: { + name: "String" + } + }, + errorMessage: { + readOnly: true, + serializedName: "properties.errorMessage", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + export const ResourceTags: msRest.CompositeMapper = { serializedName: "ResourceTags", type: { @@ -810,6 +908,17 @@ export const ResourceTags: msRest.CompositeMapper = { } }; +export const PeeringServiceCountry: msRest.CompositeMapper = { + serializedName: "PeeringServiceCountry", + type: { + name: "Composite", + className: "PeeringServiceCountry", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + export const PeeringServiceLocation: msRest.CompositeMapper = { serializedName: "PeeringServiceLocation", type: { @@ -839,6 +948,51 @@ export const PeeringServiceLocation: msRest.CompositeMapper = { } }; +export const PeeringServicePrefixEvent: msRest.CompositeMapper = { + serializedName: "PeeringServicePrefixEvent", + type: { + name: "Composite", + className: "PeeringServicePrefixEvent", + modelProperties: { + eventTimestamp: { + readOnly: true, + serializedName: "eventTimestamp", + type: { + name: "DateTime" + } + }, + eventType: { + readOnly: true, + serializedName: "eventType", + type: { + name: "String" + } + }, + eventSummary: { + readOnly: true, + serializedName: "eventSummary", + type: { + name: "String" + } + }, + eventLevel: { + readOnly: true, + serializedName: "eventLevel", + type: { + name: "String" + } + }, + eventDescription: { + readOnly: true, + serializedName: "eventDescription", + type: { + name: "String" + } + } + } + } +}; + export const PeeringServicePrefix: msRest.CompositeMapper = { serializedName: "PeeringServicePrefix", type: { @@ -853,17 +1007,45 @@ export const PeeringServicePrefix: msRest.CompositeMapper = { } }, prefixValidationState: { + readOnly: true, serializedName: "properties.prefixValidationState", type: { name: "String" } }, learnedType: { + readOnly: true, serializedName: "properties.learnedType", type: { name: "String" } }, + errorMessage: { + readOnly: true, + serializedName: "properties.errorMessage", + type: { + name: "String" + } + }, + events: { + readOnly: true, + serializedName: "properties.events", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PeeringServicePrefixEvent" + } + } + } + }, + peeringServicePrefixKey: { + serializedName: "properties.peeringServicePrefixKey", + type: { + name: "String" + } + }, provisioningState: { readOnly: true, serializedName: "properties.provisioningState", @@ -892,6 +1074,22 @@ export const PeeringServiceProvider: msRest.CompositeMapper = { } }; +export const PeeringServiceSku: msRest.CompositeMapper = { + serializedName: "PeeringServiceSku", + type: { + name: "Composite", + className: "PeeringServiceSku", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + export const PeeringService: msRest.CompositeMapper = { serializedName: "PeeringService", type: { @@ -899,6 +1097,13 @@ export const PeeringService: msRest.CompositeMapper = { className: "PeeringService", modelProperties: { ...Resource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "PeeringServiceSku" + } + }, peeringServiceLocation: { serializedName: "properties.peeringServiceLocation", type: { @@ -1076,6 +1281,90 @@ export const PeeringLocationListResult: msRest.CompositeMapper = { } }; +export const PeeringRegisteredAsnListResult: msRest.CompositeMapper = { + serializedName: "PeeringRegisteredAsnListResult", + type: { + name: "Composite", + className: "PeeringRegisteredAsnListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PeeringRegisteredAsn" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PeeringRegisteredPrefixListResult: msRest.CompositeMapper = { + serializedName: "PeeringRegisteredPrefixListResult", + type: { + name: "Composite", + className: "PeeringRegisteredPrefixListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PeeringRegisteredPrefix" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PeeringServiceCountryListResult: msRest.CompositeMapper = { + serializedName: "PeeringServiceCountryListResult", + type: { + name: "Composite", + className: "PeeringServiceCountryListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PeeringServiceCountry" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const PeeringServiceLocationListResult: msRest.CompositeMapper = { serializedName: "PeeringServiceLocationListResult", type: { diff --git a/sdk/peering/arm-peering/src/models/parameters.ts b/sdk/peering/arm-peering/src/models/parameters.ts index e9e0cef438b5..de10f622a0ff 100644 --- a/sdk/peering/arm-peering/src/models/parameters.ts +++ b/sdk/peering/arm-peering/src/models/parameters.ts @@ -30,6 +30,30 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; +export const asn: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "asn" + ], + mapper: { + serializedName: "asn", + type: { + name: "Number" + } + } +}; +export const country: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "country" + ], + mapper: { + serializedName: "country", + type: { + name: "String" + } + } +}; export const directPeeringType: msRest.OperationQueryParameter = { parameterPath: [ "options", @@ -42,6 +66,18 @@ export const directPeeringType: msRest.OperationQueryParameter = { } } }; +export const expand: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "expand" + ], + mapper: { + serializedName: "$expand", + type: { + name: "String" + } + } +}; export const kind: msRest.OperationQueryParameter = { parameterPath: "kind", mapper: { @@ -113,6 +149,26 @@ export const prefixName: msRest.OperationURLParameter = { } } }; +export const registeredAsnName: msRest.OperationURLParameter = { + parameterPath: "registeredAsnName", + mapper: { + required: true, + serializedName: "registeredAsnName", + type: { + name: "String" + } + } +}; +export const registeredPrefixName: msRest.OperationURLParameter = { + parameterPath: "registeredPrefixName", + mapper: { + required: true, + serializedName: "registeredPrefixName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { diff --git a/sdk/peering/arm-peering/src/models/peerAsnsMappers.ts b/sdk/peering/arm-peering/src/models/peerAsnsMappers.ts index da3cdc4561cd..c35e6b9ec5a4 100644 --- a/sdk/peering/arm-peering/src/models/peerAsnsMappers.ts +++ b/sdk/peering/arm-peering/src/models/peerAsnsMappers.ts @@ -9,7 +9,7 @@ export { BaseResource, BgpSession, - ContactInfo, + ContactDetail, DirectConnection, DirectPeeringFacility, ErrorResponse, @@ -24,10 +24,15 @@ export { PeeringLocationPropertiesExchange, PeeringPropertiesDirect, PeeringPropertiesExchange, + PeeringRegisteredAsn, + PeeringRegisteredPrefix, PeeringService, + PeeringServiceCountry, PeeringServiceLocation, PeeringServicePrefix, + PeeringServicePrefixEvent, PeeringServiceProvider, + PeeringServiceSku, PeeringSku, Resource, SubResource diff --git a/sdk/peering/arm-peering/src/models/peeringLocationsMappers.ts b/sdk/peering/arm-peering/src/models/peeringLocationsMappers.ts index 7e3205ea330a..e531a47cbfde 100644 --- a/sdk/peering/arm-peering/src/models/peeringLocationsMappers.ts +++ b/sdk/peering/arm-peering/src/models/peeringLocationsMappers.ts @@ -9,7 +9,7 @@ export { BaseResource, BgpSession, - ContactInfo, + ContactDetail, DirectConnection, DirectPeeringFacility, ErrorResponse, @@ -24,10 +24,15 @@ export { PeeringLocationPropertiesExchange, PeeringPropertiesDirect, PeeringPropertiesExchange, + PeeringRegisteredAsn, + PeeringRegisteredPrefix, PeeringService, + PeeringServiceCountry, PeeringServiceLocation, PeeringServicePrefix, + PeeringServicePrefixEvent, PeeringServiceProvider, + PeeringServiceSku, PeeringSku, Resource, SubResource diff --git a/sdk/peering/arm-peering/src/models/peeringServiceCountriesMappers.ts b/sdk/peering/arm-peering/src/models/peeringServiceCountriesMappers.ts new file mode 100644 index 000000000000..940773dee696 --- /dev/null +++ b/sdk/peering/arm-peering/src/models/peeringServiceCountriesMappers.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BaseResource, + BgpSession, + ContactDetail, + DirectConnection, + DirectPeeringFacility, + ErrorResponse, + ExchangeConnection, + ExchangePeeringFacility, + PeerAsn, + Peering, + PeeringBandwidthOffer, + PeeringLocation, + PeeringLocationPropertiesDirect, + PeeringLocationPropertiesExchange, + PeeringPropertiesDirect, + PeeringPropertiesExchange, + PeeringRegisteredAsn, + PeeringRegisteredPrefix, + PeeringService, + PeeringServiceCountry, + PeeringServiceCountryListResult, + PeeringServiceLocation, + PeeringServicePrefix, + PeeringServicePrefixEvent, + PeeringServiceProvider, + PeeringServiceSku, + PeeringSku, + Resource, + SubResource +} from "../models/mappers"; diff --git a/sdk/peering/arm-peering/src/models/peeringServiceLocationsMappers.ts b/sdk/peering/arm-peering/src/models/peeringServiceLocationsMappers.ts index c41b232f2c04..d5032001d785 100644 --- a/sdk/peering/arm-peering/src/models/peeringServiceLocationsMappers.ts +++ b/sdk/peering/arm-peering/src/models/peeringServiceLocationsMappers.ts @@ -9,7 +9,7 @@ export { BaseResource, BgpSession, - ContactInfo, + ContactDetail, DirectConnection, DirectPeeringFacility, ErrorResponse, @@ -23,11 +23,16 @@ export { PeeringLocationPropertiesExchange, PeeringPropertiesDirect, PeeringPropertiesExchange, + PeeringRegisteredAsn, + PeeringRegisteredPrefix, PeeringService, + PeeringServiceCountry, PeeringServiceLocation, PeeringServiceLocationListResult, PeeringServicePrefix, + PeeringServicePrefixEvent, PeeringServiceProvider, + PeeringServiceSku, PeeringSku, Resource, SubResource diff --git a/sdk/peering/arm-peering/src/models/peeringServiceProvidersMappers.ts b/sdk/peering/arm-peering/src/models/peeringServiceProvidersMappers.ts index b9729dc9379f..fb3ce2f16618 100644 --- a/sdk/peering/arm-peering/src/models/peeringServiceProvidersMappers.ts +++ b/sdk/peering/arm-peering/src/models/peeringServiceProvidersMappers.ts @@ -9,7 +9,7 @@ export { BaseResource, BgpSession, - ContactInfo, + ContactDetail, DirectConnection, DirectPeeringFacility, ErrorResponse, @@ -23,11 +23,16 @@ export { PeeringLocationPropertiesExchange, PeeringPropertiesDirect, PeeringPropertiesExchange, + PeeringRegisteredAsn, + PeeringRegisteredPrefix, PeeringService, + PeeringServiceCountry, PeeringServiceLocation, PeeringServicePrefix, + PeeringServicePrefixEvent, PeeringServiceProvider, PeeringServiceProviderListResult, + PeeringServiceSku, PeeringSku, Resource, SubResource diff --git a/sdk/peering/arm-peering/src/models/peeringServicesMappers.ts b/sdk/peering/arm-peering/src/models/peeringServicesMappers.ts index ddc9ffdfb198..f5804e693503 100644 --- a/sdk/peering/arm-peering/src/models/peeringServicesMappers.ts +++ b/sdk/peering/arm-peering/src/models/peeringServicesMappers.ts @@ -9,7 +9,7 @@ export { BaseResource, BgpSession, - ContactInfo, + ContactDetail, DirectConnection, DirectPeeringFacility, ErrorResponse, @@ -23,11 +23,16 @@ export { PeeringLocationPropertiesExchange, PeeringPropertiesDirect, PeeringPropertiesExchange, + PeeringRegisteredAsn, + PeeringRegisteredPrefix, PeeringService, + PeeringServiceCountry, PeeringServiceListResult, PeeringServiceLocation, PeeringServicePrefix, + PeeringServicePrefixEvent, PeeringServiceProvider, + PeeringServiceSku, PeeringSku, Resource, ResourceTags, diff --git a/sdk/peering/arm-peering/src/models/peeringsMappers.ts b/sdk/peering/arm-peering/src/models/peeringsMappers.ts index 736ac14d0a85..34e3a0217123 100644 --- a/sdk/peering/arm-peering/src/models/peeringsMappers.ts +++ b/sdk/peering/arm-peering/src/models/peeringsMappers.ts @@ -9,7 +9,7 @@ export { BaseResource, BgpSession, - ContactInfo, + ContactDetail, DirectConnection, DirectPeeringFacility, ErrorResponse, @@ -24,10 +24,15 @@ export { PeeringLocationPropertiesExchange, PeeringPropertiesDirect, PeeringPropertiesExchange, + PeeringRegisteredAsn, + PeeringRegisteredPrefix, PeeringService, + PeeringServiceCountry, PeeringServiceLocation, PeeringServicePrefix, + PeeringServicePrefixEvent, PeeringServiceProvider, + PeeringServiceSku, PeeringSku, Resource, ResourceTags, diff --git a/sdk/peering/arm-peering/src/models/prefixesMappers.ts b/sdk/peering/arm-peering/src/models/prefixesMappers.ts index 880f11ef7879..96304f5c5fc1 100644 --- a/sdk/peering/arm-peering/src/models/prefixesMappers.ts +++ b/sdk/peering/arm-peering/src/models/prefixesMappers.ts @@ -9,7 +9,7 @@ export { BaseResource, BgpSession, - ContactInfo, + ContactDetail, DirectConnection, DirectPeeringFacility, ErrorResponse, @@ -23,11 +23,16 @@ export { PeeringLocationPropertiesExchange, PeeringPropertiesDirect, PeeringPropertiesExchange, + PeeringRegisteredAsn, + PeeringRegisteredPrefix, PeeringService, + PeeringServiceCountry, PeeringServiceLocation, PeeringServicePrefix, + PeeringServicePrefixEvent, PeeringServicePrefixListResult, PeeringServiceProvider, + PeeringServiceSku, PeeringSku, Resource, SubResource diff --git a/sdk/peering/arm-peering/src/models/peeringServicePrefixesMappers.ts b/sdk/peering/arm-peering/src/models/registeredAsnsMappers.ts similarity index 82% rename from sdk/peering/arm-peering/src/models/peeringServicePrefixesMappers.ts rename to sdk/peering/arm-peering/src/models/registeredAsnsMappers.ts index 3750ca36a206..c0d59706b3f5 100644 --- a/sdk/peering/arm-peering/src/models/peeringServicePrefixesMappers.ts +++ b/sdk/peering/arm-peering/src/models/registeredAsnsMappers.ts @@ -9,7 +9,7 @@ export { BaseResource, BgpSession, - ContactInfo, + ContactDetail, DirectConnection, DirectPeeringFacility, ErrorResponse, @@ -23,10 +23,16 @@ export { PeeringLocationPropertiesExchange, PeeringPropertiesDirect, PeeringPropertiesExchange, + PeeringRegisteredAsn, + PeeringRegisteredAsnListResult, + PeeringRegisteredPrefix, PeeringService, + PeeringServiceCountry, PeeringServiceLocation, PeeringServicePrefix, + PeeringServicePrefixEvent, PeeringServiceProvider, + PeeringServiceSku, PeeringSku, Resource, SubResource diff --git a/sdk/peering/arm-peering/src/models/registeredPrefixesMappers.ts b/sdk/peering/arm-peering/src/models/registeredPrefixesMappers.ts new file mode 100644 index 000000000000..830d00dfa842 --- /dev/null +++ b/sdk/peering/arm-peering/src/models/registeredPrefixesMappers.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BaseResource, + BgpSession, + ContactDetail, + DirectConnection, + DirectPeeringFacility, + ErrorResponse, + ExchangeConnection, + ExchangePeeringFacility, + PeerAsn, + Peering, + PeeringBandwidthOffer, + PeeringLocation, + PeeringLocationPropertiesDirect, + PeeringLocationPropertiesExchange, + PeeringPropertiesDirect, + PeeringPropertiesExchange, + PeeringRegisteredAsn, + PeeringRegisteredPrefix, + PeeringRegisteredPrefixListResult, + PeeringService, + PeeringServiceCountry, + PeeringServiceLocation, + PeeringServicePrefix, + PeeringServicePrefixEvent, + PeeringServiceProvider, + PeeringServiceSku, + PeeringSku, + Resource, + SubResource +} from "../models/mappers"; diff --git a/sdk/peering/arm-peering/src/operations/index.ts b/sdk/peering/arm-peering/src/operations/index.ts index 62dc0305012e..beada169cc6d 100644 --- a/sdk/peering/arm-peering/src/operations/index.ts +++ b/sdk/peering/arm-peering/src/operations/index.ts @@ -12,9 +12,11 @@ export * from "./legacyPeerings"; export * from "./operations"; export * from "./peerAsns"; export * from "./peeringLocations"; +export * from "./registeredAsns"; +export * from "./registeredPrefixes"; export * from "./peerings"; +export * from "./peeringServiceCountries"; export * from "./peeringServiceLocations"; -export * from "./peeringServicePrefixes"; export * from "./prefixes"; export * from "./peeringServiceProviders"; export * from "./peeringServices"; diff --git a/sdk/peering/arm-peering/src/operations/legacyPeerings.ts b/sdk/peering/arm-peering/src/operations/legacyPeerings.ts index 552e26a56c06..7e05d81ad8b5 100644 --- a/sdk/peering/arm-peering/src/operations/legacyPeerings.ts +++ b/sdk/peering/arm-peering/src/operations/legacyPeerings.ts @@ -34,7 +34,7 @@ export class LegacyPeerings { * @param [options] The optional parameters * @returns Promise */ - list(peeringLocation: string, kind: Models.Kind1, options?: msRest.RequestOptionsBase): Promise; + list(peeringLocation: string, kind: Models.Kind1, options?: Models.LegacyPeeringsListOptionalParams): Promise; /** * @param peeringLocation The location of the peering. * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' @@ -47,8 +47,8 @@ export class LegacyPeerings { * @param options The optional parameters * @param callback The callback */ - list(peeringLocation: string, kind: Models.Kind1, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(peeringLocation: string, kind: Models.Kind1, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(peeringLocation: string, kind: Models.Kind1, options: Models.LegacyPeeringsListOptionalParams, callback: msRest.ServiceCallback): void; + list(peeringLocation: string, kind: Models.Kind1, options?: Models.LegacyPeeringsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { peeringLocation, @@ -100,6 +100,7 @@ const listOperationSpec: msRest.OperationSpec = { queryParameters: [ Parameters.peeringLocation, Parameters.kind, + Parameters.asn, Parameters.apiVersion ], headerParameters: [ diff --git a/sdk/peering/arm-peering/src/operations/peeringServiceCountries.ts b/sdk/peering/arm-peering/src/operations/peeringServiceCountries.ts new file mode 100644 index 000000000000..07789e9d1b31 --- /dev/null +++ b/sdk/peering/arm-peering/src/operations/peeringServiceCountries.ts @@ -0,0 +1,126 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/peeringServiceCountriesMappers"; +import * as Parameters from "../models/parameters"; +import { PeeringManagementClientContext } from "../peeringManagementClientContext"; + +/** Class representing a PeeringServiceCountries. */ +export class PeeringServiceCountries { + private readonly client: PeeringManagementClientContext; + + /** + * Create a PeeringServiceCountries. + * @param {PeeringManagementClientContext} client Reference to the service client. + */ + constructor(client: PeeringManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the available countries for peering service. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the available countries for peering service. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Peering/peeringServiceCountries", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringServiceCountryListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringServiceCountryListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/peering/arm-peering/src/operations/peeringServiceLocations.ts b/sdk/peering/arm-peering/src/operations/peeringServiceLocations.ts index dd0262656860..46e0ee8aafcc 100644 --- a/sdk/peering/arm-peering/src/operations/peeringServiceLocations.ts +++ b/sdk/peering/arm-peering/src/operations/peeringServiceLocations.ts @@ -27,11 +27,11 @@ export class PeeringServiceLocations { } /** - * Lists all of the available peering service locations for the specified kind of peering. + * Lists all of the available locations for peering service. * @param [options] The optional parameters * @returns Promise */ - list(options?: msRest.RequestOptionsBase): Promise; + list(options?: Models.PeeringServiceLocationsListOptionalParams): Promise; /** * @param callback The callback */ @@ -40,8 +40,8 @@ export class PeeringServiceLocations { * @param options The optional parameters * @param callback The callback */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options: Models.PeeringServiceLocationsListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.PeeringServiceLocationsListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -51,7 +51,7 @@ export class PeeringServiceLocations { } /** - * Lists all of the available peering service locations for the specified kind of peering. + * Lists all of the available locations for peering service. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -88,6 +88,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ + Parameters.country, Parameters.apiVersion ], headerParameters: [ diff --git a/sdk/peering/arm-peering/src/operations/peeringServicePrefixes.ts b/sdk/peering/arm-peering/src/operations/peeringServicePrefixes.ts deleted file mode 100644 index be55a7d444d9..000000000000 --- a/sdk/peering/arm-peering/src/operations/peeringServicePrefixes.ts +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. - */ - -import * as msRest from "@azure/ms-rest-js"; -import * as Models from "../models"; -import * as Mappers from "../models/peeringServicePrefixesMappers"; -import * as Parameters from "../models/parameters"; -import { PeeringManagementClientContext } from "../peeringManagementClientContext"; - -/** Class representing a PeeringServicePrefixes. */ -export class PeeringServicePrefixes { - private readonly client: PeeringManagementClientContext; - - /** - * Create a PeeringServicePrefixes. - * @param {PeeringManagementClientContext} client Reference to the service client. - */ - constructor(client: PeeringManagementClientContext) { - this.client = client; - } - - /** - * Gets the peering service prefix. - * @param resourceGroupName The resource group name. - * @param peeringServiceName The peering service name. - * @param prefixName The prefix name. - * @param [options] The optional parameters - * @returns Promise - */ - get(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The resource group name. - * @param peeringServiceName The peering service name. - * @param prefixName The prefix name. - * @param callback The callback - */ - get(resourceGroupName: string, peeringServiceName: string, prefixName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The resource group name. - * @param peeringServiceName The peering service name. - * @param prefixName The prefix name. - * @param options The optional parameters - * @param callback The callback - */ - get(resourceGroupName: string, peeringServiceName: string, prefixName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - peeringServiceName, - prefixName, - options - }, - getOperationSpec, - callback) as Promise; - } - - /** - * Creates or updates the peering prefix. - * @param resourceGroupName The resource group name. - * @param peeringServiceName The peering service name. - * @param prefixName The prefix name - * @param peeringServicePrefix The IP prefix for an peering - * @param [options] The optional parameters - * @returns Promise - */ - createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, peeringServicePrefix: Models.PeeringServicePrefix, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The resource group name. - * @param peeringServiceName The peering service name. - * @param prefixName The prefix name - * @param peeringServicePrefix The IP prefix for an peering - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, peeringServicePrefix: Models.PeeringServicePrefix, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The resource group name. - * @param peeringServiceName The peering service name. - * @param prefixName The prefix name - * @param peeringServicePrefix The IP prefix for an peering - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, peeringServicePrefix: Models.PeeringServicePrefix, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, peeringServicePrefix: Models.PeeringServicePrefix, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - peeringServiceName, - prefixName, - peeringServicePrefix, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * removes the peering prefix. - * @param resourceGroupName The resource group name. - * @param peeringServiceName The peering service name. - * @param prefixName The prefix name - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The resource group name. - * @param peeringServiceName The peering service name. - * @param prefixName The prefix name - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, peeringServiceName: string, prefixName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The resource group name. - * @param peeringServiceName The peering service name. - * @param prefixName The prefix name - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, peeringServiceName: string, prefixName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - peeringServiceName, - prefixName, - options - }, - deleteMethodOperationSpec, - callback); - } -} - -// Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.peeringServiceName, - Parameters.prefixName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.PeeringServicePrefix - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.peeringServiceName, - Parameters.prefixName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "peeringServicePrefix", - mapper: { - ...Mappers.PeeringServicePrefix, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.PeeringServicePrefix - }, - 201: { - bodyMapper: Mappers.PeeringServicePrefix - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}", - urlParameters: [ - Parameters.resourceGroupName, - Parameters.peeringServiceName, - Parameters.prefixName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; diff --git a/sdk/peering/arm-peering/src/operations/prefixes.ts b/sdk/peering/arm-peering/src/operations/prefixes.ts index ae39a7f70bce..ce402591f200 100644 --- a/sdk/peering/arm-peering/src/operations/prefixes.ts +++ b/sdk/peering/arm-peering/src/operations/prefixes.ts @@ -27,27 +27,138 @@ export class Prefixes { } /** - * Lists the peerings prefix in the resource group. - * @param resourceGroupName The resource group name. - * @param peeringServiceName The peering service name. + * Gets an existing prefix with the specified name under the given subscription, resource group and + * peering service. + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param prefixName The name of the prefix. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: Models.PrefixesGetOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param prefixName The name of the prefix. + * @param callback The callback + */ + get(resourceGroupName: string, peeringServiceName: string, prefixName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param prefixName The name of the prefix. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, peeringServiceName: string, prefixName: string, options: Models.PrefixesGetOptionalParams, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: Models.PrefixesGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringServiceName, + prefixName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new prefix with the specified name under the given subscription, resource group and + * peering service. + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param prefixName The name of the prefix. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: Models.PrefixesCreateOrUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param prefixName The name of the prefix. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param prefixName The name of the prefix. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, options: Models.PrefixesCreateOrUpdateOptionalParams, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: Models.PrefixesCreateOrUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringServiceName, + prefixName, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes an existing prefix with the specified name under the given subscription, resource group + * and peering service. + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param prefixName The name of the prefix. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param prefixName The name of the prefix. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, peeringServiceName: string, prefixName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. + * @param prefixName The name of the prefix. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, peeringServiceName: string, prefixName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, peeringServiceName: string, prefixName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringServiceName, + prefixName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Lists all prefixes under the given subscription, resource group and peering service. + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. * @param [options] The optional parameters * @returns Promise */ - listByPeeringService(resourceGroupName: string, peeringServiceName: string, options?: msRest.RequestOptionsBase): Promise; + listByPeeringService(resourceGroupName: string, peeringServiceName: string, options?: Models.PrefixesListByPeeringServiceOptionalParams): Promise; /** - * @param resourceGroupName The resource group name. - * @param peeringServiceName The peering service name. + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. * @param callback The callback */ listByPeeringService(resourceGroupName: string, peeringServiceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The resource group name. - * @param peeringServiceName The peering service name. + * @param resourceGroupName The name of the resource group. + * @param peeringServiceName The name of the peering service. * @param options The optional parameters * @param callback The callback */ - listByPeeringService(resourceGroupName: string, peeringServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByPeeringService(resourceGroupName: string, peeringServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByPeeringService(resourceGroupName: string, peeringServiceName: string, options: Models.PrefixesListByPeeringServiceOptionalParams, callback: msRest.ServiceCallback): void; + listByPeeringService(resourceGroupName: string, peeringServiceName: string, options?: Models.PrefixesListByPeeringServiceOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -59,7 +170,7 @@ export class Prefixes { } /** - * Lists the peerings prefix in the resource group. + * Lists all prefixes under the given subscription, resource group and peering service. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -89,6 +200,103 @@ export class Prefixes { // Operation Specifications const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringServiceName, + Parameters.prefixName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.expand, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringServicePrefix + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringServiceName, + Parameters.prefixName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + prefix: [ + "options", + "prefix" + ], + peeringServicePrefixKey: [ + "options", + "peeringServicePrefixKey" + ] + }, + mapper: { + ...Mappers.PeeringServicePrefix, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PeeringServicePrefix + }, + 201: { + bodyMapper: Mappers.PeeringServicePrefix + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringServiceName, + Parameters.prefixName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const listByPeeringServiceOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes", @@ -98,6 +306,7 @@ const listByPeeringServiceOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ + Parameters.expand, Parameters.apiVersion ], headerParameters: [ diff --git a/sdk/peering/arm-peering/src/operations/registeredAsns.ts b/sdk/peering/arm-peering/src/operations/registeredAsns.ts new file mode 100644 index 000000000000..cef7bc42ec4b --- /dev/null +++ b/sdk/peering/arm-peering/src/operations/registeredAsns.ts @@ -0,0 +1,339 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/registeredAsnsMappers"; +import * as Parameters from "../models/parameters"; +import { PeeringManagementClientContext } from "../peeringManagementClientContext"; + +/** Class representing a RegisteredAsns. */ +export class RegisteredAsns { + private readonly client: PeeringManagementClientContext; + + /** + * Create a RegisteredAsns. + * @param {PeeringManagementClientContext} client Reference to the service client. + */ + constructor(client: PeeringManagementClientContext) { + this.client = client; + } + + /** + * Gets an existing registered ASN with the specified name under the given subscription, resource + * group and peering. + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredAsnName The name of the registered ASN. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, peeringName: string, registeredAsnName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredAsnName The name of the registered ASN. + * @param callback The callback + */ + get(resourceGroupName: string, peeringName: string, registeredAsnName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredAsnName The name of the registered ASN. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, peeringName: string, registeredAsnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, peeringName: string, registeredAsnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringName, + registeredAsnName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new registered ASN with the specified name under the given subscription, resource + * group and peering. + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredAsnName The name of the ASN. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, peeringName: string, registeredAsnName: string, options?: Models.RegisteredAsnsCreateOrUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredAsnName The name of the ASN. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, peeringName: string, registeredAsnName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredAsnName The name of the ASN. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, peeringName: string, registeredAsnName: string, options: Models.RegisteredAsnsCreateOrUpdateOptionalParams, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, peeringName: string, registeredAsnName: string, options?: Models.RegisteredAsnsCreateOrUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringName, + registeredAsnName, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes an existing registered ASN with the specified name under the given subscription, + * resource group and peering. + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredAsnName The name of the registered ASN. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, peeringName: string, registeredAsnName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredAsnName The name of the registered ASN. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, peeringName: string, registeredAsnName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredAsnName The name of the registered ASN. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, peeringName: string, registeredAsnName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, peeringName: string, registeredAsnName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringName, + registeredAsnName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Lists all registered ASNs under the given subscription, resource group and peering. + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param [options] The optional parameters + * @returns Promise + */ + listByPeering(resourceGroupName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param callback The callback + */ + listByPeering(resourceGroupName: string, peeringName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param options The optional parameters + * @param callback The callback + */ + listByPeering(resourceGroupName: string, peeringName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByPeering(resourceGroupName: string, peeringName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringName, + options + }, + listByPeeringOperationSpec, + callback) as Promise; + } + + /** + * Lists all registered ASNs under the given subscription, resource group and peering. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByPeeringNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByPeeringNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByPeeringNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByPeeringNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByPeeringNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}/registeredAsns/{registeredAsnName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringName, + Parameters.registeredAsnName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringRegisteredAsn + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}/registeredAsns/{registeredAsnName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringName, + Parameters.registeredAsnName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + asn: [ + "options", + "asn" + ] + }, + mapper: { + ...Mappers.PeeringRegisteredAsn, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PeeringRegisteredAsn + }, + 201: { + bodyMapper: Mappers.PeeringRegisteredAsn + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}/registeredAsns/{registeredAsnName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringName, + Parameters.registeredAsnName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByPeeringOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}/registeredAsns", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringRegisteredAsnListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByPeeringNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringRegisteredAsnListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/peering/arm-peering/src/operations/registeredPrefixes.ts b/sdk/peering/arm-peering/src/operations/registeredPrefixes.ts new file mode 100644 index 000000000000..448475b04aee --- /dev/null +++ b/sdk/peering/arm-peering/src/operations/registeredPrefixes.ts @@ -0,0 +1,339 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/registeredPrefixesMappers"; +import * as Parameters from "../models/parameters"; +import { PeeringManagementClientContext } from "../peeringManagementClientContext"; + +/** Class representing a RegisteredPrefixes. */ +export class RegisteredPrefixes { + private readonly client: PeeringManagementClientContext; + + /** + * Create a RegisteredPrefixes. + * @param {PeeringManagementClientContext} client Reference to the service client. + */ + constructor(client: PeeringManagementClientContext) { + this.client = client; + } + + /** + * Gets an existing registered prefix with the specified name under the given subscription, + * resource group and peering. + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredPrefixName The name of the registered prefix. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, peeringName: string, registeredPrefixName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredPrefixName The name of the registered prefix. + * @param callback The callback + */ + get(resourceGroupName: string, peeringName: string, registeredPrefixName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredPrefixName The name of the registered prefix. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, peeringName: string, registeredPrefixName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, peeringName: string, registeredPrefixName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringName, + registeredPrefixName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new registered prefix with the specified name under the given subscription, resource + * group and peering. + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredPrefixName The name of the registered prefix. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, peeringName: string, registeredPrefixName: string, options?: Models.RegisteredPrefixesCreateOrUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredPrefixName The name of the registered prefix. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, peeringName: string, registeredPrefixName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredPrefixName The name of the registered prefix. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, peeringName: string, registeredPrefixName: string, options: Models.RegisteredPrefixesCreateOrUpdateOptionalParams, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, peeringName: string, registeredPrefixName: string, options?: Models.RegisteredPrefixesCreateOrUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringName, + registeredPrefixName, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes an existing registered prefix with the specified name under the given subscription, + * resource group and peering. + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredPrefixName The name of the registered prefix. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, peeringName: string, registeredPrefixName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredPrefixName The name of the registered prefix. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, peeringName: string, registeredPrefixName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param registeredPrefixName The name of the registered prefix. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, peeringName: string, registeredPrefixName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, peeringName: string, registeredPrefixName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringName, + registeredPrefixName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Lists all registered prefixes under the given subscription, resource group and peering. + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param [options] The optional parameters + * @returns Promise + */ + listByPeering(resourceGroupName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param callback The callback + */ + listByPeering(resourceGroupName: string, peeringName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param options The optional parameters + * @param callback The callback + */ + listByPeering(resourceGroupName: string, peeringName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByPeering(resourceGroupName: string, peeringName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringName, + options + }, + listByPeeringOperationSpec, + callback) as Promise; + } + + /** + * Lists all registered prefixes under the given subscription, resource group and peering. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByPeeringNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByPeeringNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByPeeringNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByPeeringNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByPeeringNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}/registeredPrefixes/{registeredPrefixName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringName, + Parameters.registeredPrefixName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringRegisteredPrefix + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}/registeredPrefixes/{registeredPrefixName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringName, + Parameters.registeredPrefixName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + prefix: [ + "options", + "prefix" + ] + }, + mapper: { + ...Mappers.PeeringRegisteredPrefix, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PeeringRegisteredPrefix + }, + 201: { + bodyMapper: Mappers.PeeringRegisteredPrefix + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}/registeredPrefixes/{registeredPrefixName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringName, + Parameters.registeredPrefixName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByPeeringOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}/registeredPrefixes", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringRegisteredPrefixListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByPeeringNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringRegisteredPrefixListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/peering/arm-peering/src/peeringManagementClient.ts b/sdk/peering/arm-peering/src/peeringManagementClient.ts index bacf9dc4aabe..e5fc2f3ad100 100644 --- a/sdk/peering/arm-peering/src/peeringManagementClient.ts +++ b/sdk/peering/arm-peering/src/peeringManagementClient.ts @@ -22,9 +22,11 @@ class PeeringManagementClient extends PeeringManagementClientContext { operations: operations.Operations; peerAsns: operations.PeerAsns; peeringLocations: operations.PeeringLocations; + registeredAsns: operations.RegisteredAsns; + registeredPrefixes: operations.RegisteredPrefixes; peerings: operations.Peerings; + peeringServiceCountries: operations.PeeringServiceCountries; peeringServiceLocations: operations.PeeringServiceLocations; - peeringServicePrefixes: operations.PeeringServicePrefixes; prefixes: operations.Prefixes; peeringServiceProviders: operations.PeeringServiceProviders; peeringServices: operations.PeeringServices; @@ -41,9 +43,11 @@ class PeeringManagementClient extends PeeringManagementClientContext { this.operations = new operations.Operations(this); this.peerAsns = new operations.PeerAsns(this); this.peeringLocations = new operations.PeeringLocations(this); + this.registeredAsns = new operations.RegisteredAsns(this); + this.registeredPrefixes = new operations.RegisteredPrefixes(this); this.peerings = new operations.Peerings(this); + this.peeringServiceCountries = new operations.PeeringServiceCountries(this); this.peeringServiceLocations = new operations.PeeringServiceLocations(this); - this.peeringServicePrefixes = new operations.PeeringServicePrefixes(this); this.prefixes = new operations.Prefixes(this); this.peeringServiceProviders = new operations.PeeringServiceProviders(this); this.peeringServices = new operations.PeeringServices(this); diff --git a/sdk/peering/arm-peering/src/peeringManagementClientContext.ts b/sdk/peering/arm-peering/src/peeringManagementClientContext.ts index 33fd6ae85bd7..326b51242ac7 100644 --- a/sdk/peering/arm-peering/src/peeringManagementClientContext.ts +++ b/sdk/peering/arm-peering/src/peeringManagementClientContext.ts @@ -44,7 +44,7 @@ export class PeeringManagementClientContext extends msRestAzure.AzureServiceClie super(credentials, options); - this.apiVersion = '2019-08-01-preview'; + this.apiVersion = '2020-01-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";