diff --git a/packages/@azure/arm-cdn/README.md b/packages/@azure/arm-cdn/README.md index 3ec40bcca5eb..f4ea0d1e50cd 100644 --- a/packages/@azure/arm-cdn/README.md +++ b/packages/@azure/arm-cdn/README.md @@ -1,6 +1,6 @@ -## Azure CdnManagementClient SDK for JavaScript +## Azure PeeringManagementClient SDK for JavaScript -This package contains an isomorphic SDK for CdnManagementClient. +This package contains an isomorphic SDK for PeeringManagementClient. ### Currently supported environments @@ -15,7 +15,7 @@ npm install @azure/arm-cdn ### How to use -#### nodejs - Authentication, client creation and list profiles as an example written in TypeScript. +#### nodejs - Authentication, client creation and list legacyPeerings as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -29,12 +29,14 @@ npm install @azure/ms-rest-nodeauth import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { CdnManagementClient, CdnManagementModels, CdnManagementMappers } from "@azure/arm-cdn"; +import { PeeringManagementClient, PeeringManagementModels, PeeringManagementMappers } from "@azure/arm-cdn"; const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new CdnManagementClient(creds, subscriptionId); - client.profiles.list().then((result) => { + const client = new PeeringManagementClient(creds, subscriptionId); + const peeringLocation = "testpeeringLocation"; + const kind = "Direct"; + client.legacyPeerings.list(peeringLocation, kind).then((result) => { console.log("The result is:"); console.log(result); }); @@ -43,7 +45,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and list profiles as an example written in JavaScript. +#### browser - Authentication, client creation and list legacyPeerings as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth @@ -76,8 +78,10 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to // may cause redirects authManager.login(); } - const client = new Azure.ArmCdn.CdnManagementClient(res.creds, subscriptionId); - client.profiles.list().then((result) => { + const client = new Azure.ArmCdn.PeeringManagementClient(res.creds, subscriptionId); + const peeringLocation = "testpeeringLocation"; + const kind = "Direct"; + client.legacyPeerings.list(peeringLocation, kind).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -94,6 +98,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## Related projects - [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%2Fpackages%2F%40azure%2Farm-cdn%2FREADME.png) diff --git a/packages/@azure/arm-cdn/lib/models/index.ts b/packages/@azure/arm-cdn/lib/models/index.ts index 951ca9b6e44c..17c3ecac05e4 100644 --- a/packages/@azure/arm-cdn/lib/models/index.ts +++ b/packages/@azure/arm-cdn/lib/models/index.ts @@ -1,9 +1,11 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -11,1849 +13,786 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; + /** - * The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile. + * @interface + * An interface representing PeeringSku. + * The SKU that defines the tier and kind of the peering. + * */ -export interface Sku { +export interface PeeringSku { /** - * Name of the pricing tier. Possible values include: 'Standard_Verizon', 'Premium_Verizon', - * 'Custom_Verizon', 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft' + * @member {Name} [name] The name of the peering SKU. Possible values + * include: 'Basic_Exchange_Free', 'Basic_Direct_Free', + * 'Premium_Direct_Free', 'Premium_Exchange_Metered' */ - name?: SkuName; -} - -/** - * The core properties of ARM resources - */ -export interface Resource extends BaseResource { + name?: Name; /** - * Resource ID. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {Tier} [tier] The tier of the peering SKU. Possible values + * include: 'Basic', 'Premium' */ - readonly id?: string; + tier?: Tier; /** - * Resource name. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {Family} [family] The family of the peering SKU. Possible values + * include: 'Direct', 'Exchange' */ - readonly name?: string; + family?: Family; /** - * Resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {Size} [size] The size of the peering SKU. Possible values + * include: 'Free', 'Metered', 'Unlimited' */ - readonly type?: string; + size?: Size; } /** - * The resource model definition for a ARM tracked top level resource. + * @interface + * An interface representing BgpSession. + * The properties that define a BGP session. + * */ -export interface TrackedResource extends Resource { +export interface BgpSession { /** - * Resource location. + * @member {string} [sessionPrefixV4] The IPv4 prefix that contains both + * ends' IPv4 addresses. */ - location: string; - /** - * Resource tags. - */ - tags?: { [propertyName: string]: string }; -} - -/** - * CDN profile is a logical grouping of endpoints that share the same settings, such as CDN - * provider and pricing tier. - */ -export interface Profile extends TrackedResource { + sessionPrefixV4?: string; /** - * The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile. + * @member {string} [sessionPrefixV6] The IPv6 prefix that contains both + * ends' IPv6 addresses. */ - sku: Sku; + sessionPrefixV6?: string; /** - * Resource status of the profile. Possible values include: 'Creating', 'Active', 'Deleting', - * 'Disabled' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {string} [microsoftSessionIPv4Address] The IPv4 session address on + * Microsoft's end. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - readonly resourceState?: ProfileResourceState; + readonly microsoftSessionIPv4Address?: string; /** - * Provisioning status of the profile. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {string} [microsoftSessionIPv6Address] The IPv6 session address on + * Microsoft's end. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - readonly provisioningState?: string; -} - -/** - * Properties required to update a profile. - */ -export interface ProfileUpdateParameters extends BaseResource { + readonly microsoftSessionIPv6Address?: string; /** - * Profile tags + * @member {string} [peerSessionIPv4Address] The IPv4 session address on + * peer's end. */ - tags?: { [propertyName: string]: string }; -} - -/** - * The URI required to login to the supplemental portal from the Azure portal. - */ -export interface SsoUri { + peerSessionIPv4Address?: string; /** - * The URI used to login to the supplemental portal. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {string} [peerSessionIPv6Address] The IPv6 session address on + * peer's end. */ - readonly ssoUriValue?: string; -} - -/** - * The result of the GetSupportedOptimizationTypes API - */ -export interface SupportedOptimizationTypesListResult { + peerSessionIPv6Address?: string; /** - * Supported optimization types for a profile. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {SessionStateV4} [sessionStateV4] The state of the IPv4 session. + * Possible values include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent', + * 'OpenConfirm', 'Established', 'PendingAdd', 'PendingUpdate', + * 'PendingRemove' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - readonly supportedOptimizationTypes?: OptimizationType[]; -} - -/** - * The main origin of CDN content which is added when creating a CDN endpoint. - */ -export interface DeepCreatedOrigin extends BaseResource { + readonly sessionStateV4?: SessionStateV4; /** - * Origin name + * @member {SessionStateV6} [sessionStateV6] The state of the IPv6 session. + * Possible values include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent', + * 'OpenConfirm', 'Established', 'PendingAdd', 'PendingUpdate', + * 'PendingRemove' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - name: string; + readonly sessionStateV6?: SessionStateV6; /** - * The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. + * @member {number} [maxPrefixesAdvertisedV4] The maximum number of prefixes + * advertised over the IPv4 session. */ - hostName: string; + maxPrefixesAdvertisedV4?: number; /** - * The value of the HTTP port. Must be between 1 and 65535 + * @member {number} [maxPrefixesAdvertisedV6] The maximum number of prefixes + * advertised over the IPv6 session. */ - httpPort?: number; + maxPrefixesAdvertisedV6?: number; /** - * The value of the HTTPS port. Must be between 1 and 65535 + * @member {string} [md5AuthenticationKey] The MD5 authentication key of the + * session. */ - httpsPort?: number; + md5AuthenticationKey?: string; } /** - * CDN endpoint is the entity within a CDN profile containing configuration information such as - * origin, protocol, content caching and delivery behavior. The CDN endpoint uses the URL format - * .azureedge.net. + * @interface + * An interface representing DirectConnection. + * The properties that define a direct connection. + * */ -export interface Endpoint extends TrackedResource { - /** - * The host header value sent to the origin with each request. If you leave this blank, the - * request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and - * Cloud Services require this host header value to match the origin hostname by default. - */ - originHostHeader?: string; - /** - * A directory path on the origin that CDN can use to retrieve content from, e.g. - * contoso.cloudapp.net/originpath. - */ - originPath?: string; - /** - * List of content types on which compression applies. The value should be a valid MIME type. - */ - contentTypesToCompress?: string[]; - /** - * Indicates whether content compression is enabled on CDN. Default value is false. If - * compression is enabled, content will be served as compressed if user requests for a compressed - * version. Content won't be compressed on CDN when requested content is smaller than 1 byte or - * larger than 1 MB. - */ - isCompressionEnabled?: boolean; - /** - * Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one - * protocol (HTTP or HTTPS) must be allowed. - */ - isHttpAllowed?: boolean; - /** - * Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least - * one protocol (HTTP or HTTPS) must be allowed. - */ - isHttpsAllowed?: boolean; - /** - * Defines how CDN caches requests that include query strings. You can ignore any query strings - * when caching, bypass caching to prevent requests that contain query strings from being cached, - * or cache every request with a unique URL. Possible values include: 'IgnoreQueryString', - * 'BypassCaching', 'UseQueryString', 'NotSet' - */ - queryStringCachingBehavior?: QueryStringCachingBehavior; - /** - * Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, - * Media services. With this information, CDN can apply scenario driven optimization. Possible - * values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', 'VideoOnDemandMediaStreaming', - * 'LargeFileDownload', 'DynamicSiteAcceleration' - */ - optimizationType?: OptimizationType; - /** - * Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and - * calculate the most optimal routes for the CDN. This is relative to the origin path. - */ - probePath?: string; - /** - * List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an - * access rule to a specified path or content, e.g. block APAC for path /pictures/ - */ - geoFilters?: GeoFilter[]; +export interface DirectConnection { /** - * A policy that specifies the delivery rules to be used for an endpoint. + * @member {number} [bandwidthInMbps] The bandwidth of the connection. */ - deliveryPolicy?: EndpointPropertiesUpdateParametersDeliveryPolicy; + bandwidthInMbps?: number; /** - * The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. - * contoso.azureedge.net - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {number} [provisionedBandwidthInMbps] The bandwidth that is + * actually provisioned. */ - readonly hostName?: string; + provisionedBandwidthInMbps?: number; /** - * The source of the content being delivered via CDN. + * @member {number} [peeringDBFacilityId] The PeeringDB.com ID of the + * facility at which the connection has to be set up. */ - origins: DeepCreatedOrigin[]; + peeringDBFacilityId?: number; /** - * Resource status of the endpoint. Possible values include: 'Creating', 'Deleting', 'Running', - * 'Starting', 'Stopped', 'Stopping' - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {ConnectionState} [connectionState] The state of the connection. + * Possible values include: 'None', 'PendingApproval', 'Approved', + * 'ProvisioningStarted', 'ProvisioningFailed', 'ProvisioningCompleted', + * 'Validating', 'Active' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - readonly resourceState?: EndpointResourceState; + readonly connectionState?: ConnectionState; /** - * Provisioning status of the endpoint. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {BgpSession} [bgpSession] The BGP session associated with the + * connection. */ - readonly provisioningState?: string; + bgpSession?: BgpSession; } /** - * Rules defining user's geo access within a CDN endpoint. + * @interface + * An interface representing PeeringPropertiesDirect. + * The properties that define a direct peering. + * */ -export interface GeoFilter { - /** - * Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) - */ - relativePath: string; - /** - * Action of the geo filter, i.e. allow or block access. Possible values include: 'Block', - * 'Allow' - */ - action: GeoFilterActions; +export interface PeeringPropertiesDirect { /** - * Two letter country codes defining user country access in a geo filter, e.g. AU, MX, US. + * @member {DirectConnection[]} [connections] The set of connections that + * constitute a direct peering. */ - countryCodes: string[]; -} - -/** - * Contains the possible cases for DeliveryRuleAction. - */ -export type DeliveryRuleActionUnion = DeliveryRuleAction | DeliveryRuleCacheExpirationAction; - -/** - * An action for the delivery rule. - */ -export interface DeliveryRuleAction { + connections?: DirectConnection[]; /** - * Polymorphic Discriminator + * @member {number} [peerAsn] The Autonomous System Number (ASN) associated + * with the peering. */ - name: "DeliveryRuleAction"; -} - -/** - * Contains the possible cases for DeliveryRuleCondition. - */ -export type DeliveryRuleConditionUnion = DeliveryRuleCondition | DeliveryRuleUrlPathCondition | DeliveryRuleUrlFileExtensionCondition; - -/** - * A condition for the delivery rule. - */ -export interface DeliveryRuleCondition { + peerAsn?: number; /** - * Polymorphic Discriminator + * @member {boolean} [useForPeeringService] The flag that indicates whether + * or not the peering is used for peering service. */ - name: "DeliveryRuleCondition"; + useForPeeringService?: boolean; } /** - * A rule that specifies a set of actions and conditions + * @interface + * An interface representing ExchangeConnection. + * The properties that define an exchange connection. + * */ -export interface DeliveryRule { - /** - * The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A - * rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 - * is a special rule. It does not require any condition and actions listed in it will always be - * applied. - */ - order: number; - /** - * A list of actions that are executed when all the conditions of a rule are satisfied. - */ - actions: DeliveryRuleActionUnion[]; +export interface ExchangeConnection { /** - * A list of conditions that must be matched for the actions to be executed + * @member {number} [peeringDBFacilityId] The PeeringDB.com ID of the + * facility at which the connection has to be set up. */ - conditions?: DeliveryRuleConditionUnion[]; -} - -/** - * A policy that specifies the delivery rules to be used for an endpoint. - */ -export interface EndpointPropertiesUpdateParametersDeliveryPolicy { + peeringDBFacilityId?: number; /** - * User-friendly description of the policy. + * @member {ConnectionState} [connectionState] The state of the connection. + * Possible values include: 'None', 'PendingApproval', 'Approved', + * 'ProvisioningStarted', 'ProvisioningFailed', 'ProvisioningCompleted', + * 'Validating', 'Active' + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - description?: string; + readonly connectionState?: ConnectionState; /** - * A list of the delivery rules. + * @member {BgpSession} [bgpSession] The BGP session associated with the + * connection. */ - rules: DeliveryRule[]; + bgpSession?: BgpSession; } /** - * Properties required to create or update an endpoint. + * @interface + * An interface representing PeeringPropertiesExchange. + * The properties that define an exchange peering. + * */ -export interface EndpointUpdateParameters extends BaseResource { - /** - * Endpoint tags. - */ - tags?: { [propertyName: string]: string }; - /** - * The host header value sent to the origin with each request. If you leave this blank, the - * request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and - * Cloud Services require this host header value to match the origin hostname by default. - */ - originHostHeader?: string; +export interface PeeringPropertiesExchange { /** - * A directory path on the origin that CDN can use to retrieve content from, e.g. - * contoso.cloudapp.net/originpath. + * @member {ExchangeConnection[]} [connections] The set of connections that + * constitute an exchange peering. */ - originPath?: string; + connections?: ExchangeConnection[]; /** - * List of content types on which compression applies. The value should be a valid MIME type. + * @member {number} [peerAsn] The Autonomous System Number (ASN) associated + * with the peering. */ - contentTypesToCompress?: string[]; - /** - * Indicates whether content compression is enabled on CDN. Default value is false. If - * compression is enabled, content will be served as compressed if user requests for a compressed - * version. Content won't be compressed on CDN when requested content is smaller than 1 byte or - * larger than 1 MB. - */ - isCompressionEnabled?: boolean; - /** - * Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one - * protocol (HTTP or HTTPS) must be allowed. - */ - isHttpAllowed?: boolean; - /** - * Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least - * one protocol (HTTP or HTTPS) must be allowed. - */ - isHttpsAllowed?: boolean; - /** - * Defines how CDN caches requests that include query strings. You can ignore any query strings - * when caching, bypass caching to prevent requests that contain query strings from being cached, - * or cache every request with a unique URL. Possible values include: 'IgnoreQueryString', - * 'BypassCaching', 'UseQueryString', 'NotSet' - */ - queryStringCachingBehavior?: QueryStringCachingBehavior; - /** - * Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, - * Media services. With this information, CDN can apply scenario driven optimization. Possible - * values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', 'VideoOnDemandMediaStreaming', - * 'LargeFileDownload', 'DynamicSiteAcceleration' - */ - optimizationType?: OptimizationType; - /** - * Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and - * calculate the most optimal routes for the CDN. This is relative to the origin path. - */ - probePath?: string; - /** - * List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an - * access rule to a specified path or content, e.g. block APAC for path /pictures/ - */ - geoFilters?: GeoFilter[]; - /** - * A policy that specifies the delivery rules to be used for an endpoint. - */ - deliveryPolicy?: EndpointPropertiesUpdateParametersDeliveryPolicy; + peerAsn?: number; } /** - * Defines the parameters for the URL path condition. + * @interface + * An interface representing Peering. + * Peering is a logical representation of a set of connections to the Microsoft + * Cloud Edge at a location. + * + * @extends BaseResource */ -export interface UrlPathConditionParameters { +export interface Peering extends BaseResource { /** - * A URL path for the condition of the delivery rule + * @member {PeeringSku} sku The SKU that defines the tier and kind of the + * peering. */ - path: string; + sku: PeeringSku; /** - * The match type for the condition of the delivery rule. Possible values include: 'Literal', - * 'Wildcard' + * @member {Kind} kind The kind of the peering. Possible values include: + * 'Direct', 'Exchange' */ - matchType: MatchType; -} - -/** - * Defines the URL path condition for the delivery rule. - */ -export interface DeliveryRuleUrlPathCondition { + kind: Kind; /** - * Polymorphic Discriminator + * @member {PeeringPropertiesDirect} [direct] The properties that define a + * direct peering. */ - name: "UrlPath"; + direct?: PeeringPropertiesDirect; /** - * Defines the parameters for the condition. + * @member {PeeringPropertiesExchange} [exchange] The properties that define + * an exchange peering. */ - parameters: UrlPathConditionParameters; -} - -/** - * Defines the parameters for the URL file extension condition. - */ -export interface UrlFileExtensionConditionParameters { + exchange?: PeeringPropertiesExchange; /** - * A list of extensions for the condition of the delivery rule. + * @member {string} [peeringLocation] The location of the peering. */ - extensions: string[]; -} - -/** - * Defines the URL file extension condition for the delivery rule. - */ -export interface DeliveryRuleUrlFileExtensionCondition { + peeringLocation?: string; /** - * Polymorphic Discriminator + * @member {ProvisioningState} [provisioningState] 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.** */ - name: "UrlFileExtension"; + readonly provisioningState?: ProvisioningState; /** - * Defines the parameters for the condition. + * @member {string} location The location of the resource. */ - parameters: UrlFileExtensionConditionParameters; -} - -/** - * Defines the parameters for the cache expiration action. - */ -export interface CacheExpirationActionParameters { + location: string; /** - * Caching behavior for the requests that include query strings. Possible values include: - * 'BypassCache', 'Override', 'SetIfMissing' + * @member {{ [propertyName: string]: string }} [tags] The resource tags. */ - cacheBehavior: CacheBehavior; + tags?: { [propertyName: string]: string }; /** - * The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + * @member {string} [name] The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - cacheDuration?: string; -} - -/** - * Defines the cache expiration action for the delivery rule. - */ -export interface DeliveryRuleCacheExpirationAction { + readonly name?: string; /** - * Polymorphic Discriminator + * @member {string} [id] The ID of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - name: "CacheExpiration"; + readonly id?: string; /** - * Defines the parameters for the action. + * @member {string} [type] The type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - parameters: CacheExpirationActionParameters; + readonly type?: string; } /** - * Parameters required for content purge. + * @interface + * An interface representing ErrorResponse. + * The error response that indicates why an operation has failed. + * */ -export interface PurgeParameters { +export interface ErrorResponse { /** - * The path to the content to be purged. Can describe a file path or a wild card directory. + * @member {string} [code] The error code. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - contentPaths: string[]; -} - -/** - * Parameters required for content load. - */ -export interface LoadParameters { + readonly code?: string; /** - * The path to the content to be loaded. Path should be a relative file URL of the origin. + * @member {string} [message] The error message. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - contentPaths: string[]; + readonly message?: string; } /** - * CDN origin is the source of the content being delivered via CDN. When the edge nodes represented - * by an endpoint do not have the requested content cached, they attempt to fetch it from one or - * more of the configured origins. + * @interface + * An interface representing OperationDisplayInfo. + * The information related to the operation. + * */ -export interface Origin extends TrackedResource { - /** - * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported. - */ - hostName: string; +export interface OperationDisplayInfo { /** - * The value of the HTTP port. Must be between 1 and 65535. + * @member {string} [provider] The name of the resource provider. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - httpPort?: number; - /** - * The value of the https port. Must be between 1 and 65535. - */ - httpsPort?: number; - /** - * Resource status of the origin. Possible values include: 'Creating', 'Active', 'Deleting' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceState?: OriginResourceState; - /** - * Provisioning status of the origin. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly provisioningState?: string; -} - -/** - * Origin properties needed for origin creation or update. - */ -export interface OriginUpdateParameters extends BaseResource { + readonly provider?: string; /** - * The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported. + * @member {string} [resource] The type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - hostName?: string; + readonly resource?: string; /** - * The value of the HTTP port. Must be between 1 and 65535. + * @member {string} [operation] The name of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - httpPort?: number; + readonly operation?: string; /** - * The value of the HTTPS port. Must be between 1 and 65535. + * @member {string} [description] The description of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - httpsPort?: number; -} - -/** - * The resource model definition for a ARM proxy resource. It will have everything other than - * required location and tags - */ -export interface ProxyResource extends Resource { + readonly description?: string; } /** - * Friendly domain name mapping to the endpoint hostname that the customer provides for branding - * purposes, e.g. www.contoso.com. + * @interface + * An interface representing Operation. + * The peering API operation. + * */ -export interface CustomDomain extends ProxyResource { - /** - * The host name of the custom domain. Must be a domain name. - */ - hostName: string; - /** - * Resource status of the custom domain. Possible values include: 'Creating', 'Active', - * 'Deleting' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceState?: CustomDomainResourceState; - /** - * Provisioning status of Custom Https of the custom domain. Possible values include: 'Enabling', - * 'Enabled', 'Disabling', 'Disabled', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly customHttpsProvisioningState?: CustomHttpsProvisioningState; - /** - * Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by - * step. Possible values include: 'SubmittingDomainControlValidationRequest', - * 'PendingDomainControlValidationREquestApproval', 'DomainControlValidationRequestApproved', - * 'DomainControlValidationRequestRejected', 'DomainControlValidationRequestTimedOut', - * 'IssuingCertificate', 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', - * 'CertificateDeleted' - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly customHttpsProvisioningSubstate?: CustomHttpsProvisioningSubstate; +export interface Operation { /** - * Special validation or data may be required when delivering CDN to some regions due to local - * compliance reasons. E.g. ICP license number of a custom domain is required to deliver content - * in China. + * @member {string} [name] The name of the operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - validationData?: string; + readonly name?: string; /** - * Provisioning status of the custom domain. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {OperationDisplayInfo} [display] The information related to the + * operation. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - readonly provisioningState?: string; -} - -/** - * The customDomain JSON object required for custom domain creation or update. - */ -export interface CustomDomainParameters { + readonly display?: OperationDisplayInfo; /** - * The host name of the custom domain. Must be a domain name. + * @member {boolean} [isDataAction] The flag that indicates whether the + * operation applies to data plane. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - hostName: string; + readonly isDataAction?: boolean; } /** - * Contains the possible cases for CustomDomainHttpsParameters. - */ -export type CustomDomainHttpsParametersUnion = CustomDomainHttpsParameters | CdnManagedHttpsParameters | UserManagedHttpsParameters; - -/** - * The JSON object that contains the properties to secure a custom domain. + * @interface + * An interface representing ContactInfo. + * The contact information of the peer. + * */ -export interface CustomDomainHttpsParameters { +export interface ContactInfo { /** - * Polymorphic Discriminator + * @member {string[]} [emails] The list of email addresses. */ - certificateSource: "CustomDomainHttpsParameters"; + emails?: string[]; /** - * Defines the TLS extension protocol that is used for secure delivery. Possible values include: - * 'ServerNameIndication', 'IPBased' + * @member {string[]} [phone] The list of contact numbers. */ - protocolType: ProtocolType; + phone?: string[]; } /** - * Defines the parameters for using CDN managed certificate for securing custom domain. + * @interface + * An interface representing PeerInfo. + * The essential information related to the peer. + * */ -export interface CdnCertificateSourceParameters { +export interface PeerInfo { /** - * Type of certificate used. Possible values include: 'Shared', 'Dedicated' + * @member {number} [peerAsn] The Autonomous System Number (ASN) of the peer. */ - certificateType: CertificateType; -} - -/** - * Defines the certificate source parameters using CDN managed certificate for enabling SSL. - */ -export interface CdnManagedHttpsParameters { + peerAsn?: number; /** - * Polymorphic Discriminator + * @member {ContactInfo} [peerContactInfo] The contact information of the + * peer. */ - certificateSource: "Cdn"; + peerContactInfo?: ContactInfo; /** - * Defines the TLS extension protocol that is used for secure delivery. Possible values include: - * 'ServerNameIndication', 'IPBased' + * @member {string} [peerName] The name of the peer. */ - protocolType: ProtocolType; + peerName?: string; /** - * Defines the certificate source parameters using CDN managed certificate for enabling SSL. + * @member {ValidationState} [validationState] The validation state of the + * ASN associated with the peer. Possible values include: 'None', 'Pending', + * 'Approved', 'Failed' */ - certificateSourceParameters: CdnCertificateSourceParameters; + validationState?: ValidationState; } /** - * Describes the parameters for using a user's KeyVault certificate for securing custom domain. + * @interface + * An interface representing DirectPeeringFacility. + * The properties that define a direct peering facility. + * */ -export interface KeyVaultCertificateSourceParameters { - /** - * Subscription Id of the user's Key Vault containing the SSL certificate - */ - subscriptionId: string; +export interface DirectPeeringFacility { /** - * Resource group of the user's Key Vault containing the SSL certificate + * @member {string} [address] The address of the direct peering facility. */ - resourceGroupName: string; + address?: string; /** - * The name of the user's Key Vault containing the SSL certificate + * @member {number} [peeringDBFacilityId] The PeeringDB.com ID of the + * facility. */ - vaultName: string; + peeringDBFacilityId?: number; /** - * The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + * @member {string} [peeringDBFacilityLink] The PeeringDB.com URL of the + * facility. */ - secretName: string; - /** - * The version(GUID) of Key Vault Secret in Key Vault. - */ - secretVersion: string; + peeringDBFacilityLink?: string; } /** - * Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + * @interface + * An interface representing PeeringBandwidthOffer. + * The properties that define a peering bandwidth offer. + * */ -export interface UserManagedHttpsParameters { - /** - * Polymorphic Discriminator - */ - certificateSource: "AzureKeyVault"; - /** - * Defines the TLS extension protocol that is used for secure delivery. Possible values include: - * 'ServerNameIndication', 'IPBased' - */ - protocolType: ProtocolType; +export interface PeeringBandwidthOffer { /** - * Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + * @member {string} [offerName] The name of the bandwidth offer. */ - certificateSourceParameters: KeyVaultCertificateSourceParameters; -} - -/** - * Input of the custom domain to be validated for DNS mapping. - */ -export interface ValidateCustomDomainInput { + offerName?: string; /** - * The host name of the custom domain. Must be a domain name. + * @member {number} [valueInMbps] The value of the bandwidth offer in Mbps. */ - hostName: string; + valueInMbps?: number; } /** - * Output of custom domain validation. + * @interface + * An interface representing PeeringLocationPropertiesDirect. + * The properties that define a direct peering location. + * */ -export interface ValidateCustomDomainOutput { - /** - * Indicates whether the custom domain is valid or not. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly customDomainValidated?: boolean; +export interface PeeringLocationPropertiesDirect { /** - * The reason why the custom domain is not valid. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {DirectPeeringFacility[]} [peeringFacilities] The list of direct + * peering facilities at the peering location. */ - readonly reason?: string; + peeringFacilities?: DirectPeeringFacility[]; /** - * Error message describing why the custom domain is not valid. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {PeeringBandwidthOffer[]} [bandwidthOffers] The list of bandwidth + * offers available at the peering location. */ - readonly message?: string; + bandwidthOffers?: PeeringBandwidthOffer[]; } /** - * Input of CheckNameAvailability API. + * @interface + * An interface representing ExchangePeeringFacility. + * The properties that define an exchange peering facility. + * */ -export interface CheckNameAvailabilityInput { +export interface ExchangePeeringFacility { /** - * The resource name to validate. + * @member {string} [exchangeName] The name of the exchange peering facility. */ - name: string; -} - -/** - * Output of check name availability API. - */ -export interface CheckNameAvailabilityOutput { + exchangeName?: string; /** - * Indicates whether the name is available. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {number} [bandwidthInMbps] The bandwidth of the connection between + * Microsoft and the exchange peering facility. */ - readonly nameAvailable?: boolean; + bandwidthInMbps?: number; /** - * The reason why the name is not available. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {string} [microsoftIPv4Address] The IPv4 address of Microsoft at + * the exchange peering facility. */ - readonly reason?: string; + microsoftIPv4Address?: string; /** - * The detailed error message describing why the name is not available. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {string} [microsoftIPv6Address] The IPv6 address of Microsoft at + * the exchange peering facility. */ - readonly message?: string; -} - -/** - * Input of the validate probe API. - */ -export interface ValidateProbeInput { + microsoftIPv6Address?: string; /** - * The probe URL to validate. + * @member {string} [facilityIPv4Prefix] The IPv4 prefixes associated with + * the exchange peering facility. */ - probeURL: string; -} - -/** - * Output of the validate probe API. - */ -export interface ValidateProbeOutput { + facilityIPv4Prefix?: string; /** - * Indicates whether the probe URL is accepted or not. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {string} [facilityIPv6Prefix] The IPv6 prefixes associated with + * the exchange peering facility. */ - readonly isValid?: boolean; + facilityIPv6Prefix?: string; /** - * Specifies the error code when the probe url is not accepted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {number} [peeringDBFacilityId] The PeeringDB.com ID of the + * facility. */ - readonly errorCode?: string; + peeringDBFacilityId?: number; /** - * The detailed error message describing why the probe URL is not accepted. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {string} [peeringDBFacilityLink] The PeeringDB.com URL of the + * facility. */ - readonly message?: string; + peeringDBFacilityLink?: string; } /** - * Output of check resource usage API. + * @interface + * An interface representing PeeringLocationPropertiesExchange. + * The properties that define an exchange peering location. + * */ -export interface ResourceUsage { - /** - * Resource type for which the usage is provided. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly resourceType?: string; - /** - * Unit of the usage. e.g. Count. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly unit?: string; - /** - * Actual value of usage on the specified resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly currentValue?: number; +export interface PeeringLocationPropertiesExchange { /** - * Quota of the specified resource type. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {ExchangePeeringFacility[]} [peeringFacilities] The list of + * exchange peering facilities at the peering location. */ - readonly limit?: number; + peeringFacilities?: ExchangePeeringFacility[]; } /** - * The object that represents the operation. + * @interface + * An interface representing PeeringLocation. + * Peering location is where connectivity could be established to the Microsoft + * Cloud Edge. + * */ -export interface OperationDisplay { +export interface PeeringLocation { /** - * Service provider: Microsoft.Cdn - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {Kind} [kind] The kind of peering that the peering location + * supports. Possible values include: 'Direct', 'Exchange' */ - readonly provider?: string; + kind?: Kind; /** - * Resource on which the operation is performed: Profile, endpoint, etc. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {PeeringLocationPropertiesDirect} [direct] The properties that + * define a direct peering location. */ - readonly resource?: string; + direct?: PeeringLocationPropertiesDirect; /** - * Operation type: Read, write, delete, etc. - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {PeeringLocationPropertiesExchange} [exchange] The properties that + * define an exchange peering location. */ - readonly operation?: string; -} - -/** - * CDN REST API operation - */ -export interface Operation { + exchange?: PeeringLocationPropertiesExchange; /** - * Operation name: {provider}/{resource}/{operation} - * **NOTE: This property will not be serialized. It can only be populated by the server.** + * @member {string} [peeringLocation] The name of the peering location. */ - readonly name?: string; + peeringLocation?: string; /** - * The object that represents the operation. + * @member {string} [country] The country in which the peering location + * exists. */ - display?: OperationDisplay; -} - -/** - * CIDR Ip address - */ -export interface CidrIpAddress { - /** - * Ip address itself. - */ - baseIpAddress?: string; - /** - * The length of the prefix of the ip address. - */ - prefixLength?: number; -} - -/** - * CDN Ip address group - */ -export interface IpAddressGroup { - /** - * The delivery region of the ip address group - */ - deliveryRegion?: string; - /** - * The list of ip v4 addresses. - */ - ipv4Addresses?: CidrIpAddress[]; - /** - * The list of ip v6 addresses. - */ - ipv6Addresses?: CidrIpAddress[]; -} - -/** - * Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. - */ -export interface EdgeNode extends ProxyResource { - /** - * List of ip address groups. - */ - ipAddressGroups: IpAddressGroup[]; -} - -/** - * Error response indicates CDN service is not able to process the incoming request. The reason is - * provided in the error message. - */ -export interface ErrorResponse { - /** - * Error code. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly code?: string; - /** - * Error message indicating why the operation failed. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly message?: string; -} - -/** - * Optional Parameters. - */ -export interface ProfilesUpdateOptionalParams extends msRest.RequestOptionsBase { - /** - * Profile tags - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface ProfilesBeginUpdateOptionalParams extends msRest.RequestOptionsBase { - /** - * Profile tags - */ - tags?: { [propertyName: string]: string }; -} - -/** - * Optional Parameters. - */ -export interface CustomDomainsEnableCustomHttpsOptionalParams extends msRest.RequestOptionsBase { - /** - * The configuration specifying how to enable HTTPS for the custom domain - using CDN managed - * certificate or user's own certificate. If not specified, enabling ssl uses CDN managed - * certificate by default. - */ - customDomainHttpsParameters?: CustomDomainHttpsParametersUnion; -} - -/** - * An interface representing CdnManagementClientOptions. - */ -export interface CdnManagementClientOptions extends AzureServiceClientOptions { - baseUri?: string; -} - -/** - * @interface - * Result of the request to list profiles. It contains a list of profile objects and a URL link to - * get the next set of results. - * @extends Array - */ -export interface ProfileListResult extends Array { - /** - * URL to get the next set of profile objects if there are any. - */ - nextLink?: string; -} - -/** - * @interface - * Output of check resource usage API. - * @extends Array - */ -export interface ResourceUsageListResult extends Array { - /** - * URL to get the next set of custom domain objects if there are any. - */ - nextLink?: string; -} - -/** - * @interface - * Result of the request to list endpoints. It contains a list of endpoint objects and a URL link - * to get the next set of results. - * @extends Array - */ -export interface EndpointListResult extends Array { - /** - * URL to get the next set of endpoint objects if there is any. - */ - nextLink?: string; -} - -/** - * @interface - * Result of the request to list origins. It contains a list of origin objects and a URL link to - * get the next set of results. - * @extends Array - */ -export interface OriginListResult extends Array { - /** - * URL to get the next set of origin objects if there are any. - */ - nextLink?: string; -} - -/** - * @interface - * Result of the request to list custom domains. It contains a list of custom domain objects and a - * URL link to get the next set of results. - * @extends Array - */ -export interface CustomDomainListResult extends Array { - /** - * URL to get the next set of custom domain objects if there are any. - */ - nextLink?: string; -} - -/** - * @interface - * Result of the request to list CDN operations. It contains a list of operations and a URL link to - * get the next set of results. - * @extends Array - */ -export interface OperationsListResult extends Array { - /** - * URL to get the next set of operation list results if there are any. - */ - nextLink?: string; -} - -/** - * @interface - * Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL - * link to get the next set of results. - * @extends Array - */ -export interface EdgenodeResult extends Array { - /** - * URL to get the next set of edgenode list results if there are any. - */ - nextLink?: string; -} - -/** - * Defines values for SkuName. - * Possible values include: 'Standard_Verizon', 'Premium_Verizon', 'Custom_Verizon', - * 'Standard_Akamai', 'Standard_ChinaCdn', 'Standard_Microsoft' - * @readonly - * @enum {string} - */ -export type SkuName = 'Standard_Verizon' | 'Premium_Verizon' | 'Custom_Verizon' | 'Standard_Akamai' | 'Standard_ChinaCdn' | 'Standard_Microsoft'; - -/** - * Defines values for ProfileResourceState. - * Possible values include: 'Creating', 'Active', 'Deleting', 'Disabled' - * @readonly - * @enum {string} - */ -export type ProfileResourceState = 'Creating' | 'Active' | 'Deleting' | 'Disabled'; - -/** - * Defines values for OptimizationType. - * Possible values include: 'GeneralWebDelivery', 'GeneralMediaStreaming', - * 'VideoOnDemandMediaStreaming', 'LargeFileDownload', 'DynamicSiteAcceleration' - * @readonly - * @enum {string} - */ -export type OptimizationType = 'GeneralWebDelivery' | 'GeneralMediaStreaming' | 'VideoOnDemandMediaStreaming' | 'LargeFileDownload' | 'DynamicSiteAcceleration'; - -/** - * Defines values for EndpointResourceState. - * Possible values include: 'Creating', 'Deleting', 'Running', 'Starting', 'Stopped', 'Stopping' - * @readonly - * @enum {string} - */ -export type EndpointResourceState = 'Creating' | 'Deleting' | 'Running' | 'Starting' | 'Stopped' | 'Stopping'; - -/** - * Defines values for QueryStringCachingBehavior. - * Possible values include: 'IgnoreQueryString', 'BypassCaching', 'UseQueryString', 'NotSet' - * @readonly - * @enum {string} - */ -export type QueryStringCachingBehavior = 'IgnoreQueryString' | 'BypassCaching' | 'UseQueryString' | 'NotSet'; - -/** - * Defines values for GeoFilterActions. - * Possible values include: 'Block', 'Allow' - * @readonly - * @enum {string} - */ -export type GeoFilterActions = 'Block' | 'Allow'; - -/** - * Defines values for OriginResourceState. - * Possible values include: 'Creating', 'Active', 'Deleting' - * @readonly - * @enum {string} - */ -export type OriginResourceState = 'Creating' | 'Active' | 'Deleting'; - -/** - * Defines values for CustomDomainResourceState. - * Possible values include: 'Creating', 'Active', 'Deleting' - * @readonly - * @enum {string} - */ -export type CustomDomainResourceState = 'Creating' | 'Active' | 'Deleting'; - -/** - * Defines values for CustomHttpsProvisioningState. - * Possible values include: 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Failed' - * @readonly - * @enum {string} - */ -export type CustomHttpsProvisioningState = 'Enabling' | 'Enabled' | 'Disabling' | 'Disabled' | 'Failed'; - -/** - * Defines values for CustomHttpsProvisioningSubstate. - * Possible values include: 'SubmittingDomainControlValidationRequest', - * 'PendingDomainControlValidationREquestApproval', 'DomainControlValidationRequestApproved', - * 'DomainControlValidationRequestRejected', 'DomainControlValidationRequestTimedOut', - * 'IssuingCertificate', 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', - * 'CertificateDeleted' - * @readonly - * @enum {string} - */ -export type CustomHttpsProvisioningSubstate = 'SubmittingDomainControlValidationRequest' | 'PendingDomainControlValidationREquestApproval' | 'DomainControlValidationRequestApproved' | 'DomainControlValidationRequestRejected' | 'DomainControlValidationRequestTimedOut' | 'IssuingCertificate' | 'DeployingCertificate' | 'CertificateDeployed' | 'DeletingCertificate' | 'CertificateDeleted'; - -/** - * Defines values for ProtocolType. - * Possible values include: 'ServerNameIndication', 'IPBased' - * @readonly - * @enum {string} - */ -export type ProtocolType = 'ServerNameIndication' | 'IPBased'; - -/** - * Defines values for CertificateType. - * Possible values include: 'Shared', 'Dedicated' - * @readonly - * @enum {string} - */ -export type CertificateType = 'Shared' | 'Dedicated'; - -/** - * Defines values for ResourceType. - * Possible values include: 'Microsoft.Cdn/Profiles/Endpoints' - * @readonly - * @enum {string} - */ -export type ResourceType = 'Microsoft.Cdn/Profiles/Endpoints'; - -/** - * Defines values for MatchType. - * Possible values include: 'Literal', 'Wildcard' - * @readonly - * @enum {string} - */ -export type MatchType = 'Literal' | 'Wildcard'; - -/** - * Defines values for CacheBehavior. - * Possible values include: 'BypassCache', 'Override', 'SetIfMissing' - * @readonly - * @enum {string} - */ -export type CacheBehavior = 'BypassCache' | 'Override' | 'SetIfMissing'; - -/** - * Contains response data for the list operation. - */ -export type ProfilesListResponse = ProfileListResult & { - /** - * 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: ProfileListResult; - }; -}; - -/** - * Contains response data for the listByResourceGroup operation. - */ -export type ProfilesListByResourceGroupResponse = ProfileListResult & { - /** - * 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: ProfileListResult; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type ProfilesGetResponse = Profile & { - /** - * 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: Profile; - }; -}; - -/** - * Contains response data for the create operation. - */ -export type ProfilesCreateResponse = Profile & { - /** - * 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: Profile; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type ProfilesUpdateResponse = Profile & { - /** - * 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: Profile; - }; -}; - -/** - * Contains response data for the generateSsoUri operation. - */ -export type ProfilesGenerateSsoUriResponse = SsoUri & { - /** - * 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: SsoUri; - }; -}; - -/** - * Contains response data for the listSupportedOptimizationTypes operation. - */ -export type ProfilesListSupportedOptimizationTypesResponse = SupportedOptimizationTypesListResult & { - /** - * 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: SupportedOptimizationTypesListResult; - }; -}; - -/** - * Contains response data for the listResourceUsage operation. - */ -export type ProfilesListResourceUsageResponse = ResourceUsageListResult & { - /** - * 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: ResourceUsageListResult; - }; -}; - -/** - * Contains response data for the beginCreate operation. - */ -export type ProfilesBeginCreateResponse = Profile & { - /** - * 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: Profile; - }; -}; - -/** - * Contains response data for the beginUpdate operation. - */ -export type ProfilesBeginUpdateResponse = Profile & { - /** - * 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: Profile; - }; -}; - -/** - * Contains response data for the listNext operation. - */ -export type ProfilesListNextResponse = ProfileListResult & { - /** - * 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: ProfileListResult; - }; -}; - -/** - * Contains response data for the listByResourceGroupNext operation. - */ -export type ProfilesListByResourceGroupNextResponse = ProfileListResult & { - /** - * 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: ProfileListResult; - }; -}; - -/** - * Contains response data for the listResourceUsageNext operation. - */ -export type ProfilesListResourceUsageNextResponse = ResourceUsageListResult & { - /** - * 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: ResourceUsageListResult; - }; -}; - -/** - * Contains response data for the listByProfile operation. - */ -export type EndpointsListByProfileResponse = EndpointListResult & { - /** - * 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: EndpointListResult; - }; -}; - -/** - * Contains response data for the get operation. - */ -export type EndpointsGetResponse = Endpoint & { - /** - * 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: Endpoint; - }; -}; - -/** - * Contains response data for the create operation. - */ -export type EndpointsCreateResponse = Endpoint & { - /** - * 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: Endpoint; - }; -}; - -/** - * Contains response data for the update operation. - */ -export type EndpointsUpdateResponse = Endpoint & { - /** - * 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: Endpoint; - }; -}; - -/** - * Contains response data for the start operation. - */ -export type EndpointsStartResponse = Endpoint & { - /** - * 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: Endpoint; - }; -}; - -/** - * Contains response data for the stop operation. - */ -export type EndpointsStopResponse = Endpoint & { - /** - * 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: Endpoint; - }; -}; - -/** - * Contains response data for the validateCustomDomain operation. - */ -export type EndpointsValidateCustomDomainResponse = ValidateCustomDomainOutput & { - /** - * 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: ValidateCustomDomainOutput; - }; -}; - -/** - * Contains response data for the listResourceUsage operation. - */ -export type EndpointsListResourceUsageResponse = ResourceUsageListResult & { - /** - * 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: ResourceUsageListResult; - }; -}; - -/** - * Contains response data for the beginCreate operation. - */ -export type EndpointsBeginCreateResponse = Endpoint & { - /** - * 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: Endpoint; - }; -}; - -/** - * Contains response data for the beginUpdate operation. - */ -export type EndpointsBeginUpdateResponse = Endpoint & { - /** - * 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: Endpoint; - }; -}; + country?: string; + /** + * @member {string} [azureRegion] The Azure region associated with the + * peering location. + */ + azureRegion?: string; + /** + * @member {string} [name] The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly name?: string; + /** + * @member {string} [id] The ID of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly id?: string; + /** + * @member {string} [type] The type of the resource. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly type?: string; +} /** - * Contains response data for the beginStart operation. + * @interface + * An interface representing ResourceTags. + * The resource tags. + * */ -export type EndpointsBeginStartResponse = Endpoint & { +export interface ResourceTags { /** - * The underlying HTTP response. + * @member {{ [propertyName: string]: string }} [tags] Gets or sets the tags, + * a dictionary of descriptors arm object */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Endpoint; - }; -}; + tags?: { [propertyName: string]: string }; +} /** - * Contains response data for the beginStop operation. + * @interface + * An interface representing PeeringsUpdateOptionalParams. + * Optional Parameters. + * + * @extends RequestOptionsBase */ -export type EndpointsBeginStopResponse = Endpoint & { +export interface PeeringsUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * The underlying HTTP response. + * @member {{ [propertyName: string]: string }} [tags] Gets or sets the tags, + * a dictionary of descriptors arm object */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Endpoint; - }; -}; + tags?: { [propertyName: string]: string }; +} /** - * Contains response data for the listByProfileNext operation. + * @interface + * An interface representing PeeringManagementClientOptions. + * @extends AzureServiceClientOptions */ -export type EndpointsListByProfileNextResponse = EndpointListResult & { +export interface PeeringManagementClientOptions extends AzureServiceClientOptions { /** - * The underlying HTTP response. + * @member {string} [baseUri] */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; + baseUri?: string; +} - /** - * The response body as parsed JSON or XML - */ - parsedBody: EndpointListResult; - }; -}; /** - * Contains response data for the listResourceUsageNext operation. + * @interface + * An interface representing the PeeringListResult. + * The paginated list of peerings. + * + * @extends Array */ -export type EndpointsListResourceUsageNextResponse = ResourceUsageListResult & { +export interface PeeringListResult extends Array { /** - * The underlying HTTP response. + * @member {string} [nextLink] The link to fetch the next page of peerings. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: ResourceUsageListResult; - }; -}; + nextLink?: string; +} /** - * Contains response data for the listByEndpoint operation. + * @interface + * An interface representing the OperationListResult. + * The paginated list of peering API operations. + * + * @extends Array */ -export type OriginsListByEndpointResponse = OriginListResult & { +export interface OperationListResult extends Array { /** - * The underlying HTTP response. + * @member {string} [nextLink] The link to fetch the next page of peering API + * operations. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: OriginListResult; - }; -}; + nextLink?: string; +} /** - * Contains response data for the get operation. + * @interface + * An interface representing the PeeringLocationListResult. + * The paginated list of peering locations. + * + * @extends Array */ -export type OriginsGetResponse = Origin & { +export interface PeeringLocationListResult extends Array { /** - * The underlying HTTP response. + * @member {string} [nextLink] The link to fetch the next page of peering + * locations. */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: Origin; - }; -}; + nextLink?: string; +} /** - * Contains response data for the update operation. + * Defines values for Name. + * Possible values include: 'Basic_Exchange_Free', 'Basic_Direct_Free', 'Premium_Direct_Free', + * 'Premium_Exchange_Metered' + * @readonly + * @enum {string} */ -export type OriginsUpdateResponse = Origin & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type Name = 'Basic_Exchange_Free' | 'Basic_Direct_Free' | 'Premium_Direct_Free' | 'Premium_Exchange_Metered'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Origin; - }; -}; +/** + * Defines values for Tier. + * Possible values include: 'Basic', 'Premium' + * @readonly + * @enum {string} + */ +export type Tier = 'Basic' | 'Premium'; /** - * Contains response data for the beginUpdate operation. + * Defines values for Family. + * Possible values include: 'Direct', 'Exchange' + * @readonly + * @enum {string} */ -export type OriginsBeginUpdateResponse = Origin & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type Family = 'Direct' | 'Exchange'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: Origin; - }; -}; +/** + * Defines values for Size. + * Possible values include: 'Free', 'Metered', 'Unlimited' + * @readonly + * @enum {string} + */ +export type Size = 'Free' | 'Metered' | 'Unlimited'; /** - * Contains response data for the listByEndpointNext operation. + * Defines values for Kind. + * Possible values include: 'Direct', 'Exchange' + * @readonly + * @enum {string} */ -export type OriginsListByEndpointNextResponse = OriginListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type Kind = 'Direct' | 'Exchange'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: OriginListResult; - }; -}; +/** + * Defines values for ConnectionState. + * Possible values include: 'None', 'PendingApproval', 'Approved', 'ProvisioningStarted', + * 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active' + * @readonly + * @enum {string} + */ +export type ConnectionState = 'None' | 'PendingApproval' | 'Approved' | 'ProvisioningStarted' | 'ProvisioningFailed' | 'ProvisioningCompleted' | 'Validating' | 'Active'; /** - * Contains response data for the listByEndpoint operation. + * Defines values for SessionStateV4. + * Possible values include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent', 'OpenConfirm', + * 'Established', 'PendingAdd', 'PendingUpdate', 'PendingRemove' + * @readonly + * @enum {string} */ -export type CustomDomainsListByEndpointResponse = CustomDomainListResult & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type SessionStateV4 = 'None' | 'Idle' | 'Connect' | 'Active' | 'OpenSent' | 'OpenConfirm' | 'Established' | 'PendingAdd' | 'PendingUpdate' | 'PendingRemove'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CustomDomainListResult; - }; -}; +/** + * Defines values for SessionStateV6. + * Possible values include: 'None', 'Idle', 'Connect', 'Active', 'OpenSent', 'OpenConfirm', + * 'Established', 'PendingAdd', 'PendingUpdate', 'PendingRemove' + * @readonly + * @enum {string} + */ +export type SessionStateV6 = 'None' | 'Idle' | 'Connect' | 'Active' | 'OpenSent' | 'OpenConfirm' | 'Established' | 'PendingAdd' | 'PendingUpdate' | 'PendingRemove'; /** - * Contains response data for the get operation. + * Defines values for ProvisioningState. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + * @readonly + * @enum {string} */ -export type CustomDomainsGetResponse = CustomDomain & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type ProvisioningState = 'Succeeded' | 'Updating' | 'Deleting' | 'Failed'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CustomDomain; - }; -}; +/** + * Defines values for ValidationState. + * Possible values include: 'None', 'Pending', 'Approved', 'Failed' + * @readonly + * @enum {string} + */ +export type ValidationState = 'None' | 'Pending' | 'Approved' | 'Failed'; /** - * Contains response data for the create operation. + * Defines values for Kind1. + * Possible values include: 'Direct', 'Exchange' + * @readonly + * @enum {string} */ -export type CustomDomainsCreateResponse = CustomDomain & { - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; +export type Kind1 = 'Direct' | 'Exchange'; - /** - * The response body as parsed JSON or XML - */ - parsedBody: CustomDomain; - }; -}; +/** + * Defines values for Kind2. + * Possible values include: 'Direct', 'Exchange' + * @readonly + * @enum {string} + */ +export type Kind2 = 'Direct' | 'Exchange'; /** - * Contains response data for the deleteMethod operation. + * Contains response data for the list operation. */ -export type CustomDomainsDeleteMethodResponse = CustomDomain & { +export type LegacyPeeringsListResponse = PeeringListResult & { /** * The underlying HTTP response. */ @@ -1862,18 +801,17 @@ export type CustomDomainsDeleteMethodResponse = CustomDomain & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomain; + parsedBody: PeeringListResult; }; }; /** - * Contains response data for the disableCustomHttps operation. + * Contains response data for the listNext operation. */ -export type CustomDomainsDisableCustomHttpsResponse = CustomDomain & { +export type LegacyPeeringsListNextResponse = PeeringListResult & { /** * The underlying HTTP response. */ @@ -1882,18 +820,17 @@ export type CustomDomainsDisableCustomHttpsResponse = CustomDomain & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomain; + parsedBody: PeeringListResult; }; }; /** - * Contains response data for the enableCustomHttps operation. + * Contains response data for the list operation. */ -export type CustomDomainsEnableCustomHttpsResponse = CustomDomain & { +export type OperationsListResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -1902,18 +839,17 @@ export type CustomDomainsEnableCustomHttpsResponse = CustomDomain & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomain; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the beginCreate operation. + * Contains response data for the listNext operation. */ -export type CustomDomainsBeginCreateResponse = CustomDomain & { +export type OperationsListNextResponse = OperationListResult & { /** * The underlying HTTP response. */ @@ -1922,18 +858,17 @@ export type CustomDomainsBeginCreateResponse = CustomDomain & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomain; + parsedBody: OperationListResult; }; }; /** - * Contains response data for the beginDeleteMethod operation. + * Contains response data for the getPeerInfo operation. */ -export type CustomDomainsBeginDeleteMethodResponse = CustomDomain & { +export type GetPeerInfoResponse = Array & { /** * The underlying HTTP response. */ @@ -1942,18 +877,17 @@ export type CustomDomainsBeginDeleteMethodResponse = CustomDomain & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomain; + parsedBody: PeerInfo[]; }; }; /** - * Contains response data for the listByEndpointNext operation. + * Contains response data for the updatePeerInfo operation. */ -export type CustomDomainsListByEndpointNextResponse = CustomDomainListResult & { +export type UpdatePeerInfoResponse = Array & { /** * The underlying HTTP response. */ @@ -1962,18 +896,17 @@ export type CustomDomainsListByEndpointNextResponse = CustomDomainListResult & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: CustomDomainListResult; + parsedBody: PeerInfo[]; }; }; /** - * Contains response data for the checkNameAvailability operation. + * Contains response data for the list operation. */ -export type CheckNameAvailabilityResponse = CheckNameAvailabilityOutput & { +export type PeeringLocationsListResponse = PeeringLocationListResult & { /** * The underlying HTTP response. */ @@ -1982,18 +915,17 @@ export type CheckNameAvailabilityResponse = CheckNameAvailabilityOutput & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: CheckNameAvailabilityOutput; + parsedBody: PeeringLocationListResult; }; }; /** - * Contains response data for the checkNameAvailabilityWithSubscription operation. + * Contains response data for the listNext operation. */ -export type CheckNameAvailabilityWithSubscriptionResponse = CheckNameAvailabilityOutput & { +export type PeeringLocationsListNextResponse = PeeringLocationListResult & { /** * The underlying HTTP response. */ @@ -2002,18 +934,17 @@ export type CheckNameAvailabilityWithSubscriptionResponse = CheckNameAvailabilit * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: CheckNameAvailabilityOutput; + parsedBody: PeeringLocationListResult; }; }; /** - * Contains response data for the validateProbe operation. + * Contains response data for the get operation. */ -export type ValidateProbeResponse = ValidateProbeOutput & { +export type PeeringsGetResponse = Peering & { /** * The underlying HTTP response. */ @@ -2022,18 +953,17 @@ export type ValidateProbeResponse = ValidateProbeOutput & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: ValidateProbeOutput; + parsedBody: Peering; }; }; /** - * Contains response data for the list operation. + * Contains response data for the createOrUpdate operation. */ -export type ResourceUsageListResponse = ResourceUsageListResult & { +export type PeeringsCreateOrUpdateResponse = Peering & { /** * The underlying HTTP response. */ @@ -2042,18 +972,17 @@ export type ResourceUsageListResponse = ResourceUsageListResult & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: ResourceUsageListResult; + parsedBody: Peering; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the update operation. */ -export type ResourceUsageListNextResponse = ResourceUsageListResult & { +export type PeeringsUpdateResponse = Peering & { /** * The underlying HTTP response. */ @@ -2062,18 +991,17 @@ export type ResourceUsageListNextResponse = ResourceUsageListResult & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: ResourceUsageListResult; + parsedBody: Peering; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByResourceGroup operation. */ -export type OperationsListResponse = OperationsListResult & { +export type PeeringsListByResourceGroupResponse = PeeringListResult & { /** * The underlying HTTP response. */ @@ -2082,18 +1010,17 @@ export type OperationsListResponse = OperationsListResult & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: OperationsListResult; + parsedBody: PeeringListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listBySubscription operation. */ -export type OperationsListNextResponse = OperationsListResult & { +export type PeeringsListBySubscriptionResponse = PeeringListResult & { /** * The underlying HTTP response. */ @@ -2102,18 +1029,17 @@ export type OperationsListNextResponse = OperationsListResult & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: OperationsListResult; + parsedBody: PeeringListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type EdgeNodesListResponse = EdgenodeResult & { +export type PeeringsListByResourceGroupNextResponse = PeeringListResult & { /** * The underlying HTTP response. */ @@ -2122,18 +1048,17 @@ export type EdgeNodesListResponse = EdgenodeResult & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: EdgenodeResult; + parsedBody: PeeringListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type EdgeNodesListNextResponse = EdgenodeResult & { +export type PeeringsListBySubscriptionNextResponse = PeeringListResult & { /** * The underlying HTTP response. */ @@ -2142,10 +1067,9 @@ export type EdgeNodesListNextResponse = EdgenodeResult & { * The response body as text (string format) */ bodyAsText: string; - /** * The response body as parsed JSON or XML */ - parsedBody: EdgenodeResult; + parsedBody: PeeringListResult; }; }; diff --git a/packages/@azure/arm-cdn/lib/models/legacyPeeringsMappers.ts b/packages/@azure/arm-cdn/lib/models/legacyPeeringsMappers.ts new file mode 100644 index 000000000000..7f279eb23664 --- /dev/null +++ b/packages/@azure/arm-cdn/lib/models/legacyPeeringsMappers.ts @@ -0,0 +1,23 @@ +/* + * 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 { + PeeringListResult, + Peering, + BaseResource, + PeeringSku, + PeeringPropertiesDirect, + DirectConnection, + BgpSession, + PeeringPropertiesExchange, + ExchangeConnection, + ErrorResponse +} from "../models/mappers"; + diff --git a/packages/@azure/arm-cdn/lib/models/mappers.ts b/packages/@azure/arm-cdn/lib/models/mappers.ts index 324463c9cddd..d44508e72262 100644 --- a/packages/@azure/arm-cdn/lib/models/mappers.ts +++ b/packages/@azure/arm-cdn/lib/models/mappers.ts @@ -1,9 +1,11 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -12,633 +14,32 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const Sku: msRest.CompositeMapper = { - serializedName: "Sku", +export const PeeringSku: msRest.CompositeMapper = { + serializedName: "PeeringSku", type: { name: "Composite", - className: "Sku", + className: "PeeringSku", modelProperties: { name: { serializedName: "name", type: { name: "String" } - } - } - } -}; - -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", - type: { - name: "Composite", - className: "Resource", - modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", - type: { - name: "String" - } - }, - type: { - readOnly: true, - serializedName: "type", - type: { - name: "String" - } - } - } - } -}; - -export const TrackedResource: msRest.CompositeMapper = { - serializedName: "TrackedResource", - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - location: { - required: true, - serializedName: "location", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const Profile: msRest.CompositeMapper = { - serializedName: "Profile", - type: { - name: "Composite", - className: "Profile", - modelProperties: { - ...TrackedResource.type.modelProperties, - sku: { - required: true, - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } - }, - resourceState: { - readOnly: true, - serializedName: "properties.resourceState", - type: { - name: "String" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - } - } - } -}; - -export const ProfileUpdateParameters: msRest.CompositeMapper = { - serializedName: "ProfileUpdateParameters", - type: { - name: "Composite", - className: "ProfileUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const SsoUri: msRest.CompositeMapper = { - serializedName: "SsoUri", - type: { - name: "Composite", - className: "SsoUri", - modelProperties: { - ssoUriValue: { - readOnly: true, - serializedName: "ssoUriValue", - type: { - name: "String" - } - } - } - } -}; - -export const SupportedOptimizationTypesListResult: msRest.CompositeMapper = { - serializedName: "SupportedOptimizationTypesListResult", - type: { - name: "Composite", - className: "SupportedOptimizationTypesListResult", - modelProperties: { - supportedOptimizationTypes: { - readOnly: true, - serializedName: "supportedOptimizationTypes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DeepCreatedOrigin: msRest.CompositeMapper = { - serializedName: "DeepCreatedOrigin", - type: { - name: "Composite", - className: "DeepCreatedOrigin", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - }, - hostName: { - required: true, - serializedName: "properties.hostName", - type: { - name: "String" - } - }, - httpPort: { - serializedName: "properties.httpPort", - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, - type: { - name: "Number" - } - }, - httpsPort: { - serializedName: "properties.httpsPort", - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, - type: { - name: "Number" - } - } - } - } -}; - -export const Endpoint: msRest.CompositeMapper = { - serializedName: "Endpoint", - type: { - name: "Composite", - className: "Endpoint", - modelProperties: { - ...TrackedResource.type.modelProperties, - originHostHeader: { - serializedName: "properties.originHostHeader", - type: { - name: "String" - } - }, - originPath: { - serializedName: "properties.originPath", - type: { - name: "String" - } - }, - contentTypesToCompress: { - serializedName: "properties.contentTypesToCompress", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - isCompressionEnabled: { - serializedName: "properties.isCompressionEnabled", - type: { - name: "Boolean" - } - }, - isHttpAllowed: { - serializedName: "properties.isHttpAllowed", - type: { - name: "Boolean" - } - }, - isHttpsAllowed: { - serializedName: "properties.isHttpsAllowed", - type: { - name: "Boolean" - } - }, - queryStringCachingBehavior: { - serializedName: "properties.queryStringCachingBehavior", - type: { - name: "Enum", - allowedValues: [ - "IgnoreQueryString", - "BypassCaching", - "UseQueryString", - "NotSet" - ] - } - }, - optimizationType: { - serializedName: "properties.optimizationType", - type: { - name: "String" - } - }, - probePath: { - serializedName: "properties.probePath", - type: { - name: "String" - } - }, - geoFilters: { - serializedName: "properties.geoFilters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GeoFilter" - } - } - } - }, - deliveryPolicy: { - serializedName: "properties.deliveryPolicy", - type: { - name: "Composite", - className: "EndpointPropertiesUpdateParametersDeliveryPolicy" - } - }, - hostName: { - readOnly: true, - serializedName: "properties.hostName", - type: { - name: "String" - } - }, - origins: { - required: true, - serializedName: "properties.origins", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeepCreatedOrigin" - } - } - } - }, - resourceState: { - readOnly: true, - serializedName: "properties.resourceState", - type: { - name: "String" - } - }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - } - } - } -}; - -export const GeoFilter: msRest.CompositeMapper = { - serializedName: "GeoFilter", - type: { - name: "Composite", - className: "GeoFilter", - modelProperties: { - relativePath: { - required: true, - serializedName: "relativePath", - type: { - name: "String" - } - }, - action: { - required: true, - serializedName: "action", - type: { - name: "Enum", - allowedValues: [ - "Block", - "Allow" - ] - } - }, - countryCodes: { - required: true, - serializedName: "countryCodes", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const DeliveryRuleAction: msRest.CompositeMapper = { - serializedName: "DeliveryRuleAction", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "name", - clientName: "name" - }, - uberParent: "DeliveryRuleAction", - className: "DeliveryRuleAction", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const DeliveryRuleCondition: msRest.CompositeMapper = { - serializedName: "DeliveryRuleCondition", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "name", - clientName: "name" - }, - uberParent: "DeliveryRuleCondition", - className: "DeliveryRuleCondition", - modelProperties: { - name: { - required: true, - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const DeliveryRule: msRest.CompositeMapper = { - serializedName: "DeliveryRule", - type: { - name: "Composite", - className: "DeliveryRule", - modelProperties: { - order: { - required: true, - serializedName: "order", - type: { - name: "Number" - } - }, - actions: { - required: true, - serializedName: "actions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeliveryRuleAction" - } - } - } - }, - conditions: { - serializedName: "conditions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeliveryRuleCondition" - } - } - } - } - } - } -}; - -export const EndpointPropertiesUpdateParametersDeliveryPolicy: msRest.CompositeMapper = { - serializedName: "EndpointPropertiesUpdateParameters_deliveryPolicy", - type: { - name: "Composite", - className: "EndpointPropertiesUpdateParametersDeliveryPolicy", - modelProperties: { - description: { - serializedName: "description", - type: { - name: "String" - } - }, - rules: { - required: true, - serializedName: "rules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeliveryRule" - } - } - } - } - } - } -}; - -export const EndpointUpdateParameters: msRest.CompositeMapper = { - serializedName: "EndpointUpdateParameters", - type: { - name: "Composite", - className: "EndpointUpdateParameters", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } - } }, - originHostHeader: { - serializedName: "properties.originHostHeader", + tier: { + serializedName: "tier", type: { name: "String" } }, - originPath: { - serializedName: "properties.originPath", - type: { - name: "String" - } - }, - contentTypesToCompress: { - serializedName: "properties.contentTypesToCompress", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - isCompressionEnabled: { - serializedName: "properties.isCompressionEnabled", - type: { - name: "Boolean" - } - }, - isHttpAllowed: { - serializedName: "properties.isHttpAllowed", - type: { - name: "Boolean" - } - }, - isHttpsAllowed: { - serializedName: "properties.isHttpsAllowed", - type: { - name: "Boolean" - } - }, - queryStringCachingBehavior: { - serializedName: "properties.queryStringCachingBehavior", - type: { - name: "Enum", - allowedValues: [ - "IgnoreQueryString", - "BypassCaching", - "UseQueryString", - "NotSet" - ] - } - }, - optimizationType: { - serializedName: "properties.optimizationType", - type: { - name: "String" - } - }, - probePath: { - serializedName: "properties.probePath", - type: { - name: "String" - } - }, - geoFilters: { - serializedName: "properties.geoFilters", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GeoFilter" - } - } - } - }, - deliveryPolicy: { - serializedName: "properties.deliveryPolicy", - type: { - name: "Composite", - className: "EndpointPropertiesUpdateParametersDeliveryPolicy" - } - } - } - } -}; - -export const UrlPathConditionParameters: msRest.CompositeMapper = { - serializedName: "UrlPathConditionParameters", - type: { - name: "Composite", - className: "UrlPathConditionParameters", - modelProperties: { - odatatype: { - required: true, - isConstant: true, - serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleUrlPathConditionParameters', - type: { - name: "String" - } - }, - path: { - required: true, - serializedName: "path", + family: { + serializedName: "family", type: { name: "String" } }, - matchType: { - required: true, - serializedName: "matchType", + size: { + serializedName: "size", type: { name: "String" } @@ -647,568 +48,303 @@ export const UrlPathConditionParameters: msRest.CompositeMapper = { } }; -export const DeliveryRuleUrlPathCondition: msRest.CompositeMapper = { - serializedName: "UrlPath", +export const BgpSession: msRest.CompositeMapper = { + serializedName: "BgpSession", type: { name: "Composite", - polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, - uberParent: "DeliveryRuleCondition", - className: "DeliveryRuleUrlPathCondition", + className: "BgpSession", modelProperties: { - ...DeliveryRuleCondition.type.modelProperties, - parameters: { - required: true, - serializedName: "parameters", - defaultValue: {}, + sessionPrefixV4: { + serializedName: "sessionPrefixV4", type: { - name: "Composite", - className: "UrlPathConditionParameters" + name: "String" } - } - } - } -}; - -export const UrlFileExtensionConditionParameters: msRest.CompositeMapper = { - serializedName: "UrlFileExtensionConditionParameters", - type: { - name: "Composite", - className: "UrlFileExtensionConditionParameters", - modelProperties: { - odatatype: { - required: true, - isConstant: true, - serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleUrlFileExtensionConditionParameters', + }, + sessionPrefixV6: { + serializedName: "sessionPrefixV6", type: { name: "String" } }, - extensions: { - required: true, - serializedName: "extensions", + microsoftSessionIPv4Address: { + readOnly: true, + serializedName: "microsoftSessionIPv4Address", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } - } - } - } -}; - -export const DeliveryRuleUrlFileExtensionCondition: msRest.CompositeMapper = { - serializedName: "UrlFileExtension", - type: { - name: "Composite", - polymorphicDiscriminator: DeliveryRuleCondition.type.polymorphicDiscriminator, - uberParent: "DeliveryRuleCondition", - className: "DeliveryRuleUrlFileExtensionCondition", - modelProperties: { - ...DeliveryRuleCondition.type.modelProperties, - parameters: { - required: true, - serializedName: "parameters", - defaultValue: {}, + }, + microsoftSessionIPv6Address: { + readOnly: true, + serializedName: "microsoftSessionIPv6Address", type: { - name: "Composite", - className: "UrlFileExtensionConditionParameters" + name: "String" } - } - } - } -}; - -export const CacheExpirationActionParameters: msRest.CompositeMapper = { - serializedName: "CacheExpirationActionParameters", - type: { - name: "Composite", - className: "CacheExpirationActionParameters", - modelProperties: { - odatatype: { - required: true, - isConstant: true, - serializedName: "@odata\\.type", - defaultValue: 'Microsoft.Azure.Cdn.Models.DeliveryRuleCacheExpirationActionParameters', + }, + peerSessionIPv4Address: { + serializedName: "peerSessionIPv4Address", type: { name: "String" } }, - cacheBehavior: { - required: true, - serializedName: "cacheBehavior", + peerSessionIPv6Address: { + serializedName: "peerSessionIPv6Address", type: { name: "String" } }, - cacheType: { - required: true, - isConstant: true, - serializedName: "cacheType", - defaultValue: 'All', + sessionStateV4: { + readOnly: true, + serializedName: "sessionStateV4", type: { name: "String" } }, - cacheDuration: { - nullable: true, - serializedName: "cacheDuration", + sessionStateV6: { + readOnly: true, + serializedName: "sessionStateV6", type: { name: "String" } - } - } - } -}; - -export const DeliveryRuleCacheExpirationAction: msRest.CompositeMapper = { - serializedName: "CacheExpiration", - type: { - name: "Composite", - polymorphicDiscriminator: DeliveryRuleAction.type.polymorphicDiscriminator, - uberParent: "DeliveryRuleAction", - className: "DeliveryRuleCacheExpirationAction", - modelProperties: { - ...DeliveryRuleAction.type.modelProperties, - parameters: { - required: true, - serializedName: "parameters", - defaultValue: {}, + }, + maxPrefixesAdvertisedV4: { + serializedName: "maxPrefixesAdvertisedV4", type: { - name: "Composite", - className: "CacheExpirationActionParameters" + name: "Number" } - } - } - } -}; - -export const PurgeParameters: msRest.CompositeMapper = { - serializedName: "PurgeParameters", - type: { - name: "Composite", - className: "PurgeParameters", - modelProperties: { - contentPaths: { - required: true, - serializedName: "contentPaths", + }, + maxPrefixesAdvertisedV6: { + serializedName: "maxPrefixesAdvertisedV6", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } - } - } - } -}; - -export const LoadParameters: msRest.CompositeMapper = { - serializedName: "LoadParameters", - type: { - name: "Composite", - className: "LoadParameters", - modelProperties: { - contentPaths: { - required: true, - serializedName: "contentPaths", + }, + md5AuthenticationKey: { + serializedName: "md5AuthenticationKey", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const Origin: msRest.CompositeMapper = { - serializedName: "Origin", +export const DirectConnection: msRest.CompositeMapper = { + serializedName: "DirectConnection", type: { name: "Composite", - className: "Origin", + className: "DirectConnection", modelProperties: { - ...TrackedResource.type.modelProperties, - hostName: { - required: true, - serializedName: "properties.hostName", + bandwidthInMbps: { + serializedName: "bandwidthInMbps", type: { - name: "String" + name: "Number" } }, - httpPort: { - serializedName: "properties.httpPort", - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, + provisionedBandwidthInMbps: { + serializedName: "provisionedBandwidthInMbps", type: { name: "Number" } }, - httpsPort: { - serializedName: "properties.httpsPort", - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, + peeringDBFacilityId: { + serializedName: "peeringDBFacilityId", type: { name: "Number" } }, - resourceState: { + connectionState: { readOnly: true, - serializedName: "properties.resourceState", + serializedName: "connectionState", type: { name: "String" } }, - provisioningState: { - readOnly: true, - serializedName: "properties.provisioningState", + bgpSession: { + serializedName: "bgpSession", type: { - name: "String" + name: "Composite", + className: "BgpSession" } } } } }; -export const OriginUpdateParameters: msRest.CompositeMapper = { - serializedName: "OriginUpdateParameters", +export const PeeringPropertiesDirect: msRest.CompositeMapper = { + serializedName: "PeeringPropertiesDirect", type: { name: "Composite", - className: "OriginUpdateParameters", + className: "PeeringPropertiesDirect", modelProperties: { - hostName: { - serializedName: "properties.hostName", + connections: { + serializedName: "connections", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DirectConnection" + } + } } }, - httpPort: { - serializedName: "properties.httpPort", - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, + peerAsn: { + serializedName: "peerAsn", type: { name: "Number" } }, - httpsPort: { - serializedName: "properties.httpsPort", - constraints: { - InclusiveMaximum: 65535, - InclusiveMinimum: 1 - }, + useForPeeringService: { + serializedName: "useForPeeringService", type: { - name: "Number" + name: "Boolean" } } } } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const CustomDomain: msRest.CompositeMapper = { - serializedName: "CustomDomain", +export const ExchangeConnection: msRest.CompositeMapper = { + serializedName: "ExchangeConnection", type: { name: "Composite", - className: "CustomDomain", + className: "ExchangeConnection", modelProperties: { - ...ProxyResource.type.modelProperties, - hostName: { - required: true, - serializedName: "properties.hostName", - type: { - name: "String" - } - }, - resourceState: { - readOnly: true, - serializedName: "properties.resourceState", - type: { - name: "String" - } - }, - customHttpsProvisioningState: { - readOnly: true, - serializedName: "properties.customHttpsProvisioningState", - type: { - name: "String" - } - }, - customHttpsProvisioningSubstate: { - readOnly: true, - serializedName: "properties.customHttpsProvisioningSubstate", + peeringDBFacilityId: { + serializedName: "peeringDBFacilityId", type: { - name: "String" - } - }, - validationData: { - serializedName: "properties.validationData", - type: { - name: "String" + name: "Number" } }, - provisioningState: { + connectionState: { readOnly: true, - serializedName: "properties.provisioningState", - type: { - name: "String" - } - } - } - } -}; - -export const CustomDomainParameters: msRest.CompositeMapper = { - serializedName: "CustomDomainParameters", - type: { - name: "Composite", - className: "CustomDomainParameters", - modelProperties: { - hostName: { - required: true, - serializedName: "properties.hostName", - type: { - name: "String" - } - } - } - } -}; - -export const CustomDomainHttpsParameters: msRest.CompositeMapper = { - serializedName: "CustomDomainHttpsParameters", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "certificateSource", - clientName: "certificateSource" - }, - uberParent: "CustomDomainHttpsParameters", - className: "CustomDomainHttpsParameters", - modelProperties: { - protocolType: { - required: true, - serializedName: "protocolType", + serializedName: "connectionState", type: { name: "String" } }, - certificateSource: { - required: true, - serializedName: "certificateSource", + bgpSession: { + serializedName: "bgpSession", type: { - name: "String" + name: "Composite", + className: "BgpSession" } } } } }; -export const CdnCertificateSourceParameters: msRest.CompositeMapper = { - serializedName: "CdnCertificateSourceParameters", +export const PeeringPropertiesExchange: msRest.CompositeMapper = { + serializedName: "PeeringPropertiesExchange", type: { name: "Composite", - className: "CdnCertificateSourceParameters", + className: "PeeringPropertiesExchange", modelProperties: { - odatatype: { - required: true, - isConstant: true, - serializedName: "@odata\\.type", - defaultValue: '#Microsoft.Azure.Cdn.Models.CdnCertificateSourceParameters', + connections: { + serializedName: "connections", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExchangeConnection" + } + } } }, - certificateType: { - required: true, - serializedName: "certificateType", + peerAsn: { + serializedName: "peerAsn", type: { - name: "String" + name: "Number" } } } } }; -export const CdnManagedHttpsParameters: msRest.CompositeMapper = { - serializedName: "Cdn", +export const Peering: msRest.CompositeMapper = { + serializedName: "Peering", type: { name: "Composite", - polymorphicDiscriminator: CustomDomainHttpsParameters.type.polymorphicDiscriminator, - uberParent: "CustomDomainHttpsParameters", - className: "CdnManagedHttpsParameters", + className: "Peering", modelProperties: { - ...CustomDomainHttpsParameters.type.modelProperties, - certificateSourceParameters: { + sku: { required: true, - serializedName: "certificateSourceParameters", - defaultValue: {}, + serializedName: "sku", type: { name: "Composite", - className: "CdnCertificateSourceParameters" - } - } - } - } -}; - -export const KeyVaultCertificateSourceParameters: msRest.CompositeMapper = { - serializedName: "KeyVaultCertificateSourceParameters", - type: { - name: "Composite", - className: "KeyVaultCertificateSourceParameters", - modelProperties: { - odatatype: { - required: true, - isConstant: true, - serializedName: "@odata\\.type", - defaultValue: '#Microsoft.Azure.Cdn.Models.KeyVaultCertificateSourceParameters', - type: { - name: "String" + className: "PeeringSku" } }, - subscriptionId: { + kind: { required: true, - serializedName: "subscriptionId", + serializedName: "kind", type: { name: "String" } }, - resourceGroupName: { - required: true, - serializedName: "resourceGroupName", + direct: { + serializedName: "properties.direct", type: { - name: "String" + name: "Composite", + className: "PeeringPropertiesDirect" } }, - vaultName: { - required: true, - serializedName: "vaultName", + exchange: { + serializedName: "properties.exchange", type: { - name: "String" + name: "Composite", + className: "PeeringPropertiesExchange" } }, - secretName: { - required: true, - serializedName: "secretName", + peeringLocation: { + serializedName: "properties.peeringLocation", type: { name: "String" } }, - secretVersion: { - required: true, - serializedName: "secretVersion", + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", type: { name: "String" } }, - updateRule: { + location: { required: true, - isConstant: true, - serializedName: "updateRule", - defaultValue: 'NoAction', + serializedName: "location", type: { name: "String" } }, - deleteRule: { - required: true, - isConstant: true, - serializedName: "deleteRule", - defaultValue: 'NoAction', - type: { - name: "String" - } - } - } - } -}; - -export const UserManagedHttpsParameters: msRest.CompositeMapper = { - serializedName: "AzureKeyVault", - type: { - name: "Composite", - polymorphicDiscriminator: CustomDomainHttpsParameters.type.polymorphicDiscriminator, - uberParent: "CustomDomainHttpsParameters", - className: "UserManagedHttpsParameters", - modelProperties: { - ...CustomDomainHttpsParameters.type.modelProperties, - certificateSourceParameters: { - required: true, - serializedName: "certificateSourceParameters", - defaultValue: {}, - type: { - name: "Composite", - className: "KeyVaultCertificateSourceParameters" - } - } - } - } -}; - -export const ValidateCustomDomainInput: msRest.CompositeMapper = { - serializedName: "ValidateCustomDomainInput", - type: { - name: "Composite", - className: "ValidateCustomDomainInput", - modelProperties: { - hostName: { - required: true, - serializedName: "hostName", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "String" + } + } } - } - } - } -}; - -export const ValidateCustomDomainOutput: msRest.CompositeMapper = { - serializedName: "ValidateCustomDomainOutput", - type: { - name: "Composite", - className: "ValidateCustomDomainOutput", - modelProperties: { - customDomainValidated: { + }, + name: { readOnly: true, - serializedName: "customDomainValidated", + serializedName: "name", type: { - name: "Boolean" + name: "String" } }, - reason: { + id: { readOnly: true, - serializedName: "reason", + serializedName: "id", type: { name: "String" } }, - message: { + type: { readOnly: true, - serializedName: "message", + serializedName: "type", type: { name: "String" } @@ -1217,24 +353,22 @@ export const ValidateCustomDomainOutput: msRest.CompositeMapper = { } }; -export const CheckNameAvailabilityInput: msRest.CompositeMapper = { - serializedName: "CheckNameAvailabilityInput", +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", type: { name: "Composite", - className: "CheckNameAvailabilityInput", + className: "ErrorResponse", modelProperties: { - name: { - required: true, - serializedName: "name", + code: { + readOnly: true, + serializedName: "code", type: { name: "String" } }, - type: { - required: true, - isConstant: true, - serializedName: "type", - defaultValue: 'Microsoft.Cdn/Profiles/Endpoints', + message: { + readOnly: true, + serializedName: "message", type: { name: "String" } @@ -1243,46 +377,36 @@ export const CheckNameAvailabilityInput: msRest.CompositeMapper = { } }; -export const CheckNameAvailabilityOutput: msRest.CompositeMapper = { - serializedName: "CheckNameAvailabilityOutput", +export const OperationDisplayInfo: msRest.CompositeMapper = { + serializedName: "OperationDisplayInfo", type: { name: "Composite", - className: "CheckNameAvailabilityOutput", + className: "OperationDisplayInfo", modelProperties: { - nameAvailable: { + provider: { readOnly: true, - serializedName: "nameAvailable", + serializedName: "provider", type: { - name: "Boolean" + name: "String" } }, - reason: { + resource: { readOnly: true, - serializedName: "reason", + serializedName: "resource", type: { name: "String" } }, - message: { + operation: { readOnly: true, - serializedName: "message", + serializedName: "operation", type: { name: "String" } - } - } - } -}; - -export const ValidateProbeInput: msRest.CompositeMapper = { - serializedName: "ValidateProbeInput", - type: { - name: "Composite", - className: "ValidateProbeInput", - modelProperties: { - probeURL: { - required: true, - serializedName: "probeURL", + }, + description: { + readOnly: true, + serializedName: "description", type: { name: "String" } @@ -1291,98 +415,97 @@ export const ValidateProbeInput: msRest.CompositeMapper = { } }; -export const ValidateProbeOutput: msRest.CompositeMapper = { - serializedName: "ValidateProbeOutput", +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", type: { name: "Composite", - className: "ValidateProbeOutput", + className: "Operation", modelProperties: { - isValid: { + name: { readOnly: true, - serializedName: "isValid", + serializedName: "name", type: { - name: "Boolean" + name: "String" } }, - errorCode: { + display: { readOnly: true, - serializedName: "errorCode", + serializedName: "display", type: { - name: "String" + name: "Composite", + className: "OperationDisplayInfo" } }, - message: { + isDataAction: { readOnly: true, - serializedName: "message", + serializedName: "isDataAction", type: { - name: "String" + name: "Boolean" } } } } }; -export const ResourceUsage: msRest.CompositeMapper = { - serializedName: "ResourceUsage", +export const ContactInfo: msRest.CompositeMapper = { + serializedName: "ContactInfo", type: { name: "Composite", - className: "ResourceUsage", + className: "ContactInfo", modelProperties: { - resourceType: { - readOnly: true, - serializedName: "resourceType", - type: { - name: "String" - } - }, - unit: { - readOnly: true, - serializedName: "unit", - type: { - name: "String" - } - }, - currentValue: { - readOnly: true, - serializedName: "currentValue", + emails: { + serializedName: "emails", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - limit: { - readOnly: true, - serializedName: "limit", + phone: { + serializedName: "phone", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", +export const PeerInfo: msRest.CompositeMapper = { + serializedName: "PeerInfo", type: { name: "Composite", - className: "OperationDisplay", + className: "PeerInfo", modelProperties: { - provider: { - readOnly: true, - serializedName: "provider", + peerAsn: { + serializedName: "peerAsn", type: { - name: "String" + name: "Number" } }, - resource: { - readOnly: true, - serializedName: "resource", + peerContactInfo: { + serializedName: "peerContactInfo", + type: { + name: "Composite", + className: "ContactInfo" + } + }, + peerName: { + serializedName: "peerName", type: { name: "String" } }, - operation: { - readOnly: true, - serializedName: "operation", + validationState: { + serializedName: "validationState", type: { name: "String" } @@ -1391,44 +514,48 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const DirectPeeringFacility: msRest.CompositeMapper = { + serializedName: "DirectPeeringFacility", type: { name: "Composite", - className: "Operation", + className: "DirectPeeringFacility", modelProperties: { - name: { - readOnly: true, - serializedName: "name", + address: { + serializedName: "address", type: { name: "String" } }, - display: { - serializedName: "display", + peeringDBFacilityId: { + serializedName: "peeringDBFacilityId", type: { - name: "Composite", - className: "OperationDisplay" + name: "Number" + } + }, + peeringDBFacilityLink: { + serializedName: "peeringDBFacilityLink", + type: { + name: "String" } } } } }; -export const CidrIpAddress: msRest.CompositeMapper = { - serializedName: "cidrIpAddress", +export const PeeringBandwidthOffer: msRest.CompositeMapper = { + serializedName: "PeeringBandwidthOffer", type: { name: "Composite", - className: "CidrIpAddress", + className: "PeeringBandwidthOffer", modelProperties: { - baseIpAddress: { - serializedName: "baseIpAddress", + offerName: { + serializedName: "offerName", type: { name: "String" } }, - prefixLength: { - serializedName: "prefixLength", + valueInMbps: { + serializedName: "valueInMbps", type: { name: "Number" } @@ -1437,38 +564,32 @@ export const CidrIpAddress: msRest.CompositeMapper = { } }; -export const IpAddressGroup: msRest.CompositeMapper = { - serializedName: "IpAddressGroup", +export const PeeringLocationPropertiesDirect: msRest.CompositeMapper = { + serializedName: "PeeringLocationPropertiesDirect", type: { name: "Composite", - className: "IpAddressGroup", + className: "PeeringLocationPropertiesDirect", modelProperties: { - deliveryRegion: { - serializedName: "deliveryRegion", - type: { - name: "String" - } - }, - ipv4Addresses: { - serializedName: "ipv4Addresses", + peeringFacilities: { + serializedName: "peeringFacilities", type: { name: "Sequence", element: { type: { name: "Composite", - className: "CidrIpAddress" + className: "DirectPeeringFacility" } } } }, - ipv6Addresses: { - serializedName: "ipv6Addresses", + bandwidthOffers: { + serializedName: "bandwidthOffers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "CidrIpAddress" + className: "PeeringBandwidthOffer" } } } @@ -1477,75 +598,56 @@ export const IpAddressGroup: msRest.CompositeMapper = { } }; -export const EdgeNode: msRest.CompositeMapper = { - serializedName: "EdgeNode", +export const ExchangePeeringFacility: msRest.CompositeMapper = { + serializedName: "ExchangePeeringFacility", type: { name: "Composite", - className: "EdgeNode", + className: "ExchangePeeringFacility", modelProperties: { - ...ProxyResource.type.modelProperties, - ipAddressGroups: { - required: true, - serializedName: "properties.ipAddressGroups", + exchangeName: { + serializedName: "exchangeName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpAddressGroup" - } - } + name: "String" } - } - } - } -}; - -export const ErrorResponse: msRest.CompositeMapper = { - serializedName: "ErrorResponse", - type: { - name: "Composite", - className: "ErrorResponse", - modelProperties: { - code: { - readOnly: true, - serializedName: "code", + }, + bandwidthInMbps: { + serializedName: "bandwidthInMbps", + type: { + name: "Number" + } + }, + microsoftIPv4Address: { + serializedName: "microsoftIPv4Address", type: { name: "String" } }, - message: { - readOnly: true, - serializedName: "message", + microsoftIPv6Address: { + serializedName: "microsoftIPv6Address", type: { name: "String" } - } - } - } -}; - -export const ProfileListResult: msRest.CompositeMapper = { - serializedName: "ProfileListResult", - type: { - name: "Composite", - className: "ProfileListResult", - modelProperties: { - value: { - readOnly: true, - serializedName: "", + }, + facilityIPv4Prefix: { + serializedName: "facilityIPv4Prefix", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Profile" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + facilityIPv6Prefix: { + serializedName: "facilityIPv6Prefix", + type: { + name: "String" + } + }, + peeringDBFacilityId: { + serializedName: "peeringDBFacilityId", + type: { + name: "Number" + } + }, + peeringDBFacilityLink: { + serializedName: "peeringDBFacilityLink", type: { name: "String" } @@ -1554,56 +656,89 @@ export const ProfileListResult: msRest.CompositeMapper = { } }; -export const ResourceUsageListResult: msRest.CompositeMapper = { - serializedName: "ResourceUsageListResult", +export const PeeringLocationPropertiesExchange: msRest.CompositeMapper = { + serializedName: "PeeringLocationPropertiesExchange", type: { name: "Composite", - className: "ResourceUsageListResult", + className: "PeeringLocationPropertiesExchange", modelProperties: { - value: { - readOnly: true, - serializedName: "", + peeringFacilities: { + serializedName: "peeringFacilities", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ResourceUsage" + className: "ExchangePeeringFacility" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const EndpointListResult: msRest.CompositeMapper = { - serializedName: "EndpointListResult", +export const PeeringLocation: msRest.CompositeMapper = { + serializedName: "PeeringLocation", type: { name: "Composite", - className: "EndpointListResult", + className: "PeeringLocation", modelProperties: { - value: { + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, + direct: { + serializedName: "properties.direct", + type: { + name: "Composite", + className: "PeeringLocationPropertiesDirect" + } + }, + exchange: { + serializedName: "properties.exchange", + type: { + name: "Composite", + className: "PeeringLocationPropertiesExchange" + } + }, + peeringLocation: { + serializedName: "properties.peeringLocation", + type: { + name: "String" + } + }, + country: { + serializedName: "properties.country", + type: { + name: "String" + } + }, + azureRegion: { + serializedName: "properties.azureRegion", + type: { + name: "String" + } + }, + name: { readOnly: true, - serializedName: "", + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Endpoint" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", type: { name: "String" } @@ -1612,50 +747,41 @@ export const EndpointListResult: msRest.CompositeMapper = { } }; -export const OriginListResult: msRest.CompositeMapper = { - serializedName: "OriginListResult", +export const ResourceTags: msRest.CompositeMapper = { + serializedName: "ResourceTags", type: { name: "Composite", - className: "OriginListResult", + className: "ResourceTags", modelProperties: { - value: { - readOnly: true, - serializedName: "", + tags: { + serializedName: "tags", type: { - name: "Sequence", - element: { + name: "Dictionary", + value: { type: { - name: "Composite", - className: "Origin" + name: "String" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const CustomDomainListResult: msRest.CompositeMapper = { - serializedName: "CustomDomainListResult", +export const PeeringListResult: msRest.CompositeMapper = { + serializedName: "PeeringListResult", type: { name: "Composite", - className: "CustomDomainListResult", + className: "PeeringListResult", modelProperties: { value: { - readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "CustomDomain" + className: "Peering" } } } @@ -1670,14 +796,13 @@ export const CustomDomainListResult: msRest.CompositeMapper = { } }; -export const OperationsListResult: msRest.CompositeMapper = { - serializedName: "OperationsListResult", +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", type: { name: "Composite", - className: "OperationsListResult", + className: "OperationListResult", modelProperties: { value: { - readOnly: true, serializedName: "", type: { name: "Sequence", @@ -1699,21 +824,20 @@ export const OperationsListResult: msRest.CompositeMapper = { } }; -export const EdgenodeResult: msRest.CompositeMapper = { - serializedName: "EdgenodeResult", +export const PeeringLocationListResult: msRest.CompositeMapper = { + serializedName: "PeeringLocationListResult", type: { name: "Composite", - className: "EdgenodeResult", + className: "PeeringLocationListResult", modelProperties: { value: { - readOnly: true, serializedName: "", type: { name: "Sequence", element: { type: { name: "Composite", - className: "EdgeNode" + className: "PeeringLocation" } } } @@ -1727,15 +851,3 @@ export const EdgenodeResult: msRest.CompositeMapper = { } } }; - -export const discriminators = { - 'DeliveryRuleAction' : DeliveryRuleAction, - 'DeliveryRuleCondition' : DeliveryRuleCondition, - 'DeliveryRuleCondition.UrlPath' : DeliveryRuleUrlPathCondition, - 'DeliveryRuleCondition.UrlFileExtension' : DeliveryRuleUrlFileExtensionCondition, - 'DeliveryRuleAction.CacheExpiration' : DeliveryRuleCacheExpirationAction, - 'CustomDomainHttpsParameters' : CustomDomainHttpsParameters, - 'CustomDomainHttpsParameters.Cdn' : CdnManagedHttpsParameters, - 'CustomDomainHttpsParameters.AzureKeyVault' : UserManagedHttpsParameters - -}; diff --git a/packages/@azure/arm-cdn/lib/models/operationsMappers.ts b/packages/@azure/arm-cdn/lib/models/operationsMappers.ts index b4fe02631a85..b25dbb4b1b70 100644 --- a/packages/@azure/arm-cdn/lib/models/operationsMappers.ts +++ b/packages/@azure/arm-cdn/lib/models/operationsMappers.ts @@ -1,15 +1,17 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. */ export { - discriminators, - ErrorResponse, + OperationListResult, Operation, - OperationDisplay, - OperationsListResult + OperationDisplayInfo, + ErrorResponse } from "../models/mappers"; + diff --git a/packages/@azure/arm-cdn/lib/models/parameters.ts b/packages/@azure/arm-cdn/lib/models/parameters.ts index dea0816e4379..00eac7195f8f 100644 --- a/packages/@azure/arm-cdn/lib/models/parameters.ts +++ b/packages/@azure/arm-cdn/lib/models/parameters.ts @@ -30,21 +30,11 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; -export const customDomainName: msRest.OperationURLParameter = { - parameterPath: "customDomainName", +export const kind: msRest.OperationQueryParameter = { + parameterPath: "kind", mapper: { required: true, - serializedName: "customDomainName", - type: { - name: "String" - } - } -}; -export const endpointName: msRest.OperationURLParameter = { - parameterPath: "endpointName", - mapper: { - required: true, - serializedName: "endpointName", + serializedName: "kind", type: { name: "String" } @@ -61,21 +51,21 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; -export const originName: msRest.OperationURLParameter = { - parameterPath: "originName", +export const peeringLocation: msRest.OperationQueryParameter = { + parameterPath: "peeringLocation", mapper: { required: true, - serializedName: "originName", + serializedName: "peeringLocation", type: { name: "String" } } }; -export const profileName: msRest.OperationURLParameter = { - parameterPath: "profileName", +export const peeringName: msRest.OperationURLParameter = { + parameterPath: "peeringName", mapper: { required: true, - serializedName: "profileName", + serializedName: "peeringName", type: { name: "String" } @@ -86,11 +76,6 @@ export const resourceGroupName: msRest.OperationURLParameter = { mapper: { required: true, serializedName: "resourceGroupName", - constraints: { - MaxLength: 90, - MinLength: 1, - Pattern: /^[-\w\._\(\)]+$/ - }, type: { name: "String" } diff --git a/packages/@azure/arm-cdn/lib/models/peeringLocationsMappers.ts b/packages/@azure/arm-cdn/lib/models/peeringLocationsMappers.ts new file mode 100644 index 000000000000..fb71f7593230 --- /dev/null +++ b/packages/@azure/arm-cdn/lib/models/peeringLocationsMappers.ts @@ -0,0 +1,21 @@ +/* + * 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 { + PeeringLocationListResult, + PeeringLocation, + PeeringLocationPropertiesDirect, + DirectPeeringFacility, + PeeringBandwidthOffer, + PeeringLocationPropertiesExchange, + ExchangePeeringFacility, + ErrorResponse +} from "../models/mappers"; + diff --git a/packages/@azure/arm-cdn/lib/models/peeringsMappers.ts b/packages/@azure/arm-cdn/lib/models/peeringsMappers.ts new file mode 100644 index 000000000000..cf0a5f499891 --- /dev/null +++ b/packages/@azure/arm-cdn/lib/models/peeringsMappers.ts @@ -0,0 +1,24 @@ +/* + * 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 { + Peering, + BaseResource, + PeeringSku, + PeeringPropertiesDirect, + DirectConnection, + BgpSession, + PeeringPropertiesExchange, + ExchangeConnection, + ErrorResponse, + ResourceTags, + PeeringListResult +} from "../models/mappers"; + diff --git a/packages/@azure/arm-cdn/lib/operations/index.ts b/packages/@azure/arm-cdn/lib/operations/index.ts index 36365ff3eca2..566e9100884a 100644 --- a/packages/@azure/arm-cdn/lib/operations/index.ts +++ b/packages/@azure/arm-cdn/lib/operations/index.ts @@ -8,10 +8,7 @@ * regenerated. */ -export * from "./profiles"; -export * from "./endpoints"; -export * from "./origins"; -export * from "./customDomains"; -export * from "./resourceUsageOperations"; +export * from "./legacyPeerings"; export * from "./operations"; -export * from "./edgeNodes"; +export * from "./peeringLocations"; +export * from "./peerings"; diff --git a/packages/@azure/arm-cdn/lib/operations/legacyPeerings.ts b/packages/@azure/arm-cdn/lib/operations/legacyPeerings.ts new file mode 100644 index 000000000000..552e26a56c06 --- /dev/null +++ b/packages/@azure/arm-cdn/lib/operations/legacyPeerings.ts @@ -0,0 +1,138 @@ +/* + * 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/legacyPeeringsMappers"; +import * as Parameters from "../models/parameters"; +import { PeeringManagementClientContext } from "../peeringManagementClientContext"; + +/** Class representing a LegacyPeerings. */ +export class LegacyPeerings { + private readonly client: PeeringManagementClientContext; + + /** + * Create a LegacyPeerings. + * @param {PeeringManagementClientContext} client Reference to the service client. + */ + constructor(client: PeeringManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and + * location. + * @param peeringLocation The location of the peering. + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @param [options] The optional parameters + * @returns Promise + */ + list(peeringLocation: string, kind: Models.Kind1, options?: msRest.RequestOptionsBase): Promise; + /** + * @param peeringLocation The location of the peering. + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @param callback The callback + */ + list(peeringLocation: string, kind: Models.Kind1, callback: msRest.ServiceCallback): void; + /** + * @param peeringLocation The location of the peering. + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @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 { + return this.client.sendOperationRequest( + { + peeringLocation, + kind, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the legacy peerings under the given subscription matching the specified kind and + * location. + * @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/legacyPeerings", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.peeringLocation, + Parameters.kind, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringListResult + }, + 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.PeeringListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-cdn/lib/operations/operations.ts b/packages/@azure/arm-cdn/lib/operations/operations.ts index 09c0ecfd5439..ea8c2e65bb8d 100644 --- a/packages/@azure/arm-cdn/lib/operations/operations.ts +++ b/packages/@azure/arm-cdn/lib/operations/operations.ts @@ -12,22 +12,22 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "../models"; import * as Mappers from "../models/operationsMappers"; import * as Parameters from "../models/parameters"; -import { CdnManagementClientContext } from "../cdnManagementClientContext"; +import { PeeringManagementClientContext } from "../peeringManagementClientContext"; /** Class representing a Operations. */ export class Operations { - private readonly client: CdnManagementClientContext; + private readonly client: PeeringManagementClientContext; /** * Create a Operations. - * @param {CdnManagementClientContext} client Reference to the service client. + * @param {PeeringManagementClientContext} client Reference to the service client. */ - constructor(client: CdnManagementClientContext) { + constructor(client: PeeringManagementClientContext) { this.client = client; } /** - * Lists all of the available CDN REST API operations. + * Lists all of the available API operations for peering resources. * @param [options] The optional parameters * @returns Promise */ @@ -35,13 +35,13 @@ export class Operations { /** * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + 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 { + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -51,7 +51,7 @@ export class Operations { } /** - * Lists all of the available CDN REST API operations. + * Lists all of the available API operations for peering resources. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise @@ -61,14 +61,14 @@ export class Operations { * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + 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 { + 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, @@ -83,7 +83,7 @@ export class Operations { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "providers/Microsoft.Cdn/operations", + path: "providers/Microsoft.Peering/operations", queryParameters: [ Parameters.apiVersion ], @@ -92,7 +92,7 @@ const listOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.OperationsListResult + bodyMapper: Mappers.OperationListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -113,7 +113,7 @@ const listNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.OperationsListResult + bodyMapper: Mappers.OperationListResult }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/packages/@azure/arm-cdn/lib/operations/peeringLocations.ts b/packages/@azure/arm-cdn/lib/operations/peeringLocations.ts new file mode 100644 index 000000000000..40f758976752 --- /dev/null +++ b/packages/@azure/arm-cdn/lib/operations/peeringLocations.ts @@ -0,0 +1,131 @@ +/* + * 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/peeringLocationsMappers"; +import * as Parameters from "../models/parameters"; +import { PeeringManagementClientContext } from "../peeringManagementClientContext"; + +/** Class representing a PeeringLocations. */ +export class PeeringLocations { + private readonly client: PeeringManagementClientContext; + + /** + * Create a PeeringLocations. + * @param {PeeringManagementClientContext} client Reference to the service client. + */ + constructor(client: PeeringManagementClientContext) { + this.client = client; + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @param [options] The optional parameters + * @returns Promise + */ + list(kind: Models.Kind2, options?: msRest.RequestOptionsBase): Promise; + /** + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @param callback The callback + */ + list(kind: Models.Kind2, callback: msRest.ServiceCallback): void; + /** + * @param kind The kind of the peering. Possible values include: 'Direct', 'Exchange' + * @param options The optional parameters + * @param callback The callback + */ + list(kind: Models.Kind2, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(kind: Models.Kind2, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + kind, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the available peering locations for the specified kind of peering. + * @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/peeringLocations", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.kind, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringLocationListResult + }, + 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.PeeringLocationListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-cdn/lib/operations/peerings.ts b/packages/@azure/arm-cdn/lib/operations/peerings.ts new file mode 100644 index 000000000000..5ae8d6aac042 --- /dev/null +++ b/packages/@azure/arm-cdn/lib/operations/peerings.ts @@ -0,0 +1,484 @@ +/* + * 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/peeringsMappers"; +import * as Parameters from "../models/parameters"; +import { PeeringManagementClientContext } from "../peeringManagementClientContext"; + +/** Class representing a Peerings. */ +export class Peerings { + private readonly client: PeeringManagementClientContext; + + /** + * Create a Peerings. + * @param {PeeringManagementClientContext} client Reference to the service client. + */ + constructor(client: PeeringManagementClientContext) { + this.client = client; + } + + /** + * Gets an existing peering with the specified name under the given subscription and resource + * group. + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param [options] The optional parameters + * @returns Promise + */ + get(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 + */ + get(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 + */ + get(resourceGroupName: string, peeringName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, peeringName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates a new peering or updates an existing peering with the specified name under the given + * subscription and resource group. + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param peering The properties needed to create or update a peering. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, peeringName: string, peering: Models.Peering, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param peering The properties needed to create or update a peering. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, peeringName: string, peering: Models.Peering, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param peering The properties needed to create or update a peering. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, peeringName: string, peering: Models.Peering, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, peeringName: string, peering: Models.Peering, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringName, + peering, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes an existing peering with the specified name under the given subscription and resource + * group. + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(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 + */ + deleteMethod(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 + */ + deleteMethod(resourceGroupName: string, peeringName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, peeringName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Updates tags for a peering with the specified name under the given subscription and resource + * group. + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, peeringName: string, options?: Models.PeeringsUpdateOptionalParams): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param peeringName The name of the peering. + * @param callback The callback + */ + update(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 + */ + update(resourceGroupName: string, peeringName: string, options: Models.PeeringsUpdateOptionalParams, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, peeringName: string, options?: Models.PeeringsUpdateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + peeringName, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the peerings under the given subscription and resource group. + * @param resourceGroupName The name of the resource group. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the peerings under the given subscription. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscription(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + listBySubscription(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listBySubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the peerings under the given subscription and resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(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 + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * Lists all of the peerings under the given subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listBySubscriptionNext(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 + */ + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listBySubscriptionNextOperationSpec, + 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}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Peering + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "peering", + mapper: { + ...Mappers.Peering, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Peering + }, + 201: { + bodyMapper: Mappers.Peering + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings/{peeringName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.peeringName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: { + tags: [ + "options", + "tags" + ] + }, + mapper: { + ...Mappers.ResourceTags, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Peering + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peerings", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Peering/peerings", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PeeringListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-cdn/lib/peeringManagementClient.ts b/packages/@azure/arm-cdn/lib/peeringManagementClient.ts new file mode 100644 index 000000000000..a0ef040ff201 --- /dev/null +++ b/packages/@azure/arm-cdn/lib/peeringManagementClient.ts @@ -0,0 +1,185 @@ +/* + * 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/mappers"; +import * as Parameters from "./models/parameters"; +import * as operations from "./operations"; +import { PeeringManagementClientContext } from "./peeringManagementClientContext"; + + +class PeeringManagementClient extends PeeringManagementClientContext { + // Operation groups + legacyPeerings: operations.LegacyPeerings; + operations: operations.Operations; + peeringLocations: operations.PeeringLocations; + peerings: operations.Peerings; + + /** + * Initializes a new instance of the PeeringManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The Azure subscription ID. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PeeringManagementClientOptions) { + super(credentials, subscriptionId, options); + this.legacyPeerings = new operations.LegacyPeerings(this); + this.operations = new operations.Operations(this); + this.peeringLocations = new operations.PeeringLocations(this); + this.peerings = new operations.Peerings(this); + } + + /** + * Gets the peer info associated with the specified subscription. + * @param [options] The optional parameters + * @returns Promise + */ + getPeerInfo(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + getPeerInfo(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + getPeerInfo(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getPeerInfo(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + options + }, + getPeerInfoOperationSpec, + callback) as Promise; + } + + /** + * Updates the peer info associated with the specified subscription. + * @param peerInfo The peer info. + * @param [options] The optional parameters + * @returns Promise + */ + updatePeerInfo(peerInfo: Models.PeerInfo[], options?: msRest.RequestOptionsBase): Promise; + /** + * @param peerInfo The peer info. + * @param callback The callback + */ + updatePeerInfo(peerInfo: Models.PeerInfo[], callback: msRest.ServiceCallback): void; + /** + * @param peerInfo The peer info. + * @param options The optional parameters + * @param callback The callback + */ + updatePeerInfo(peerInfo: Models.PeerInfo[], options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + updatePeerInfo(peerInfo: Models.PeerInfo[], options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + peerInfo, + options + }, + updatePeerInfoOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getPeerInfoOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Peering/getPeerInfo", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PeerInfo" + } + } + } + } + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updatePeerInfoOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Peering/updatePeerInfo", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "peerInfo", + mapper: { + required: true, + serializedName: "peerInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PeerInfo" + } + } + } + } + }, + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PeerInfo" + } + } + } + } + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +export { + PeeringManagementClient, + PeeringManagementClientContext, + Models as PeeringManagementModels, + Mappers as PeeringManagementMappers +}; +export * from "./operations"; diff --git a/packages/@azure/arm-cdn/lib/peeringManagementClientContext.ts b/packages/@azure/arm-cdn/lib/peeringManagementClientContext.ts new file mode 100644 index 000000000000..039cfd4a95a1 --- /dev/null +++ b/packages/@azure/arm-cdn/lib/peeringManagementClientContext.ts @@ -0,0 +1,62 @@ +/* + * 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 Models from "./models"; +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; + +const packageName = "@azure/arm-cdn"; +const packageVersion = "4.2.0"; + +export class PeeringManagementClientContext extends msRestAzure.AzureServiceClient { + credentials: msRest.ServiceClientCredentials; + subscriptionId: string; + apiVersion?: string; + + /** + * Initializes a new instance of the PeeringManagementClient class. + * @param credentials Credentials needed for the client to connect to Azure. + * @param subscriptionId The Azure subscription ID. + * @param [options] The parameter options + */ + constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.PeeringManagementClientOptions) { + if (credentials == undefined) { + throw new Error('\'credentials\' cannot be null.'); + } + if (subscriptionId == undefined) { + throw new Error('\'subscriptionId\' cannot be null.'); + } + + if (!options) { + options = {}; + } + if(!options.userAgent) { + const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); + options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; + } + + super(credentials, options); + + this.apiVersion = '2019-03-01-preview'; + this.acceptLanguage = 'en-US'; + this.longRunningOperationRetryTimeout = 30; + this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; + this.requestContentType = "application/json; charset=utf-8"; + this.credentials = credentials; + this.subscriptionId = subscriptionId; + + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + this.acceptLanguage = options.acceptLanguage; + } + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; + } + } +} diff --git a/packages/@azure/arm-cdn/package.json b/packages/@azure/arm-cdn/package.json index 1fe34a7826f0..cdff46ee2a87 100644 --- a/packages/@azure/arm-cdn/package.json +++ b/packages/@azure/arm-cdn/package.json @@ -1,11 +1,11 @@ { "name": "@azure/arm-cdn", "author": "Microsoft Corporation", - "description": "CdnManagementClient Library with typescript type definitions for node.js and browser.", + "description": "PeeringManagementClient Library with typescript type definitions for node.js and browser.", "version": "4.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.6.0", + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -17,8 +17,8 @@ ], "license": "MIT", "main": "./dist/arm-cdn.js", - "module": "./esm/cdnManagementClient.js", - "types": "./esm/cdnManagementClient.d.ts", + "module": "./esm/peeringManagementClient.js", + "types": "./esm/peeringManagementClient.d.ts", "devDependencies": { "typescript": "^3.1.1", "rollup": "^0.66.2", @@ -44,7 +44,6 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "lib/**/*.ts", - "README.md", "rollup.config.js", "tsconfig.json" ], @@ -53,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-cdn.js.map'\" -o ./dist/arm-cdn.min.js ./dist/arm-cdn.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "autoPublish": true + "sideEffects": false } diff --git a/packages/@azure/arm-cdn/rollup.config.js b/packages/@azure/arm-cdn/rollup.config.js index 98d4b544f35f..ac6c1fa68a49 100644 --- a/packages/@azure/arm-cdn/rollup.config.js +++ b/packages/@azure/arm-cdn/rollup.config.js @@ -6,7 +6,7 @@ import sourcemaps from "rollup-plugin-sourcemaps"; * @type {rollup.RollupFileOptions} */ const config = { - input: "./esm/cdnManagementClient.js", + input: "./esm/peeringManagementClient.js", external: [ "@azure/ms-rest-js", "@azure/ms-rest-azure-js"