diff --git a/lib/services/networkManagement2/lib/models/applicationGateway.js b/lib/services/networkManagement2/lib/models/applicationGateway.js index 51d8ecf64c..390a89816a 100644 --- a/lib/services/networkManagement2/lib/models/applicationGateway.js +++ b/lib/services/networkManagement2/lib/models/applicationGateway.js @@ -93,11 +93,8 @@ class ApplicationGateway extends models['Resource'] { * @member {boolean} [enableFips] Whether FIPS is enabled on the application * gateway resource. * @member {object} [autoscaleConfiguration] Autoscale Configuration. - * @member {object} [autoscaleConfiguration.bounds] Autoscale bounds - * @member {number} [autoscaleConfiguration.bounds.min] Lower bound on number - * of Application Gateway instances. - * @member {number} [autoscaleConfiguration.bounds.max] Upper bound on number - * of Application Gateway instances. + * @member {number} [autoscaleConfiguration.minCapacity] Lower bound on + * number of Application Gateway instances * @member {string} [resourceGuid] Resource GUID property of the application * gateway resource. * @member {string} [provisioningState] Provisioning state of the application diff --git a/lib/services/networkManagement2/lib/models/applicationGatewayAutoscaleConfiguration.js b/lib/services/networkManagement2/lib/models/applicationGatewayAutoscaleConfiguration.js index 1cdf898a49..084d05a93d 100644 --- a/lib/services/networkManagement2/lib/models/applicationGatewayAutoscaleConfiguration.js +++ b/lib/services/networkManagement2/lib/models/applicationGatewayAutoscaleConfiguration.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * Application Gateway autoscale configuration. * @@ -19,11 +17,8 @@ const models = require('./index'); class ApplicationGatewayAutoscaleConfiguration { /** * Create a ApplicationGatewayAutoscaleConfiguration. - * @member {object} bounds Autoscale bounds - * @member {number} [bounds.min] Lower bound on number of Application Gateway - * instances. - * @member {number} [bounds.max] Upper bound on number of Application Gateway - * instances. + * @member {number} minCapacity Lower bound on number of Application Gateway + * instances */ constructor() { } @@ -42,12 +37,14 @@ class ApplicationGatewayAutoscaleConfiguration { name: 'Composite', className: 'ApplicationGatewayAutoscaleConfiguration', modelProperties: { - bounds: { + minCapacity: { required: true, - serializedName: 'bounds', + serializedName: 'minCapacity', + constraints: { + InclusiveMinimum: 2 + }, type: { - name: 'Composite', - className: 'ApplicationGatewayAutoscaleBounds' + name: 'Number' } } } diff --git a/lib/services/networkManagement2/lib/models/applicationGatewayBackendHealthServer.js b/lib/services/networkManagement2/lib/models/applicationGatewayBackendHealthServer.js index 9833dc0dbb..ae08c4951b 100644 --- a/lib/services/networkManagement2/lib/models/applicationGatewayBackendHealthServer.js +++ b/lib/services/networkManagement2/lib/models/applicationGatewayBackendHealthServer.js @@ -90,8 +90,12 @@ class ApplicationGatewayBackendHealthServer { * references to interface endpoints * @member {array} [ipConfiguration.subnet.ipConfigurations] Gets an array of * references to the network interface IP configurations using subnet. + * @member {array} [ipConfiguration.subnet.ipConfigurationProfiles] Array of + * IP configuration profiles which reference this subnet. * @member {array} [ipConfiguration.subnet.resourceNavigationLinks] Gets an * array of references to the external resources using subnet. + * @member {array} [ipConfiguration.subnet.serviceAssociationLinks] Gets an + * array of references to services injecting into this subnet. * @member {array} [ipConfiguration.subnet.delegations] Gets an array of * references to the delegations on the subnet. * @member {string} [ipConfiguration.subnet.purpose] A read-only string @@ -196,9 +200,15 @@ class ApplicationGatewayBackendHealthServer { * Gets an array of references to the network interface IP configurations * using subnet. * @member {array} + * [ipConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [ipConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [ipConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [ipConfiguration.publicIPAddress.ipConfiguration.subnet.delegations] Gets * an array of references to the delegations on the subnet. * @member {string} diff --git a/lib/services/networkManagement2/lib/models/frontendIPConfiguration.js b/lib/services/networkManagement2/lib/models/frontendIPConfiguration.js index ac7e7b9b07..f263c5e10c 100644 --- a/lib/services/networkManagement2/lib/models/frontendIPConfiguration.js +++ b/lib/services/networkManagement2/lib/models/frontendIPConfiguration.js @@ -75,8 +75,12 @@ class FrontendIPConfiguration extends models['SubResource'] { * interface endpoints * @member {array} [subnet.ipConfigurations] Gets an array of references to * the network interface IP configurations using subnet. + * @member {array} [subnet.ipConfigurationProfiles] Array of IP configuration + * profiles which reference this subnet. * @member {array} [subnet.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. + * @member {array} [subnet.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. * @member {array} [subnet.delegations] Gets an array of references to the * delegations on the subnet. * @member {string} [subnet.purpose] A read-only string identifying the @@ -168,8 +172,14 @@ class FrontendIPConfiguration extends models['SubResource'] { * Gets an array of references to the network interface IP configurations * using subnet. * @member {array} + * [publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] Array of + * IP configuration profiles which reference this subnet. + * @member {array} * [publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] Gets an * array of references to the external resources using subnet. + * @member {array} + * [publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] Gets an + * array of references to services injecting into this subnet. * @member {array} [publicIPAddress.ipConfiguration.subnet.delegations] Gets * an array of references to the delegations on the subnet. * @member {string} [publicIPAddress.ipConfiguration.subnet.purpose] A diff --git a/lib/services/networkManagement2/lib/models/getVpnSitesConfigurationRequest.js b/lib/services/networkManagement2/lib/models/getVpnSitesConfigurationRequest.js index 43fd740986..4ce96099c5 100644 --- a/lib/services/networkManagement2/lib/models/getVpnSitesConfigurationRequest.js +++ b/lib/services/networkManagement2/lib/models/getVpnSitesConfigurationRequest.js @@ -10,8 +10,6 @@ 'use strict'; -const models = require('./index'); - /** * List of Vpn-Sites * @@ -48,10 +46,9 @@ class GetVpnSitesConfigurationRequest { name: 'Sequence', element: { required: false, - serializedName: 'SubResourceElementType', + serializedName: 'StringElementType', type: { - name: 'Composite', - className: 'SubResource' + name: 'String' } } } diff --git a/lib/services/networkManagement2/lib/models/hubVirtualNetworkConnection.js b/lib/services/networkManagement2/lib/models/hubVirtualNetworkConnection.js index b534f34173..de3551178d 100644 --- a/lib/services/networkManagement2/lib/models/hubVirtualNetworkConnection.js +++ b/lib/services/networkManagement2/lib/models/hubVirtualNetworkConnection.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * HubVirtualNetworkConnection Resource. * - * @extends models['Resource'] + * @extends models['SubResource'] */ -class HubVirtualNetworkConnection extends models['Resource'] { +class HubVirtualNetworkConnection extends models['SubResource'] { /** * Create a HubVirtualNetworkConnection. * @member {object} [remoteVirtualNetwork] Reference to the remote virtual @@ -27,9 +27,12 @@ class HubVirtualNetworkConnection extends models['Resource'] { * transit to enabled or not. * @member {boolean} [allowRemoteVnetToUseHubVnetGateways] Allow RemoteVnet * to use Virtual Hub's gateways. + * @member {boolean} [enableInternetSecurity] Enable internet security * @member {string} [provisioningState] The provisioning state of the * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. * @member {string} [etag] Gets a unique read-only string that changes * whenever the resource is updated. */ @@ -58,43 +61,6 @@ class HubVirtualNetworkConnection extends models['Resource'] { name: 'String' } }, - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - type: { - required: false, - readOnly: true, - serializedName: 'type', - type: { - name: 'String' - } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, - tags: { - required: false, - serializedName: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } - } - }, remoteVirtualNetwork: { required: false, serializedName: 'properties.remoteVirtualNetwork', @@ -117,6 +83,13 @@ class HubVirtualNetworkConnection extends models['Resource'] { name: 'Boolean' } }, + enableInternetSecurity: { + required: false, + serializedName: 'properties.enableInternetSecurity', + type: { + name: 'Boolean' + } + }, provisioningState: { required: false, serializedName: 'properties.provisioningState', @@ -124,6 +97,13 @@ class HubVirtualNetworkConnection extends models['Resource'] { name: 'String' } }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, etag: { required: false, readOnly: true, diff --git a/lib/services/networkManagement2/lib/models/iPConfiguration.js b/lib/services/networkManagement2/lib/models/iPConfiguration.js index c08dd73bc5..bdeb1e7d3f 100644 --- a/lib/services/networkManagement2/lib/models/iPConfiguration.js +++ b/lib/services/networkManagement2/lib/models/iPConfiguration.js @@ -67,8 +67,12 @@ class IPConfiguration extends models['SubResource'] { * interface endpoints * @member {array} [subnet.ipConfigurations] Gets an array of references to * the network interface IP configurations using subnet. + * @member {array} [subnet.ipConfigurationProfiles] Array of IP configuration + * profiles which reference this subnet. * @member {array} [subnet.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. + * @member {array} [subnet.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. * @member {array} [subnet.delegations] Gets an array of references to the * delegations on the subnet. * @member {string} [subnet.purpose] A read-only string identifying the diff --git a/lib/services/networkManagement2/lib/models/iPConfigurationProfile.js b/lib/services/networkManagement2/lib/models/iPConfigurationProfile.js index 23c1630fd3..2e553c3d6e 100644 --- a/lib/services/networkManagement2/lib/models/iPConfigurationProfile.js +++ b/lib/services/networkManagement2/lib/models/iPConfigurationProfile.js @@ -63,8 +63,12 @@ class IPConfigurationProfile extends models['SubResource'] { * interface endpoints * @member {array} [subnet.ipConfigurations] Gets an array of references to * the network interface IP configurations using subnet. + * @member {array} [subnet.ipConfigurationProfiles] Array of IP configuration + * profiles which reference this subnet. * @member {array} [subnet.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. + * @member {array} [subnet.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. * @member {array} [subnet.delegations] Gets an array of references to the * delegations on the subnet. * @member {string} [subnet.purpose] A read-only string identifying the diff --git a/lib/services/networkManagement2/lib/models/inboundNatRule.js b/lib/services/networkManagement2/lib/models/inboundNatRule.js index 05f4c51c2e..60f93c940c 100644 --- a/lib/services/networkManagement2/lib/models/inboundNatRule.js +++ b/lib/services/networkManagement2/lib/models/inboundNatRule.js @@ -100,8 +100,12 @@ class InboundNatRule extends models['SubResource'] { * @member {array} [backendIPConfiguration.subnet.ipConfigurations] Gets an * array of references to the network interface IP configurations using * subnet. + * @member {array} [backendIPConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. * @member {array} [backendIPConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. + * @member {array} [backendIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. * @member {array} [backendIPConfiguration.subnet.delegations] Gets an array * of references to the delegations on the subnet. * @member {string} [backendIPConfiguration.subnet.purpose] A read-only @@ -208,9 +212,15 @@ class InboundNatRule extends models['SubResource'] { * Gets an array of references to the network interface IP configurations * using subnet. * @member {array} + * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} diff --git a/lib/services/networkManagement2/lib/models/index.d.ts b/lib/services/networkManagement2/lib/models/index.d.ts index 21d8b79826..8f3139a00e 100644 --- a/lib/services/networkManagement2/lib/models/index.d.ts +++ b/lib/services/networkManagement2/lib/models/index.d.ts @@ -39,6 +39,11 @@ export interface SubResource extends BaseResource { * @member {array} [virtualNetworkTap.networkInterfaceTapConfigurations] * Specifies the list of resource IDs for the network interface IP * configuration that needs to be tapped. + * @member {string} [virtualNetworkTap.resourceGuid] The resourceGuid property + * of the virtual network tap. + * @member {string} [virtualNetworkTap.provisioningState] The provisioning + * state of the virtual network tap. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. * @member {object} * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration] The reference * to the private IP Address of the collector nic that will receive the tap @@ -136,9 +141,15 @@ export interface SubResource extends BaseResource { * Gets an array of references to the network interface IP configurations using * subnet. * @member {array} + * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -255,9 +266,15 @@ export interface SubResource extends BaseResource { * Gets an array of references to the network interface IP configurations using * subnet. * @member {array} + * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -444,9 +461,15 @@ export interface SubResource extends BaseResource { * Gets an array of references to the network interface IP configurations using * subnet. * @member {array} + * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -560,9 +583,15 @@ export interface SubResource extends BaseResource { * Gets an array of references to the network interface IP configurations using * subnet. * @member {array} + * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -668,6 +697,9 @@ export interface SubResource extends BaseResource { * port that will receive the tapped traffic. * @member {string} [virtualNetworkTap.etag] Gets a unique read-only string * that changes whenever the resource is updated. + * @member {string} [provisioningState] The provisioning state of the network + * interface tap configuration. Possible values are: 'Updating', 'Deleting', + * and 'Failed'. * @member {string} [name] The name of the resource that is unique within a * resource group. This name can be used to access the resource. * @member {string} [etag] A unique read-only string that changes whenever the @@ -676,6 +708,7 @@ export interface SubResource extends BaseResource { */ export interface NetworkInterfaceTapConfiguration extends SubResource { virtualNetworkTap?: VirtualNetworkTap; + readonly provisioningState?: string; name?: string; etag?: string; readonly type?: string; @@ -825,6 +858,8 @@ export interface EndpointService { * network interfaces created for this interface endpoint. * @member {string} [owner] A read-only property that identifies who created * this interface endpoint. + * @member {string} [provisioningState] The provisioning state of the interface + * endpoint. Possible values are: 'Updating', 'Deleting', and 'Failed'. * @member {string} [etag] Gets a unique read-only string that changes whenever * the resource is updated. */ @@ -834,6 +869,7 @@ export interface InterfaceEndpoint extends Resource { subnet?: SubResource; networkInterfaces?: SubResource[]; readonly owner?: string; + readonly provisioningState?: string; etag?: string; } @@ -908,6 +944,9 @@ export interface NetworkInterfaceDnsSettings { * references to the network interfaces created for this interface endpoint. * @member {string} [interfaceEndpoint.owner] A read-only property that * identifies who created this interface endpoint. + * @member {string} [interfaceEndpoint.provisioningState] The provisioning + * state of the interface endpoint. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. * @member {string} [interfaceEndpoint.etag] Gets a unique read-only string * that changes whenever the resource is updated. * @member {array} [ipConfigurations] A list of IPConfigurations of the network @@ -953,7 +992,7 @@ export interface NetworkInterfaceDnsSettings { export interface NetworkInterface extends Resource { virtualMachine?: SubResource; networkSecurityGroup?: NetworkSecurityGroup; - interfaceEndpoint?: InterfaceEndpoint; + readonly interfaceEndpoint?: InterfaceEndpoint; ipConfigurations?: NetworkInterfaceIPConfiguration[]; tapConfigurations?: NetworkInterfaceTapConfiguration[]; dnsSettings?: NetworkInterfaceDnsSettings; @@ -1091,7 +1130,7 @@ export interface ServiceEndpointPolicyDefinition extends SubResource { description?: string; service?: string; serviceResources?: string[]; - provisioningState?: string; + readonly provisioningState?: string; name?: string; etag?: string; } @@ -1104,6 +1143,7 @@ export interface ServiceEndpointPolicyDefinition extends SubResource { * * @member {array} [serviceEndpointPolicyDefinitions] A collection of service * endpoint policy definitions of the service endpoint policy. + * @member {array} [subnets] A collection of references to subnets. * @member {string} [resourceGuid] The resource GUID property of the service * endpoint policy resource. * @member {string} [provisioningState] The provisioning state of the service @@ -1113,8 +1153,9 @@ export interface ServiceEndpointPolicyDefinition extends SubResource { */ export interface ServiceEndpointPolicy extends Resource { serviceEndpointPolicyDefinitions?: ServiceEndpointPolicyDefinition[]; - resourceGuid?: string; - provisioningState?: string; + readonly subnets?: Subnet[]; + readonly resourceGuid?: string; + readonly provisioningState?: string; etag?: string; } @@ -1243,8 +1284,12 @@ export interface IpTag { * references to interface endpoints * @member {array} [ipConfiguration.subnet.ipConfigurations] Gets an array of * references to the network interface IP configurations using subnet. + * @member {array} [ipConfiguration.subnet.ipConfigurationProfiles] Array of IP + * configuration profiles which reference this subnet. * @member {array} [ipConfiguration.subnet.resourceNavigationLinks] Gets an * array of references to the external resources using subnet. + * @member {array} [ipConfiguration.subnet.serviceAssociationLinks] Gets an + * array of references to services injecting into this subnet. * @member {array} [ipConfiguration.subnet.delegations] Gets an array of * references to the delegations on the subnet. * @member {string} [ipConfiguration.subnet.purpose] A read-only string @@ -1368,8 +1413,12 @@ export interface PublicIPAddress extends Resource { * interface endpoints * @member {array} [subnet.ipConfigurations] Gets an array of references to the * network interface IP configurations using subnet. + * @member {array} [subnet.ipConfigurationProfiles] Array of IP configuration + * profiles which reference this subnet. * @member {array} [subnet.resourceNavigationLinks] Gets an array of references * to the external resources using subnet. + * @member {array} [subnet.serviceAssociationLinks] Gets an array of references + * to services injecting into this subnet. * @member {array} [subnet.delegations] Gets an array of references to the * delegations on the subnet. * @member {string} [subnet.purpose] A read-only string identifying the @@ -1445,6 +1494,87 @@ export interface IPConfiguration extends SubResource { etag?: string; } +/** + * @class + * Initializes a new instance of the IPConfigurationProfile class. + * @constructor + * IP configuration profile child resource. + * + * @member {object} [subnet] The reference of the subnet resource to create a + * contatainer network interface ip configruation. + * @member {string} [subnet.addressPrefix] The address prefix for the subnet. + * @member {array} [subnet.addressPrefixes] List of address prefixes for the + * subnet. + * @member {object} [subnet.networkSecurityGroup] The reference of the + * NetworkSecurityGroup resource. + * @member {array} [subnet.networkSecurityGroup.securityRules] A collection of + * security rules of the network security group. + * @member {array} [subnet.networkSecurityGroup.defaultSecurityRules] The + * default security rules of network security group. + * @member {array} [subnet.networkSecurityGroup.networkInterfaces] A collection + * of references to network interfaces. + * @member {array} [subnet.networkSecurityGroup.subnets] A collection of + * references to subnets. + * @member {string} [subnet.networkSecurityGroup.resourceGuid] The resource + * GUID property of the network security group resource. + * @member {string} [subnet.networkSecurityGroup.provisioningState] The + * provisioning state of the public IP resource. Possible values are: + * 'Updating', 'Deleting', and 'Failed'. + * @member {string} [subnet.networkSecurityGroup.etag] A unique read-only + * string that changes whenever the resource is updated. + * @member {object} [subnet.routeTable] The reference of the RouteTable + * resource. + * @member {array} [subnet.routeTable.routes] Collection of routes contained + * within a route table. + * @member {array} [subnet.routeTable.subnets] A collection of references to + * subnets. + * @member {boolean} [subnet.routeTable.disableBgpRoutePropagation] Gets or + * sets whether to disable the routes learned by BGP on that route table. True + * means disable. + * @member {string} [subnet.routeTable.provisioningState] The provisioning + * state of the resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * @member {string} [subnet.routeTable.etag] Gets a unique read-only string + * that changes whenever the resource is updated. + * @member {array} [subnet.serviceEndpoints] An array of service endpoints. + * @member {array} [subnet.serviceEndpointPolicies] An array of service + * endpoint policies. + * @member {array} [subnet.interfaceEndpoints] An array of references to + * interface endpoints + * @member {array} [subnet.ipConfigurations] Gets an array of references to the + * network interface IP configurations using subnet. + * @member {array} [subnet.ipConfigurationProfiles] Array of IP configuration + * profiles which reference this subnet. + * @member {array} [subnet.resourceNavigationLinks] Gets an array of references + * to the external resources using subnet. + * @member {array} [subnet.serviceAssociationLinks] Gets an array of references + * to services injecting into this subnet. + * @member {array} [subnet.delegations] Gets an array of references to the + * delegations on the subnet. + * @member {string} [subnet.purpose] A read-only string identifying the + * intention of use for this subnet based on delegations and other user-defined + * properties. + * @member {string} [subnet.provisioningState] The provisioning state of the + * resource. + * @member {string} [subnet.name] The name of the resource that is unique + * within a resource group. This name can be used to access the resource. + * @member {string} [subnet.etag] A unique read-only string that changes + * whenever the resource is updated. + * @member {string} [provisioningState] The provisioning state of the resource. + * @member {string} [name] The name of the resource. This name can be used to + * access the resource. + * @member {string} [type] Sub Resource type. + * @member {string} [etag] A unique read-only string that changes whenever the + * resource is updated. + */ +export interface IPConfigurationProfile extends SubResource { + subnet?: Subnet; + readonly provisioningState?: string; + name?: string; + readonly type?: string; + etag?: string; +} + /** * @class * Initializes a new instance of the ResourceNavigationLink class. @@ -1468,6 +1598,29 @@ export interface ResourceNavigationLink extends SubResource { readonly etag?: string; } +/** + * @class + * Initializes a new instance of the ServiceAssociationLink class. + * @constructor + * ServiceAssociationLink resource. + * + * @member {string} [linkedResourceType] Resource type of the linked resource. + * @member {string} [link] Link to the external resource. + * @member {string} [provisioningState] Provisioning state of the + * ServiceAssociationLink resource. + * @member {string} [name] Name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever the + * resource is updated. + */ +export interface ServiceAssociationLink extends SubResource { + linkedResourceType?: string; + link?: string; + readonly provisioningState?: string; + name?: string; + readonly etag?: string; +} + /** * @class * Initializes a new instance of the Delegation class. @@ -1535,8 +1688,12 @@ export interface Delegation extends SubResource { * endpoints * @member {array} [ipConfigurations] Gets an array of references to the * network interface IP configurations using subnet. + * @member {array} [ipConfigurationProfiles] Array of IP configuration profiles + * which reference this subnet. * @member {array} [resourceNavigationLinks] Gets an array of references to the * external resources using subnet. + * @member {array} [serviceAssociationLinks] Gets an array of references to + * services injecting into this subnet. * @member {array} [delegations] Gets an array of references to the delegations * on the subnet. * @member {string} [purpose] A read-only string identifying the intention of @@ -1556,7 +1713,9 @@ export interface Subnet extends SubResource { serviceEndpointPolicies?: ServiceEndpointPolicy[]; interfaceEndpoints?: SubResource[]; readonly ipConfigurations?: IPConfiguration[]; + readonly ipConfigurationProfiles?: IPConfigurationProfile[]; resourceNavigationLinks?: ResourceNavigationLink[]; + serviceAssociationLinks?: ServiceAssociationLink[]; delegations?: Delegation[]; readonly purpose?: string; provisioningState?: string; @@ -1625,8 +1784,12 @@ export interface Subnet extends SubResource { * interface endpoints * @member {array} [subnet.ipConfigurations] Gets an array of references to the * network interface IP configurations using subnet. + * @member {array} [subnet.ipConfigurationProfiles] Array of IP configuration + * profiles which reference this subnet. * @member {array} [subnet.resourceNavigationLinks] Gets an array of references * to the external resources using subnet. + * @member {array} [subnet.serviceAssociationLinks] Gets an array of references + * to services injecting into this subnet. * @member {array} [subnet.delegations] Gets an array of references to the * delegations on the subnet. * @member {string} [subnet.purpose] A read-only string identifying the @@ -1714,8 +1877,14 @@ export interface Subnet extends SubResource { * Gets an array of references to the network interface IP configurations using * subnet. * @member {array} + * [publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] Array of IP + * configuration profiles which reference this subnet. + * @member {array} * [publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] Gets an * array of references to the external resources using subnet. + * @member {array} + * [publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] Gets an + * array of references to services injecting into this subnet. * @member {array} [publicIPAddress.ipConfiguration.subnet.delegations] Gets an * array of references to the delegations on the subnet. * @member {string} [publicIPAddress.ipConfiguration.subnet.purpose] A @@ -1810,6 +1979,10 @@ export interface FrontendIPConfiguration extends SubResource { * @member {array} [networkInterfaceTapConfigurations] Specifies the list of * resource IDs for the network interface IP configuration that needs to be * tapped. + * @member {string} [resourceGuid] The resourceGuid property of the virtual + * network tap. + * @member {string} [provisioningState] The provisioning state of the virtual + * network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'. * @member {object} [destinationNetworkInterfaceIPConfiguration] The reference * to the private IP Address of the collector nic that will receive the tap * @member {array} @@ -1903,9 +2076,15 @@ export interface FrontendIPConfiguration extends SubResource { * [destinationNetworkInterfaceIPConfiguration.subnet.ipConfigurations] Gets an * array of references to the network interface IP configurations using subnet. * @member {array} + * [destinationNetworkInterfaceIPConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [destinationNetworkInterfaceIPConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [destinationNetworkInterfaceIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [destinationNetworkInterfaceIPConfiguration.subnet.delegations] Gets an * array of references to the delegations on the subnet. * @member {string} [destinationNetworkInterfaceIPConfiguration.subnet.purpose] @@ -2017,9 +2196,15 @@ export interface FrontendIPConfiguration extends SubResource { * Gets an array of references to the network interface IP configurations using * subnet. * @member {array} + * [destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -2201,9 +2386,15 @@ export interface FrontendIPConfiguration extends SubResource { * Gets an array of references to the network interface IP configurations using * subnet. * @member {array} + * [destinationLoadBalancerFrontEndIPConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [destinationLoadBalancerFrontEndIPConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] Gets an * array of references to the delegations on the subnet. * @member {string} @@ -2317,9 +2508,15 @@ export interface FrontendIPConfiguration extends SubResource { * Gets an array of references to the network interface IP configurations using * subnet. * @member {array} + * [destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -2424,7 +2621,9 @@ export interface FrontendIPConfiguration extends SubResource { * the resource is updated. */ export interface VirtualNetworkTap extends Resource { - networkInterfaceTapConfigurations?: NetworkInterfaceTapConfiguration[]; + readonly networkInterfaceTapConfigurations?: NetworkInterfaceTapConfiguration[]; + readonly resourceGuid?: string; + readonly provisioningState?: string; destinationNetworkInterfaceIPConfiguration?: NetworkInterfaceIPConfiguration; destinationLoadBalancerFrontEndIPConfiguration?: FrontendIPConfiguration; destinationPort?: number; @@ -2543,8 +2742,12 @@ export interface BackendAddressPool extends SubResource { * of references to interface endpoints * @member {array} [backendIPConfiguration.subnet.ipConfigurations] Gets an * array of references to the network interface IP configurations using subnet. + * @member {array} [backendIPConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. * @member {array} [backendIPConfiguration.subnet.resourceNavigationLinks] Gets * an array of references to the external resources using subnet. + * @member {array} [backendIPConfiguration.subnet.serviceAssociationLinks] Gets + * an array of references to services injecting into this subnet. * @member {array} [backendIPConfiguration.subnet.delegations] Gets an array of * references to the delegations on the subnet. * @member {string} [backendIPConfiguration.subnet.purpose] A read-only string @@ -2651,9 +2854,15 @@ export interface BackendAddressPool extends SubResource { * Gets an array of references to the network interface IP configurations using * subnet. * @member {array} + * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [backendIPConfiguration.publicIPAddress.ipConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -2836,8 +3045,12 @@ export interface InboundNatRule extends SubResource { * interface endpoints * @member {array} [subnet.ipConfigurations] Gets an array of references to the * network interface IP configurations using subnet. + * @member {array} [subnet.ipConfigurationProfiles] Array of IP configuration + * profiles which reference this subnet. * @member {array} [subnet.resourceNavigationLinks] Gets an array of references * to the external resources using subnet. + * @member {array} [subnet.serviceAssociationLinks] Gets an array of references + * to services injecting into this subnet. * @member {array} [subnet.delegations] Gets an array of references to the * delegations on the subnet. * @member {string} [subnet.purpose] A read-only string identifying the @@ -2928,8 +3141,14 @@ export interface InboundNatRule extends SubResource { * Gets an array of references to the network interface IP configurations using * subnet. * @member {array} + * [publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] Array of IP + * configuration profiles which reference this subnet. + * @member {array} * [publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] Gets an * array of references to the external resources using subnet. + * @member {array} + * [publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] Gets an + * array of references to services injecting into this subnet. * @member {array} [publicIPAddress.ipConfiguration.subnet.delegations] Gets an * array of references to the delegations on the subnet. * @member {string} [publicIPAddress.ipConfiguration.subnet.purpose] A @@ -3213,8 +3432,12 @@ export interface ApplicationGatewayBackendHttpSettings extends SubResource { * references to interface endpoints * @member {array} [ipConfiguration.subnet.ipConfigurations] Gets an array of * references to the network interface IP configurations using subnet. + * @member {array} [ipConfiguration.subnet.ipConfigurationProfiles] Array of IP + * configuration profiles which reference this subnet. * @member {array} [ipConfiguration.subnet.resourceNavigationLinks] Gets an * array of references to the external resources using subnet. + * @member {array} [ipConfiguration.subnet.serviceAssociationLinks] Gets an + * array of references to services injecting into this subnet. * @member {array} [ipConfiguration.subnet.delegations] Gets an array of * references to the delegations on the subnet. * @member {string} [ipConfiguration.subnet.purpose] A read-only string @@ -3318,9 +3541,15 @@ export interface ApplicationGatewayBackendHttpSettings extends SubResource { * Gets an array of references to the network interface IP configurations using * subnet. * @member {array} + * [ipConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [ipConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [ipConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [ipConfiguration.publicIPAddress.ipConfiguration.subnet.delegations] Gets an * array of references to the delegations on the subnet. * @member {string} @@ -4030,35 +4259,17 @@ export interface ApplicationGatewayWebApplicationFirewallConfiguration { maxRequestBodySize?: number; } -/** - * @class - * Initializes a new instance of the ApplicationGatewayAutoscaleBounds class. - * @constructor - * Application Gateway autoscale bounds on number of Application Gateway - * instance. - * - * @member {number} min Lower bound on number of Application Gateway instances. - * @member {number} max Upper bound on number of Application Gateway instances. - */ -export interface ApplicationGatewayAutoscaleBounds { - min: number; - max: number; -} - /** * @class * Initializes a new instance of the ApplicationGatewayAutoscaleConfiguration class. * @constructor * Application Gateway autoscale configuration. * - * @member {object} bounds Autoscale bounds - * @member {number} [bounds.min] Lower bound on number of Application Gateway - * instances. - * @member {number} [bounds.max] Upper bound on number of Application Gateway - * instances. + * @member {number} minCapacity Lower bound on number of Application Gateway + * instances */ export interface ApplicationGatewayAutoscaleConfiguration { - bounds: ApplicationGatewayAutoscaleBounds; + minCapacity: number; } /** @@ -4138,11 +4349,8 @@ export interface ApplicationGatewayAutoscaleConfiguration { * @member {boolean} [enableFips] Whether FIPS is enabled on the application * gateway resource. * @member {object} [autoscaleConfiguration] Autoscale Configuration. - * @member {object} [autoscaleConfiguration.bounds] Autoscale bounds - * @member {number} [autoscaleConfiguration.bounds.min] Lower bound on number - * of Application Gateway instances. - * @member {number} [autoscaleConfiguration.bounds.max] Upper bound on number - * of Application Gateway instances. + * @member {number} [autoscaleConfiguration.minCapacity] Lower bound on number + * of Application Gateway instances * @member {string} [resourceGuid] Resource GUID property of the application * gateway resource. * @member {string} [provisioningState] Provisioning state of the application @@ -6058,83 +6266,6 @@ export interface EffectiveRouteListResult { readonly nextLink?: string; } -/** - * @class - * Initializes a new instance of the IPConfigurationProfile class. - * @constructor - * IP configuration profile child resource. - * - * @member {object} [subnet] The reference of the subnet resource to create a - * contatainer network interface ip configruation. - * @member {string} [subnet.addressPrefix] The address prefix for the subnet. - * @member {array} [subnet.addressPrefixes] List of address prefixes for the - * subnet. - * @member {object} [subnet.networkSecurityGroup] The reference of the - * NetworkSecurityGroup resource. - * @member {array} [subnet.networkSecurityGroup.securityRules] A collection of - * security rules of the network security group. - * @member {array} [subnet.networkSecurityGroup.defaultSecurityRules] The - * default security rules of network security group. - * @member {array} [subnet.networkSecurityGroup.networkInterfaces] A collection - * of references to network interfaces. - * @member {array} [subnet.networkSecurityGroup.subnets] A collection of - * references to subnets. - * @member {string} [subnet.networkSecurityGroup.resourceGuid] The resource - * GUID property of the network security group resource. - * @member {string} [subnet.networkSecurityGroup.provisioningState] The - * provisioning state of the public IP resource. Possible values are: - * 'Updating', 'Deleting', and 'Failed'. - * @member {string} [subnet.networkSecurityGroup.etag] A unique read-only - * string that changes whenever the resource is updated. - * @member {object} [subnet.routeTable] The reference of the RouteTable - * resource. - * @member {array} [subnet.routeTable.routes] Collection of routes contained - * within a route table. - * @member {array} [subnet.routeTable.subnets] A collection of references to - * subnets. - * @member {boolean} [subnet.routeTable.disableBgpRoutePropagation] Gets or - * sets whether to disable the routes learned by BGP on that route table. True - * means disable. - * @member {string} [subnet.routeTable.provisioningState] The provisioning - * state of the resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * @member {string} [subnet.routeTable.etag] Gets a unique read-only string - * that changes whenever the resource is updated. - * @member {array} [subnet.serviceEndpoints] An array of service endpoints. - * @member {array} [subnet.serviceEndpointPolicies] An array of service - * endpoint policies. - * @member {array} [subnet.interfaceEndpoints] An array of references to - * interface endpoints - * @member {array} [subnet.ipConfigurations] Gets an array of references to the - * network interface IP configurations using subnet. - * @member {array} [subnet.resourceNavigationLinks] Gets an array of references - * to the external resources using subnet. - * @member {array} [subnet.delegations] Gets an array of references to the - * delegations on the subnet. - * @member {string} [subnet.purpose] A read-only string identifying the - * intention of use for this subnet based on delegations and other user-defined - * properties. - * @member {string} [subnet.provisioningState] The provisioning state of the - * resource. - * @member {string} [subnet.name] The name of the resource that is unique - * within a resource group. This name can be used to access the resource. - * @member {string} [subnet.etag] A unique read-only string that changes - * whenever the resource is updated. - * @member {string} [provisioningState] The provisioning state of the resource. - * @member {string} [name] The name of the resource. This name can be used to - * access the resource. - * @member {string} [type] Sub Resource type. - * @member {string} [etag] A unique read-only string that changes whenever the - * resource is updated. - */ -export interface IPConfigurationProfile extends SubResource { - subnet?: Subnet; - readonly provisioningState?: string; - name?: string; - readonly type?: string; - etag?: string; -} - /** * @class * Initializes a new instance of the ContainerNetworkInterfaceConfiguration class. @@ -8827,6 +8958,8 @@ export interface LocalNetworkGateway extends Resource { * @member {string} connectionType Gateway connection type. Possible values * are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values * include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' + * @member {string} [connectionProtocol] Connection protocol used for this + * connection. Possible values include: 'IKEv2', 'IKEv1' * @member {number} [routingWeight] The routing weight. * @member {string} [sharedKey] The IPSec shared key. * @member {string} [connectionStatus] Virtual network Gateway connection @@ -8862,6 +8995,7 @@ export interface VirtualNetworkGatewayConnection extends Resource { virtualNetworkGateway2?: VirtualNetworkGateway; localNetworkGateway2?: LocalNetworkGateway; connectionType: string; + connectionProtocol?: string; routingWeight?: number; sharedKey?: string; readonly connectionStatus?: string; @@ -8978,6 +9112,8 @@ export interface VirtualNetworkConnectionGatewayReference { * @member {string} connectionType Gateway connection type. Possible values * are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values * include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' + * @member {string} [connectionProtocol] Connection protocol used for this + * connection. Possible values include: 'IKEv2', 'IKEv1' * @member {number} [routingWeight] The routing weight. * @member {string} [sharedKey] The IPSec shared key. * @member {string} [connectionStatus] Virtual network Gateway connection @@ -9013,6 +9149,7 @@ export interface VirtualNetworkGatewayConnectionListEntity extends Resource { virtualNetworkGateway2?: VirtualNetworkConnectionGatewayReference; localNetworkGateway2?: VirtualNetworkConnectionGatewayReference; connectionType: string; + connectionProtocol?: string; routingWeight?: number; sharedKey?: string; readonly connectionStatus?: string; @@ -9045,6 +9182,148 @@ export interface VpnDeviceScriptParameters { firmwareVersion?: string; } +/** + * @class + * Initializes a new instance of the P2SVpnServerConfigVpnClientRootCertificate class. + * @constructor + * VPN client root certificate of P2SVpnServerConfiguration. + * + * @member {string} publicCertData The certificate public data. + * @member {string} [provisioningState] The provisioning state of the + * P2SVpnServerConfiguration VPN client root certificate resource. Possible + * values are: 'Updating', 'Deleting', and 'Failed'. + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever the + * resource is updated. + */ +export interface P2SVpnServerConfigVpnClientRootCertificate extends SubResource { + publicCertData: string; + readonly provisioningState?: string; + name?: string; + etag?: string; +} + +/** + * @class + * Initializes a new instance of the P2SVpnServerConfigVpnClientRevokedCertificate class. + * @constructor + * VPN client revoked certificate of P2SVpnServerConfiguration. + * + * @member {string} [thumbprint] The revoked VPN client certificate thumbprint. + * @member {string} [provisioningState] The provisioning state of the VPN + * client revoked certificate resource. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever the + * resource is updated. + */ +export interface P2SVpnServerConfigVpnClientRevokedCertificate extends SubResource { + thumbprint?: string; + readonly provisioningState?: string; + name?: string; + etag?: string; +} + +/** + * @class + * Initializes a new instance of the P2SVpnServerConfigRadiusServerRootCertificate class. + * @constructor + * Radius Server root certificate of P2SVpnServerConfiguration. + * + * @member {string} publicCertData The certificate public data. + * @member {string} [provisioningState] The provisioning state of the + * P2SVpnServerConfiguration Radius Server root certificate resource. Possible + * values are: 'Updating', 'Deleting', and 'Failed'. + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever the + * resource is updated. + */ +export interface P2SVpnServerConfigRadiusServerRootCertificate extends SubResource { + publicCertData: string; + readonly provisioningState?: string; + name?: string; + etag?: string; +} + +/** + * @class + * Initializes a new instance of the P2SVpnServerConfigRadiusClientRootCertificate class. + * @constructor + * Radius client root certificate of P2SVpnServerConfiguration. + * + * @member {string} [thumbprint] The Radius client root certificate thumbprint. + * @member {string} [provisioningState] The provisioning state of the Radius + * client root certificate resource. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever the + * resource is updated. + */ +export interface P2SVpnServerConfigRadiusClientRootCertificate extends SubResource { + thumbprint?: string; + readonly provisioningState?: string; + name?: string; + etag?: string; +} + +/** + * @class + * Initializes a new instance of the P2SVpnServerConfiguration class. + * @constructor + * P2SVpnServerConfiguration Resource. + * + * @member {string} [p2SVpnServerConfigurationPropertiesName] The name of the + * P2SVpnServerConfiguration that is unique within a VirtualWan in a resource + * group. This name can be used to access the resource along with Paren + * VirtualWan resource name. + * @member {array} [vpnProtocols] vpnProtocols for the + * P2SVpnServerConfiguration. + * @member {array} [p2SVpnServerConfigVpnClientRootCertificates] VPN client + * root certificate of P2SVpnServerConfiguration. + * @member {array} [p2SVpnServerConfigVpnClientRevokedCertificates] VPN client + * revoked certificate of P2SVpnServerConfiguration. + * @member {array} [p2SVpnServerConfigRadiusServerRootCertificates] Radius + * Server root certificate of P2SVpnServerConfiguration. + * @member {array} [p2SVpnServerConfigRadiusClientRootCertificates] Radius + * client root certificate of P2SVpnServerConfiguration. + * @member {array} [vpnClientIpsecPolicies] VpnClientIpsecPolicies for + * P2SVpnServerConfiguration. + * @member {string} [radiusServerAddress] The radius server address property of + * the P2SVpnServerConfiguration resource for point to site client connection. + * @member {string} [radiusServerSecret] The radius secret property of the + * P2SVpnServerConfiguration resource for for point to site client connection. + * @member {string} [provisioningState] The provisioning state of the + * P2SVpnServerConfiguration resource. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. + * @member {array} [p2SVpnGateways] + * @member {string} [p2SVpnServerConfigurationPropertiesEtag] A unique + * read-only string that changes whenever the resource is updated. + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] Gets a unique read-only string that changes whenever + * the resource is updated. + */ +export interface P2SVpnServerConfiguration extends SubResource { + p2SVpnServerConfigurationPropertiesName?: string; + vpnProtocols?: string[]; + p2SVpnServerConfigVpnClientRootCertificates?: P2SVpnServerConfigVpnClientRootCertificate[]; + p2SVpnServerConfigVpnClientRevokedCertificates?: P2SVpnServerConfigVpnClientRevokedCertificate[]; + p2SVpnServerConfigRadiusServerRootCertificates?: P2SVpnServerConfigRadiusServerRootCertificate[]; + p2SVpnServerConfigRadiusClientRootCertificates?: P2SVpnServerConfigRadiusClientRootCertificate[]; + vpnClientIpsecPolicies?: IpsecPolicy[]; + radiusServerAddress?: string; + radiusServerSecret?: string; + readonly provisioningState?: string; + readonly p2SVpnGateways?: SubResource[]; + p2SVpnServerConfigurationPropertiesEtag?: string; + name?: string; + readonly etag?: string; +} + /** * @class * Initializes a new instance of the VirtualWAN class. @@ -9055,6 +9334,16 @@ export interface VpnDeviceScriptParameters { * not. * @member {array} [virtualHubs] List of VirtualHubs in the VirtualWAN. * @member {array} [vpnSites] + * @member {string} [securityProviderName] The Security Provider name. + * @member {boolean} [allowBranchToBranchTraffic] True if branch to branch + * traffic is allowed. + * @member {boolean} [allowVnetToVnetTraffic] True if Vnet to Vnet traffic is + * allowed. + * @member {string} [office365LocalBreakoutCategory] The office local breakout + * category. Possible values include: 'Optimize', 'OptimizeAndAllow', 'All', + * 'None' + * @member {array} [p2SVpnServerConfigurations] list of all + * P2SVpnServerConfigurations associated with the virtual wan. * @member {string} [provisioningState] The provisioning state of the resource. * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' * @member {string} [etag] Gets a unique read-only string that changes whenever @@ -9064,6 +9353,11 @@ export interface VirtualWAN extends Resource { disableVpnEncryption?: boolean; readonly virtualHubs?: SubResource[]; readonly vpnSites?: SubResource[]; + securityProviderName?: string; + allowBranchToBranchTraffic?: boolean; + allowVnetToVnetTraffic?: boolean; + office365LocalBreakoutCategory?: string; + p2SVpnServerConfigurations?: P2SVpnServerConfiguration[]; provisioningState?: string; readonly etag?: string; } @@ -9090,8 +9384,8 @@ export interface DeviceProperties { * @constructor * VpnSite Resource. * - * @member {object} [virtualWAN] The VirtualWAN to which the vpnSite belongs - * @member {string} [virtualWAN.id] Resource ID. + * @member {object} [virtualWan] The VirtualWAN to which the vpnSite belongs + * @member {string} [virtualWan.id] Resource ID. * @member {object} [deviceProperties] The device properties * @member {string} [deviceProperties.deviceVendor] Name of the device Vendor. * @member {string} [deviceProperties.deviceModel] Model of the device. @@ -9111,17 +9405,19 @@ export interface DeviceProperties { * learned from this BGP speaker. * @member {string} [provisioningState] The provisioning state of the resource. * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + * @member {boolean} [isSecuritySite] IsSecuritySite flag * @member {string} [etag] Gets a unique read-only string that changes whenever * the resource is updated. */ export interface VpnSite extends Resource { - virtualWAN?: SubResource; + virtualWan?: SubResource; deviceProperties?: DeviceProperties; ipAddress?: string; siteKey?: string; addressSpace?: AddressSpace; bgpProperties?: BgpSettings; provisioningState?: string; + isSecuritySite?: boolean; readonly etag?: string; } @@ -9137,7 +9433,7 @@ export interface VpnSite extends Resource { * configurations for vpn-sites */ export interface GetVpnSitesConfigurationRequest { - vpnSites?: SubResource[]; + vpnSites?: string[]; outputBlobSasUrl?: string; } @@ -9154,19 +9450,50 @@ export interface GetVpnSitesConfigurationRequest { * transit to enabled or not. * @member {boolean} [allowRemoteVnetToUseHubVnetGateways] Allow RemoteVnet to * use Virtual Hub's gateways. + * @member {boolean} [enableInternetSecurity] Enable internet security * @member {string} [provisioningState] The provisioning state of the resource. * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. * @member {string} [etag] Gets a unique read-only string that changes whenever * the resource is updated. */ -export interface HubVirtualNetworkConnection extends Resource { +export interface HubVirtualNetworkConnection extends SubResource { remoteVirtualNetwork?: SubResource; allowHubToRemoteVnetTransit?: boolean; allowRemoteVnetToUseHubVnetGateways?: boolean; + enableInternetSecurity?: boolean; provisioningState?: string; + name?: string; readonly etag?: string; } +/** + * @class + * Initializes a new instance of the VirtualHubRoute class. + * @constructor + * VirtualHub route + * + * @member {array} [addressPrefixes] list of all addressPrefixes. + * @member {string} [nextHopIpAddress] NextHop ip address. + */ +export interface VirtualHubRoute { + addressPrefixes?: string[]; + nextHopIpAddress?: string; +} + +/** + * @class + * Initializes a new instance of the VirtualHubRouteTable class. + * @constructor + * VirtualHub route table + * + * @member {array} [routes] list of all routes. + */ +export interface VirtualHubRouteTable { + routes?: VirtualHubRoute[]; +} + /** * @class * Initializes a new instance of the VirtualHub class. @@ -9175,9 +9502,20 @@ export interface HubVirtualNetworkConnection extends Resource { * * @member {object} [virtualWan] The VirtualWAN to which the VirtualHub belongs * @member {string} [virtualWan.id] Resource ID. - * @member {array} [hubVirtualNetworkConnections] list of all vnet connections + * @member {object} [vpnGateway] The VpnGateway associated with this VirtualHub + * @member {string} [vpnGateway.id] Resource ID. + * @member {object} [p2SVpnGateway] The P2SVpnGateway associated with this + * VirtualHub + * @member {string} [p2SVpnGateway.id] Resource ID. + * @member {object} [expressRouteGateway] The expressRouteGateway associated + * with this VirtualHub + * @member {string} [expressRouteGateway.id] Resource ID. + * @member {array} [virtualNetworkConnections] list of all vnet connections * with this VirtualHub. * @member {string} [addressPrefix] Address-prefix for this VirtualHub. + * @member {object} [routeTable] The routeTable associated with this virtual + * hub. + * @member {array} [routeTable.routes] list of all routes. * @member {string} [provisioningState] The provisioning state of the resource. * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' * @member {string} [etag] Gets a unique read-only string that changes whenever @@ -9185,8 +9523,12 @@ export interface HubVirtualNetworkConnection extends Resource { */ export interface VirtualHub extends Resource { virtualWan?: SubResource; - hubVirtualNetworkConnections?: HubVirtualNetworkConnection[]; + vpnGateway?: SubResource; + p2SVpnGateway?: SubResource; + expressRouteGateway?: SubResource; + virtualNetworkConnections?: HubVirtualNetworkConnection[]; addressPrefix?: string; + routeTable?: VirtualHubRouteTable; provisioningState?: string; readonly etag?: string; } @@ -9202,48 +9544,42 @@ export interface VirtualHub extends Resource { * @member {number} [routingWeight] routing weight for vpn connection. * @member {string} [connectionStatus] The connection status. Possible values * include: 'Unknown', 'Connecting', 'Connected', 'NotConnected' + * @member {string} [vpnConnectionProtocolType] Connection protocol used for + * this connection. Possible values include: 'IKEv2', 'IKEv1' * @member {number} [ingressBytesTransferred] Ingress bytes transferred. * @member {number} [egressBytesTransferred] Egress bytes transferred. - * @member {number} [connectionBandwidthInMbps] Expected bandwidth in MBPS. + * @member {number} [connectionBandwidth] Expected bandwidth in MBPS. * @member {string} [sharedKey] SharedKey for the vpn connection. * @member {boolean} [enableBgp] EnableBgp flag * @member {array} [ipsecPolicies] The IPSec Policies to be considered by this * connection. + * @member {boolean} [enableRateLimiting] EnableBgp flag + * @member {boolean} [enableInternetSecurity] Enable internet security * @member {string} [provisioningState] The provisioning state of the resource. * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. * @member {string} [etag] Gets a unique read-only string that changes whenever * the resource is updated. */ -export interface VpnConnection extends Resource { +export interface VpnConnection extends SubResource { remoteVpnSite?: SubResource; routingWeight?: number; connectionStatus?: string; + vpnConnectionProtocolType?: string; readonly ingressBytesTransferred?: number; readonly egressBytesTransferred?: number; - readonly connectionBandwidthInMbps?: number; + connectionBandwidth?: number; sharedKey?: string; enableBgp?: boolean; ipsecPolicies?: IpsecPolicy[]; + enableRateLimiting?: boolean; + enableInternetSecurity?: boolean; provisioningState?: string; + name?: string; readonly etag?: string; } -/** - * @class - * Initializes a new instance of the Policies class. - * @constructor - * Policies for vpn gateway. - * - * @member {boolean} [allowBranchToBranchTraffic] True if branch to branch - * traffic is allowed. - * @member {boolean} [allowVnetToVnetTraffic] True if Vnet to Vnet traffic is - * allowed. - */ -export interface Policies { - allowBranchToBranchTraffic?: boolean; - allowVnetToVnetTraffic?: boolean; -} - /** * @class * Initializes a new instance of the VpnGateway class. @@ -9261,11 +9597,7 @@ export interface Policies { * from this BGP speaker. * @member {string} [provisioningState] The provisioning state of the resource. * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' - * @member {object} [policies] The policies applied to this vpn gateway. - * @member {boolean} [policies.allowBranchToBranchTraffic] True if branch to - * branch traffic is allowed. - * @member {boolean} [policies.allowVnetToVnetTraffic] True if Vnet to Vnet - * traffic is allowed. + * @member {number} [vpnGatewayScaleUnit] The scale unit for this vpn gateway. * @member {string} [etag] Gets a unique read-only string that changes whenever * the resource is updated. */ @@ -9274,7 +9606,7 @@ export interface VpnGateway extends Resource { connections?: VpnConnection[]; bgpSettings?: BgpSettings; provisioningState?: string; - policies?: Policies; + vpnGatewayScaleUnit?: number; readonly etag?: string; } @@ -9291,6 +9623,125 @@ export interface VpnSiteId { readonly vpnSite?: string; } +/** + * @class + * Initializes a new instance of the VirtualWanSecurityProvider class. + * @constructor + * Collection of SecurityProviders. + * + * @member {string} [name] Name of the security provider. + * @member {string} [url] Url of the security provider. + * @member {string} [type] Name of the security provider. Possible values + * include: 'External', 'Native' + */ +export interface VirtualWanSecurityProvider { + name?: string; + url?: string; + type?: string; +} + +/** + * @class + * Initializes a new instance of the VirtualWanSecurityProviders class. + * @constructor + * Collection of SecurityProviders. + * + * @member {array} [supportedProviders] + */ +export interface VirtualWanSecurityProviders { + supportedProviders?: VirtualWanSecurityProvider[]; +} + +/** + * @class + * Initializes a new instance of the VpnClientConnectionHealth class. + * @constructor + * VpnClientConnectionHealth properties + * + * @member {number} [totalIngressBytesTransferred] Total of the Ingress Bytes + * Transferred in this P2S Vpn connection + * @member {number} [totalEgressBytesTransferred] Total of the Egress Bytes + * Transferred in this connection + * @member {number} [vpnClientConnectionsCount] The total of p2s vpn clients + * connected at this time to this P2SVpnGateway. + * @member {array} [allocatedIpAddresses] List of allocated ip addresses to the + * connected p2s vpn clients. + */ +export interface VpnClientConnectionHealth { + readonly totalIngressBytesTransferred?: number; + readonly totalEgressBytesTransferred?: number; + vpnClientConnectionsCount?: number; + allocatedIpAddresses?: string[]; +} + +/** + * @class + * Initializes a new instance of the P2SVpnGateway class. + * @constructor + * P2SVpnGateway Resource. + * + * @member {object} [virtualHub] The VirtualHub to which the gateway belongs + * @member {string} [virtualHub.id] Resource ID. + * @member {string} [provisioningState] The provisioning state of the resource. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed' + * @member {number} [vpnGatewayScaleUnit] The scale unit for this p2s vpn + * gateway. + * @member {object} [p2SVpnServerConfiguration] The P2SVpnServerConfiguration + * to which the p2sVpnGateway is attached to. + * @member {string} [p2SVpnServerConfiguration.id] Resource ID. + * @member {object} [vpnClientAddressPool] The reference of the address space + * resource which represents Address space for P2S VpnClient. + * @member {array} [vpnClientAddressPool.addressPrefixes] A list of address + * blocks reserved for this virtual network in CIDR notation. + * @member {object} [vpnClientConnectionHealth] All P2S vpnclients' connection + * health status. + * @member {number} [vpnClientConnectionHealth.totalIngressBytesTransferred] + * Total of the Ingress Bytes Transferred in this P2S Vpn connection + * @member {number} [vpnClientConnectionHealth.totalEgressBytesTransferred] + * Total of the Egress Bytes Transferred in this connection + * @member {number} [vpnClientConnectionHealth.vpnClientConnectionsCount] The + * total of p2s vpn clients connected at this time to this P2SVpnGateway. + * @member {array} [vpnClientConnectionHealth.allocatedIpAddresses] List of + * allocated ip addresses to the connected p2s vpn clients. + * @member {string} [etag] Gets a unique read-only string that changes whenever + * the resource is updated. + */ +export interface P2SVpnGateway extends Resource { + virtualHub?: SubResource; + provisioningState?: string; + vpnGatewayScaleUnit?: number; + p2SVpnServerConfiguration?: SubResource; + vpnClientAddressPool?: AddressSpace; + readonly vpnClientConnectionHealth?: VpnClientConnectionHealth; + readonly etag?: string; +} + +/** + * @class + * Initializes a new instance of the P2SVpnProfileParameters class. + * @constructor + * Vpn Client Parameters for package generation + * + * @member {string} [authenticationMethod] VPN client Authentication Method. + * Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: + * 'EAPTLS', 'EAPMSCHAPv2' + */ +export interface P2SVpnProfileParameters { + authenticationMethod?: string; +} + +/** + * @class + * Initializes a new instance of the VpnProfileResponse class. + * @constructor + * Vpn Profile Response for package generation + * + * @member {string} [profileUrl] URL to the VPN profile + */ +export interface VpnProfileResponse { + profileUrl?: string; +} + /** * @class @@ -9992,3 +10443,32 @@ export interface ListVpnGatewaysResult extends Array { export interface ListVpnConnectionsResult extends Array { nextLink?: string; } + +/** + * @class + * Initializes a new instance of the ListP2SVpnServerConfigurationsResult class. + * @constructor + * Result of the request to list all P2SVpnServerConfigurations associated to a + * VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL + * nextLink to get the next set of results. + * + * @member {string} [nextLink] URL to get the next set of operation list + * results if there are any. + */ +export interface ListP2SVpnServerConfigurationsResult extends Array { + nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the ListP2SVpnGatewaysResult class. + * @constructor + * Result of the request to list P2SVpnGateways. It contains a list of + * P2SVpnGateways and a URL nextLink to get the next set of results. + * + * @member {string} [nextLink] URL to get the next set of operation list + * results if there are any. + */ +export interface ListP2SVpnGatewaysResult extends Array { + nextLink?: string; +} diff --git a/lib/services/networkManagement2/lib/models/index.js b/lib/services/networkManagement2/lib/models/index.js index e8f10d108b..e4968ddb8b 100644 --- a/lib/services/networkManagement2/lib/models/index.js +++ b/lib/services/networkManagement2/lib/models/index.js @@ -38,7 +38,9 @@ exports.PublicIPAddressDnsSettings = require('./publicIPAddressDnsSettings'); exports.IpTag = require('./ipTag'); exports.PublicIPAddress = require('./publicIPAddress'); exports.IPConfiguration = require('./iPConfiguration'); +exports.IPConfigurationProfile = require('./iPConfigurationProfile'); exports.ResourceNavigationLink = require('./resourceNavigationLink'); +exports.ServiceAssociationLink = require('./serviceAssociationLink'); exports.Delegation = require('./delegation'); exports.Subnet = require('./subnet'); exports.FrontendIPConfiguration = require('./frontendIPConfiguration'); @@ -71,7 +73,6 @@ exports.ApplicationGatewayRedirectConfiguration = require('./applicationGatewayR exports.ApplicationGatewayUrlPathMap = require('./applicationGatewayUrlPathMap'); exports.ApplicationGatewayFirewallDisabledRuleGroup = require('./applicationGatewayFirewallDisabledRuleGroup'); exports.ApplicationGatewayWebApplicationFirewallConfiguration = require('./applicationGatewayWebApplicationFirewallConfiguration'); -exports.ApplicationGatewayAutoscaleBounds = require('./applicationGatewayAutoscaleBounds'); exports.ApplicationGatewayAutoscaleConfiguration = require('./applicationGatewayAutoscaleConfiguration'); exports.ApplicationGateway = require('./applicationGateway'); exports.ApplicationGatewayFirewallRule = require('./applicationGatewayFirewallRule'); @@ -145,7 +146,6 @@ exports.EffectiveNetworkSecurityGroup = require('./effectiveNetworkSecurityGroup exports.EffectiveNetworkSecurityGroupListResult = require('./effectiveNetworkSecurityGroupListResult'); exports.EffectiveRoute = require('./effectiveRoute'); exports.EffectiveRouteListResult = require('./effectiveRouteListResult'); -exports.IPConfigurationProfile = require('./iPConfigurationProfile'); exports.ContainerNetworkInterfaceConfiguration = require('./containerNetworkInterfaceConfiguration'); exports.Container = require('./container'); exports.ContainerNetworkInterfaceIpConfiguration = require('./containerNetworkInterfaceIpConfiguration'); @@ -262,16 +262,28 @@ exports.VpnClientIPsecParameters = require('./vpnClientIPsecParameters'); exports.VirtualNetworkConnectionGatewayReference = require('./virtualNetworkConnectionGatewayReference'); exports.VirtualNetworkGatewayConnectionListEntity = require('./virtualNetworkGatewayConnectionListEntity'); exports.VpnDeviceScriptParameters = require('./vpnDeviceScriptParameters'); +exports.P2SVpnServerConfigVpnClientRootCertificate = require('./p2SVpnServerConfigVpnClientRootCertificate'); +exports.P2SVpnServerConfigVpnClientRevokedCertificate = require('./p2SVpnServerConfigVpnClientRevokedCertificate'); +exports.P2SVpnServerConfigRadiusServerRootCertificate = require('./p2SVpnServerConfigRadiusServerRootCertificate'); +exports.P2SVpnServerConfigRadiusClientRootCertificate = require('./p2SVpnServerConfigRadiusClientRootCertificate'); +exports.P2SVpnServerConfiguration = require('./p2SVpnServerConfiguration'); exports.VirtualWAN = require('./virtualWAN'); exports.DeviceProperties = require('./deviceProperties'); exports.VpnSite = require('./vpnSite'); exports.GetVpnSitesConfigurationRequest = require('./getVpnSitesConfigurationRequest'); exports.HubVirtualNetworkConnection = require('./hubVirtualNetworkConnection'); +exports.VirtualHubRoute = require('./virtualHubRoute'); +exports.VirtualHubRouteTable = require('./virtualHubRouteTable'); exports.VirtualHub = require('./virtualHub'); exports.VpnConnection = require('./vpnConnection'); -exports.Policies = require('./policies'); exports.VpnGateway = require('./vpnGateway'); exports.VpnSiteId = require('./vpnSiteId'); +exports.VirtualWanSecurityProvider = require('./virtualWanSecurityProvider'); +exports.VirtualWanSecurityProviders = require('./virtualWanSecurityProviders'); +exports.VpnClientConnectionHealth = require('./vpnClientConnectionHealth'); +exports.P2SVpnGateway = require('./p2SVpnGateway'); +exports.P2SVpnProfileParameters = require('./p2SVpnProfileParameters'); +exports.VpnProfileResponse = require('./vpnProfileResponse'); exports.ApplicationGatewayListResult = require('./applicationGatewayListResult'); exports.ApplicationGatewayAvailableSslPredefinedPolicies = require('./applicationGatewayAvailableSslPredefinedPolicies'); exports.ApplicationSecurityGroupListResult = require('./applicationSecurityGroupListResult'); @@ -329,3 +341,5 @@ exports.ListVirtualHubsResult = require('./listVirtualHubsResult'); exports.ListHubVirtualNetworkConnectionsResult = require('./listHubVirtualNetworkConnectionsResult'); exports.ListVpnGatewaysResult = require('./listVpnGatewaysResult'); exports.ListVpnConnectionsResult = require('./listVpnConnectionsResult'); +exports.ListP2SVpnServerConfigurationsResult = require('./listP2SVpnServerConfigurationsResult'); +exports.ListP2SVpnGatewaysResult = require('./listP2SVpnGatewaysResult'); diff --git a/lib/services/networkManagement2/lib/models/interfaceEndpoint.js b/lib/services/networkManagement2/lib/models/interfaceEndpoint.js index 90aaa98901..9b387fa96e 100644 --- a/lib/services/networkManagement2/lib/models/interfaceEndpoint.js +++ b/lib/services/networkManagement2/lib/models/interfaceEndpoint.js @@ -33,6 +33,9 @@ class InterfaceEndpoint extends models['Resource'] { * network interfaces created for this interface endpoint. * @member {string} [owner] A read-only property that identifies who created * this interface endpoint. + * @member {string} [provisioningState] The provisioning state of the + * interface endpoint. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. * @member {string} [etag] Gets a unique read-only string that changes * whenever the resource is updated. */ @@ -144,6 +147,14 @@ class InterfaceEndpoint extends models['Resource'] { name: 'String' } }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, etag: { required: false, serializedName: 'etag', diff --git a/lib/services/networkManagement2/lib/models/listP2SVpnGatewaysResult.js b/lib/services/networkManagement2/lib/models/listP2SVpnGatewaysResult.js new file mode 100644 index 0000000000..ce6911aa72 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/listP2SVpnGatewaysResult.js @@ -0,0 +1,69 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Result of the request to list P2SVpnGateways. It contains a list of + * P2SVpnGateways and a URL nextLink to get the next set of results. + */ +class ListP2SVpnGatewaysResult extends Array { + /** + * Create a ListP2SVpnGatewaysResult. + * @member {string} [nextLink] URL to get the next set of operation list + * results if there are any. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ListP2SVpnGatewaysResult + * + * @returns {object} metadata of ListP2SVpnGatewaysResult + * + */ + mapper() { + return { + required: false, + serializedName: 'ListP2SVpnGatewaysResult', + type: { + name: 'Composite', + className: 'ListP2SVpnGatewaysResult', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'P2SVpnGatewayElementType', + type: { + name: 'Composite', + className: 'P2SVpnGateway' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ListP2SVpnGatewaysResult; diff --git a/lib/services/networkManagement2/lib/models/listP2SVpnServerConfigurationsResult.js b/lib/services/networkManagement2/lib/models/listP2SVpnServerConfigurationsResult.js new file mode 100644 index 0000000000..0c4df250da --- /dev/null +++ b/lib/services/networkManagement2/lib/models/listP2SVpnServerConfigurationsResult.js @@ -0,0 +1,70 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Result of the request to list all P2SVpnServerConfigurations associated to a + * VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL + * nextLink to get the next set of results. + */ +class ListP2SVpnServerConfigurationsResult extends Array { + /** + * Create a ListP2SVpnServerConfigurationsResult. + * @member {string} [nextLink] URL to get the next set of operation list + * results if there are any. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ListP2SVpnServerConfigurationsResult + * + * @returns {object} metadata of ListP2SVpnServerConfigurationsResult + * + */ + mapper() { + return { + required: false, + serializedName: 'ListP2SVpnServerConfigurationsResult', + type: { + name: 'Composite', + className: 'ListP2SVpnServerConfigurationsResult', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'P2SVpnServerConfigurationElementType', + type: { + name: 'Composite', + className: 'P2SVpnServerConfiguration' + } + } + } + }, + nextLink: { + required: false, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ListP2SVpnServerConfigurationsResult; diff --git a/lib/services/networkManagement2/lib/models/networkInterface.js b/lib/services/networkManagement2/lib/models/networkInterface.js index cf4f1d025d..73fad227ac 100644 --- a/lib/services/networkManagement2/lib/models/networkInterface.js +++ b/lib/services/networkManagement2/lib/models/networkInterface.js @@ -54,6 +54,9 @@ class NetworkInterface extends models['Resource'] { * references to the network interfaces created for this interface endpoint. * @member {string} [interfaceEndpoint.owner] A read-only property that * identifies who created this interface endpoint. + * @member {string} [interfaceEndpoint.provisioningState] The provisioning + * state of the interface endpoint. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. * @member {string} [interfaceEndpoint.etag] Gets a unique read-only string * that changes whenever the resource is updated. * @member {array} [ipConfigurations] A list of IPConfigurations of the @@ -177,6 +180,7 @@ class NetworkInterface extends models['Resource'] { }, interfaceEndpoint: { required: false, + readOnly: true, serializedName: 'properties.interfaceEndpoint', type: { name: 'Composite', diff --git a/lib/services/networkManagement2/lib/models/networkInterfaceIPConfiguration.js b/lib/services/networkManagement2/lib/models/networkInterfaceIPConfiguration.js index 2dc1d19945..b63537f8d3 100644 --- a/lib/services/networkManagement2/lib/models/networkInterfaceIPConfiguration.js +++ b/lib/services/networkManagement2/lib/models/networkInterfaceIPConfiguration.js @@ -79,8 +79,12 @@ class NetworkInterfaceIPConfiguration extends models['SubResource'] { * interface endpoints * @member {array} [subnet.ipConfigurations] Gets an array of references to * the network interface IP configurations using subnet. + * @member {array} [subnet.ipConfigurationProfiles] Array of IP configuration + * profiles which reference this subnet. * @member {array} [subnet.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. + * @member {array} [subnet.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. * @member {array} [subnet.delegations] Gets an array of references to the * delegations on the subnet. * @member {string} [subnet.purpose] A read-only string identifying the @@ -174,8 +178,14 @@ class NetworkInterfaceIPConfiguration extends models['SubResource'] { * Gets an array of references to the network interface IP configurations * using subnet. * @member {array} + * [publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] Array of + * IP configuration profiles which reference this subnet. + * @member {array} * [publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] Gets an * array of references to the external resources using subnet. + * @member {array} + * [publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] Gets an + * array of references to services injecting into this subnet. * @member {array} [publicIPAddress.ipConfiguration.subnet.delegations] Gets * an array of references to the delegations on the subnet. * @member {string} [publicIPAddress.ipConfiguration.subnet.purpose] A diff --git a/lib/services/networkManagement2/lib/models/networkInterfaceTapConfiguration.js b/lib/services/networkManagement2/lib/models/networkInterfaceTapConfiguration.js index 91f6bc344d..8194c5da80 100644 --- a/lib/services/networkManagement2/lib/models/networkInterfaceTapConfiguration.js +++ b/lib/services/networkManagement2/lib/models/networkInterfaceTapConfiguration.js @@ -25,6 +25,11 @@ class NetworkInterfaceTapConfiguration extends models['SubResource'] { * @member {array} [virtualNetworkTap.networkInterfaceTapConfigurations] * Specifies the list of resource IDs for the network interface IP * configuration that needs to be tapped. + * @member {string} [virtualNetworkTap.resourceGuid] The resourceGuid + * property of the virtual network tap. + * @member {string} [virtualNetworkTap.provisioningState] The provisioning + * state of the virtual network tap. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. * @member {object} * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration] The * reference to the private IP Address of the collector nic that will receive @@ -123,9 +128,15 @@ class NetworkInterfaceTapConfiguration extends models['SubResource'] { * Gets an array of references to the network interface IP configurations * using subnet. * @member {array} + * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -242,9 +253,15 @@ class NetworkInterfaceTapConfiguration extends models['SubResource'] { * Gets an array of references to the network interface IP configurations * using subnet. * @member {array} + * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [virtualNetworkTap.destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -431,9 +448,15 @@ class NetworkInterfaceTapConfiguration extends models['SubResource'] { * Gets an array of references to the network interface IP configurations * using subnet. * @member {array} + * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -547,9 +570,15 @@ class NetworkInterfaceTapConfiguration extends models['SubResource'] { * Gets an array of references to the network interface IP configurations * using subnet. * @member {array} + * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -655,6 +684,9 @@ class NetworkInterfaceTapConfiguration extends models['SubResource'] { * port that will receive the tapped traffic. * @member {string} [virtualNetworkTap.etag] Gets a unique read-only string * that changes whenever the resource is updated. + * @member {string} [provisioningState] The provisioning state of the network + * interface tap configuration. Possible values are: 'Updating', 'Deleting', + * and 'Failed'. * @member {string} [name] The name of the resource that is unique within a * resource group. This name can be used to access the resource. * @member {string} [etag] A unique read-only string that changes whenever @@ -694,6 +726,14 @@ class NetworkInterfaceTapConfiguration extends models['SubResource'] { className: 'VirtualNetworkTap' } }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, name: { required: false, serializedName: 'name', diff --git a/lib/services/networkManagement2/lib/models/p2SVpnGateway.js b/lib/services/networkManagement2/lib/models/p2SVpnGateway.js new file mode 100644 index 0000000000..0952f19a2c --- /dev/null +++ b/lib/services/networkManagement2/lib/models/p2SVpnGateway.js @@ -0,0 +1,173 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * P2SVpnGateway Resource. + * + * @extends models['Resource'] + */ +class P2SVpnGateway extends models['Resource'] { + /** + * Create a P2SVpnGateway. + * @member {object} [virtualHub] The VirtualHub to which the gateway belongs + * @member {string} [virtualHub.id] Resource ID. + * @member {string} [provisioningState] The provisioning state of the + * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', + * 'Failed' + * @member {number} [vpnGatewayScaleUnit] The scale unit for this p2s vpn + * gateway. + * @member {object} [p2SVpnServerConfiguration] The P2SVpnServerConfiguration + * to which the p2sVpnGateway is attached to. + * @member {string} [p2SVpnServerConfiguration.id] Resource ID. + * @member {object} [vpnClientAddressPool] The reference of the address space + * resource which represents Address space for P2S VpnClient. + * @member {array} [vpnClientAddressPool.addressPrefixes] A list of address + * blocks reserved for this virtual network in CIDR notation. + * @member {object} [vpnClientConnectionHealth] All P2S vpnclients' + * connection health status. + * @member {number} [vpnClientConnectionHealth.totalIngressBytesTransferred] + * Total of the Ingress Bytes Transferred in this P2S Vpn connection + * @member {number} [vpnClientConnectionHealth.totalEgressBytesTransferred] + * Total of the Egress Bytes Transferred in this connection + * @member {number} [vpnClientConnectionHealth.vpnClientConnectionsCount] The + * total of p2s vpn clients connected at this time to this P2SVpnGateway. + * @member {array} [vpnClientConnectionHealth.allocatedIpAddresses] List of + * allocated ip addresses to the connected p2s vpn clients. + * @member {string} [etag] Gets a unique read-only string that changes + * whenever the resource is updated. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of P2SVpnGateway + * + * @returns {object} metadata of P2SVpnGateway + * + */ + mapper() { + return { + required: false, + serializedName: 'P2SVpnGateway', + type: { + name: 'Composite', + className: 'P2SVpnGateway', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + virtualHub: { + required: false, + serializedName: 'properties.virtualHub', + type: { + name: 'Composite', + className: 'SubResource' + } + }, + provisioningState: { + required: false, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + vpnGatewayScaleUnit: { + required: false, + serializedName: 'properties.vpnGatewayScaleUnit', + type: { + name: 'Number' + } + }, + p2SVpnServerConfiguration: { + required: false, + serializedName: 'properties.p2SVpnServerConfiguration', + type: { + name: 'Composite', + className: 'SubResource' + } + }, + vpnClientAddressPool: { + required: false, + serializedName: 'properties.vpnClientAddressPool', + type: { + name: 'Composite', + className: 'AddressSpace' + } + }, + vpnClientConnectionHealth: { + required: false, + readOnly: true, + serializedName: 'properties.vpnClientConnectionHealth', + type: { + name: 'Composite', + className: 'VpnClientConnectionHealth' + } + }, + etag: { + required: false, + readOnly: true, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = P2SVpnGateway; diff --git a/lib/services/networkManagement2/lib/models/p2SVpnProfileParameters.js b/lib/services/networkManagement2/lib/models/p2SVpnProfileParameters.js new file mode 100644 index 0000000000..050b8ec698 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/p2SVpnProfileParameters.js @@ -0,0 +1,54 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Vpn Client Parameters for package generation + * + */ +class P2SVpnProfileParameters { + /** + * Create a P2SVpnProfileParameters. + * @member {string} [authenticationMethod] VPN client Authentication Method. + * Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values include: + * 'EAPTLS', 'EAPMSCHAPv2' + */ + constructor() { + } + + /** + * Defines the metadata of P2SVpnProfileParameters + * + * @returns {object} metadata of P2SVpnProfileParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'P2SVpnProfileParameters', + type: { + name: 'Composite', + className: 'P2SVpnProfileParameters', + modelProperties: { + authenticationMethod: { + required: false, + serializedName: 'authenticationMethod', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = P2SVpnProfileParameters; diff --git a/lib/services/networkManagement2/lib/models/p2SVpnServerConfigRadiusClientRootCertificate.js b/lib/services/networkManagement2/lib/models/p2SVpnServerConfigRadiusClientRootCertificate.js new file mode 100644 index 0000000000..b965aaede9 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/p2SVpnServerConfigRadiusClientRootCertificate.js @@ -0,0 +1,93 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Radius client root certificate of P2SVpnServerConfiguration. + * + * @extends models['SubResource'] + */ +class P2SVpnServerConfigRadiusClientRootCertificate extends models['SubResource'] { + /** + * Create a P2SVpnServerConfigRadiusClientRootCertificate. + * @member {string} [thumbprint] The Radius client root certificate + * thumbprint. + * @member {string} [provisioningState] The provisioning state of the Radius + * client root certificate resource. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever + * the resource is updated. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of P2SVpnServerConfigRadiusClientRootCertificate + * + * @returns {object} metadata of P2SVpnServerConfigRadiusClientRootCertificate + * + */ + mapper() { + return { + required: false, + serializedName: 'P2SVpnServerConfigRadiusClientRootCertificate', + type: { + name: 'Composite', + className: 'P2SVpnServerConfigRadiusClientRootCertificate', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + thumbprint: { + required: false, + serializedName: 'properties.thumbprint', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + etag: { + required: false, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = P2SVpnServerConfigRadiusClientRootCertificate; diff --git a/lib/services/networkManagement2/lib/models/p2SVpnServerConfigRadiusServerRootCertificate.js b/lib/services/networkManagement2/lib/models/p2SVpnServerConfigRadiusServerRootCertificate.js new file mode 100644 index 0000000000..94ccac982a --- /dev/null +++ b/lib/services/networkManagement2/lib/models/p2SVpnServerConfigRadiusServerRootCertificate.js @@ -0,0 +1,92 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Radius Server root certificate of P2SVpnServerConfiguration. + * + * @extends models['SubResource'] + */ +class P2SVpnServerConfigRadiusServerRootCertificate extends models['SubResource'] { + /** + * Create a P2SVpnServerConfigRadiusServerRootCertificate. + * @member {string} publicCertData The certificate public data. + * @member {string} [provisioningState] The provisioning state of the + * P2SVpnServerConfiguration Radius Server root certificate resource. + * Possible values are: 'Updating', 'Deleting', and 'Failed'. + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever + * the resource is updated. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of P2SVpnServerConfigRadiusServerRootCertificate + * + * @returns {object} metadata of P2SVpnServerConfigRadiusServerRootCertificate + * + */ + mapper() { + return { + required: false, + serializedName: 'P2SVpnServerConfigRadiusServerRootCertificate', + type: { + name: 'Composite', + className: 'P2SVpnServerConfigRadiusServerRootCertificate', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + publicCertData: { + required: true, + serializedName: 'properties.publicCertData', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + etag: { + required: false, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = P2SVpnServerConfigRadiusServerRootCertificate; diff --git a/lib/services/networkManagement2/lib/models/p2SVpnServerConfigVpnClientRevokedCertificate.js b/lib/services/networkManagement2/lib/models/p2SVpnServerConfigVpnClientRevokedCertificate.js new file mode 100644 index 0000000000..051c2b7a1d --- /dev/null +++ b/lib/services/networkManagement2/lib/models/p2SVpnServerConfigVpnClientRevokedCertificate.js @@ -0,0 +1,93 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * VPN client revoked certificate of P2SVpnServerConfiguration. + * + * @extends models['SubResource'] + */ +class P2SVpnServerConfigVpnClientRevokedCertificate extends models['SubResource'] { + /** + * Create a P2SVpnServerConfigVpnClientRevokedCertificate. + * @member {string} [thumbprint] The revoked VPN client certificate + * thumbprint. + * @member {string} [provisioningState] The provisioning state of the VPN + * client revoked certificate resource. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever + * the resource is updated. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of P2SVpnServerConfigVpnClientRevokedCertificate + * + * @returns {object} metadata of P2SVpnServerConfigVpnClientRevokedCertificate + * + */ + mapper() { + return { + required: false, + serializedName: 'P2SVpnServerConfigVpnClientRevokedCertificate', + type: { + name: 'Composite', + className: 'P2SVpnServerConfigVpnClientRevokedCertificate', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + thumbprint: { + required: false, + serializedName: 'properties.thumbprint', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + etag: { + required: false, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = P2SVpnServerConfigVpnClientRevokedCertificate; diff --git a/lib/services/networkManagement2/lib/models/p2SVpnServerConfigVpnClientRootCertificate.js b/lib/services/networkManagement2/lib/models/p2SVpnServerConfigVpnClientRootCertificate.js new file mode 100644 index 0000000000..2d8316a087 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/p2SVpnServerConfigVpnClientRootCertificate.js @@ -0,0 +1,92 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * VPN client root certificate of P2SVpnServerConfiguration. + * + * @extends models['SubResource'] + */ +class P2SVpnServerConfigVpnClientRootCertificate extends models['SubResource'] { + /** + * Create a P2SVpnServerConfigVpnClientRootCertificate. + * @member {string} publicCertData The certificate public data. + * @member {string} [provisioningState] The provisioning state of the + * P2SVpnServerConfiguration VPN client root certificate resource. Possible + * values are: 'Updating', 'Deleting', and 'Failed'. + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever + * the resource is updated. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of P2SVpnServerConfigVpnClientRootCertificate + * + * @returns {object} metadata of P2SVpnServerConfigVpnClientRootCertificate + * + */ + mapper() { + return { + required: false, + serializedName: 'P2SVpnServerConfigVpnClientRootCertificate', + type: { + name: 'Composite', + className: 'P2SVpnServerConfigVpnClientRootCertificate', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + publicCertData: { + required: true, + serializedName: 'properties.publicCertData', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + etag: { + required: false, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = P2SVpnServerConfigVpnClientRootCertificate; diff --git a/lib/services/networkManagement2/lib/models/p2SVpnServerConfiguration.js b/lib/services/networkManagement2/lib/models/p2SVpnServerConfiguration.js new file mode 100644 index 0000000000..ffb2ff5835 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/p2SVpnServerConfiguration.js @@ -0,0 +1,243 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * P2SVpnServerConfiguration Resource. + * + * @extends models['SubResource'] + */ +class P2SVpnServerConfiguration extends models['SubResource'] { + /** + * Create a P2SVpnServerConfiguration. + * @member {string} [p2SVpnServerConfigurationPropertiesName] The name of the + * P2SVpnServerConfiguration that is unique within a VirtualWan in a resource + * group. This name can be used to access the resource along with Paren + * VirtualWan resource name. + * @member {array} [vpnProtocols] vpnProtocols for the + * P2SVpnServerConfiguration. + * @member {array} [p2SVpnServerConfigVpnClientRootCertificates] VPN client + * root certificate of P2SVpnServerConfiguration. + * @member {array} [p2SVpnServerConfigVpnClientRevokedCertificates] VPN + * client revoked certificate of P2SVpnServerConfiguration. + * @member {array} [p2SVpnServerConfigRadiusServerRootCertificates] Radius + * Server root certificate of P2SVpnServerConfiguration. + * @member {array} [p2SVpnServerConfigRadiusClientRootCertificates] Radius + * client root certificate of P2SVpnServerConfiguration. + * @member {array} [vpnClientIpsecPolicies] VpnClientIpsecPolicies for + * P2SVpnServerConfiguration. + * @member {string} [radiusServerAddress] The radius server address property + * of the P2SVpnServerConfiguration resource for point to site client + * connection. + * @member {string} [radiusServerSecret] The radius secret property of the + * P2SVpnServerConfiguration resource for for point to site client + * connection. + * @member {string} [provisioningState] The provisioning state of the + * P2SVpnServerConfiguration resource. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. + * @member {array} [p2SVpnGateways] + * @member {string} [p2SVpnServerConfigurationPropertiesEtag] A unique + * read-only string that changes whenever the resource is updated. + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] Gets a unique read-only string that changes + * whenever the resource is updated. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of P2SVpnServerConfiguration + * + * @returns {object} metadata of P2SVpnServerConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'P2SVpnServerConfiguration', + type: { + name: 'Composite', + className: 'P2SVpnServerConfiguration', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + p2SVpnServerConfigurationPropertiesName: { + required: false, + serializedName: 'properties.name', + type: { + name: 'String' + } + }, + vpnProtocols: { + required: false, + serializedName: 'properties.vpnProtocols', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'VpnGatewayTunnelingProtocolElementType', + type: { + name: 'String' + } + } + } + }, + p2SVpnServerConfigVpnClientRootCertificates: { + required: false, + serializedName: 'properties.p2SVpnServerConfigVpnClientRootCertificates', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'P2SVpnServerConfigVpnClientRootCertificateElementType', + type: { + name: 'Composite', + className: 'P2SVpnServerConfigVpnClientRootCertificate' + } + } + } + }, + p2SVpnServerConfigVpnClientRevokedCertificates: { + required: false, + serializedName: 'properties.p2SVpnServerConfigVpnClientRevokedCertificates', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'P2SVpnServerConfigVpnClientRevokedCertificateElementType', + type: { + name: 'Composite', + className: 'P2SVpnServerConfigVpnClientRevokedCertificate' + } + } + } + }, + p2SVpnServerConfigRadiusServerRootCertificates: { + required: false, + serializedName: 'properties.p2SVpnServerConfigRadiusServerRootCertificates', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'P2SVpnServerConfigRadiusServerRootCertificateElementType', + type: { + name: 'Composite', + className: 'P2SVpnServerConfigRadiusServerRootCertificate' + } + } + } + }, + p2SVpnServerConfigRadiusClientRootCertificates: { + required: false, + serializedName: 'properties.p2SVpnServerConfigRadiusClientRootCertificates', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'P2SVpnServerConfigRadiusClientRootCertificateElementType', + type: { + name: 'Composite', + className: 'P2SVpnServerConfigRadiusClientRootCertificate' + } + } + } + }, + vpnClientIpsecPolicies: { + required: false, + serializedName: 'properties.vpnClientIpsecPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'IpsecPolicyElementType', + type: { + name: 'Composite', + className: 'IpsecPolicy' + } + } + } + }, + radiusServerAddress: { + required: false, + serializedName: 'properties.radiusServerAddress', + type: { + name: 'String' + } + }, + radiusServerSecret: { + required: false, + serializedName: 'properties.radiusServerSecret', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + p2SVpnGateways: { + required: false, + readOnly: true, + serializedName: 'properties.p2SVpnGateways', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SubResourceElementType', + type: { + name: 'Composite', + className: 'SubResource' + } + } + } + }, + p2SVpnServerConfigurationPropertiesEtag: { + required: false, + serializedName: 'properties.etag', + type: { + name: 'String' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + etag: { + required: false, + readOnly: true, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = P2SVpnServerConfiguration; diff --git a/lib/services/networkManagement2/lib/models/publicIPAddress.js b/lib/services/networkManagement2/lib/models/publicIPAddress.js index 39abe8ab6b..113c900ad2 100644 --- a/lib/services/networkManagement2/lib/models/publicIPAddress.js +++ b/lib/services/networkManagement2/lib/models/publicIPAddress.js @@ -87,8 +87,12 @@ class PublicIPAddress extends models['Resource'] { * references to interface endpoints * @member {array} [ipConfiguration.subnet.ipConfigurations] Gets an array of * references to the network interface IP configurations using subnet. + * @member {array} [ipConfiguration.subnet.ipConfigurationProfiles] Array of + * IP configuration profiles which reference this subnet. * @member {array} [ipConfiguration.subnet.resourceNavigationLinks] Gets an * array of references to the external resources using subnet. + * @member {array} [ipConfiguration.subnet.serviceAssociationLinks] Gets an + * array of references to services injecting into this subnet. * @member {array} [ipConfiguration.subnet.delegations] Gets an array of * references to the delegations on the subnet. * @member {string} [ipConfiguration.subnet.purpose] A read-only string diff --git a/lib/services/networkManagement2/lib/models/serviceAssociationLink.js b/lib/services/networkManagement2/lib/models/serviceAssociationLink.js new file mode 100644 index 0000000000..b89cea2271 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/serviceAssociationLink.js @@ -0,0 +1,101 @@ +/* + * 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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * ServiceAssociationLink resource. + * + * @extends models['SubResource'] + */ +class ServiceAssociationLink extends models['SubResource'] { + /** + * Create a ServiceAssociationLink. + * @member {string} [linkedResourceType] Resource type of the linked + * resource. + * @member {string} [link] Link to the external resource. + * @member {string} [provisioningState] Provisioning state of the + * ServiceAssociationLink resource. + * @member {string} [name] Name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever + * the resource is updated. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServiceAssociationLink + * + * @returns {object} metadata of ServiceAssociationLink + * + */ + mapper() { + return { + required: false, + serializedName: 'ServiceAssociationLink', + type: { + name: 'Composite', + className: 'ServiceAssociationLink', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + linkedResourceType: { + required: false, + serializedName: 'properties.linkedResourceType', + type: { + name: 'String' + } + }, + link: { + required: false, + serializedName: 'properties.link', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + etag: { + required: false, + readOnly: true, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServiceAssociationLink; diff --git a/lib/services/networkManagement2/lib/models/serviceEndpointPolicy.js b/lib/services/networkManagement2/lib/models/serviceEndpointPolicy.js index 8851f22a7b..8728b9005a 100644 --- a/lib/services/networkManagement2/lib/models/serviceEndpointPolicy.js +++ b/lib/services/networkManagement2/lib/models/serviceEndpointPolicy.js @@ -22,6 +22,7 @@ class ServiceEndpointPolicy extends models['Resource'] { * Create a ServiceEndpointPolicy. * @member {array} [serviceEndpointPolicyDefinitions] A collection of service * endpoint policy definitions of the service endpoint policy. + * @member {array} [subnets] A collection of references to subnets. * @member {string} [resourceGuid] The resource GUID property of the service * endpoint policy resource. * @member {string} [provisioningState] The provisioning state of the service @@ -107,8 +108,25 @@ class ServiceEndpointPolicy extends models['Resource'] { } } }, + subnets: { + required: false, + readOnly: true, + serializedName: 'properties.subnets', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SubnetElementType', + type: { + name: 'Composite', + className: 'Subnet' + } + } + } + }, resourceGuid: { required: false, + readOnly: true, serializedName: 'properties.resourceGuid', type: { name: 'String' @@ -116,6 +134,7 @@ class ServiceEndpointPolicy extends models['Resource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' diff --git a/lib/services/networkManagement2/lib/models/serviceEndpointPolicyDefinition.js b/lib/services/networkManagement2/lib/models/serviceEndpointPolicyDefinition.js index 5fd6b74d31..d05a956862 100644 --- a/lib/services/networkManagement2/lib/models/serviceEndpointPolicyDefinition.js +++ b/lib/services/networkManagement2/lib/models/serviceEndpointPolicyDefinition.js @@ -87,6 +87,7 @@ class ServiceEndpointPolicyDefinition extends models['SubResource'] { }, provisioningState: { required: false, + readOnly: true, serializedName: 'properties.provisioningState', type: { name: 'String' diff --git a/lib/services/networkManagement2/lib/models/subnet.js b/lib/services/networkManagement2/lib/models/subnet.js index fa76b54d3b..fab41e6051 100644 --- a/lib/services/networkManagement2/lib/models/subnet.js +++ b/lib/services/networkManagement2/lib/models/subnet.js @@ -59,8 +59,12 @@ class Subnet extends models['SubResource'] { * endpoints * @member {array} [ipConfigurations] Gets an array of references to the * network interface IP configurations using subnet. + * @member {array} [ipConfigurationProfiles] Array of IP configuration + * profiles which reference this subnet. * @member {array} [resourceNavigationLinks] Gets an array of references to * the external resources using subnet. + * @member {array} [serviceAssociationLinks] Gets an array of references to + * services injecting into this subnet. * @member {array} [delegations] Gets an array of references to the * delegations on the subnet. * @member {string} [purpose] A read-only string identifying the intention of @@ -196,6 +200,22 @@ class Subnet extends models['SubResource'] { } } }, + ipConfigurationProfiles: { + required: false, + readOnly: true, + serializedName: 'properties.ipConfigurationProfiles', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'IPConfigurationProfileElementType', + type: { + name: 'Composite', + className: 'IPConfigurationProfile' + } + } + } + }, resourceNavigationLinks: { required: false, serializedName: 'properties.resourceNavigationLinks', @@ -211,6 +231,21 @@ class Subnet extends models['SubResource'] { } } }, + serviceAssociationLinks: { + required: false, + serializedName: 'properties.serviceAssociationLinks', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ServiceAssociationLinkElementType', + type: { + name: 'Composite', + className: 'ServiceAssociationLink' + } + } + } + }, delegations: { required: false, serializedName: 'properties.delegations', diff --git a/lib/services/networkManagement2/lib/models/virtualHub.js b/lib/services/networkManagement2/lib/models/virtualHub.js index 57bb504dfe..3155c699ca 100644 --- a/lib/services/networkManagement2/lib/models/virtualHub.js +++ b/lib/services/networkManagement2/lib/models/virtualHub.js @@ -23,9 +23,21 @@ class VirtualHub extends models['Resource'] { * @member {object} [virtualWan] The VirtualWAN to which the VirtualHub * belongs * @member {string} [virtualWan.id] Resource ID. - * @member {array} [hubVirtualNetworkConnections] list of all vnet - * connections with this VirtualHub. + * @member {object} [vpnGateway] The VpnGateway associated with this + * VirtualHub + * @member {string} [vpnGateway.id] Resource ID. + * @member {object} [p2SVpnGateway] The P2SVpnGateway associated with this + * VirtualHub + * @member {string} [p2SVpnGateway.id] Resource ID. + * @member {object} [expressRouteGateway] The expressRouteGateway associated + * with this VirtualHub + * @member {string} [expressRouteGateway.id] Resource ID. + * @member {array} [virtualNetworkConnections] list of all vnet connections + * with this VirtualHub. * @member {string} [addressPrefix] Address-prefix for this VirtualHub. + * @member {object} [routeTable] The routeTable associated with this virtual + * hub. + * @member {array} [routeTable.routes] list of all routes. * @member {string} [provisioningState] The provisioning state of the * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' @@ -102,9 +114,33 @@ class VirtualHub extends models['Resource'] { className: 'SubResource' } }, - hubVirtualNetworkConnections: { + vpnGateway: { required: false, - serializedName: 'properties.hubVirtualNetworkConnections', + serializedName: 'properties.vpnGateway', + type: { + name: 'Composite', + className: 'SubResource' + } + }, + p2SVpnGateway: { + required: false, + serializedName: 'properties.p2SVpnGateway', + type: { + name: 'Composite', + className: 'SubResource' + } + }, + expressRouteGateway: { + required: false, + serializedName: 'properties.expressRouteGateway', + type: { + name: 'Composite', + className: 'SubResource' + } + }, + virtualNetworkConnections: { + required: false, + serializedName: 'properties.virtualNetworkConnections', type: { name: 'Sequence', element: { @@ -124,6 +160,14 @@ class VirtualHub extends models['Resource'] { name: 'String' } }, + routeTable: { + required: false, + serializedName: 'properties.routeTable', + type: { + name: 'Composite', + className: 'VirtualHubRouteTable' + } + }, provisioningState: { required: false, serializedName: 'properties.provisioningState', diff --git a/lib/services/networkManagement2/lib/models/virtualHubRoute.js b/lib/services/networkManagement2/lib/models/virtualHubRoute.js new file mode 100644 index 0000000000..bb59c5d479 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/virtualHubRoute.js @@ -0,0 +1,67 @@ +/* + * 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. + */ + +'use strict'; + +/** + * VirtualHub route + * + */ +class VirtualHubRoute { + /** + * Create a VirtualHubRoute. + * @member {array} [addressPrefixes] list of all addressPrefixes. + * @member {string} [nextHopIpAddress] NextHop ip address. + */ + constructor() { + } + + /** + * Defines the metadata of VirtualHubRoute + * + * @returns {object} metadata of VirtualHubRoute + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualHubRoute', + type: { + name: 'Composite', + className: 'VirtualHubRoute', + modelProperties: { + addressPrefixes: { + required: false, + serializedName: 'addressPrefixes', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + nextHopIpAddress: { + required: false, + serializedName: 'nextHopIpAddress', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VirtualHubRoute; diff --git a/lib/services/networkManagement2/lib/models/virtualHubRouteTable.js b/lib/services/networkManagement2/lib/models/virtualHubRouteTable.js new file mode 100644 index 0000000000..ef75f559c6 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/virtualHubRouteTable.js @@ -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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * VirtualHub route table + * + */ +class VirtualHubRouteTable { + /** + * Create a VirtualHubRouteTable. + * @member {array} [routes] list of all routes. + */ + constructor() { + } + + /** + * Defines the metadata of VirtualHubRouteTable + * + * @returns {object} metadata of VirtualHubRouteTable + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualHubRouteTable', + type: { + name: 'Composite', + className: 'VirtualHubRouteTable', + modelProperties: { + routes: { + required: false, + serializedName: 'routes', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'VirtualHubRouteElementType', + type: { + name: 'Composite', + className: 'VirtualHubRoute' + } + } + } + } + } + } + }; + } +} + +module.exports = VirtualHubRouteTable; diff --git a/lib/services/networkManagement2/lib/models/virtualNetworkGatewayConnection.js b/lib/services/networkManagement2/lib/models/virtualNetworkGatewayConnection.js index 0d63743097..5d07002e5c 100644 --- a/lib/services/networkManagement2/lib/models/virtualNetworkGatewayConnection.js +++ b/lib/services/networkManagement2/lib/models/virtualNetworkGatewayConnection.js @@ -202,6 +202,8 @@ class VirtualNetworkGatewayConnection extends models['Resource'] { * @member {string} connectionType Gateway connection type. Possible values * are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values * include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' + * @member {string} [connectionProtocol] Connection protocol used for this + * connection. Possible values include: 'IKEv2', 'IKEv1' * @member {number} [routingWeight] The routing weight. * @member {string} [sharedKey] The IPSec shared key. * @member {string} [connectionStatus] Virtual network Gateway connection @@ -331,6 +333,13 @@ class VirtualNetworkGatewayConnection extends models['Resource'] { name: 'String' } }, + connectionProtocol: { + required: false, + serializedName: 'properties.connectionProtocol', + type: { + name: 'String' + } + }, routingWeight: { required: false, serializedName: 'properties.routingWeight', diff --git a/lib/services/networkManagement2/lib/models/virtualNetworkGatewayConnectionListEntity.js b/lib/services/networkManagement2/lib/models/virtualNetworkGatewayConnectionListEntity.js index f65af58487..a23dc5c010 100644 --- a/lib/services/networkManagement2/lib/models/virtualNetworkGatewayConnectionListEntity.js +++ b/lib/services/networkManagement2/lib/models/virtualNetworkGatewayConnectionListEntity.js @@ -36,6 +36,8 @@ class VirtualNetworkGatewayConnectionListEntity extends models['Resource'] { * @member {string} connectionType Gateway connection type. Possible values * are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values * include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' + * @member {string} [connectionProtocol] Connection protocol used for this + * connection. Possible values include: 'IKEv2', 'IKEv1' * @member {number} [routingWeight] The routing weight. * @member {string} [sharedKey] The IPSec shared key. * @member {string} [connectionStatus] Virtual network Gateway connection @@ -165,6 +167,13 @@ class VirtualNetworkGatewayConnectionListEntity extends models['Resource'] { name: 'String' } }, + connectionProtocol: { + required: false, + serializedName: 'properties.connectionProtocol', + type: { + name: 'String' + } + }, routingWeight: { required: false, serializedName: 'properties.routingWeight', diff --git a/lib/services/networkManagement2/lib/models/virtualNetworkTap.js b/lib/services/networkManagement2/lib/models/virtualNetworkTap.js index 4f0e891126..952fe13b70 100644 --- a/lib/services/networkManagement2/lib/models/virtualNetworkTap.js +++ b/lib/services/networkManagement2/lib/models/virtualNetworkTap.js @@ -23,6 +23,10 @@ class VirtualNetworkTap extends models['Resource'] { * @member {array} [networkInterfaceTapConfigurations] Specifies the list of * resource IDs for the network interface IP configuration that needs to be * tapped. + * @member {string} [resourceGuid] The resourceGuid property of the virtual + * network tap. + * @member {string} [provisioningState] The provisioning state of the virtual + * network tap. Possible values are: 'Updating', 'Deleting', and 'Failed'. * @member {object} [destinationNetworkInterfaceIPConfiguration] The * reference to the private IP Address of the collector nic that will receive * the tap @@ -118,9 +122,15 @@ class VirtualNetworkTap extends models['Resource'] { * an array of references to the network interface IP configurations using * subnet. * @member {array} + * [destinationNetworkInterfaceIPConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [destinationNetworkInterfaceIPConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [destinationNetworkInterfaceIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [destinationNetworkInterfaceIPConfiguration.subnet.delegations] Gets an * array of references to the delegations on the subnet. * @member {string} @@ -233,9 +243,15 @@ class VirtualNetworkTap extends models['Resource'] { * Gets an array of references to the network interface IP configurations * using subnet. * @member {array} + * [destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [destinationNetworkInterfaceIPConfiguration.publicIPAddress.ipConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -418,9 +434,15 @@ class VirtualNetworkTap extends models['Resource'] { * Gets an array of references to the network interface IP configurations * using subnet. * @member {array} + * [destinationLoadBalancerFrontEndIPConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [destinationLoadBalancerFrontEndIPConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] Gets * an array of references to the delegations on the subnet. * @member {string} @@ -534,9 +556,15 @@ class VirtualNetworkTap extends models['Resource'] { * Gets an array of references to the network interface IP configurations * using subnet. * @member {array} + * [destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.ipConfigurationProfiles] + * Array of IP configuration profiles which reference this subnet. + * @member {array} * [destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.resourceNavigationLinks] * Gets an array of references to the external resources using subnet. * @member {array} + * [destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * @member {array} * [destinationLoadBalancerFrontEndIPConfiguration.publicIPAddress.ipConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @member {string} @@ -704,6 +732,7 @@ class VirtualNetworkTap extends models['Resource'] { }, networkInterfaceTapConfigurations: { required: false, + readOnly: true, serializedName: 'properties.networkInterfaceTapConfigurations', type: { name: 'Sequence', @@ -717,6 +746,22 @@ class VirtualNetworkTap extends models['Resource'] { } } }, + resourceGuid: { + required: false, + readOnly: true, + serializedName: 'properties.resourceGuid', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, destinationNetworkInterfaceIPConfiguration: { required: false, serializedName: 'properties.destinationNetworkInterfaceIPConfiguration', diff --git a/lib/services/networkManagement2/lib/models/virtualWAN.js b/lib/services/networkManagement2/lib/models/virtualWAN.js index 7e36a55266..06f774bada 100644 --- a/lib/services/networkManagement2/lib/models/virtualWAN.js +++ b/lib/services/networkManagement2/lib/models/virtualWAN.js @@ -24,6 +24,16 @@ class VirtualWAN extends models['Resource'] { * not. * @member {array} [virtualHubs] List of VirtualHubs in the VirtualWAN. * @member {array} [vpnSites] + * @member {string} [securityProviderName] The Security Provider name. + * @member {boolean} [allowBranchToBranchTraffic] True if branch to branch + * traffic is allowed. + * @member {boolean} [allowVnetToVnetTraffic] True if Vnet to Vnet traffic is + * allowed. + * @member {string} [office365LocalBreakoutCategory] The office local + * breakout category. Possible values include: 'Optimize', + * 'OptimizeAndAllow', 'All', 'None' + * @member {array} [p2SVpnServerConfigurations] list of all + * P2SVpnServerConfigurations associated with the virtual wan. * @member {string} [provisioningState] The provisioning state of the * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' @@ -131,6 +141,49 @@ class VirtualWAN extends models['Resource'] { } } }, + securityProviderName: { + required: false, + serializedName: 'properties.securityProviderName', + type: { + name: 'String' + } + }, + allowBranchToBranchTraffic: { + required: false, + serializedName: 'properties.allowBranchToBranchTraffic', + type: { + name: 'Boolean' + } + }, + allowVnetToVnetTraffic: { + required: false, + serializedName: 'properties.allowVnetToVnetTraffic', + type: { + name: 'Boolean' + } + }, + office365LocalBreakoutCategory: { + required: false, + serializedName: 'properties.office365LocalBreakoutCategory', + type: { + name: 'String' + } + }, + p2SVpnServerConfigurations: { + required: false, + serializedName: 'properties.p2SVpnServerConfigurations', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'P2SVpnServerConfigurationElementType', + type: { + name: 'Composite', + className: 'P2SVpnServerConfiguration' + } + } + } + }, provisioningState: { required: false, serializedName: 'properties.provisioningState', diff --git a/lib/services/networkManagement2/lib/models/virtualWanSecurityProvider.js b/lib/services/networkManagement2/lib/models/virtualWanSecurityProvider.js new file mode 100644 index 0000000000..617122fc78 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/virtualWanSecurityProvider.js @@ -0,0 +1,69 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Collection of SecurityProviders. + * + */ +class VirtualWanSecurityProvider { + /** + * Create a VirtualWanSecurityProvider. + * @member {string} [name] Name of the security provider. + * @member {string} [url] Url of the security provider. + * @member {string} [type] Name of the security provider. Possible values + * include: 'External', 'Native' + */ + constructor() { + } + + /** + * Defines the metadata of VirtualWanSecurityProvider + * + * @returns {object} metadata of VirtualWanSecurityProvider + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualWanSecurityProvider', + type: { + name: 'Composite', + className: 'VirtualWanSecurityProvider', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + url: { + required: false, + serializedName: 'url', + type: { + name: 'String' + } + }, + type: { + required: false, + serializedName: 'type', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VirtualWanSecurityProvider; diff --git a/lib/services/networkManagement2/lib/models/virtualWanSecurityProviders.js b/lib/services/networkManagement2/lib/models/virtualWanSecurityProviders.js new file mode 100644 index 0000000000..9c0a291c7f --- /dev/null +++ b/lib/services/networkManagement2/lib/models/virtualWanSecurityProviders.js @@ -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. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Collection of SecurityProviders. + * + */ +class VirtualWanSecurityProviders { + /** + * Create a VirtualWanSecurityProviders. + * @member {array} [supportedProviders] + */ + constructor() { + } + + /** + * Defines the metadata of VirtualWanSecurityProviders + * + * @returns {object} metadata of VirtualWanSecurityProviders + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualWanSecurityProviders', + type: { + name: 'Composite', + className: 'VirtualWanSecurityProviders', + modelProperties: { + supportedProviders: { + required: false, + serializedName: 'supportedProviders', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'VirtualWanSecurityProviderElementType', + type: { + name: 'Composite', + className: 'VirtualWanSecurityProvider' + } + } + } + } + } + } + }; + } +} + +module.exports = VirtualWanSecurityProviders; diff --git a/lib/services/networkManagement2/lib/models/vpnClientConnectionHealth.js b/lib/services/networkManagement2/lib/models/vpnClientConnectionHealth.js new file mode 100644 index 0000000000..10a781f657 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/vpnClientConnectionHealth.js @@ -0,0 +1,89 @@ +/* + * 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. + */ + +'use strict'; + +/** + * VpnClientConnectionHealth properties + * + */ +class VpnClientConnectionHealth { + /** + * Create a VpnClientConnectionHealth. + * @member {number} [totalIngressBytesTransferred] Total of the Ingress Bytes + * Transferred in this P2S Vpn connection + * @member {number} [totalEgressBytesTransferred] Total of the Egress Bytes + * Transferred in this connection + * @member {number} [vpnClientConnectionsCount] The total of p2s vpn clients + * connected at this time to this P2SVpnGateway. + * @member {array} [allocatedIpAddresses] List of allocated ip addresses to + * the connected p2s vpn clients. + */ + constructor() { + } + + /** + * Defines the metadata of VpnClientConnectionHealth + * + * @returns {object} metadata of VpnClientConnectionHealth + * + */ + mapper() { + return { + required: false, + serializedName: 'VpnClientConnectionHealth', + type: { + name: 'Composite', + className: 'VpnClientConnectionHealth', + modelProperties: { + totalIngressBytesTransferred: { + required: false, + readOnly: true, + serializedName: 'totalIngressBytesTransferred', + type: { + name: 'Number' + } + }, + totalEgressBytesTransferred: { + required: false, + readOnly: true, + serializedName: 'totalEgressBytesTransferred', + type: { + name: 'Number' + } + }, + vpnClientConnectionsCount: { + required: false, + serializedName: 'vpnClientConnectionsCount', + type: { + name: 'Number' + } + }, + allocatedIpAddresses: { + required: false, + serializedName: 'allocatedIpAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = VpnClientConnectionHealth; diff --git a/lib/services/networkManagement2/lib/models/vpnConnection.js b/lib/services/networkManagement2/lib/models/vpnConnection.js index 7b6eac00b2..350af67fe6 100644 --- a/lib/services/networkManagement2/lib/models/vpnConnection.js +++ b/lib/services/networkManagement2/lib/models/vpnConnection.js @@ -15,9 +15,9 @@ const models = require('./index'); /** * VpnConnection Resource. * - * @extends models['Resource'] + * @extends models['SubResource'] */ -class VpnConnection extends models['Resource'] { +class VpnConnection extends models['SubResource'] { /** * Create a VpnConnection. * @member {object} [remoteVpnSite] Id of the connected vpn site. @@ -25,16 +25,22 @@ class VpnConnection extends models['Resource'] { * @member {number} [routingWeight] routing weight for vpn connection. * @member {string} [connectionStatus] The connection status. Possible values * include: 'Unknown', 'Connecting', 'Connected', 'NotConnected' + * @member {string} [vpnConnectionProtocolType] Connection protocol used for + * this connection. Possible values include: 'IKEv2', 'IKEv1' * @member {number} [ingressBytesTransferred] Ingress bytes transferred. * @member {number} [egressBytesTransferred] Egress bytes transferred. - * @member {number} [connectionBandwidthInMbps] Expected bandwidth in MBPS. + * @member {number} [connectionBandwidth] Expected bandwidth in MBPS. * @member {string} [sharedKey] SharedKey for the vpn connection. * @member {boolean} [enableBgp] EnableBgp flag * @member {array} [ipsecPolicies] The IPSec Policies to be considered by * this connection. + * @member {boolean} [enableRateLimiting] EnableBgp flag + * @member {boolean} [enableInternetSecurity] Enable internet security * @member {string} [provisioningState] The provisioning state of the * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' + * @member {string} [name] The name of the resource that is unique within a + * resource group. This name can be used to access the resource. * @member {string} [etag] Gets a unique read-only string that changes * whenever the resource is updated. */ @@ -63,43 +69,6 @@ class VpnConnection extends models['Resource'] { name: 'String' } }, - name: { - required: false, - readOnly: true, - serializedName: 'name', - type: { - name: 'String' - } - }, - type: { - required: false, - readOnly: true, - serializedName: 'type', - type: { - name: 'String' - } - }, - location: { - required: false, - serializedName: 'location', - type: { - name: 'String' - } - }, - tags: { - required: false, - serializedName: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } - } - }, remoteVpnSite: { required: false, serializedName: 'properties.remoteVpnSite', @@ -122,6 +91,13 @@ class VpnConnection extends models['Resource'] { name: 'String' } }, + vpnConnectionProtocolType: { + required: false, + serializedName: 'properties.vpnConnectionProtocolType', + type: { + name: 'String' + } + }, ingressBytesTransferred: { required: false, readOnly: true, @@ -138,10 +114,9 @@ class VpnConnection extends models['Resource'] { name: 'Number' } }, - connectionBandwidthInMbps: { + connectionBandwidth: { required: false, - readOnly: true, - serializedName: 'properties.connectionBandwidthInMbps', + serializedName: 'properties.connectionBandwidth', type: { name: 'Number' } @@ -175,6 +150,20 @@ class VpnConnection extends models['Resource'] { } } }, + enableRateLimiting: { + required: false, + serializedName: 'properties.enableRateLimiting', + type: { + name: 'Boolean' + } + }, + enableInternetSecurity: { + required: false, + serializedName: 'properties.enableInternetSecurity', + type: { + name: 'Boolean' + } + }, provisioningState: { required: false, serializedName: 'properties.provisioningState', @@ -182,6 +171,13 @@ class VpnConnection extends models['Resource'] { name: 'String' } }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, etag: { required: false, readOnly: true, diff --git a/lib/services/networkManagement2/lib/models/vpnGateway.js b/lib/services/networkManagement2/lib/models/vpnGateway.js index 574f18446e..abc5ae46dd 100644 --- a/lib/services/networkManagement2/lib/models/vpnGateway.js +++ b/lib/services/networkManagement2/lib/models/vpnGateway.js @@ -33,11 +33,8 @@ class VpnGateway extends models['Resource'] { * @member {string} [provisioningState] The provisioning state of the * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' - * @member {object} [policies] The policies applied to this vpn gateway. - * @member {boolean} [policies.allowBranchToBranchTraffic] True if branch to - * branch traffic is allowed. - * @member {boolean} [policies.allowVnetToVnetTraffic] True if Vnet to Vnet - * traffic is allowed. + * @member {number} [vpnGatewayScaleUnit] The scale unit for this vpn + * gateway. * @member {string} [etag] Gets a unique read-only string that changes * whenever the resource is updated. */ @@ -141,12 +138,11 @@ class VpnGateway extends models['Resource'] { name: 'String' } }, - policies: { + vpnGatewayScaleUnit: { required: false, - serializedName: 'properties.policies', + serializedName: 'properties.vpnGatewayScaleUnit', type: { - name: 'Composite', - className: 'Policies' + name: 'Number' } }, etag: { diff --git a/lib/services/networkManagement2/lib/models/vpnProfileResponse.js b/lib/services/networkManagement2/lib/models/vpnProfileResponse.js new file mode 100644 index 0000000000..4fcab7e02c --- /dev/null +++ b/lib/services/networkManagement2/lib/models/vpnProfileResponse.js @@ -0,0 +1,52 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Vpn Profile Response for package generation + * + */ +class VpnProfileResponse { + /** + * Create a VpnProfileResponse. + * @member {string} [profileUrl] URL to the VPN profile + */ + constructor() { + } + + /** + * Defines the metadata of VpnProfileResponse + * + * @returns {object} metadata of VpnProfileResponse + * + */ + mapper() { + return { + required: false, + serializedName: 'VpnProfileResponse', + type: { + name: 'Composite', + className: 'VpnProfileResponse', + modelProperties: { + profileUrl: { + required: false, + serializedName: 'profileUrl', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VpnProfileResponse; diff --git a/lib/services/networkManagement2/lib/models/vpnSite.js b/lib/services/networkManagement2/lib/models/vpnSite.js index c7dab1c028..702e68e349 100644 --- a/lib/services/networkManagement2/lib/models/vpnSite.js +++ b/lib/services/networkManagement2/lib/models/vpnSite.js @@ -20,8 +20,8 @@ const models = require('./index'); class VpnSite extends models['Resource'] { /** * Create a VpnSite. - * @member {object} [virtualWAN] The VirtualWAN to which the vpnSite belongs - * @member {string} [virtualWAN.id] Resource ID. + * @member {object} [virtualWan] The VirtualWAN to which the vpnSite belongs + * @member {string} [virtualWan.id] Resource ID. * @member {object} [deviceProperties] The device properties * @member {string} [deviceProperties.deviceVendor] Name of the device * Vendor. @@ -43,6 +43,7 @@ class VpnSite extends models['Resource'] { * @member {string} [provisioningState] The provisioning state of the * resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' + * @member {boolean} [isSecuritySite] IsSecuritySite flag * @member {string} [etag] Gets a unique read-only string that changes * whenever the resource is updated. */ @@ -108,9 +109,9 @@ class VpnSite extends models['Resource'] { } } }, - virtualWAN: { + virtualWan: { required: false, - serializedName: 'properties.virtualWAN', + serializedName: 'properties.virtualWan', type: { name: 'Composite', className: 'SubResource' @@ -161,6 +162,13 @@ class VpnSite extends models['Resource'] { name: 'String' } }, + isSecuritySite: { + required: false, + serializedName: 'properties.isSecuritySite', + type: { + name: 'Boolean' + } + }, etag: { required: false, readOnly: true, diff --git a/lib/services/networkManagement2/lib/networkManagementClient.d.ts b/lib/services/networkManagement2/lib/networkManagementClient.d.ts index d498a214b5..1aff04a73d 100644 --- a/lib/services/networkManagement2/lib/networkManagementClient.d.ts +++ b/lib/services/networkManagement2/lib/networkManagementClient.d.ts @@ -115,6 +115,8 @@ export default class NetworkManagementClient extends AzureServiceClient { hubVirtualNetworkConnections: operations.HubVirtualNetworkConnections; vpnGateways: operations.VpnGateways; vpnConnections: operations.VpnConnections; + p2SVpnServerConfigurations: operations.P2SVpnServerConfigurations; + p2SVpnGateways: operations.P2SVpnGateways; /** @@ -179,6 +181,68 @@ export default class NetworkManagementClient extends AzureServiceClient { checkDnsNameAvailability(location: string, domainNameLabel: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; checkDnsNameAvailability(location: string, domainNameLabel: string, callback: ServiceCallback): void; checkDnsNameAvailability(location: string, domainNameLabel: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gives the supported security providers for the virtual wan. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} virtualWANName The name of the VirtualWAN for which + * supported security providers are needed. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + supportedSecurityProvidersWithHttpOperationResponse(resourceGroupName: string, virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gives the supported security providers for the virtual wan. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} virtualWANName The name of the VirtualWAN for which + * supported security providers are needed. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VirtualWanSecurityProviders} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VirtualWanSecurityProviders} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualWanSecurityProviders} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + supportedSecurityProviders(resourceGroupName: string, virtualWANName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + supportedSecurityProviders(resourceGroupName: string, virtualWANName: string, callback: ServiceCallback): void; + supportedSecurityProviders(resourceGroupName: string, virtualWANName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } export { NetworkManagementClient, models as NetworkManagementModels }; diff --git a/lib/services/networkManagement2/lib/networkManagementClient.js b/lib/services/networkManagement2/lib/networkManagementClient.js index a426010d96..a81e887414 100644 --- a/lib/services/networkManagement2/lib/networkManagementClient.js +++ b/lib/services/networkManagement2/lib/networkManagementClient.js @@ -169,6 +169,152 @@ function _checkDnsNameAvailability(location, domainNameLabel, options, callback) }); } +/** + * Gives the supported security providers for the virtual wan. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} virtualWANName The name of the VirtualWAN for which + * supported security providers are needed. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualWanSecurityProviders} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _supportedSecurityProviders(resourceGroupName, virtualWANName, options, callback) { + /* jshint validthis: true */ + let client = this; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (this.subscriptionId === null || this.subscriptionId === undefined || typeof this.subscriptionId.valueOf() !== 'string') { + throw new Error('this.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (virtualWANName === null || virtualWANName === undefined || typeof virtualWANName.valueOf() !== 'string') { + throw new Error('virtualWANName cannot be null or undefined and it must be of type string.'); + } + if (this.acceptLanguage !== null && this.acceptLanguage !== undefined && typeof this.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{virtualWANName}', encodeURIComponent(virtualWANName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.acceptLanguage !== undefined && this.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VirtualWanSecurityProviders']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + /** Class representing a NetworkManagementClient. */ class NetworkManagementClient extends ServiceClient { /** @@ -279,8 +425,11 @@ class NetworkManagementClient extends ServiceClient { this.hubVirtualNetworkConnections = new operations.HubVirtualNetworkConnections(this); this.vpnGateways = new operations.VpnGateways(this); this.vpnConnections = new operations.VpnConnections(this); + this.p2SVpnServerConfigurations = new operations.P2SVpnServerConfigurations(this); + this.p2SVpnGateways = new operations.P2SVpnGateways(this); this.models = models; this._checkDnsNameAvailability = _checkDnsNameAvailability; + this._supportedSecurityProviders = _supportedSecurityProviders; msRest.addSerializationMixin(this); } @@ -375,6 +524,95 @@ class NetworkManagementClient extends ServiceClient { } } + /** + * Gives the supported security providers for the virtual wan. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} virtualWANName The name of the VirtualWAN for which + * supported security providers are needed. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + supportedSecurityProvidersWithHttpOperationResponse(resourceGroupName, virtualWANName, options) { + let client = this; + let self = this; + return new Promise((resolve, reject) => { + self._supportedSecurityProviders(resourceGroupName, virtualWANName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gives the supported security providers for the virtual wan. + * + * @param {string} resourceGroupName The resource group name. + * + * @param {string} virtualWANName The name of the VirtualWAN for which + * supported security providers are needed. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VirtualWanSecurityProviders} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualWanSecurityProviders} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + supportedSecurityProviders(resourceGroupName, virtualWANName, options, optionalCallback) { + let client = this; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._supportedSecurityProviders(resourceGroupName, virtualWANName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._supportedSecurityProviders(resourceGroupName, virtualWANName, options, optionalCallback); + } + } + } module.exports = NetworkManagementClient; diff --git a/lib/services/networkManagement2/lib/operations/applicationGateways.js b/lib/services/networkManagement2/lib/operations/applicationGateways.js index 549d6f97a8..167d4e06ec 100644 --- a/lib/services/networkManagement2/lib/operations/applicationGateways.js +++ b/lib/services/networkManagement2/lib/operations/applicationGateways.js @@ -340,13 +340,8 @@ function _get(resourceGroupName, applicationGatewayName, options, callback) { * * @param {object} [parameters.autoscaleConfiguration] Autoscale Configuration. * - * @param {object} parameters.autoscaleConfiguration.bounds Autoscale bounds - * - * @param {number} parameters.autoscaleConfiguration.bounds.min Lower bound on - * number of Application Gateway instances. - * - * @param {number} parameters.autoscaleConfiguration.bounds.max Upper bound on - * number of Application Gateway instances. + * @param {number} parameters.autoscaleConfiguration.minCapacity Lower bound on + * number of Application Gateway instances * * @param {string} [parameters.resourceGuid] Resource GUID property of the * application gateway resource. @@ -1779,13 +1774,8 @@ function _beginDeleteMethod(resourceGroupName, applicationGatewayName, options, * * @param {object} [parameters.autoscaleConfiguration] Autoscale Configuration. * - * @param {object} parameters.autoscaleConfiguration.bounds Autoscale bounds - * - * @param {number} parameters.autoscaleConfiguration.bounds.min Lower bound on - * number of Application Gateway instances. - * - * @param {number} parameters.autoscaleConfiguration.bounds.max Upper bound on - * number of Application Gateway instances. + * @param {number} parameters.autoscaleConfiguration.minCapacity Lower bound on + * number of Application Gateway instances * * @param {string} [parameters.resourceGuid] Resource GUID property of the * application gateway resource. @@ -3253,13 +3243,8 @@ class ApplicationGateways { * * @param {object} [parameters.autoscaleConfiguration] Autoscale Configuration. * - * @param {object} parameters.autoscaleConfiguration.bounds Autoscale bounds - * - * @param {number} parameters.autoscaleConfiguration.bounds.min Lower bound on - * number of Application Gateway instances. - * - * @param {number} parameters.autoscaleConfiguration.bounds.max Upper bound on - * number of Application Gateway instances. + * @param {number} parameters.autoscaleConfiguration.minCapacity Lower bound on + * number of Application Gateway instances * * @param {string} [parameters.resourceGuid] Resource GUID property of the * application gateway resource. @@ -3424,13 +3409,8 @@ class ApplicationGateways { * * @param {object} [parameters.autoscaleConfiguration] Autoscale Configuration. * - * @param {object} parameters.autoscaleConfiguration.bounds Autoscale bounds - * - * @param {number} parameters.autoscaleConfiguration.bounds.min Lower bound on - * number of Application Gateway instances. - * - * @param {number} parameters.autoscaleConfiguration.bounds.max Upper bound on - * number of Application Gateway instances. + * @param {number} parameters.autoscaleConfiguration.minCapacity Lower bound on + * number of Application Gateway instances * * @param {string} [parameters.resourceGuid] Resource GUID property of the * application gateway resource. @@ -4547,13 +4527,8 @@ class ApplicationGateways { * * @param {object} [parameters.autoscaleConfiguration] Autoscale Configuration. * - * @param {object} parameters.autoscaleConfiguration.bounds Autoscale bounds - * - * @param {number} parameters.autoscaleConfiguration.bounds.min Lower bound on - * number of Application Gateway instances. - * - * @param {number} parameters.autoscaleConfiguration.bounds.max Upper bound on - * number of Application Gateway instances. + * @param {number} parameters.autoscaleConfiguration.minCapacity Lower bound on + * number of Application Gateway instances * * @param {string} [parameters.resourceGuid] Resource GUID property of the * application gateway resource. @@ -4718,13 +4693,8 @@ class ApplicationGateways { * * @param {object} [parameters.autoscaleConfiguration] Autoscale Configuration. * - * @param {object} parameters.autoscaleConfiguration.bounds Autoscale bounds - * - * @param {number} parameters.autoscaleConfiguration.bounds.min Lower bound on - * number of Application Gateway instances. - * - * @param {number} parameters.autoscaleConfiguration.bounds.max Upper bound on - * number of Application Gateway instances. + * @param {number} parameters.autoscaleConfiguration.minCapacity Lower bound on + * number of Application Gateway instances * * @param {string} [parameters.resourceGuid] Resource GUID property of the * application gateway resource. diff --git a/lib/services/networkManagement2/lib/operations/index.d.ts b/lib/services/networkManagement2/lib/operations/index.d.ts index ef58534665..13713c467a 100644 --- a/lib/services/networkManagement2/lib/operations/index.d.ts +++ b/lib/services/networkManagement2/lib/operations/index.d.ts @@ -257,13 +257,8 @@ export interface ApplicationGateways { * * @param {object} [parameters.autoscaleConfiguration] Autoscale Configuration. * - * @param {object} parameters.autoscaleConfiguration.bounds Autoscale bounds - * - * @param {number} parameters.autoscaleConfiguration.bounds.min Lower bound on - * number of Application Gateway instances. - * - * @param {number} parameters.autoscaleConfiguration.bounds.max Upper bound on - * number of Application Gateway instances. + * @param {number} parameters.autoscaleConfiguration.minCapacity Lower bound on + * number of Application Gateway instances * * @param {string} [parameters.resourceGuid] Resource GUID property of the * application gateway resource. @@ -416,13 +411,8 @@ export interface ApplicationGateways { * * @param {object} [parameters.autoscaleConfiguration] Autoscale Configuration. * - * @param {object} parameters.autoscaleConfiguration.bounds Autoscale bounds - * - * @param {number} parameters.autoscaleConfiguration.bounds.min Lower bound on - * number of Application Gateway instances. - * - * @param {number} parameters.autoscaleConfiguration.bounds.max Upper bound on - * number of Application Gateway instances. + * @param {number} parameters.autoscaleConfiguration.minCapacity Lower bound on + * number of Application Gateway instances * * @param {string} [parameters.resourceGuid] Resource GUID property of the * application gateway resource. @@ -1227,13 +1217,8 @@ export interface ApplicationGateways { * * @param {object} [parameters.autoscaleConfiguration] Autoscale Configuration. * - * @param {object} parameters.autoscaleConfiguration.bounds Autoscale bounds - * - * @param {number} parameters.autoscaleConfiguration.bounds.min Lower bound on - * number of Application Gateway instances. - * - * @param {number} parameters.autoscaleConfiguration.bounds.max Upper bound on - * number of Application Gateway instances. + * @param {number} parameters.autoscaleConfiguration.minCapacity Lower bound on + * number of Application Gateway instances * * @param {string} [parameters.resourceGuid] Resource GUID property of the * application gateway resource. @@ -1386,13 +1371,8 @@ export interface ApplicationGateways { * * @param {object} [parameters.autoscaleConfiguration] Autoscale Configuration. * - * @param {object} parameters.autoscaleConfiguration.bounds Autoscale bounds - * - * @param {number} parameters.autoscaleConfiguration.bounds.min Lower bound on - * number of Application Gateway instances. - * - * @param {number} parameters.autoscaleConfiguration.bounds.max Upper bound on - * number of Application Gateway instances. + * @param {number} parameters.autoscaleConfiguration.minCapacity Lower bound on + * number of Application Gateway instances * * @param {string} [parameters.resourceGuid] Resource GUID property of the * application gateway resource. @@ -13900,6 +13880,8 @@ export interface NetworkInterfaces { * @param {object} [parameters.virtualMachine] The reference of a virtual * machine. * + * @param {string} [parameters.virtualMachine.id] Resource ID. + * * @param {object} [parameters.networkSecurityGroup] The reference of the * NetworkSecurityGroup resource. * @@ -13926,36 +13908,6 @@ export interface NetworkInterfaces { * * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. * - * @param {object} [parameters.interfaceEndpoint] A reference to the interface - * endpoint to which the network interface is linked. - * - * @param {string} [parameters.interfaceEndpoint.fqdn] A first-party service's - * FQDN that is mapped to the private IP allocated via this interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.endpointService] A reference - * to the service being brought into the virtual network. - * - * @param {string} [parameters.interfaceEndpoint.endpointService.id] A unique - * identifier of the service being referenced by the interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.subnet] The ID of the subnet - * from which the private IP will be allocated. - * - * @param {string} [parameters.interfaceEndpoint.subnet.id] Resource ID. - * - * @param {array} [parameters.interfaceEndpoint.networkInterfaces] Gets an - * array of references to the network interfaces created for this interface - * endpoint. - * - * @param {string} [parameters.interfaceEndpoint.etag] Gets a unique read-only - * string that changes whenever the resource is updated. - * - * @param {string} [parameters.interfaceEndpoint.id] Resource ID. - * - * @param {string} [parameters.interfaceEndpoint.location] Resource location. - * - * @param {object} [parameters.interfaceEndpoint.tags] Resource tags. - * * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of * the network interface. * @@ -14045,6 +13997,8 @@ export interface NetworkInterfaces { * @param {object} [parameters.virtualMachine] The reference of a virtual * machine. * + * @param {string} [parameters.virtualMachine.id] Resource ID. + * * @param {object} [parameters.networkSecurityGroup] The reference of the * NetworkSecurityGroup resource. * @@ -14071,36 +14025,6 @@ export interface NetworkInterfaces { * * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. * - * @param {object} [parameters.interfaceEndpoint] A reference to the interface - * endpoint to which the network interface is linked. - * - * @param {string} [parameters.interfaceEndpoint.fqdn] A first-party service's - * FQDN that is mapped to the private IP allocated via this interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.endpointService] A reference - * to the service being brought into the virtual network. - * - * @param {string} [parameters.interfaceEndpoint.endpointService.id] A unique - * identifier of the service being referenced by the interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.subnet] The ID of the subnet - * from which the private IP will be allocated. - * - * @param {string} [parameters.interfaceEndpoint.subnet.id] Resource ID. - * - * @param {array} [parameters.interfaceEndpoint.networkInterfaces] Gets an - * array of references to the network interfaces created for this interface - * endpoint. - * - * @param {string} [parameters.interfaceEndpoint.etag] Gets a unique read-only - * string that changes whenever the resource is updated. - * - * @param {string} [parameters.interfaceEndpoint.id] Resource ID. - * - * @param {string} [parameters.interfaceEndpoint.location] Resource location. - * - * @param {object} [parameters.interfaceEndpoint.tags] Resource tags. - * * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of * the network interface. * @@ -14923,6 +14847,8 @@ export interface NetworkInterfaces { * @param {object} [parameters.virtualMachine] The reference of a virtual * machine. * + * @param {string} [parameters.virtualMachine.id] Resource ID. + * * @param {object} [parameters.networkSecurityGroup] The reference of the * NetworkSecurityGroup resource. * @@ -14949,36 +14875,6 @@ export interface NetworkInterfaces { * * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. * - * @param {object} [parameters.interfaceEndpoint] A reference to the interface - * endpoint to which the network interface is linked. - * - * @param {string} [parameters.interfaceEndpoint.fqdn] A first-party service's - * FQDN that is mapped to the private IP allocated via this interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.endpointService] A reference - * to the service being brought into the virtual network. - * - * @param {string} [parameters.interfaceEndpoint.endpointService.id] A unique - * identifier of the service being referenced by the interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.subnet] The ID of the subnet - * from which the private IP will be allocated. - * - * @param {string} [parameters.interfaceEndpoint.subnet.id] Resource ID. - * - * @param {array} [parameters.interfaceEndpoint.networkInterfaces] Gets an - * array of references to the network interfaces created for this interface - * endpoint. - * - * @param {string} [parameters.interfaceEndpoint.etag] Gets a unique read-only - * string that changes whenever the resource is updated. - * - * @param {string} [parameters.interfaceEndpoint.id] Resource ID. - * - * @param {string} [parameters.interfaceEndpoint.location] Resource location. - * - * @param {object} [parameters.interfaceEndpoint.tags] Resource tags. - * * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of * the network interface. * @@ -15068,6 +14964,8 @@ export interface NetworkInterfaces { * @param {object} [parameters.virtualMachine] The reference of a virtual * machine. * + * @param {string} [parameters.virtualMachine.id] Resource ID. + * * @param {object} [parameters.networkSecurityGroup] The reference of the * NetworkSecurityGroup resource. * @@ -15094,36 +14992,6 @@ export interface NetworkInterfaces { * * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. * - * @param {object} [parameters.interfaceEndpoint] A reference to the interface - * endpoint to which the network interface is linked. - * - * @param {string} [parameters.interfaceEndpoint.fqdn] A first-party service's - * FQDN that is mapped to the private IP allocated via this interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.endpointService] A reference - * to the service being brought into the virtual network. - * - * @param {string} [parameters.interfaceEndpoint.endpointService.id] A unique - * identifier of the service being referenced by the interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.subnet] The ID of the subnet - * from which the private IP will be allocated. - * - * @param {string} [parameters.interfaceEndpoint.subnet.id] Resource ID. - * - * @param {array} [parameters.interfaceEndpoint.networkInterfaces] Gets an - * array of references to the network interfaces created for this interface - * endpoint. - * - * @param {string} [parameters.interfaceEndpoint.etag] Gets a unique read-only - * string that changes whenever the resource is updated. - * - * @param {string} [parameters.interfaceEndpoint.id] Resource ID. - * - * @param {string} [parameters.interfaceEndpoint.location] Resource location. - * - * @param {object} [parameters.interfaceEndpoint.tags] Resource tags. - * * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of * the network interface. * @@ -16170,11 +16038,6 @@ export interface NetworkInterfaceTapConfigurations { * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference * of the Virtual Network Tap resource. * - * @param {array} - * [tapConfigurationParameters.virtualNetworkTap.networkInterfaceTapConfigurations] - * Specifies the list of resource IDs for the network interface IP - * configuration that needs to be tapped. - * * @param {object} * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration] * The reference to the private IP Address of the collector nic that will @@ -16361,6 +16224,10 @@ export interface NetworkInterfaceTapConfigurations { * Gets an array of references to the external resources using subnet. * * @param {array} + * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -16559,11 +16426,6 @@ export interface NetworkInterfaceTapConfigurations { * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference * of the Virtual Network Tap resource. * - * @param {array} - * [tapConfigurationParameters.virtualNetworkTap.networkInterfaceTapConfigurations] - * Specifies the list of resource IDs for the network interface IP - * configuration that needs to be tapped. - * * @param {object} * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration] * The reference to the private IP Address of the collector nic that will @@ -16750,6 +16612,10 @@ export interface NetworkInterfaceTapConfigurations { * Gets an array of references to the external resources using subnet. * * @param {array} + * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -17090,11 +16956,6 @@ export interface NetworkInterfaceTapConfigurations { * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference * of the Virtual Network Tap resource. * - * @param {array} - * [tapConfigurationParameters.virtualNetworkTap.networkInterfaceTapConfigurations] - * Specifies the list of resource IDs for the network interface IP - * configuration that needs to be tapped. - * * @param {object} * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration] * The reference to the private IP Address of the collector nic that will @@ -17281,6 +17142,10 @@ export interface NetworkInterfaceTapConfigurations { * Gets an array of references to the external resources using subnet. * * @param {array} + * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -17479,11 +17344,6 @@ export interface NetworkInterfaceTapConfigurations { * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference * of the Virtual Network Tap resource. * - * @param {array} - * [tapConfigurationParameters.virtualNetworkTap.networkInterfaceTapConfigurations] - * Specifies the list of resource IDs for the network interface IP - * configuration that needs to be tapped. - * * @param {object} * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration] * The reference to the private IP Address of the collector nic that will @@ -17670,6 +17530,10 @@ export interface NetworkInterfaceTapConfigurations { * Gets an array of references to the external resources using subnet. * * @param {array} + * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -29774,13 +29638,6 @@ export interface ServiceEndpointPolicies { * @param {array} [parameters.serviceEndpointPolicyDefinitions] A collection of * service endpoint policy definitions of the service endpoint policy. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * service endpoint policy resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * service endpoint policy. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * * @param {string} [parameters.etag] A unique read-only string that changes * whenever the resource is updated. * @@ -29817,13 +29674,6 @@ export interface ServiceEndpointPolicies { * @param {array} [parameters.serviceEndpointPolicyDefinitions] A collection of * service endpoint policy definitions of the service endpoint policy. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * service endpoint policy resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * service endpoint policy. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * * @param {string} [parameters.etag] A unique read-only string that changes * whenever the resource is updated. * @@ -30118,13 +29968,6 @@ export interface ServiceEndpointPolicies { * @param {array} [parameters.serviceEndpointPolicyDefinitions] A collection of * service endpoint policy definitions of the service endpoint policy. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * service endpoint policy resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * service endpoint policy. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * * @param {string} [parameters.etag] A unique read-only string that changes * whenever the resource is updated. * @@ -30161,13 +30004,6 @@ export interface ServiceEndpointPolicies { * @param {array} [parameters.serviceEndpointPolicyDefinitions] A collection of * service endpoint policy definitions of the service endpoint policy. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * service endpoint policy resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * service endpoint policy. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * * @param {string} [parameters.etag] A unique read-only string that changes * whenever the resource is updated. * @@ -30565,10 +30401,6 @@ export interface ServiceEndpointPolicyDefinitions { * @param {array} [serviceEndpointPolicyDefinitions.serviceResources] A list of * service resources. * - * @param {string} [serviceEndpointPolicyDefinitions.provisioningState] The - * provisioning state of the service end point policy definition. Possible - * values are: 'Updating', 'Deleting', and 'Failed'. - * * @param {string} [serviceEndpointPolicyDefinitions.name] The name of the * resource that is unique within a resource group. This name can be used to * access the resource. @@ -30615,10 +30447,6 @@ export interface ServiceEndpointPolicyDefinitions { * @param {array} [serviceEndpointPolicyDefinitions.serviceResources] A list of * service resources. * - * @param {string} [serviceEndpointPolicyDefinitions.provisioningState] The - * provisioning state of the service end point policy definition. Possible - * values are: 'Updating', 'Deleting', and 'Failed'. - * * @param {string} [serviceEndpointPolicyDefinitions.name] The name of the * resource that is unique within a resource group. This name can be used to * access the resource. @@ -30813,10 +30641,6 @@ export interface ServiceEndpointPolicyDefinitions { * @param {array} [serviceEndpointPolicyDefinitions.serviceResources] A list of * service resources. * - * @param {string} [serviceEndpointPolicyDefinitions.provisioningState] The - * provisioning state of the service end point policy definition. Possible - * values are: 'Updating', 'Deleting', and 'Failed'. - * * @param {string} [serviceEndpointPolicyDefinitions.name] The name of the * resource that is unique within a resource group. This name can be used to * access the resource. @@ -30863,10 +30687,6 @@ export interface ServiceEndpointPolicyDefinitions { * @param {array} [serviceEndpointPolicyDefinitions.serviceResources] A list of * service resources. * - * @param {string} [serviceEndpointPolicyDefinitions.provisioningState] The - * provisioning state of the service end point policy definition. Possible - * values are: 'Updating', 'Deleting', and 'Failed'. - * * @param {string} [serviceEndpointPolicyDefinitions.name] The name of the * resource that is unique within a resource group. This name can be used to * access the resource. @@ -32347,6 +32167,9 @@ export interface Subnets { * @param {array} [subnetParameters.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. * + * @param {array} [subnetParameters.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. + * * @param {array} [subnetParameters.delegations] Gets an array of references to * the delegations on the subnet. * @@ -32454,6 +32277,9 @@ export interface Subnets { * @param {array} [subnetParameters.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. * + * @param {array} [subnetParameters.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. + * * @param {array} [subnetParameters.delegations] Gets an array of references to * the delegations on the subnet. * @@ -32701,6 +32527,9 @@ export interface Subnets { * @param {array} [subnetParameters.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. * + * @param {array} [subnetParameters.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. + * * @param {array} [subnetParameters.delegations] Gets an array of references to * the delegations on the subnet. * @@ -32808,6 +32637,9 @@ export interface Subnets { * @param {array} [subnetParameters.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. * + * @param {array} [subnetParameters.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. + * * @param {array} [subnetParameters.delegations] Gets an array of references to * the delegations on the subnet. * @@ -33714,10 +33546,6 @@ export interface VirtualNetworkTaps { * @param {object} parameters Parameters supplied to the create or update * virtual network tap operation. * - * @param {array} [parameters.networkInterfaceTapConfigurations] Specifies the - * list of resource IDs for the network interface IP configuration that needs - * to be tapped. - * * @param {object} [parameters.destinationNetworkInterfaceIPConfiguration] The * reference to the private IP Address of the collector nic that will receive * the tap @@ -33899,6 +33727,10 @@ export interface VirtualNetworkTaps { * Gets an array of references to the external resources using subnet. * * @param {array} + * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -34078,10 +33910,6 @@ export interface VirtualNetworkTaps { * @param {object} parameters Parameters supplied to the create or update * virtual network tap operation. * - * @param {array} [parameters.networkInterfaceTapConfigurations] Specifies the - * list of resource IDs for the network interface IP configuration that needs - * to be tapped. - * * @param {object} [parameters.destinationNetworkInterfaceIPConfiguration] The * reference to the private IP Address of the collector nic that will receive * the tap @@ -34263,6 +34091,10 @@ export interface VirtualNetworkTaps { * Gets an array of references to the external resources using subnet. * * @param {array} + * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -34696,10 +34528,6 @@ export interface VirtualNetworkTaps { * @param {object} parameters Parameters supplied to the create or update * virtual network tap operation. * - * @param {array} [parameters.networkInterfaceTapConfigurations] Specifies the - * list of resource IDs for the network interface IP configuration that needs - * to be tapped. - * * @param {object} [parameters.destinationNetworkInterfaceIPConfiguration] The * reference to the private IP Address of the collector nic that will receive * the tap @@ -34881,6 +34709,10 @@ export interface VirtualNetworkTaps { * Gets an array of references to the external resources using subnet. * * @param {array} + * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -35060,10 +34892,6 @@ export interface VirtualNetworkTaps { * @param {object} parameters Parameters supplied to the create or update * virtual network tap operation. * - * @param {array} [parameters.networkInterfaceTapConfigurations] Specifies the - * list of resource IDs for the network interface IP configuration that needs - * to be tapped. - * * @param {object} [parameters.destinationNetworkInterfaceIPConfiguration] The * reference to the private IP Address of the collector nic that will receive * the tap @@ -35245,6 +35073,10 @@ export interface VirtualNetworkTaps { * Gets an array of references to the external resources using subnet. * * @param {array} + * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -36265,6 +36097,68 @@ export interface VirtualNetworkGateways { reset(resourceGroupName: string, virtualNetworkGatewayName: string, options: { gatewayVip? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Resets the VPN client shared key of the virtual network gateway in the + * specified resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + resetVpnClientSharedKeyWithHttpOperationResponse(resourceGroupName: string, virtualNetworkGatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Resets the VPN client shared key of the virtual network gateway in the + * specified resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + resetVpnClientSharedKey(resourceGroupName: string, virtualNetworkGatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + resetVpnClientSharedKey(resourceGroupName: string, virtualNetworkGatewayName: string, callback: ServiceCallback): void; + resetVpnClientSharedKey(resourceGroupName: string, virtualNetworkGatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Generates VPN client package for P2S client of the virtual network gateway * in the specified resource group. @@ -37536,6 +37430,68 @@ export interface VirtualNetworkGateways { beginReset(resourceGroupName: string, virtualNetworkGatewayName: string, options: { gatewayVip? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * Resets the VPN client shared key of the virtual network gateway in the + * specified resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginResetVpnClientSharedKeyWithHttpOperationResponse(resourceGroupName: string, virtualNetworkGatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Resets the VPN client shared key of the virtual network gateway in the + * specified resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginResetVpnClientSharedKey(resourceGroupName: string, virtualNetworkGatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginResetVpnClientSharedKey(resourceGroupName: string, virtualNetworkGatewayName: string, callback: ServiceCallback): void; + beginResetVpnClientSharedKey(resourceGroupName: string, virtualNetworkGatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Generates VPN client package for P2S client of the virtual network gateway * in the specified resource group. @@ -38484,6 +38440,9 @@ export interface VirtualNetworkGatewayConnections { * values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible * values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' * + * @param {string} [parameters.connectionProtocol] Connection protocol used for + * this connection. Possible values include: 'IKEv2', 'IKEv1' + * * @param {number} [parameters.routingWeight] The routing weight. * * @param {string} [parameters.sharedKey] The IPSec shared key. @@ -38681,6 +38640,9 @@ export interface VirtualNetworkGatewayConnections { * values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible * values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' * + * @param {string} [parameters.connectionProtocol] Connection protocol used for + * this connection. Possible values include: 'IKEv2', 'IKEv1' + * * @param {number} [parameters.routingWeight] The routing weight. * * @param {string} [parameters.sharedKey] The IPSec shared key. @@ -39382,6 +39344,9 @@ export interface VirtualNetworkGatewayConnections { * values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible * values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' * + * @param {string} [parameters.connectionProtocol] Connection protocol used for + * this connection. Possible values include: 'IKEv2', 'IKEv1' + * * @param {number} [parameters.routingWeight] The routing weight. * * @param {string} [parameters.sharedKey] The IPSec shared key. @@ -39579,6 +39544,9 @@ export interface VirtualNetworkGatewayConnections { * values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible * values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' * + * @param {string} [parameters.connectionProtocol] Connection protocol used for + * this connection. Possible values include: 'IKEv2', 'IKEv1' + * * @param {number} [parameters.routingWeight] The routing weight. * * @param {string} [parameters.sharedKey] The IPSec shared key. @@ -40793,6 +40761,22 @@ export interface VirtualWANs { * @param {boolean} [wANParameters.disableVpnEncryption] Vpn encryption to be * disabled or not. * + * @param {string} [wANParameters.securityProviderName] The Security Provider + * name. + * + * @param {boolean} [wANParameters.allowBranchToBranchTraffic] True if branch + * to branch traffic is allowed. + * + * @param {boolean} [wANParameters.allowVnetToVnetTraffic] True if Vnet to Vnet + * traffic is allowed. + * + * @param {string} [wANParameters.office365LocalBreakoutCategory] The office + * local breakout category. Possible values include: 'Optimize', + * 'OptimizeAndAllow', 'All', 'None' + * + * @param {array} [wANParameters.p2SVpnServerConfigurations] list of all + * P2SVpnServerConfigurations associated with the virtual wan. + * * @param {string} [wANParameters.provisioningState] The provisioning state of * the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' @@ -40831,6 +40815,22 @@ export interface VirtualWANs { * @param {boolean} [wANParameters.disableVpnEncryption] Vpn encryption to be * disabled or not. * + * @param {string} [wANParameters.securityProviderName] The Security Provider + * name. + * + * @param {boolean} [wANParameters.allowBranchToBranchTraffic] True if branch + * to branch traffic is allowed. + * + * @param {boolean} [wANParameters.allowVnetToVnetTraffic] True if Vnet to Vnet + * traffic is allowed. + * + * @param {string} [wANParameters.office365LocalBreakoutCategory] The office + * local breakout category. Possible values include: 'Optimize', + * 'OptimizeAndAllow', 'All', 'None' + * + * @param {array} [wANParameters.p2SVpnServerConfigurations] list of all + * P2SVpnServerConfigurations associated with the virtual wan. + * * @param {string} [wANParameters.provisioningState] The provisioning state of * the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' @@ -41119,6 +41119,22 @@ export interface VirtualWANs { * @param {boolean} [wANParameters.disableVpnEncryption] Vpn encryption to be * disabled or not. * + * @param {string} [wANParameters.securityProviderName] The Security Provider + * name. + * + * @param {boolean} [wANParameters.allowBranchToBranchTraffic] True if branch + * to branch traffic is allowed. + * + * @param {boolean} [wANParameters.allowVnetToVnetTraffic] True if Vnet to Vnet + * traffic is allowed. + * + * @param {string} [wANParameters.office365LocalBreakoutCategory] The office + * local breakout category. Possible values include: 'Optimize', + * 'OptimizeAndAllow', 'All', 'None' + * + * @param {array} [wANParameters.p2SVpnServerConfigurations] list of all + * P2SVpnServerConfigurations associated with the virtual wan. + * * @param {string} [wANParameters.provisioningState] The provisioning state of * the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' @@ -41157,6 +41173,22 @@ export interface VirtualWANs { * @param {boolean} [wANParameters.disableVpnEncryption] Vpn encryption to be * disabled or not. * + * @param {string} [wANParameters.securityProviderName] The Security Provider + * name. + * + * @param {boolean} [wANParameters.allowBranchToBranchTraffic] True if branch + * to branch traffic is allowed. + * + * @param {boolean} [wANParameters.allowVnetToVnetTraffic] True if Vnet to Vnet + * traffic is allowed. + * + * @param {string} [wANParameters.office365LocalBreakoutCategory] The office + * local breakout category. Possible values include: 'Optimize', + * 'OptimizeAndAllow', 'All', 'None' + * + * @param {array} [wANParameters.p2SVpnServerConfigurations] list of all + * P2SVpnServerConfigurations associated with the virtual wan. + * * @param {string} [wANParameters.provisioningState] The provisioning state of * the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' @@ -41518,10 +41550,10 @@ export interface VpnSites { * @param {object} vpnSiteParameters Parameters supplied to create or update * VpnSite. * - * @param {object} [vpnSiteParameters.virtualWAN] The VirtualWAN to which the + * @param {object} [vpnSiteParameters.virtualWan] The VirtualWAN to which the * vpnSite belongs * - * @param {string} [vpnSiteParameters.virtualWAN.id] Resource ID. + * @param {string} [vpnSiteParameters.virtualWan.id] Resource ID. * * @param {object} [vpnSiteParameters.deviceProperties] The device properties * @@ -41560,6 +41592,8 @@ export interface VpnSites { * of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * + * @param {boolean} [vpnSiteParameters.isSecuritySite] IsSecuritySite flag + * * @param {string} [vpnSiteParameters.id] Resource ID. * * @param {string} [vpnSiteParameters.location] Resource location. @@ -41591,10 +41625,10 @@ export interface VpnSites { * @param {object} vpnSiteParameters Parameters supplied to create or update * VpnSite. * - * @param {object} [vpnSiteParameters.virtualWAN] The VirtualWAN to which the + * @param {object} [vpnSiteParameters.virtualWan] The VirtualWAN to which the * vpnSite belongs * - * @param {string} [vpnSiteParameters.virtualWAN.id] Resource ID. + * @param {string} [vpnSiteParameters.virtualWan.id] Resource ID. * * @param {object} [vpnSiteParameters.deviceProperties] The device properties * @@ -41633,6 +41667,8 @@ export interface VpnSites { * of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * + * @param {boolean} [vpnSiteParameters.isSecuritySite] IsSecuritySite flag + * * @param {string} [vpnSiteParameters.id] Resource ID. * * @param {string} [vpnSiteParameters.location] Resource location. @@ -41916,10 +41952,10 @@ export interface VpnSites { * @param {object} vpnSiteParameters Parameters supplied to create or update * VpnSite. * - * @param {object} [vpnSiteParameters.virtualWAN] The VirtualWAN to which the + * @param {object} [vpnSiteParameters.virtualWan] The VirtualWAN to which the * vpnSite belongs * - * @param {string} [vpnSiteParameters.virtualWAN.id] Resource ID. + * @param {string} [vpnSiteParameters.virtualWan.id] Resource ID. * * @param {object} [vpnSiteParameters.deviceProperties] The device properties * @@ -41958,6 +41994,8 @@ export interface VpnSites { * of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * + * @param {boolean} [vpnSiteParameters.isSecuritySite] IsSecuritySite flag + * * @param {string} [vpnSiteParameters.id] Resource ID. * * @param {string} [vpnSiteParameters.location] Resource location. @@ -41989,10 +42027,10 @@ export interface VpnSites { * @param {object} vpnSiteParameters Parameters supplied to create or update * VpnSite. * - * @param {object} [vpnSiteParameters.virtualWAN] The VirtualWAN to which the + * @param {object} [vpnSiteParameters.virtualWan] The VirtualWAN to which the * vpnSite belongs * - * @param {string} [vpnSiteParameters.virtualWAN.id] Resource ID. + * @param {string} [vpnSiteParameters.virtualWan.id] Resource ID. * * @param {object} [vpnSiteParameters.deviceProperties] The device properties * @@ -42031,6 +42069,8 @@ export interface VpnSites { * of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * + * @param {boolean} [vpnSiteParameters.isSecuritySite] IsSecuritySite flag + * * @param {string} [vpnSiteParameters.id] Resource ID. * * @param {string} [vpnSiteParameters.location] Resource location. @@ -42561,14 +42601,28 @@ export interface VirtualHubs { * @param {object} [virtualHubParameters.virtualWan] The VirtualWAN to which * the VirtualHub belongs * - * @param {string} [virtualHubParameters.virtualWan.id] Resource ID. + * @param {object} [virtualHubParameters.vpnGateway] The VpnGateway associated + * with this VirtualHub + * + * @param {object} [virtualHubParameters.p2SVpnGateway] The P2SVpnGateway + * associated with this VirtualHub * - * @param {array} [virtualHubParameters.hubVirtualNetworkConnections] list of - * all vnet connections with this VirtualHub. + * @param {object} [virtualHubParameters.expressRouteGateway] The + * expressRouteGateway associated with this VirtualHub + * + * @param {string} [virtualHubParameters.expressRouteGateway.id] Resource ID. + * + * @param {array} [virtualHubParameters.virtualNetworkConnections] list of all + * vnet connections with this VirtualHub. * * @param {string} [virtualHubParameters.addressPrefix] Address-prefix for this * VirtualHub. * + * @param {object} [virtualHubParameters.routeTable] The routeTable associated + * with this virtual hub. + * + * @param {array} [virtualHubParameters.routeTable.routes] list of all routes. + * * @param {string} [virtualHubParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' @@ -42606,14 +42660,28 @@ export interface VirtualHubs { * @param {object} [virtualHubParameters.virtualWan] The VirtualWAN to which * the VirtualHub belongs * - * @param {string} [virtualHubParameters.virtualWan.id] Resource ID. + * @param {object} [virtualHubParameters.vpnGateway] The VpnGateway associated + * with this VirtualHub * - * @param {array} [virtualHubParameters.hubVirtualNetworkConnections] list of - * all vnet connections with this VirtualHub. + * @param {object} [virtualHubParameters.p2SVpnGateway] The P2SVpnGateway + * associated with this VirtualHub + * + * @param {object} [virtualHubParameters.expressRouteGateway] The + * expressRouteGateway associated with this VirtualHub + * + * @param {string} [virtualHubParameters.expressRouteGateway.id] Resource ID. + * + * @param {array} [virtualHubParameters.virtualNetworkConnections] list of all + * vnet connections with this VirtualHub. * * @param {string} [virtualHubParameters.addressPrefix] Address-prefix for this * VirtualHub. * + * @param {object} [virtualHubParameters.routeTable] The routeTable associated + * with this virtual hub. + * + * @param {array} [virtualHubParameters.routeTable.routes] list of all routes. + * * @param {string} [virtualHubParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' @@ -42903,14 +42971,28 @@ export interface VirtualHubs { * @param {object} [virtualHubParameters.virtualWan] The VirtualWAN to which * the VirtualHub belongs * - * @param {string} [virtualHubParameters.virtualWan.id] Resource ID. + * @param {object} [virtualHubParameters.vpnGateway] The VpnGateway associated + * with this VirtualHub * - * @param {array} [virtualHubParameters.hubVirtualNetworkConnections] list of - * all vnet connections with this VirtualHub. + * @param {object} [virtualHubParameters.p2SVpnGateway] The P2SVpnGateway + * associated with this VirtualHub + * + * @param {object} [virtualHubParameters.expressRouteGateway] The + * expressRouteGateway associated with this VirtualHub + * + * @param {string} [virtualHubParameters.expressRouteGateway.id] Resource ID. + * + * @param {array} [virtualHubParameters.virtualNetworkConnections] list of all + * vnet connections with this VirtualHub. * * @param {string} [virtualHubParameters.addressPrefix] Address-prefix for this * VirtualHub. * + * @param {object} [virtualHubParameters.routeTable] The routeTable associated + * with this virtual hub. + * + * @param {array} [virtualHubParameters.routeTable.routes] list of all routes. + * * @param {string} [virtualHubParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' @@ -42948,14 +43030,28 @@ export interface VirtualHubs { * @param {object} [virtualHubParameters.virtualWan] The VirtualWAN to which * the VirtualHub belongs * - * @param {string} [virtualHubParameters.virtualWan.id] Resource ID. + * @param {object} [virtualHubParameters.vpnGateway] The VpnGateway associated + * with this VirtualHub + * + * @param {object} [virtualHubParameters.p2SVpnGateway] The P2SVpnGateway + * associated with this VirtualHub + * + * @param {object} [virtualHubParameters.expressRouteGateway] The + * expressRouteGateway associated with this VirtualHub * - * @param {array} [virtualHubParameters.hubVirtualNetworkConnections] list of - * all vnet connections with this VirtualHub. + * @param {string} [virtualHubParameters.expressRouteGateway.id] Resource ID. + * + * @param {array} [virtualHubParameters.virtualNetworkConnections] list of all + * vnet connections with this VirtualHub. * * @param {string} [virtualHubParameters.addressPrefix] Address-prefix for this * VirtualHub. * + * @param {object} [virtualHubParameters.routeTable] The routeTable associated + * with this virtual hub. + * + * @param {array} [virtualHubParameters.routeTable.routes] list of all routes. + * * @param {string} [virtualHubParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' @@ -43533,14 +43629,8 @@ export interface VpnGateways { * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {object} [vpnGatewayParameters.policies] The policies applied to this - * vpn gateway. - * - * @param {boolean} [vpnGatewayParameters.policies.allowBranchToBranchTraffic] - * True if branch to branch traffic is allowed. - * - * @param {boolean} [vpnGatewayParameters.policies.allowVnetToVnetTraffic] True - * if Vnet to Vnet traffic is allowed. + * @param {number} [vpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this vpn gateway. * * @param {string} [vpnGatewayParameters.id] Resource ID. * @@ -43596,14 +43686,8 @@ export interface VpnGateways { * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {object} [vpnGatewayParameters.policies] The policies applied to this - * vpn gateway. - * - * @param {boolean} [vpnGatewayParameters.policies.allowBranchToBranchTraffic] - * True if branch to branch traffic is allowed. - * - * @param {boolean} [vpnGatewayParameters.policies.allowVnetToVnetTraffic] True - * if Vnet to Vnet traffic is allowed. + * @param {number} [vpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this vpn gateway. * * @param {string} [vpnGatewayParameters.id] Resource ID. * @@ -43911,14 +43995,8 @@ export interface VpnGateways { * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {object} [vpnGatewayParameters.policies] The policies applied to this - * vpn gateway. - * - * @param {boolean} [vpnGatewayParameters.policies.allowBranchToBranchTraffic] - * True if branch to branch traffic is allowed. - * - * @param {boolean} [vpnGatewayParameters.policies.allowVnetToVnetTraffic] True - * if Vnet to Vnet traffic is allowed. + * @param {number} [vpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this vpn gateway. * * @param {string} [vpnGatewayParameters.id] Resource ID. * @@ -43974,14 +44052,8 @@ export interface VpnGateways { * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {object} [vpnGatewayParameters.policies] The policies applied to this - * vpn gateway. - * - * @param {boolean} [vpnGatewayParameters.policies.allowBranchToBranchTraffic] - * True if branch to branch traffic is allowed. - * - * @param {boolean} [vpnGatewayParameters.policies.allowVnetToVnetTraffic] True - * if Vnet to Vnet traffic is allowed. + * @param {number} [vpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this vpn gateway. * * @param {string} [vpnGatewayParameters.id] Resource ID. * @@ -44359,61 +44431,12 @@ export interface VpnConnections { * status. Possible values include: 'Unknown', 'Connecting', 'Connected', * 'NotConnected' * - * @param {string} [vpnConnectionParameters.sharedKey] SharedKey for the vpn - * connection. - * - * @param {boolean} [vpnConnectionParameters.enableBgp] EnableBgp flag - * - * @param {array} [vpnConnectionParameters.ipsecPolicies] The IPSec Policies to - * be considered by this connection. - * - * @param {string} [vpnConnectionParameters.provisioningState] The provisioning - * state of the resource. Possible values include: 'Succeeded', 'Updating', - * 'Deleting', 'Failed' - * - * @param {string} [vpnConnectionParameters.id] Resource ID. - * - * @param {string} [vpnConnectionParameters.location] Resource location. - * - * @param {object} [vpnConnectionParameters.tags] Resource tags. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else - * updates the existing connection. - * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * - * @param {string} gatewayName The name of the gateway. - * - * @param {string} connectionName The name of the connection. - * - * @param {object} vpnConnectionParameters Parameters supplied to create or - * Update a VPN Connection. - * - * @param {object} [vpnConnectionParameters.remoteVpnSite] Id of the connected - * vpn site. - * - * @param {string} [vpnConnectionParameters.remoteVpnSite.id] Resource ID. - * - * @param {number} [vpnConnectionParameters.routingWeight] routing weight for - * vpn connection. + * @param {string} [vpnConnectionParameters.vpnConnectionProtocolType] + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1' * - * @param {string} [vpnConnectionParameters.connectionStatus] The connection - * status. Possible values include: 'Unknown', 'Connecting', 'Connected', - * 'NotConnected' + * @param {number} [vpnConnectionParameters.connectionBandwidth] Expected + * bandwidth in MBPS. * * @param {string} [vpnConnectionParameters.sharedKey] SharedKey for the vpn * connection. @@ -44423,212 +44446,20 @@ export interface VpnConnections { * @param {array} [vpnConnectionParameters.ipsecPolicies] The IPSec Policies to * be considered by this connection. * - * @param {string} [vpnConnectionParameters.provisioningState] The provisioning - * state of the resource. Possible values include: 'Succeeded', 'Updating', - * 'Deleting', 'Failed' - * - * @param {string} [vpnConnectionParameters.id] Resource ID. - * - * @param {string} [vpnConnectionParameters.location] Resource location. - * - * @param {object} [vpnConnectionParameters.tags] Resource tags. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {VpnConnection} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {VpnConnection} [result] - The deserialized result object if an error did not occur. - * See {@link VpnConnection} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - createOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Deletes a vpn connection. - * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * - * @param {string} gatewayName The name of the gateway. - * - * @param {string} connectionName The name of the connection. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Deletes a vpn connection. - * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * - * @param {string} gatewayName The name of the gateway. - * - * @param {string} connectionName The name of the connection. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - deleteMethod(resourceGroupName: string, gatewayName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, gatewayName: string, connectionName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, gatewayName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Retrieves all vpn connections for a particular virtual wan vpn gateway. - * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * - * @param {string} gatewayName The name of the gateway. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listByVpnGatewayWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Retrieves all vpn connections for a particular virtual wan vpn gateway. - * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * - * @param {string} gatewayName The name of the gateway. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {ListVpnConnectionsResult} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {ListVpnConnectionsResult} [result] - The deserialized result object if an error did not occur. - * See {@link ListVpnConnectionsResult} for more - * information. + * @param {boolean} [vpnConnectionParameters.enableRateLimiting] EnableBgp flag * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listByVpnGateway(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByVpnGateway(resourceGroupName: string, gatewayName: string, callback: ServiceCallback): void; - listByVpnGateway(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else - * updates the existing connection. - * - * @param {string} resourceGroupName The resource group name of the VpnGateway. - * - * @param {string} gatewayName The name of the gateway. - * - * @param {string} connectionName The name of the connection. - * - * @param {object} vpnConnectionParameters Parameters supplied to create or - * Update a VPN Connection. - * - * @param {object} [vpnConnectionParameters.remoteVpnSite] Id of the connected - * vpn site. - * - * @param {string} [vpnConnectionParameters.remoteVpnSite.id] Resource ID. - * - * @param {number} [vpnConnectionParameters.routingWeight] routing weight for - * vpn connection. - * - * @param {string} [vpnConnectionParameters.connectionStatus] The connection - * status. Possible values include: 'Unknown', 'Connecting', 'Connected', - * 'NotConnected' - * - * @param {string} [vpnConnectionParameters.sharedKey] SharedKey for the vpn - * connection. - * - * @param {boolean} [vpnConnectionParameters.enableBgp] EnableBgp flag - * - * @param {array} [vpnConnectionParameters.ipsecPolicies] The IPSec Policies to - * be considered by this connection. + * @param {boolean} [vpnConnectionParameters.enableInternetSecurity] Enable + * internet security * * @param {string} [vpnConnectionParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {string} [vpnConnectionParameters.id] Resource ID. - * - * @param {string} [vpnConnectionParameters.location] Resource location. + * @param {string} [vpnConnectionParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. * - * @param {object} [vpnConnectionParameters.tags] Resource tags. + * @param {string} [vpnConnectionParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -44641,7 +44472,7 @@ export interface VpnConnections { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else @@ -44668,6 +44499,222 @@ export interface VpnConnections { * status. Possible values include: 'Unknown', 'Connecting', 'Connected', * 'NotConnected' * + * @param {string} [vpnConnectionParameters.vpnConnectionProtocolType] + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1' + * + * @param {number} [vpnConnectionParameters.connectionBandwidth] Expected + * bandwidth in MBPS. + * + * @param {string} [vpnConnectionParameters.sharedKey] SharedKey for the vpn + * connection. + * + * @param {boolean} [vpnConnectionParameters.enableBgp] EnableBgp flag + * + * @param {array} [vpnConnectionParameters.ipsecPolicies] The IPSec Policies to + * be considered by this connection. + * + * @param {boolean} [vpnConnectionParameters.enableRateLimiting] EnableBgp flag + * + * @param {boolean} [vpnConnectionParameters.enableInternetSecurity] Enable + * internet security + * + * @param {string} [vpnConnectionParameters.provisioningState] The provisioning + * state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * + * @param {string} [vpnConnectionParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [vpnConnectionParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VpnConnection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VpnConnection} [result] - The deserialized result object if an error did not occur. + * See {@link VpnConnection} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a vpn connection. + * + * @param {string} resourceGroupName The resource group name of the VpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {string} connectionName The name of the connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a vpn connection. + * + * @param {string} resourceGroupName The resource group name of the VpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {string} connectionName The name of the connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, gatewayName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, gatewayName: string, connectionName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, gatewayName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the VpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByVpnGatewayWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves all vpn connections for a particular virtual wan vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the VpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ListVpnConnectionsResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ListVpnConnectionsResult} [result] - The deserialized result object if an error did not occur. + * See {@link ListVpnConnectionsResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByVpnGateway(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByVpnGateway(resourceGroupName: string, gatewayName: string, callback: ServiceCallback): void; + listByVpnGateway(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else + * updates the existing connection. + * + * @param {string} resourceGroupName The resource group name of the VpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {string} connectionName The name of the connection. + * + * @param {object} vpnConnectionParameters Parameters supplied to create or + * Update a VPN Connection. + * + * @param {object} [vpnConnectionParameters.remoteVpnSite] Id of the connected + * vpn site. + * + * @param {string} [vpnConnectionParameters.remoteVpnSite.id] Resource ID. + * + * @param {number} [vpnConnectionParameters.routingWeight] routing weight for + * vpn connection. + * + * @param {string} [vpnConnectionParameters.connectionStatus] The connection + * status. Possible values include: 'Unknown', 'Connecting', 'Connected', + * 'NotConnected' + * + * @param {string} [vpnConnectionParameters.vpnConnectionProtocolType] + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1' + * + * @param {number} [vpnConnectionParameters.connectionBandwidth] Expected + * bandwidth in MBPS. + * * @param {string} [vpnConnectionParameters.sharedKey] SharedKey for the vpn * connection. * @@ -44676,15 +44723,88 @@ export interface VpnConnections { * @param {array} [vpnConnectionParameters.ipsecPolicies] The IPSec Policies to * be considered by this connection. * + * @param {boolean} [vpnConnectionParameters.enableRateLimiting] EnableBgp flag + * + * @param {boolean} [vpnConnectionParameters.enableInternetSecurity] Enable + * internet security + * * @param {string} [vpnConnectionParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * + * @param {string} [vpnConnectionParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. + * * @param {string} [vpnConnectionParameters.id] Resource ID. * - * @param {string} [vpnConnectionParameters.location] Resource location. + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, connectionName: string, vpnConnectionParameters: models.VpnConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates a vpn connection to a scalable vpn gateway if it doesn't exist else + * updates the existing connection. + * + * @param {string} resourceGroupName The resource group name of the VpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {string} connectionName The name of the connection. + * + * @param {object} vpnConnectionParameters Parameters supplied to create or + * Update a VPN Connection. + * + * @param {object} [vpnConnectionParameters.remoteVpnSite] Id of the connected + * vpn site. + * + * @param {string} [vpnConnectionParameters.remoteVpnSite.id] Resource ID. + * + * @param {number} [vpnConnectionParameters.routingWeight] routing weight for + * vpn connection. + * + * @param {string} [vpnConnectionParameters.connectionStatus] The connection + * status. Possible values include: 'Unknown', 'Connecting', 'Connected', + * 'NotConnected' + * + * @param {string} [vpnConnectionParameters.vpnConnectionProtocolType] + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1' + * + * @param {number} [vpnConnectionParameters.connectionBandwidth] Expected + * bandwidth in MBPS. + * + * @param {string} [vpnConnectionParameters.sharedKey] SharedKey for the vpn + * connection. + * + * @param {boolean} [vpnConnectionParameters.enableBgp] EnableBgp flag + * + * @param {array} [vpnConnectionParameters.ipsecPolicies] The IPSec Policies to + * be considered by this connection. + * + * @param {boolean} [vpnConnectionParameters.enableRateLimiting] EnableBgp flag + * + * @param {boolean} [vpnConnectionParameters.enableInternetSecurity] Enable + * internet security * - * @param {object} [vpnConnectionParameters.tags] Resource tags. + * @param {string} [vpnConnectionParameters.provisioningState] The provisioning + * state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * + * @param {string} [vpnConnectionParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [vpnConnectionParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -44837,3 +44957,1628 @@ export interface VpnConnections { listByVpnGatewayNext(nextPageLink: string, callback: ServiceCallback): void; listByVpnGatewayNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } + +/** + * @class + * P2SVpnServerConfigurations + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface P2SVpnServerConfigurations { + + + /** + * Retrieves the details of a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves the details of a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {P2SVpnServerConfiguration} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {P2SVpnServerConfiguration} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnServerConfiguration} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it + * doesn't exist else updates the existing P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} p2SVpnServerConfigurationParameters Parameters supplied to + * create or Update a P2SVpnServerConfiguration. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesName] + * The name of the P2SVpnServerConfiguration that is unique within a VirtualWan + * in a resource group. This name can be used to access the resource along with + * Paren VirtualWan resource name. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnProtocols] + * vpnProtocols for the P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRootCertificates] + * VPN client root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRevokedCertificates] + * VPN client revoked certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusServerRootCertificates] + * Radius Server root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusClientRootCertificates] + * Radius client root certificate of P2SVpnServerConfiguration. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for P2SVpnServerConfiguration. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerAddress] + * The radius server address property of the P2SVpnServerConfiguration resource + * for point to site client connection. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The + * radius secret property of the P2SVpnServerConfiguration resource for for + * point to site client connection. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] + * A unique read-only string that changes whenever the resource is updated. + * + * @param {string} [p2SVpnServerConfigurationParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [p2SVpnServerConfigurationParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it + * doesn't exist else updates the existing P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} p2SVpnServerConfigurationParameters Parameters supplied to + * create or Update a P2SVpnServerConfiguration. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesName] + * The name of the P2SVpnServerConfiguration that is unique within a VirtualWan + * in a resource group. This name can be used to access the resource along with + * Paren VirtualWan resource name. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnProtocols] + * vpnProtocols for the P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRootCertificates] + * VPN client root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRevokedCertificates] + * VPN client revoked certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusServerRootCertificates] + * Radius Server root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusClientRootCertificates] + * Radius client root certificate of P2SVpnServerConfiguration. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for P2SVpnServerConfiguration. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerAddress] + * The radius server address property of the P2SVpnServerConfiguration resource + * for point to site client connection. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The + * radius secret property of the P2SVpnServerConfiguration resource for for + * point to site client connection. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] + * A unique read-only string that changes whenever the resource is updated. + * + * @param {string} [p2SVpnServerConfigurationParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [p2SVpnServerConfigurationParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {P2SVpnServerConfiguration} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {P2SVpnServerConfiguration} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnServerConfiguration} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByVirtualWanWithHttpOperationResponse(resourceGroupName: string, virtualWanName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ListP2SVpnServerConfigurationsResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ListP2SVpnServerConfigurationsResult} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnServerConfigurationsResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByVirtualWan(resourceGroupName: string, virtualWanName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByVirtualWan(resourceGroupName: string, virtualWanName: string, callback: ServiceCallback): void; + listByVirtualWan(resourceGroupName: string, virtualWanName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it + * doesn't exist else updates the existing P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} p2SVpnServerConfigurationParameters Parameters supplied to + * create or Update a P2SVpnServerConfiguration. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesName] + * The name of the P2SVpnServerConfiguration that is unique within a VirtualWan + * in a resource group. This name can be used to access the resource along with + * Paren VirtualWan resource name. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnProtocols] + * vpnProtocols for the P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRootCertificates] + * VPN client root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRevokedCertificates] + * VPN client revoked certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusServerRootCertificates] + * Radius Server root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusClientRootCertificates] + * Radius client root certificate of P2SVpnServerConfiguration. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for P2SVpnServerConfiguration. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerAddress] + * The radius server address property of the P2SVpnServerConfiguration resource + * for point to site client connection. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The + * radius secret property of the P2SVpnServerConfiguration resource for for + * point to site client connection. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] + * A unique read-only string that changes whenever the resource is updated. + * + * @param {string} [p2SVpnServerConfigurationParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [p2SVpnServerConfigurationParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it + * doesn't exist else updates the existing P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} p2SVpnServerConfigurationParameters Parameters supplied to + * create or Update a P2SVpnServerConfiguration. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesName] + * The name of the P2SVpnServerConfiguration that is unique within a VirtualWan + * in a resource group. This name can be used to access the resource along with + * Paren VirtualWan resource name. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnProtocols] + * vpnProtocols for the P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRootCertificates] + * VPN client root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRevokedCertificates] + * VPN client revoked certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusServerRootCertificates] + * Radius Server root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusClientRootCertificates] + * Radius client root certificate of P2SVpnServerConfiguration. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for P2SVpnServerConfiguration. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerAddress] + * The radius server address property of the P2SVpnServerConfiguration resource + * for point to site client connection. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The + * radius secret property of the P2SVpnServerConfiguration resource for for + * point to site client connection. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] + * A unique read-only string that changes whenever the resource is updated. + * + * @param {string} [p2SVpnServerConfigurationParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [p2SVpnServerConfigurationParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {P2SVpnServerConfiguration} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {P2SVpnServerConfiguration} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnServerConfiguration} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, p2SVpnServerConfigurationParameters: models.P2SVpnServerConfiguration, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, virtualWanName: string, p2SVpnServerConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByVirtualWanNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ListP2SVpnServerConfigurationsResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ListP2SVpnServerConfigurationsResult} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnServerConfigurationsResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByVirtualWanNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByVirtualWanNext(nextPageLink: string, callback: ServiceCallback): void; + listByVirtualWanNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * P2SVpnGateways + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface P2SVpnGateways { + + + /** + * Retrieves the details of a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves the details of a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {P2SVpnGateway} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {P2SVpnGateway} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, gatewayName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the + * existing gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to create or + * Update a virtual wan p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.virtualHub] The VirtualHub to which + * the gateway belongs + * + * @param {string} [p2SVpnGatewayParameters.provisioningState] The provisioning + * state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * + * @param {number} [p2SVpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.p2SVpnServerConfiguration] The + * P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. + * + * @param {string} [p2SVpnGatewayParameters.p2SVpnServerConfiguration.id] + * Resource ID. + * + * @param {object} [p2SVpnGatewayParameters.vpnClientAddressPool] The reference + * of the address space resource which represents Address space for P2S + * VpnClient. + * + * @param {array} + * [p2SVpnGatewayParameters.vpnClientAddressPool.addressPrefixes] A list of + * address blocks reserved for this virtual network in CIDR notation. + * + * @param {string} [p2SVpnGatewayParameters.id] Resource ID. + * + * @param {string} [p2SVpnGatewayParameters.location] Resource location. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the + * existing gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to create or + * Update a virtual wan p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.virtualHub] The VirtualHub to which + * the gateway belongs + * + * @param {string} [p2SVpnGatewayParameters.provisioningState] The provisioning + * state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * + * @param {number} [p2SVpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.p2SVpnServerConfiguration] The + * P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. + * + * @param {string} [p2SVpnGatewayParameters.p2SVpnServerConfiguration.id] + * Resource ID. + * + * @param {object} [p2SVpnGatewayParameters.vpnClientAddressPool] The reference + * of the address space resource which represents Address space for P2S + * VpnClient. + * + * @param {array} + * [p2SVpnGatewayParameters.vpnClientAddressPool.addressPrefixes] A list of + * address blocks reserved for this virtual network in CIDR notation. + * + * @param {string} [p2SVpnGatewayParameters.id] Resource ID. + * + * @param {string} [p2SVpnGatewayParameters.location] Resource location. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {P2SVpnGateway} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {P2SVpnGateway} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to update a + * virtual wan p2s vpn gateway tags. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateTagsWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to update a + * virtual wan p2s vpn gateway tags. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {P2SVpnGateway} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {P2SVpnGateway} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + updateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, gatewayName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all the P2SVpnGateways in a resource group. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all the P2SVpnGateways in a resource group. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ListP2SVpnGatewaysResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ListP2SVpnGatewaysResult} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnGatewaysResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all the P2SVpnGateways in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all the P2SVpnGateways in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ListP2SVpnGatewaysResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ListP2SVpnGatewaysResult} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnGatewaysResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified + * resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} gatewayName The name of the P2SVpnGateway. + * + * @param {object} parameters Parameters supplied to the generate P2SVpnGateway + * VPN client package operation. + * + * @param {string} [parameters.authenticationMethod] VPN client Authentication + * Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values + * include: 'EAPTLS', 'EAPMSCHAPv2' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + generateVpnProfileWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified + * resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} gatewayName The name of the P2SVpnGateway. + * + * @param {object} parameters Parameters supplied to the generate P2SVpnGateway + * VPN client package operation. + * + * @param {string} [parameters.authenticationMethod] VPN client Authentication + * Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values + * include: 'EAPTLS', 'EAPMSCHAPv2' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VpnProfileResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VpnProfileResponse} [result] - The deserialized result object if an error did not occur. + * See {@link VpnProfileResponse} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + generateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + generateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, callback: ServiceCallback): void; + generateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the + * existing gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to create or + * Update a virtual wan p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.virtualHub] The VirtualHub to which + * the gateway belongs + * + * @param {string} [p2SVpnGatewayParameters.provisioningState] The provisioning + * state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * + * @param {number} [p2SVpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.p2SVpnServerConfiguration] The + * P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. + * + * @param {string} [p2SVpnGatewayParameters.p2SVpnServerConfiguration.id] + * Resource ID. + * + * @param {object} [p2SVpnGatewayParameters.vpnClientAddressPool] The reference + * of the address space resource which represents Address space for P2S + * VpnClient. + * + * @param {array} + * [p2SVpnGatewayParameters.vpnClientAddressPool.addressPrefixes] A list of + * address blocks reserved for this virtual network in CIDR notation. + * + * @param {string} [p2SVpnGatewayParameters.id] Resource ID. + * + * @param {string} [p2SVpnGatewayParameters.location] Resource location. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the + * existing gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to create or + * Update a virtual wan p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.virtualHub] The VirtualHub to which + * the gateway belongs + * + * @param {string} [p2SVpnGatewayParameters.provisioningState] The provisioning + * state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * + * @param {number} [p2SVpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.p2SVpnServerConfiguration] The + * P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. + * + * @param {string} [p2SVpnGatewayParameters.p2SVpnServerConfiguration.id] + * Resource ID. + * + * @param {object} [p2SVpnGatewayParameters.vpnClientAddressPool] The reference + * of the address space resource which represents Address space for P2S + * VpnClient. + * + * @param {array} + * [p2SVpnGatewayParameters.vpnClientAddressPool.addressPrefixes] A list of + * address blocks reserved for this virtual network in CIDR notation. + * + * @param {string} [p2SVpnGatewayParameters.id] Resource ID. + * + * @param {string} [p2SVpnGatewayParameters.location] Resource location. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {P2SVpnGateway} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {P2SVpnGateway} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.P2SVpnGateway, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to update a + * virtual wan p2s vpn gateway tags. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to update a + * virtual wan p2s vpn gateway tags. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {P2SVpnGateway} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {P2SVpnGateway} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginUpdateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(resourceGroupName: string, gatewayName: string, p2SVpnGatewayParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, gatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, gatewayName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, gatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified + * resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} gatewayName The name of the P2SVpnGateway. + * + * @param {object} parameters Parameters supplied to the generate P2SVpnGateway + * VPN client package operation. + * + * @param {string} [parameters.authenticationMethod] VPN client Authentication + * Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values + * include: 'EAPTLS', 'EAPMSCHAPv2' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginGenerateVpnProfileWithHttpOperationResponse(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified + * resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} gatewayName The name of the P2SVpnGateway. + * + * @param {object} parameters Parameters supplied to the generate P2SVpnGateway + * VPN client package operation. + * + * @param {string} [parameters.authenticationMethod] VPN client Authentication + * Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values + * include: 'EAPTLS', 'EAPMSCHAPv2' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VpnProfileResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VpnProfileResponse} [result] - The deserialized result object if an error did not occur. + * See {@link VpnProfileResponse} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginGenerateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginGenerateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, callback: ServiceCallback): void; + beginGenerateVpnProfile(resourceGroupName: string, gatewayName: string, parameters: models.P2SVpnProfileParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all the P2SVpnGateways in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all the P2SVpnGateways in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ListP2SVpnGatewaysResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ListP2SVpnGatewaysResult} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnGatewaysResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all the P2SVpnGateways in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all the P2SVpnGateways in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ListP2SVpnGatewaysResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ListP2SVpnGatewaysResult} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnGatewaysResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} diff --git a/lib/services/networkManagement2/lib/operations/index.js b/lib/services/networkManagement2/lib/operations/index.js index 1e5dcea1af..5d322c1aef 100644 --- a/lib/services/networkManagement2/lib/operations/index.js +++ b/lib/services/networkManagement2/lib/operations/index.js @@ -75,3 +75,5 @@ exports.VirtualHubs = require('./virtualHubs'); exports.HubVirtualNetworkConnections = require('./hubVirtualNetworkConnections'); exports.VpnGateways = require('./vpnGateways'); exports.VpnConnections = require('./vpnConnections'); +exports.P2SVpnServerConfigurations = require('./p2SVpnServerConfigurations'); +exports.P2SVpnGateways = require('./p2SVpnGateways'); diff --git a/lib/services/networkManagement2/lib/operations/networkInterfaceTapConfigurations.js b/lib/services/networkManagement2/lib/operations/networkInterfaceTapConfigurations.js index 2dcdbaba2f..dddd3b2fd2 100644 --- a/lib/services/networkManagement2/lib/operations/networkInterfaceTapConfigurations.js +++ b/lib/services/networkManagement2/lib/operations/networkInterfaceTapConfigurations.js @@ -245,11 +245,6 @@ function _get(resourceGroupName, networkInterfaceName, tapConfigurationName, opt * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference * of the Virtual Network Tap resource. * - * @param {array} - * [tapConfigurationParameters.virtualNetworkTap.networkInterfaceTapConfigurations] - * Specifies the list of resource IDs for the network interface IP - * configuration that needs to be tapped. - * * @param {object} * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration] * The reference to the private IP Address of the collector nic that will @@ -436,6 +431,10 @@ function _get(resourceGroupName, networkInterfaceName, tapConfigurationName, opt * Gets an array of references to the external resources using subnet. * * @param {array} + * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -967,11 +966,6 @@ function _beginDeleteMethod(resourceGroupName, networkInterfaceName, tapConfigur * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference * of the Virtual Network Tap resource. * - * @param {array} - * [tapConfigurationParameters.virtualNetworkTap.networkInterfaceTapConfigurations] - * Specifies the list of resource IDs for the network interface IP - * configuration that needs to be tapped. - * * @param {object} * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration] * The reference to the private IP Address of the collector nic that will @@ -1158,6 +1152,10 @@ function _beginDeleteMethod(resourceGroupName, networkInterfaceName, tapConfigur * Gets an array of references to the external resources using subnet. * * @param {array} + * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -1843,11 +1841,6 @@ class NetworkInterfaceTapConfigurations { * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference * of the Virtual Network Tap resource. * - * @param {array} - * [tapConfigurationParameters.virtualNetworkTap.networkInterfaceTapConfigurations] - * Specifies the list of resource IDs for the network interface IP - * configuration that needs to be tapped. - * * @param {object} * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration] * The reference to the private IP Address of the collector nic that will @@ -2034,6 +2027,10 @@ class NetworkInterfaceTapConfigurations { * Gets an array of references to the external resources using subnet. * * @param {array} + * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -2244,11 +2241,6 @@ class NetworkInterfaceTapConfigurations { * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference * of the Virtual Network Tap resource. * - * @param {array} - * [tapConfigurationParameters.virtualNetworkTap.networkInterfaceTapConfigurations] - * Specifies the list of resource IDs for the network interface IP - * configuration that needs to be tapped. - * * @param {object} * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration] * The reference to the private IP Address of the collector nic that will @@ -2435,6 +2427,10 @@ class NetworkInterfaceTapConfigurations { * Gets an array of references to the external resources using subnet. * * @param {array} + * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -2844,11 +2840,6 @@ class NetworkInterfaceTapConfigurations { * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference * of the Virtual Network Tap resource. * - * @param {array} - * [tapConfigurationParameters.virtualNetworkTap.networkInterfaceTapConfigurations] - * Specifies the list of resource IDs for the network interface IP - * configuration that needs to be tapped. - * * @param {object} * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration] * The reference to the private IP Address of the collector nic that will @@ -3035,6 +3026,10 @@ class NetworkInterfaceTapConfigurations { * Gets an array of references to the external resources using subnet. * * @param {array} + * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -3245,11 +3240,6 @@ class NetworkInterfaceTapConfigurations { * @param {object} [tapConfigurationParameters.virtualNetworkTap] The reference * of the Virtual Network Tap resource. * - * @param {array} - * [tapConfigurationParameters.virtualNetworkTap.networkInterfaceTapConfigurations] - * Specifies the list of resource IDs for the network interface IP - * configuration that needs to be tapped. - * * @param {object} * [tapConfigurationParameters.virtualNetworkTap.destinationNetworkInterfaceIPConfiguration] * The reference to the private IP Address of the collector nic that will @@ -3436,6 +3426,10 @@ class NetworkInterfaceTapConfigurations { * Gets an array of references to the external resources using subnet. * * @param {array} + * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [tapConfigurationParameters.virtualNetworkTap.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * diff --git a/lib/services/networkManagement2/lib/operations/networkInterfaces.js b/lib/services/networkManagement2/lib/operations/networkInterfaces.js index 29a3f41327..11438beaa6 100644 --- a/lib/services/networkManagement2/lib/operations/networkInterfaces.js +++ b/lib/services/networkManagement2/lib/operations/networkInterfaces.js @@ -243,6 +243,8 @@ function _get(resourceGroupName, networkInterfaceName, options, callback) { * @param {object} [parameters.virtualMachine] The reference of a virtual * machine. * + * @param {string} [parameters.virtualMachine.id] Resource ID. + * * @param {object} [parameters.networkSecurityGroup] The reference of the * NetworkSecurityGroup resource. * @@ -269,36 +271,6 @@ function _get(resourceGroupName, networkInterfaceName, options, callback) { * * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. * - * @param {object} [parameters.interfaceEndpoint] A reference to the interface - * endpoint to which the network interface is linked. - * - * @param {string} [parameters.interfaceEndpoint.fqdn] A first-party service's - * FQDN that is mapped to the private IP allocated via this interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.endpointService] A reference - * to the service being brought into the virtual network. - * - * @param {string} [parameters.interfaceEndpoint.endpointService.id] A unique - * identifier of the service being referenced by the interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.subnet] The ID of the subnet - * from which the private IP will be allocated. - * - * @param {string} [parameters.interfaceEndpoint.subnet.id] Resource ID. - * - * @param {array} [parameters.interfaceEndpoint.networkInterfaces] Gets an - * array of references to the network interfaces created for this interface - * endpoint. - * - * @param {string} [parameters.interfaceEndpoint.etag] Gets a unique read-only - * string that changes whenever the resource is updated. - * - * @param {string} [parameters.interfaceEndpoint.id] Resource ID. - * - * @param {string} [parameters.interfaceEndpoint.location] Resource location. - * - * @param {object} [parameters.interfaceEndpoint.tags] Resource tags. - * * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of * the network interface. * @@ -1883,6 +1855,8 @@ function _beginDeleteMethod(resourceGroupName, networkInterfaceName, options, ca * @param {object} [parameters.virtualMachine] The reference of a virtual * machine. * + * @param {string} [parameters.virtualMachine.id] Resource ID. + * * @param {object} [parameters.networkSecurityGroup] The reference of the * NetworkSecurityGroup resource. * @@ -1909,36 +1883,6 @@ function _beginDeleteMethod(resourceGroupName, networkInterfaceName, options, ca * * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. * - * @param {object} [parameters.interfaceEndpoint] A reference to the interface - * endpoint to which the network interface is linked. - * - * @param {string} [parameters.interfaceEndpoint.fqdn] A first-party service's - * FQDN that is mapped to the private IP allocated via this interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.endpointService] A reference - * to the service being brought into the virtual network. - * - * @param {string} [parameters.interfaceEndpoint.endpointService.id] A unique - * identifier of the service being referenced by the interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.subnet] The ID of the subnet - * from which the private IP will be allocated. - * - * @param {string} [parameters.interfaceEndpoint.subnet.id] Resource ID. - * - * @param {array} [parameters.interfaceEndpoint.networkInterfaces] Gets an - * array of references to the network interfaces created for this interface - * endpoint. - * - * @param {string} [parameters.interfaceEndpoint.etag] Gets a unique read-only - * string that changes whenever the resource is updated. - * - * @param {string} [parameters.interfaceEndpoint.id] Resource ID. - * - * @param {string} [parameters.interfaceEndpoint.location] Resource location. - * - * @param {object} [parameters.interfaceEndpoint.tags] Resource tags. - * * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of * the network interface. * @@ -3488,6 +3432,8 @@ class NetworkInterfaces { * @param {object} [parameters.virtualMachine] The reference of a virtual * machine. * + * @param {string} [parameters.virtualMachine.id] Resource ID. + * * @param {object} [parameters.networkSecurityGroup] The reference of the * NetworkSecurityGroup resource. * @@ -3514,36 +3460,6 @@ class NetworkInterfaces { * * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. * - * @param {object} [parameters.interfaceEndpoint] A reference to the interface - * endpoint to which the network interface is linked. - * - * @param {string} [parameters.interfaceEndpoint.fqdn] A first-party service's - * FQDN that is mapped to the private IP allocated via this interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.endpointService] A reference - * to the service being brought into the virtual network. - * - * @param {string} [parameters.interfaceEndpoint.endpointService.id] A unique - * identifier of the service being referenced by the interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.subnet] The ID of the subnet - * from which the private IP will be allocated. - * - * @param {string} [parameters.interfaceEndpoint.subnet.id] Resource ID. - * - * @param {array} [parameters.interfaceEndpoint.networkInterfaces] Gets an - * array of references to the network interfaces created for this interface - * endpoint. - * - * @param {string} [parameters.interfaceEndpoint.etag] Gets a unique read-only - * string that changes whenever the resource is updated. - * - * @param {string} [parameters.interfaceEndpoint.id] Resource ID. - * - * @param {string} [parameters.interfaceEndpoint.location] Resource location. - * - * @param {object} [parameters.interfaceEndpoint.tags] Resource tags. - * * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of * the network interface. * @@ -3645,6 +3561,8 @@ class NetworkInterfaces { * @param {object} [parameters.virtualMachine] The reference of a virtual * machine. * + * @param {string} [parameters.virtualMachine.id] Resource ID. + * * @param {object} [parameters.networkSecurityGroup] The reference of the * NetworkSecurityGroup resource. * @@ -3671,36 +3589,6 @@ class NetworkInterfaces { * * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. * - * @param {object} [parameters.interfaceEndpoint] A reference to the interface - * endpoint to which the network interface is linked. - * - * @param {string} [parameters.interfaceEndpoint.fqdn] A first-party service's - * FQDN that is mapped to the private IP allocated via this interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.endpointService] A reference - * to the service being brought into the virtual network. - * - * @param {string} [parameters.interfaceEndpoint.endpointService.id] A unique - * identifier of the service being referenced by the interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.subnet] The ID of the subnet - * from which the private IP will be allocated. - * - * @param {string} [parameters.interfaceEndpoint.subnet.id] Resource ID. - * - * @param {array} [parameters.interfaceEndpoint.networkInterfaces] Gets an - * array of references to the network interfaces created for this interface - * endpoint. - * - * @param {string} [parameters.interfaceEndpoint.etag] Gets a unique read-only - * string that changes whenever the resource is updated. - * - * @param {string} [parameters.interfaceEndpoint.id] Resource ID. - * - * @param {string} [parameters.interfaceEndpoint.location] Resource location. - * - * @param {object} [parameters.interfaceEndpoint.tags] Resource tags. - * * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of * the network interface. * @@ -4835,6 +4723,8 @@ class NetworkInterfaces { * @param {object} [parameters.virtualMachine] The reference of a virtual * machine. * + * @param {string} [parameters.virtualMachine.id] Resource ID. + * * @param {object} [parameters.networkSecurityGroup] The reference of the * NetworkSecurityGroup resource. * @@ -4861,36 +4751,6 @@ class NetworkInterfaces { * * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. * - * @param {object} [parameters.interfaceEndpoint] A reference to the interface - * endpoint to which the network interface is linked. - * - * @param {string} [parameters.interfaceEndpoint.fqdn] A first-party service's - * FQDN that is mapped to the private IP allocated via this interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.endpointService] A reference - * to the service being brought into the virtual network. - * - * @param {string} [parameters.interfaceEndpoint.endpointService.id] A unique - * identifier of the service being referenced by the interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.subnet] The ID of the subnet - * from which the private IP will be allocated. - * - * @param {string} [parameters.interfaceEndpoint.subnet.id] Resource ID. - * - * @param {array} [parameters.interfaceEndpoint.networkInterfaces] Gets an - * array of references to the network interfaces created for this interface - * endpoint. - * - * @param {string} [parameters.interfaceEndpoint.etag] Gets a unique read-only - * string that changes whenever the resource is updated. - * - * @param {string} [parameters.interfaceEndpoint.id] Resource ID. - * - * @param {string} [parameters.interfaceEndpoint.location] Resource location. - * - * @param {object} [parameters.interfaceEndpoint.tags] Resource tags. - * * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of * the network interface. * @@ -4992,6 +4852,8 @@ class NetworkInterfaces { * @param {object} [parameters.virtualMachine] The reference of a virtual * machine. * + * @param {string} [parameters.virtualMachine.id] Resource ID. + * * @param {object} [parameters.networkSecurityGroup] The reference of the * NetworkSecurityGroup resource. * @@ -5018,36 +4880,6 @@ class NetworkInterfaces { * * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. * - * @param {object} [parameters.interfaceEndpoint] A reference to the interface - * endpoint to which the network interface is linked. - * - * @param {string} [parameters.interfaceEndpoint.fqdn] A first-party service's - * FQDN that is mapped to the private IP allocated via this interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.endpointService] A reference - * to the service being brought into the virtual network. - * - * @param {string} [parameters.interfaceEndpoint.endpointService.id] A unique - * identifier of the service being referenced by the interface endpoint. - * - * @param {object} [parameters.interfaceEndpoint.subnet] The ID of the subnet - * from which the private IP will be allocated. - * - * @param {string} [parameters.interfaceEndpoint.subnet.id] Resource ID. - * - * @param {array} [parameters.interfaceEndpoint.networkInterfaces] Gets an - * array of references to the network interfaces created for this interface - * endpoint. - * - * @param {string} [parameters.interfaceEndpoint.etag] Gets a unique read-only - * string that changes whenever the resource is updated. - * - * @param {string} [parameters.interfaceEndpoint.id] Resource ID. - * - * @param {string} [parameters.interfaceEndpoint.location] Resource location. - * - * @param {object} [parameters.interfaceEndpoint.tags] Resource tags. - * * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of * the network interface. * diff --git a/lib/services/networkManagement2/lib/operations/p2SVpnGateways.js b/lib/services/networkManagement2/lib/operations/p2SVpnGateways.js new file mode 100644 index 0000000000..fe009e2efa --- /dev/null +++ b/lib/services/networkManagement2/lib/operations/p2SVpnGateways.js @@ -0,0 +1,3065 @@ +/* + * 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. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Retrieves the details of a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, gatewayName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (gatewayName === null || gatewayName === undefined || typeof gatewayName.valueOf() !== 'string') { + throw new Error('gatewayName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['P2SVpnGateway']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the + * existing gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to create or + * Update a virtual wan p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.virtualHub] The VirtualHub to which + * the gateway belongs + * + * @param {string} [p2SVpnGatewayParameters.provisioningState] The provisioning + * state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * + * @param {number} [p2SVpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.p2SVpnServerConfiguration] The + * P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. + * + * @param {string} [p2SVpnGatewayParameters.p2SVpnServerConfiguration.id] + * Resource ID. + * + * @param {object} [p2SVpnGatewayParameters.vpnClientAddressPool] The reference + * of the address space resource which represents Address space for P2S + * VpnClient. + * + * @param {array} + * [p2SVpnGatewayParameters.vpnClientAddressPool.addressPrefixes] A list of + * address blocks reserved for this virtual network in CIDR notation. + * + * @param {string} [p2SVpnGatewayParameters.id] Resource ID. + * + * @param {string} [p2SVpnGatewayParameters.location] Resource location. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['P2SVpnGateway']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Updates virtual wan p2s vpn gateway tags. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to update a + * virtual wan p2s vpn gateway tags. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['P2SVpnGateway']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Deletes a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, gatewayName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, gatewayName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Lists all the P2SVpnGateways in a resource group. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnGatewaysResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroup(resourceGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ListP2SVpnGatewaysResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Lists all the P2SVpnGateways in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnGatewaysResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ListP2SVpnGatewaysResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified + * resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} gatewayName The name of the P2SVpnGateway. + * + * @param {object} parameters Parameters supplied to the generate P2SVpnGateway + * VPN client package operation. + * + * @param {string} [parameters.authenticationMethod] VPN client Authentication + * Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values + * include: 'EAPTLS', 'EAPMSCHAPv2' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VpnProfileResponse} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _generateVpnProfile(resourceGroupName, gatewayName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VpnProfileResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the + * existing gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to create or + * Update a virtual wan p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.virtualHub] The VirtualHub to which + * the gateway belongs + * + * @param {string} [p2SVpnGatewayParameters.provisioningState] The provisioning + * state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * + * @param {number} [p2SVpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.p2SVpnServerConfiguration] The + * P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. + * + * @param {string} [p2SVpnGatewayParameters.p2SVpnServerConfiguration.id] + * Resource ID. + * + * @param {object} [p2SVpnGatewayParameters.vpnClientAddressPool] The reference + * of the address space resource which represents Address space for P2S + * VpnClient. + * + * @param {array} + * [p2SVpnGatewayParameters.vpnClientAddressPool.addressPrefixes] A list of + * address blocks reserved for this virtual network in CIDR notation. + * + * @param {string} [p2SVpnGatewayParameters.id] Resource ID. + * + * @param {string} [p2SVpnGatewayParameters.location] Resource location. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (gatewayName === null || gatewayName === undefined || typeof gatewayName.valueOf() !== 'string') { + throw new Error('gatewayName cannot be null or undefined and it must be of type string.'); + } + if (p2SVpnGatewayParameters === null || p2SVpnGatewayParameters === undefined) { + throw new Error('p2SVpnGatewayParameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (p2SVpnGatewayParameters !== null && p2SVpnGatewayParameters !== undefined) { + let requestModelMapper = new client.models['P2SVpnGateway']().mapper(); + requestModel = client.serialize(requestModelMapper, p2SVpnGatewayParameters, 'p2SVpnGatewayParameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(p2SVpnGatewayParameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['P2SVpnGateway']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['P2SVpnGateway']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Updates virtual wan p2s vpn gateway tags. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to update a + * virtual wan p2s vpn gateway tags. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (gatewayName === null || gatewayName === undefined || typeof gatewayName.valueOf() !== 'string') { + throw new Error('gatewayName cannot be null or undefined and it must be of type string.'); + } + if (p2SVpnGatewayParameters === null || p2SVpnGatewayParameters === undefined) { + throw new Error('p2SVpnGatewayParameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PATCH'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (p2SVpnGatewayParameters !== null && p2SVpnGatewayParameters !== undefined) { + let requestModelMapper = new client.models['TagsObject']().mapper(); + requestModel = client.serialize(requestModelMapper, p2SVpnGatewayParameters, 'p2SVpnGatewayParameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(p2SVpnGatewayParameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['P2SVpnGateway']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['P2SVpnGateway']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Deletes a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, gatewayName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (gatewayName === null || gatewayName === undefined || typeof gatewayName.valueOf() !== 'string') { + throw new Error('gatewayName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified + * resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} gatewayName The name of the P2SVpnGateway. + * + * @param {object} parameters Parameters supplied to the generate P2SVpnGateway + * VPN client package operation. + * + * @param {string} [parameters.authenticationMethod] VPN client Authentication + * Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values + * include: 'EAPTLS', 'EAPMSCHAPv2' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VpnProfileResponse} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (gatewayName === null || gatewayName === undefined || typeof gatewayName.valueOf() !== 'string') { + throw new Error('gatewayName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{gatewayName}', encodeURIComponent(gatewayName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['P2SVpnProfileParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VpnProfileResponse']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Lists all the P2SVpnGateways in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnGatewaysResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ListP2SVpnGatewaysResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Lists all the P2SVpnGateways in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnGatewaysResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ListP2SVpnGatewaysResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a P2SVpnGateways. */ +class P2SVpnGateways { + /** + * Create a P2SVpnGateways. + * @param {NetworkManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._updateTags = _updateTags; + this._deleteMethod = _deleteMethod; + this._listByResourceGroup = _listByResourceGroup; + this._list = _list; + this._generateVpnProfile = _generateVpnProfile; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginUpdateTags = _beginUpdateTags; + this._beginDeleteMethod = _beginDeleteMethod; + this._beginGenerateVpnProfile = _beginGenerateVpnProfile; + this._listByResourceGroupNext = _listByResourceGroupNext; + this._listNext = _listNext; + } + + /** + * Retrieves the details of a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, gatewayName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, gatewayName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves the details of a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {P2SVpnGateway} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, gatewayName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, gatewayName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, gatewayName, options, optionalCallback); + } + } + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the + * existing gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to create or + * Update a virtual wan p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.virtualHub] The VirtualHub to which + * the gateway belongs + * + * @param {string} [p2SVpnGatewayParameters.provisioningState] The provisioning + * state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * + * @param {number} [p2SVpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.p2SVpnServerConfiguration] The + * P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. + * + * @param {string} [p2SVpnGatewayParameters.p2SVpnServerConfiguration.id] + * Resource ID. + * + * @param {object} [p2SVpnGatewayParameters.vpnClientAddressPool] The reference + * of the address space resource which represents Address space for P2S + * VpnClient. + * + * @param {array} + * [p2SVpnGatewayParameters.vpnClientAddressPool.addressPrefixes] A list of + * address blocks reserved for this virtual network in CIDR notation. + * + * @param {string} [p2SVpnGatewayParameters.id] Resource ID. + * + * @param {string} [p2SVpnGatewayParameters.location] Resource location. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the + * existing gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to create or + * Update a virtual wan p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.virtualHub] The VirtualHub to which + * the gateway belongs + * + * @param {string} [p2SVpnGatewayParameters.provisioningState] The provisioning + * state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * + * @param {number} [p2SVpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.p2SVpnServerConfiguration] The + * P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. + * + * @param {string} [p2SVpnGatewayParameters.p2SVpnServerConfiguration.id] + * Resource ID. + * + * @param {object} [p2SVpnGatewayParameters.vpnClientAddressPool] The reference + * of the address space resource which represents Address space for P2S + * VpnClient. + * + * @param {array} + * [p2SVpnGatewayParameters.vpnClientAddressPool.addressPrefixes] A list of + * address blocks reserved for this virtual network in CIDR notation. + * + * @param {string} [p2SVpnGatewayParameters.id] Resource ID. + * + * @param {string} [p2SVpnGatewayParameters.location] Resource location. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {P2SVpnGateway} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback); + } + } + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to update a + * virtual wan p2s vpn gateway tags. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateTagsWithHttpOperationResponse(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to update a + * virtual wan p2s vpn gateway tags. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {P2SVpnGateway} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._updateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback); + } + } + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, gatewayName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, gatewayName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, gatewayName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, gatewayName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, gatewayName, options, optionalCallback); + } + } + + /** + * Lists all the P2SVpnGateways in a resource group. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all the P2SVpnGateways in a resource group. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ListP2SVpnGatewaysResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnGatewaysResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * Lists all the P2SVpnGateways in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all the P2SVpnGateways in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ListP2SVpnGatewaysResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnGatewaysResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified + * resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} gatewayName The name of the P2SVpnGateway. + * + * @param {object} parameters Parameters supplied to the generate P2SVpnGateway + * VPN client package operation. + * + * @param {string} [parameters.authenticationMethod] VPN client Authentication + * Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values + * include: 'EAPTLS', 'EAPMSCHAPv2' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + generateVpnProfileWithHttpOperationResponse(resourceGroupName, gatewayName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._generateVpnProfile(resourceGroupName, gatewayName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified + * resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} gatewayName The name of the P2SVpnGateway. + * + * @param {object} parameters Parameters supplied to the generate P2SVpnGateway + * VPN client package operation. + * + * @param {string} [parameters.authenticationMethod] VPN client Authentication + * Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values + * include: 'EAPTLS', 'EAPMSCHAPv2' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VpnProfileResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VpnProfileResponse} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + generateVpnProfile(resourceGroupName, gatewayName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._generateVpnProfile(resourceGroupName, gatewayName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._generateVpnProfile(resourceGroupName, gatewayName, parameters, options, optionalCallback); + } + } + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the + * existing gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to create or + * Update a virtual wan p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.virtualHub] The VirtualHub to which + * the gateway belongs + * + * @param {string} [p2SVpnGatewayParameters.provisioningState] The provisioning + * state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * + * @param {number} [p2SVpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.p2SVpnServerConfiguration] The + * P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. + * + * @param {string} [p2SVpnGatewayParameters.p2SVpnServerConfiguration.id] + * Resource ID. + * + * @param {object} [p2SVpnGatewayParameters.vpnClientAddressPool] The reference + * of the address space resource which represents Address space for P2S + * VpnClient. + * + * @param {array} + * [p2SVpnGatewayParameters.vpnClientAddressPool.addressPrefixes] A list of + * address blocks reserved for this virtual network in CIDR notation. + * + * @param {string} [p2SVpnGatewayParameters.id] Resource ID. + * + * @param {string} [p2SVpnGatewayParameters.location] Resource location. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the + * existing gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to create or + * Update a virtual wan p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.virtualHub] The VirtualHub to which + * the gateway belongs + * + * @param {string} [p2SVpnGatewayParameters.provisioningState] The provisioning + * state of the resource. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * + * @param {number} [p2SVpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this p2s vpn gateway. + * + * @param {object} [p2SVpnGatewayParameters.p2SVpnServerConfiguration] The + * P2SVpnServerConfiguration to which the p2sVpnGateway is attached to. + * + * @param {string} [p2SVpnGatewayParameters.p2SVpnServerConfiguration.id] + * Resource ID. + * + * @param {object} [p2SVpnGatewayParameters.vpnClientAddressPool] The reference + * of the address space resource which represents Address space for P2S + * VpnClient. + * + * @param {array} + * [p2SVpnGatewayParameters.vpnClientAddressPool.addressPrefixes] A list of + * address blocks reserved for this virtual network in CIDR notation. + * + * @param {string} [p2SVpnGatewayParameters.id] Resource ID. + * + * @param {string} [p2SVpnGatewayParameters.location] Resource location. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {P2SVpnGateway} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback); + } + } + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to update a + * virtual wan p2s vpn gateway tags. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginUpdateTagsWithHttpOperationResponse(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates virtual wan p2s vpn gateway tags. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} p2SVpnGatewayParameters Parameters supplied to update a + * virtual wan p2s vpn gateway tags. + * + * @param {object} [p2SVpnGatewayParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {P2SVpnGateway} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnGateway} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginUpdateTags(resourceGroupName, gatewayName, p2SVpnGatewayParameters, options, optionalCallback); + } + } + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, gatewayName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, gatewayName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes a virtual wan p2s vpn gateway. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnGateway. + * + * @param {string} gatewayName The name of the gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, gatewayName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, gatewayName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, gatewayName, options, optionalCallback); + } + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified + * resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} gatewayName The name of the P2SVpnGateway. + * + * @param {object} parameters Parameters supplied to the generate P2SVpnGateway + * VPN client package operation. + * + * @param {string} [parameters.authenticationMethod] VPN client Authentication + * Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values + * include: 'EAPTLS', 'EAPMSCHAPv2' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginGenerateVpnProfileWithHttpOperationResponse(resourceGroupName, gatewayName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Generates VPN profile for P2S client of the P2SVpnGateway in the specified + * resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} gatewayName The name of the P2SVpnGateway. + * + * @param {object} parameters Parameters supplied to the generate P2SVpnGateway + * VPN client package operation. + * + * @param {string} [parameters.authenticationMethod] VPN client Authentication + * Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. Possible values + * include: 'EAPTLS', 'EAPMSCHAPv2' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VpnProfileResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VpnProfileResponse} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginGenerateVpnProfile(resourceGroupName, gatewayName, parameters, options, optionalCallback); + } + } + + /** + * Lists all the P2SVpnGateways in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all the P2SVpnGateways in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ListP2SVpnGatewaysResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnGatewaysResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + + /** + * Lists all the P2SVpnGateways in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all the P2SVpnGateways in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ListP2SVpnGatewaysResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnGatewaysResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = P2SVpnGateways; diff --git a/lib/services/networkManagement2/lib/operations/p2SVpnServerConfigurations.js b/lib/services/networkManagement2/lib/operations/p2SVpnServerConfigurations.js new file mode 100644 index 0000000000..5e52908ed7 --- /dev/null +++ b/lib/services/networkManagement2/lib/operations/p2SVpnServerConfigurations.js @@ -0,0 +1,1871 @@ +/* + * 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. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Retrieves the details of a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnServerConfiguration} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (virtualWanName === null || virtualWanName === undefined || typeof virtualWanName.valueOf() !== 'string') { + throw new Error('virtualWanName cannot be null or undefined and it must be of type string.'); + } + if (p2SVpnServerConfigurationName === null || p2SVpnServerConfigurationName === undefined || typeof p2SVpnServerConfigurationName.valueOf() !== 'string') { + throw new Error('p2SVpnServerConfigurationName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{virtualWanName}', encodeURIComponent(virtualWanName)); + requestUrl = requestUrl.replace('{p2SVpnServerConfigurationName}', encodeURIComponent(p2SVpnServerConfigurationName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['P2SVpnServerConfiguration']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it + * doesn't exist else updates the existing P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} p2SVpnServerConfigurationParameters Parameters supplied to + * create or Update a P2SVpnServerConfiguration. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesName] + * The name of the P2SVpnServerConfiguration that is unique within a VirtualWan + * in a resource group. This name can be used to access the resource along with + * Paren VirtualWan resource name. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnProtocols] + * vpnProtocols for the P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRootCertificates] + * VPN client root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRevokedCertificates] + * VPN client revoked certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusServerRootCertificates] + * Radius Server root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusClientRootCertificates] + * Radius client root certificate of P2SVpnServerConfiguration. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for P2SVpnServerConfiguration. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerAddress] + * The radius server address property of the P2SVpnServerConfiguration resource + * for point to site client connection. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The + * radius secret property of the P2SVpnServerConfiguration resource for for + * point to site client connection. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] + * A unique read-only string that changes whenever the resource is updated. + * + * @param {string} [p2SVpnServerConfigurationParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [p2SVpnServerConfigurationParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnServerConfiguration} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['P2SVpnServerConfiguration']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Deletes a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnServerConfigurationsResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByVirtualWan(resourceGroupName, virtualWanName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (virtualWanName === null || virtualWanName === undefined || typeof virtualWanName.valueOf() !== 'string') { + throw new Error('virtualWanName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{virtualWanName}', encodeURIComponent(virtualWanName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ListP2SVpnServerConfigurationsResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it + * doesn't exist else updates the existing P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} p2SVpnServerConfigurationParameters Parameters supplied to + * create or Update a P2SVpnServerConfiguration. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesName] + * The name of the P2SVpnServerConfiguration that is unique within a VirtualWan + * in a resource group. This name can be used to access the resource along with + * Paren VirtualWan resource name. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnProtocols] + * vpnProtocols for the P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRootCertificates] + * VPN client root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRevokedCertificates] + * VPN client revoked certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusServerRootCertificates] + * Radius Server root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusClientRootCertificates] + * Radius client root certificate of P2SVpnServerConfiguration. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for P2SVpnServerConfiguration. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerAddress] + * The radius server address property of the P2SVpnServerConfiguration resource + * for point to site client connection. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The + * radius secret property of the P2SVpnServerConfiguration resource for for + * point to site client connection. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] + * A unique read-only string that changes whenever the resource is updated. + * + * @param {string} [p2SVpnServerConfigurationParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [p2SVpnServerConfigurationParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnServerConfiguration} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (virtualWanName === null || virtualWanName === undefined || typeof virtualWanName.valueOf() !== 'string') { + throw new Error('virtualWanName cannot be null or undefined and it must be of type string.'); + } + if (p2SVpnServerConfigurationName === null || p2SVpnServerConfigurationName === undefined || typeof p2SVpnServerConfigurationName.valueOf() !== 'string') { + throw new Error('p2SVpnServerConfigurationName cannot be null or undefined and it must be of type string.'); + } + if (p2SVpnServerConfigurationParameters === null || p2SVpnServerConfigurationParameters === undefined) { + throw new Error('p2SVpnServerConfigurationParameters cannot be null or undefined.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{virtualWanName}', encodeURIComponent(virtualWanName)); + requestUrl = requestUrl.replace('{p2SVpnServerConfigurationName}', encodeURIComponent(p2SVpnServerConfigurationName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (p2SVpnServerConfigurationParameters !== null && p2SVpnServerConfigurationParameters !== undefined) { + let requestModelMapper = new client.models['P2SVpnServerConfiguration']().mapper(); + requestModel = client.serialize(requestModelMapper, p2SVpnServerConfigurationParameters, 'p2SVpnServerConfigurationParameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(p2SVpnServerConfigurationParameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['P2SVpnServerConfiguration']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['P2SVpnServerConfiguration']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Deletes a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (virtualWanName === null || virtualWanName === undefined || typeof virtualWanName.valueOf() !== 'string') { + throw new Error('virtualWanName cannot be null or undefined and it must be of type string.'); + } + if (p2SVpnServerConfigurationName === null || p2SVpnServerConfigurationName === undefined || typeof p2SVpnServerConfigurationName.valueOf() !== 'string') { + throw new Error('p2SVpnServerConfigurationName cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWanName}/p2sVpnServerConfigurations/{p2SVpnServerConfigurationName}'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{virtualWanName}', encodeURIComponent(virtualWanName)); + requestUrl = requestUrl.replace('{p2SVpnServerConfigurationName}', encodeURIComponent(p2SVpnServerConfigurationName)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnServerConfigurationsResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByVirtualWanNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['ErrorModel']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ListP2SVpnServerConfigurationsResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a P2SVpnServerConfigurations. */ +class P2SVpnServerConfigurations { + /** + * Create a P2SVpnServerConfigurations. + * @param {NetworkManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._listByVirtualWan = _listByVirtualWan; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._listByVirtualWanNext = _listByVirtualWanNext; + } + + /** + * Retrieves the details of a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves the details of a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {P2SVpnServerConfiguration} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnServerConfiguration} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback); + } + } + + /** + * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it + * doesn't exist else updates the existing P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} p2SVpnServerConfigurationParameters Parameters supplied to + * create or Update a P2SVpnServerConfiguration. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesName] + * The name of the P2SVpnServerConfiguration that is unique within a VirtualWan + * in a resource group. This name can be used to access the resource along with + * Paren VirtualWan resource name. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnProtocols] + * vpnProtocols for the P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRootCertificates] + * VPN client root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRevokedCertificates] + * VPN client revoked certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusServerRootCertificates] + * Radius Server root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusClientRootCertificates] + * Radius client root certificate of P2SVpnServerConfiguration. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for P2SVpnServerConfiguration. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerAddress] + * The radius server address property of the P2SVpnServerConfiguration resource + * for point to site client connection. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The + * radius secret property of the P2SVpnServerConfiguration resource for for + * point to site client connection. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] + * A unique read-only string that changes whenever the resource is updated. + * + * @param {string} [p2SVpnServerConfigurationParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [p2SVpnServerConfigurationParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it + * doesn't exist else updates the existing P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} p2SVpnServerConfigurationParameters Parameters supplied to + * create or Update a P2SVpnServerConfiguration. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesName] + * The name of the P2SVpnServerConfiguration that is unique within a VirtualWan + * in a resource group. This name can be used to access the resource along with + * Paren VirtualWan resource name. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnProtocols] + * vpnProtocols for the P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRootCertificates] + * VPN client root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRevokedCertificates] + * VPN client revoked certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusServerRootCertificates] + * Radius Server root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusClientRootCertificates] + * Radius client root certificate of P2SVpnServerConfiguration. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for P2SVpnServerConfiguration. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerAddress] + * The radius server address property of the P2SVpnServerConfiguration resource + * for point to site client connection. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The + * radius secret property of the P2SVpnServerConfiguration resource for for + * point to site client connection. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] + * A unique read-only string that changes whenever the resource is updated. + * + * @param {string} [p2SVpnServerConfigurationParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [p2SVpnServerConfigurationParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {P2SVpnServerConfiguration} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnServerConfiguration} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, optionalCallback); + } + } + + /** + * Deletes a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback); + } + } + + /** + * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByVirtualWanWithHttpOperationResponse(resourceGroupName, virtualWanName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByVirtualWan(resourceGroupName, virtualWanName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ListP2SVpnServerConfigurationsResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnServerConfigurationsResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByVirtualWan(resourceGroupName, virtualWanName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByVirtualWan(resourceGroupName, virtualWanName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByVirtualWan(resourceGroupName, virtualWanName, options, optionalCallback); + } + } + + /** + * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it + * doesn't exist else updates the existing P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} p2SVpnServerConfigurationParameters Parameters supplied to + * create or Update a P2SVpnServerConfiguration. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesName] + * The name of the P2SVpnServerConfiguration that is unique within a VirtualWan + * in a resource group. This name can be used to access the resource along with + * Paren VirtualWan resource name. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnProtocols] + * vpnProtocols for the P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRootCertificates] + * VPN client root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRevokedCertificates] + * VPN client revoked certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusServerRootCertificates] + * Radius Server root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusClientRootCertificates] + * Radius client root certificate of P2SVpnServerConfiguration. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for P2SVpnServerConfiguration. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerAddress] + * The radius server address property of the P2SVpnServerConfiguration resource + * for point to site client connection. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The + * radius secret property of the P2SVpnServerConfiguration resource for for + * point to site client connection. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] + * A unique read-only string that changes whenever the resource is updated. + * + * @param {string} [p2SVpnServerConfigurationParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [p2SVpnServerConfigurationParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates a P2SVpnServerConfiguration to associate with a VirtualWan if it + * doesn't exist else updates the existing P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the VirtualWan. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} p2SVpnServerConfigurationParameters Parameters supplied to + * create or Update a P2SVpnServerConfiguration. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesName] + * The name of the P2SVpnServerConfiguration that is unique within a VirtualWan + * in a resource group. This name can be used to access the resource along with + * Paren VirtualWan resource name. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnProtocols] + * vpnProtocols for the P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRootCertificates] + * VPN client root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigVpnClientRevokedCertificates] + * VPN client revoked certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusServerRootCertificates] + * Radius Server root certificate of P2SVpnServerConfiguration. + * + * @param {array} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigRadiusClientRootCertificates] + * Radius client root certificate of P2SVpnServerConfiguration. + * + * @param {array} [p2SVpnServerConfigurationParameters.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for P2SVpnServerConfiguration. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerAddress] + * The radius server address property of the P2SVpnServerConfiguration resource + * for point to site client connection. + * + * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The + * radius secret property of the P2SVpnServerConfiguration resource for for + * point to site client connection. + * + * @param {string} + * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] + * A unique read-only string that changes whenever the resource is updated. + * + * @param {string} [p2SVpnServerConfigurationParameters.name] The name of the + * resource that is unique within a resource group. This name can be used to + * access the resource. + * + * @param {string} [p2SVpnServerConfigurationParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {P2SVpnServerConfiguration} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link P2SVpnServerConfiguration} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters, options, optionalCallback); + } + } + + /** + * Deletes a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes a P2SVpnServerConfiguration. + * + * @param {string} resourceGroupName The resource group name of the + * P2SVpnServerConfiguration. + * + * @param {string} virtualWanName The name of the VirtualWan. + * + * @param {string} p2SVpnServerConfigurationName The name of the + * P2SVpnServerConfiguration. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, options, optionalCallback); + } + } + + /** + * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByVirtualWanNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByVirtualWanNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves all P2SVpnServerConfigurations for a particular VirtualWan. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ListP2SVpnServerConfigurationsResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ListP2SVpnServerConfigurationsResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByVirtualWanNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByVirtualWanNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByVirtualWanNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = P2SVpnServerConfigurations; diff --git a/lib/services/networkManagement2/lib/operations/serviceEndpointPolicies.js b/lib/services/networkManagement2/lib/operations/serviceEndpointPolicies.js index a87741db3e..6e840059a3 100644 --- a/lib/services/networkManagement2/lib/operations/serviceEndpointPolicies.js +++ b/lib/services/networkManagement2/lib/operations/serviceEndpointPolicies.js @@ -246,13 +246,6 @@ function _get(resourceGroupName, serviceEndpointPolicyName, options, callback) { * @param {array} [parameters.serviceEndpointPolicyDefinitions] A collection of * service endpoint policy definitions of the service endpoint policy. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * service endpoint policy resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * service endpoint policy. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * * @param {string} [parameters.etag] A unique read-only string that changes * whenever the resource is updated. * @@ -826,13 +819,6 @@ function _beginDeleteMethod(resourceGroupName, serviceEndpointPolicyName, option * @param {array} [parameters.serviceEndpointPolicyDefinitions] A collection of * service endpoint policy definitions of the service endpoint policy. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * service endpoint policy resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * service endpoint policy. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * * @param {string} [parameters.etag] A unique read-only string that changes * whenever the resource is updated. * @@ -1648,13 +1634,6 @@ class ServiceEndpointPolicies { * @param {array} [parameters.serviceEndpointPolicyDefinitions] A collection of * service endpoint policy definitions of the service endpoint policy. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * service endpoint policy resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * service endpoint policy. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * * @param {string} [parameters.etag] A unique read-only string that changes * whenever the resource is updated. * @@ -1703,13 +1682,6 @@ class ServiceEndpointPolicies { * @param {array} [parameters.serviceEndpointPolicyDefinitions] A collection of * service endpoint policy definitions of the service endpoint policy. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * service endpoint policy resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * service endpoint policy. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * * @param {string} [parameters.etag] A unique read-only string that changes * whenever the resource is updated. * @@ -2127,13 +2099,6 @@ class ServiceEndpointPolicies { * @param {array} [parameters.serviceEndpointPolicyDefinitions] A collection of * service endpoint policy definitions of the service endpoint policy. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * service endpoint policy resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * service endpoint policy. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * * @param {string} [parameters.etag] A unique read-only string that changes * whenever the resource is updated. * @@ -2182,13 +2147,6 @@ class ServiceEndpointPolicies { * @param {array} [parameters.serviceEndpointPolicyDefinitions] A collection of * service endpoint policy definitions of the service endpoint policy. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * service endpoint policy resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * service endpoint policy. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * * @param {string} [parameters.etag] A unique read-only string that changes * whenever the resource is updated. * diff --git a/lib/services/networkManagement2/lib/operations/serviceEndpointPolicyDefinitions.js b/lib/services/networkManagement2/lib/operations/serviceEndpointPolicyDefinitions.js index bcacd3b25f..391a2c1767 100644 --- a/lib/services/networkManagement2/lib/operations/serviceEndpointPolicyDefinitions.js +++ b/lib/services/networkManagement2/lib/operations/serviceEndpointPolicyDefinitions.js @@ -259,10 +259,6 @@ function _get(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolic * @param {array} [serviceEndpointPolicyDefinitions.serviceResources] A list of * service resources. * - * @param {string} [serviceEndpointPolicyDefinitions.provisioningState] The - * provisioning state of the service end point policy definition. Possible - * values are: 'Updating', 'Deleting', and 'Failed'. - * * @param {string} [serviceEndpointPolicyDefinitions.name] The name of the * resource that is unique within a resource group. This name can be used to * access the resource. @@ -645,10 +641,6 @@ function _beginDeleteMethod(resourceGroupName, serviceEndpointPolicyName, servic * @param {array} [serviceEndpointPolicyDefinitions.serviceResources] A list of * service resources. * - * @param {string} [serviceEndpointPolicyDefinitions.provisioningState] The - * provisioning state of the service end point policy definition. Possible - * values are: 'Updating', 'Deleting', and 'Failed'. - * * @param {string} [serviceEndpointPolicyDefinitions.name] The name of the * resource that is unique within a resource group. This name can be used to * access the resource. @@ -1192,10 +1184,6 @@ class ServiceEndpointPolicyDefinitions { * @param {array} [serviceEndpointPolicyDefinitions.serviceResources] A list of * service resources. * - * @param {string} [serviceEndpointPolicyDefinitions.provisioningState] The - * provisioning state of the service end point policy definition. Possible - * values are: 'Updating', 'Deleting', and 'Failed'. - * * @param {string} [serviceEndpointPolicyDefinitions.name] The name of the * resource that is unique within a resource group. This name can be used to * access the resource. @@ -1254,10 +1242,6 @@ class ServiceEndpointPolicyDefinitions { * @param {array} [serviceEndpointPolicyDefinitions.serviceResources] A list of * service resources. * - * @param {string} [serviceEndpointPolicyDefinitions.provisioningState] The - * provisioning state of the service end point policy definition. Possible - * values are: 'Updating', 'Deleting', and 'Failed'. - * * @param {string} [serviceEndpointPolicyDefinitions.name] The name of the * resource that is unique within a resource group. This name can be used to * access the resource. @@ -1521,10 +1505,6 @@ class ServiceEndpointPolicyDefinitions { * @param {array} [serviceEndpointPolicyDefinitions.serviceResources] A list of * service resources. * - * @param {string} [serviceEndpointPolicyDefinitions.provisioningState] The - * provisioning state of the service end point policy definition. Possible - * values are: 'Updating', 'Deleting', and 'Failed'. - * * @param {string} [serviceEndpointPolicyDefinitions.name] The name of the * resource that is unique within a resource group. This name can be used to * access the resource. @@ -1583,10 +1563,6 @@ class ServiceEndpointPolicyDefinitions { * @param {array} [serviceEndpointPolicyDefinitions.serviceResources] A list of * service resources. * - * @param {string} [serviceEndpointPolicyDefinitions.provisioningState] The - * provisioning state of the service end point policy definition. Possible - * values are: 'Updating', 'Deleting', and 'Failed'. - * * @param {string} [serviceEndpointPolicyDefinitions.name] The name of the * resource that is unique within a resource group. This name can be used to * access the resource. diff --git a/lib/services/networkManagement2/lib/operations/subnets.js b/lib/services/networkManagement2/lib/operations/subnets.js index 80d416e78c..4cf63c48d4 100644 --- a/lib/services/networkManagement2/lib/operations/subnets.js +++ b/lib/services/networkManagement2/lib/operations/subnets.js @@ -317,6 +317,9 @@ function _get(resourceGroupName, virtualNetworkName, subnetName, options, callba * @param {array} [subnetParameters.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. * + * @param {array} [subnetParameters.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. + * * @param {array} [subnetParameters.delegations] Gets an array of references to * the delegations on the subnet. * @@ -755,6 +758,9 @@ function _beginDeleteMethod(resourceGroupName, virtualNetworkName, subnetName, o * @param {array} [subnetParameters.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. * + * @param {array} [subnetParameters.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. + * * @param {array} [subnetParameters.delegations] Gets an array of references to * the delegations on the subnet. * @@ -1350,6 +1356,9 @@ class Subnets { * @param {array} [subnetParameters.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. * + * @param {array} [subnetParameters.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. + * * @param {array} [subnetParameters.delegations] Gets an array of references to * the delegations on the subnet. * @@ -1469,6 +1478,9 @@ class Subnets { * @param {array} [subnetParameters.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. * + * @param {array} [subnetParameters.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. + * * @param {array} [subnetParameters.delegations] Gets an array of references to * the delegations on the subnet. * @@ -1785,6 +1797,9 @@ class Subnets { * @param {array} [subnetParameters.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. * + * @param {array} [subnetParameters.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. + * * @param {array} [subnetParameters.delegations] Gets an array of references to * the delegations on the subnet. * @@ -1904,6 +1919,9 @@ class Subnets { * @param {array} [subnetParameters.resourceNavigationLinks] Gets an array of * references to the external resources using subnet. * + * @param {array} [subnetParameters.serviceAssociationLinks] Gets an array of + * references to services injecting into this subnet. + * * @param {array} [subnetParameters.delegations] Gets an array of references to * the delegations on the subnet. * diff --git a/lib/services/networkManagement2/lib/operations/virtualHubs.js b/lib/services/networkManagement2/lib/operations/virtualHubs.js index e55954edef..8f5651474b 100644 --- a/lib/services/networkManagement2/lib/operations/virtualHubs.js +++ b/lib/services/networkManagement2/lib/operations/virtualHubs.js @@ -173,14 +173,28 @@ function _get(resourceGroupName, virtualHubName, options, callback) { * @param {object} [virtualHubParameters.virtualWan] The VirtualWAN to which * the VirtualHub belongs * - * @param {string} [virtualHubParameters.virtualWan.id] Resource ID. + * @param {object} [virtualHubParameters.vpnGateway] The VpnGateway associated + * with this VirtualHub * - * @param {array} [virtualHubParameters.hubVirtualNetworkConnections] list of - * all vnet connections with this VirtualHub. + * @param {object} [virtualHubParameters.p2SVpnGateway] The P2SVpnGateway + * associated with this VirtualHub + * + * @param {object} [virtualHubParameters.expressRouteGateway] The + * expressRouteGateway associated with this VirtualHub + * + * @param {string} [virtualHubParameters.expressRouteGateway.id] Resource ID. + * + * @param {array} [virtualHubParameters.virtualNetworkConnections] list of all + * vnet connections with this VirtualHub. * * @param {string} [virtualHubParameters.addressPrefix] Address-prefix for this * VirtualHub. * + * @param {object} [virtualHubParameters.routeTable] The routeTable associated + * with this virtual hub. + * + * @param {array} [virtualHubParameters.routeTable.routes] list of all routes. + * * @param {string} [virtualHubParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' @@ -691,14 +705,28 @@ function _list(options, callback) { * @param {object} [virtualHubParameters.virtualWan] The VirtualWAN to which * the VirtualHub belongs * - * @param {string} [virtualHubParameters.virtualWan.id] Resource ID. + * @param {object} [virtualHubParameters.vpnGateway] The VpnGateway associated + * with this VirtualHub + * + * @param {object} [virtualHubParameters.p2SVpnGateway] The P2SVpnGateway + * associated with this VirtualHub + * + * @param {object} [virtualHubParameters.expressRouteGateway] The + * expressRouteGateway associated with this VirtualHub + * + * @param {string} [virtualHubParameters.expressRouteGateway.id] Resource ID. * - * @param {array} [virtualHubParameters.hubVirtualNetworkConnections] list of - * all vnet connections with this VirtualHub. + * @param {array} [virtualHubParameters.virtualNetworkConnections] list of all + * vnet connections with this VirtualHub. * * @param {string} [virtualHubParameters.addressPrefix] Address-prefix for this * VirtualHub. * + * @param {object} [virtualHubParameters.routeTable] The routeTable associated + * with this virtual hub. + * + * @param {array} [virtualHubParameters.routeTable.routes] list of all routes. + * * @param {string} [virtualHubParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' @@ -1566,14 +1594,28 @@ class VirtualHubs { * @param {object} [virtualHubParameters.virtualWan] The VirtualWAN to which * the VirtualHub belongs * - * @param {string} [virtualHubParameters.virtualWan.id] Resource ID. + * @param {object} [virtualHubParameters.vpnGateway] The VpnGateway associated + * with this VirtualHub + * + * @param {object} [virtualHubParameters.p2SVpnGateway] The P2SVpnGateway + * associated with this VirtualHub + * + * @param {object} [virtualHubParameters.expressRouteGateway] The + * expressRouteGateway associated with this VirtualHub * - * @param {array} [virtualHubParameters.hubVirtualNetworkConnections] list of - * all vnet connections with this VirtualHub. + * @param {string} [virtualHubParameters.expressRouteGateway.id] Resource ID. + * + * @param {array} [virtualHubParameters.virtualNetworkConnections] list of all + * vnet connections with this VirtualHub. * * @param {string} [virtualHubParameters.addressPrefix] Address-prefix for this * VirtualHub. * + * @param {object} [virtualHubParameters.routeTable] The routeTable associated + * with this virtual hub. + * + * @param {array} [virtualHubParameters.routeTable.routes] list of all routes. + * * @param {string} [virtualHubParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' @@ -1623,14 +1665,28 @@ class VirtualHubs { * @param {object} [virtualHubParameters.virtualWan] The VirtualWAN to which * the VirtualHub belongs * - * @param {string} [virtualHubParameters.virtualWan.id] Resource ID. + * @param {object} [virtualHubParameters.vpnGateway] The VpnGateway associated + * with this VirtualHub * - * @param {array} [virtualHubParameters.hubVirtualNetworkConnections] list of - * all vnet connections with this VirtualHub. + * @param {object} [virtualHubParameters.p2SVpnGateway] The P2SVpnGateway + * associated with this VirtualHub + * + * @param {object} [virtualHubParameters.expressRouteGateway] The + * expressRouteGateway associated with this VirtualHub + * + * @param {string} [virtualHubParameters.expressRouteGateway.id] Resource ID. + * + * @param {array} [virtualHubParameters.virtualNetworkConnections] list of all + * vnet connections with this VirtualHub. * * @param {string} [virtualHubParameters.addressPrefix] Address-prefix for this * VirtualHub. * + * @param {object} [virtualHubParameters.routeTable] The routeTable associated + * with this virtual hub. + * + * @param {array} [virtualHubParameters.routeTable.routes] list of all routes. + * * @param {string} [virtualHubParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' @@ -2043,14 +2099,28 @@ class VirtualHubs { * @param {object} [virtualHubParameters.virtualWan] The VirtualWAN to which * the VirtualHub belongs * - * @param {string} [virtualHubParameters.virtualWan.id] Resource ID. + * @param {object} [virtualHubParameters.vpnGateway] The VpnGateway associated + * with this VirtualHub + * + * @param {object} [virtualHubParameters.p2SVpnGateway] The P2SVpnGateway + * associated with this VirtualHub + * + * @param {object} [virtualHubParameters.expressRouteGateway] The + * expressRouteGateway associated with this VirtualHub + * + * @param {string} [virtualHubParameters.expressRouteGateway.id] Resource ID. * - * @param {array} [virtualHubParameters.hubVirtualNetworkConnections] list of - * all vnet connections with this VirtualHub. + * @param {array} [virtualHubParameters.virtualNetworkConnections] list of all + * vnet connections with this VirtualHub. * * @param {string} [virtualHubParameters.addressPrefix] Address-prefix for this * VirtualHub. * + * @param {object} [virtualHubParameters.routeTable] The routeTable associated + * with this virtual hub. + * + * @param {array} [virtualHubParameters.routeTable.routes] list of all routes. + * * @param {string} [virtualHubParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' @@ -2100,14 +2170,28 @@ class VirtualHubs { * @param {object} [virtualHubParameters.virtualWan] The VirtualWAN to which * the VirtualHub belongs * - * @param {string} [virtualHubParameters.virtualWan.id] Resource ID. + * @param {object} [virtualHubParameters.vpnGateway] The VpnGateway associated + * with this VirtualHub + * + * @param {object} [virtualHubParameters.p2SVpnGateway] The P2SVpnGateway + * associated with this VirtualHub + * + * @param {object} [virtualHubParameters.expressRouteGateway] The + * expressRouteGateway associated with this VirtualHub * - * @param {array} [virtualHubParameters.hubVirtualNetworkConnections] list of - * all vnet connections with this VirtualHub. + * @param {string} [virtualHubParameters.expressRouteGateway.id] Resource ID. + * + * @param {array} [virtualHubParameters.virtualNetworkConnections] list of all + * vnet connections with this VirtualHub. * * @param {string} [virtualHubParameters.addressPrefix] Address-prefix for this * VirtualHub. * + * @param {object} [virtualHubParameters.routeTable] The routeTable associated + * with this virtual hub. + * + * @param {array} [virtualHubParameters.routeTable.routes] list of all routes. + * * @param {string} [virtualHubParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' diff --git a/lib/services/networkManagement2/lib/operations/virtualNetworkGatewayConnections.js b/lib/services/networkManagement2/lib/operations/virtualNetworkGatewayConnections.js index 8ec942c3b5..9be0c9847d 100644 --- a/lib/services/networkManagement2/lib/operations/virtualNetworkGatewayConnections.js +++ b/lib/services/networkManagement2/lib/operations/virtualNetworkGatewayConnections.js @@ -168,6 +168,9 @@ const WebResource = msRest.WebResource; * values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible * values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' * + * @param {string} [parameters.connectionProtocol] Connection protocol used for + * this connection. Possible values include: 'IKEv2', 'IKEv1' + * * @param {number} [parameters.routingWeight] The routing weight. * * @param {string} [parameters.sharedKey] The IPSec shared key. @@ -1183,6 +1186,9 @@ function _resetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, * values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible * values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' * + * @param {string} [parameters.connectionProtocol] Connection protocol used for + * this connection. Possible values include: 'IKEv2', 'IKEv1' + * * @param {number} [parameters.routingWeight] The routing weight. * * @param {string} [parameters.sharedKey] The IPSec shared key. @@ -2346,6 +2352,9 @@ class VirtualNetworkGatewayConnections { * values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible * values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' * + * @param {string} [parameters.connectionProtocol] Connection protocol used for + * this connection. Possible values include: 'IKEv2', 'IKEv1' + * * @param {number} [parameters.routingWeight] The routing weight. * * @param {string} [parameters.sharedKey] The IPSec shared key. @@ -2555,6 +2564,9 @@ class VirtualNetworkGatewayConnections { * values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible * values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' * + * @param {string} [parameters.connectionProtocol] Connection protocol used for + * this connection. Possible values include: 'IKEv2', 'IKEv1' + * * @param {number} [parameters.routingWeight] The routing weight. * * @param {string} [parameters.sharedKey] The IPSec shared key. @@ -3460,6 +3472,9 @@ class VirtualNetworkGatewayConnections { * values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible * values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' * + * @param {string} [parameters.connectionProtocol] Connection protocol used for + * this connection. Possible values include: 'IKEv2', 'IKEv1' + * * @param {number} [parameters.routingWeight] The routing weight. * * @param {string} [parameters.sharedKey] The IPSec shared key. @@ -3669,6 +3684,9 @@ class VirtualNetworkGatewayConnections { * values are: 'Ipsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible * values include: 'IPsec', 'Vnet2Vnet', 'ExpressRoute', 'VPNClient' * + * @param {string} [parameters.connectionProtocol] Connection protocol used for + * this connection. Possible values include: 'IKEv2', 'IKEv1' + * * @param {number} [parameters.routingWeight] The routing weight. * * @param {string} [parameters.sharedKey] The IPSec shared key. diff --git a/lib/services/networkManagement2/lib/operations/virtualNetworkGateways.js b/lib/services/networkManagement2/lib/operations/virtualNetworkGateways.js index 6864a99afe..959d65f7b4 100644 --- a/lib/services/networkManagement2/lib/operations/virtualNetworkGateways.js +++ b/lib/services/networkManagement2/lib/operations/virtualNetworkGateways.js @@ -851,6 +851,71 @@ function _reset(resourceGroupName, virtualNetworkGatewayName, options, callback) } +/** + * Resets the VPN client shared key of the virtual network gateway in the + * specified resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _resetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginResetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + + /** * Generates VPN client package for P2S client of the virtual network gateway * in the specified resource group. @@ -2642,6 +2707,133 @@ function _beginReset(resourceGroupName, virtualNetworkGatewayName, options, call }); } +/** + * Resets the VPN client shared key of the virtual network gateway in the + * specified resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginResetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-08-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (virtualNetworkGatewayName === null || virtualNetworkGatewayName === undefined || typeof virtualNetworkGatewayName.valueOf() !== 'string') { + throw new Error('virtualNetworkGatewayName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{virtualNetworkGatewayName}', encodeURIComponent(virtualNetworkGatewayName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + /** * Generates VPN client package for P2S client of the virtual network gateway * in the specified resource group. @@ -4237,6 +4429,7 @@ class VirtualNetworkGateways { this._list = _list; this._listConnections = _listConnections; this._reset = _reset; + this._resetVpnClientSharedKey = _resetVpnClientSharedKey; this._generatevpnclientpackage = _generatevpnclientpackage; this._generateVpnProfile = _generateVpnProfile; this._getVpnProfilePackageUrl = _getVpnProfilePackageUrl; @@ -4251,6 +4444,7 @@ class VirtualNetworkGateways { this._beginDeleteMethod = _beginDeleteMethod; this._beginUpdateTags = _beginUpdateTags; this._beginReset = _beginReset; + this._beginResetVpnClientSharedKey = _beginResetVpnClientSharedKey; this._beginGeneratevpnclientpackage = _beginGeneratevpnclientpackage; this._beginGenerateVpnProfile = _beginGenerateVpnProfile; this._beginGetVpnProfilePackageUrl = _beginGetVpnProfilePackageUrl; @@ -5090,6 +5284,95 @@ class VirtualNetworkGateways { } } + /** + * Resets the VPN client shared key of the virtual network gateway in the + * specified resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + resetVpnClientSharedKeyWithHttpOperationResponse(resourceGroupName, virtualNetworkGatewayName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._resetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the + * specified resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + resetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._resetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._resetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback); + } + } + /** * Generates VPN client package for P2S client of the virtual network gateway * in the specified resource group. @@ -6739,6 +7022,95 @@ class VirtualNetworkGateways { } } + /** + * Resets the VPN client shared key of the virtual network gateway in the + * specified resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginResetVpnClientSharedKeyWithHttpOperationResponse(resourceGroupName, virtualNetworkGatewayName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginResetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the + * specified resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginResetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginResetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginResetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback); + } + } + /** * Generates VPN client package for P2S client of the virtual network gateway * in the specified resource group. diff --git a/lib/services/networkManagement2/lib/operations/virtualNetworkTaps.js b/lib/services/networkManagement2/lib/operations/virtualNetworkTaps.js index a1f644de71..fff4b4f891 100644 --- a/lib/services/networkManagement2/lib/operations/virtualNetworkTaps.js +++ b/lib/services/networkManagement2/lib/operations/virtualNetworkTaps.js @@ -231,10 +231,6 @@ function _get(resourceGroupName, tapName, options, callback) { * @param {object} parameters Parameters supplied to the create or update * virtual network tap operation. * - * @param {array} [parameters.networkInterfaceTapConfigurations] Specifies the - * list of resource IDs for the network interface IP configuration that needs - * to be tapped. - * * @param {object} [parameters.destinationNetworkInterfaceIPConfiguration] The * reference to the private IP Address of the collector nic that will receive * the tap @@ -416,6 +412,10 @@ function _get(resourceGroupName, tapName, options, callback) { * Gets an array of references to the external resources using subnet. * * @param {array} + * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -1130,10 +1130,6 @@ function _beginDeleteMethod(resourceGroupName, tapName, options, callback) { * @param {object} parameters Parameters supplied to the create or update * virtual network tap operation. * - * @param {array} [parameters.networkInterfaceTapConfigurations] Specifies the - * list of resource IDs for the network interface IP configuration that needs - * to be tapped. - * * @param {object} [parameters.destinationNetworkInterfaceIPConfiguration] The * reference to the private IP Address of the collector nic that will receive * the tap @@ -1315,6 +1311,10 @@ function _beginDeleteMethod(resourceGroupName, tapName, options, callback) { * Gets an array of references to the external resources using subnet. * * @param {array} + * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -2264,10 +2264,6 @@ class VirtualNetworkTaps { * @param {object} parameters Parameters supplied to the create or update * virtual network tap operation. * - * @param {array} [parameters.networkInterfaceTapConfigurations] Specifies the - * list of resource IDs for the network interface IP configuration that needs - * to be tapped. - * * @param {object} [parameters.destinationNetworkInterfaceIPConfiguration] The * reference to the private IP Address of the collector nic that will receive * the tap @@ -2449,6 +2445,10 @@ class VirtualNetworkTaps { * Gets an array of references to the external resources using subnet. * * @param {array} + * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -2640,10 +2640,6 @@ class VirtualNetworkTaps { * @param {object} parameters Parameters supplied to the create or update * virtual network tap operation. * - * @param {array} [parameters.networkInterfaceTapConfigurations] Specifies the - * list of resource IDs for the network interface IP configuration that needs - * to be tapped. - * * @param {object} [parameters.destinationNetworkInterfaceIPConfiguration] The * reference to the private IP Address of the collector nic that will receive * the tap @@ -2825,6 +2821,10 @@ class VirtualNetworkTaps { * Gets an array of references to the external resources using subnet. * * @param {array} + * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -3381,10 +3381,6 @@ class VirtualNetworkTaps { * @param {object} parameters Parameters supplied to the create or update * virtual network tap operation. * - * @param {array} [parameters.networkInterfaceTapConfigurations] Specifies the - * list of resource IDs for the network interface IP configuration that needs - * to be tapped. - * * @param {object} [parameters.destinationNetworkInterfaceIPConfiguration] The * reference to the private IP Address of the collector nic that will receive * the tap @@ -3566,6 +3562,10 @@ class VirtualNetworkTaps { * Gets an array of references to the external resources using subnet. * * @param {array} + * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * @@ -3757,10 +3757,6 @@ class VirtualNetworkTaps { * @param {object} parameters Parameters supplied to the create or update * virtual network tap operation. * - * @param {array} [parameters.networkInterfaceTapConfigurations] Specifies the - * list of resource IDs for the network interface IP configuration that needs - * to be tapped. - * * @param {object} [parameters.destinationNetworkInterfaceIPConfiguration] The * reference to the private IP Address of the collector nic that will receive * the tap @@ -3942,6 +3938,10 @@ class VirtualNetworkTaps { * Gets an array of references to the external resources using subnet. * * @param {array} + * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.serviceAssociationLinks] + * Gets an array of references to services injecting into this subnet. + * + * @param {array} * [parameters.destinationLoadBalancerFrontEndIPConfiguration.subnet.delegations] * Gets an array of references to the delegations on the subnet. * diff --git a/lib/services/networkManagement2/lib/operations/virtualWANs.js b/lib/services/networkManagement2/lib/operations/virtualWANs.js index d24a3b0ad0..bcf0015eb5 100644 --- a/lib/services/networkManagement2/lib/operations/virtualWANs.js +++ b/lib/services/networkManagement2/lib/operations/virtualWANs.js @@ -174,6 +174,22 @@ function _get(resourceGroupName, virtualWANName, options, callback) { * @param {boolean} [wANParameters.disableVpnEncryption] Vpn encryption to be * disabled or not. * + * @param {string} [wANParameters.securityProviderName] The Security Provider + * name. + * + * @param {boolean} [wANParameters.allowBranchToBranchTraffic] True if branch + * to branch traffic is allowed. + * + * @param {boolean} [wANParameters.allowVnetToVnetTraffic] True if Vnet to Vnet + * traffic is allowed. + * + * @param {string} [wANParameters.office365LocalBreakoutCategory] The office + * local breakout category. Possible values include: 'Optimize', + * 'OptimizeAndAllow', 'All', 'None' + * + * @param {array} [wANParameters.p2SVpnServerConfigurations] list of all + * P2SVpnServerConfigurations associated with the virtual wan. + * * @param {string} [wANParameters.provisioningState] The provisioning state of * the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' @@ -684,6 +700,22 @@ function _list(options, callback) { * @param {boolean} [wANParameters.disableVpnEncryption] Vpn encryption to be * disabled or not. * + * @param {string} [wANParameters.securityProviderName] The Security Provider + * name. + * + * @param {boolean} [wANParameters.allowBranchToBranchTraffic] True if branch + * to branch traffic is allowed. + * + * @param {boolean} [wANParameters.allowVnetToVnetTraffic] True if Vnet to Vnet + * traffic is allowed. + * + * @param {string} [wANParameters.office365LocalBreakoutCategory] The office + * local breakout category. Possible values include: 'Optimize', + * 'OptimizeAndAllow', 'All', 'None' + * + * @param {array} [wANParameters.p2SVpnServerConfigurations] list of all + * P2SVpnServerConfigurations associated with the virtual wan. + * * @param {string} [wANParameters.provisioningState] The provisioning state of * the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' @@ -1551,6 +1583,22 @@ class VirtualWANs { * @param {boolean} [wANParameters.disableVpnEncryption] Vpn encryption to be * disabled or not. * + * @param {string} [wANParameters.securityProviderName] The Security Provider + * name. + * + * @param {boolean} [wANParameters.allowBranchToBranchTraffic] True if branch + * to branch traffic is allowed. + * + * @param {boolean} [wANParameters.allowVnetToVnetTraffic] True if Vnet to Vnet + * traffic is allowed. + * + * @param {string} [wANParameters.office365LocalBreakoutCategory] The office + * local breakout category. Possible values include: 'Optimize', + * 'OptimizeAndAllow', 'All', 'None' + * + * @param {array} [wANParameters.p2SVpnServerConfigurations] list of all + * P2SVpnServerConfigurations associated with the virtual wan. + * * @param {string} [wANParameters.provisioningState] The provisioning state of * the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' @@ -1601,6 +1649,22 @@ class VirtualWANs { * @param {boolean} [wANParameters.disableVpnEncryption] Vpn encryption to be * disabled or not. * + * @param {string} [wANParameters.securityProviderName] The Security Provider + * name. + * + * @param {boolean} [wANParameters.allowBranchToBranchTraffic] True if branch + * to branch traffic is allowed. + * + * @param {boolean} [wANParameters.allowVnetToVnetTraffic] True if Vnet to Vnet + * traffic is allowed. + * + * @param {string} [wANParameters.office365LocalBreakoutCategory] The office + * local breakout category. Possible values include: 'Optimize', + * 'OptimizeAndAllow', 'All', 'None' + * + * @param {array} [wANParameters.p2SVpnServerConfigurations] list of all + * P2SVpnServerConfigurations associated with the virtual wan. + * * @param {string} [wANParameters.provisioningState] The provisioning state of * the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' @@ -2012,6 +2076,22 @@ class VirtualWANs { * @param {boolean} [wANParameters.disableVpnEncryption] Vpn encryption to be * disabled or not. * + * @param {string} [wANParameters.securityProviderName] The Security Provider + * name. + * + * @param {boolean} [wANParameters.allowBranchToBranchTraffic] True if branch + * to branch traffic is allowed. + * + * @param {boolean} [wANParameters.allowVnetToVnetTraffic] True if Vnet to Vnet + * traffic is allowed. + * + * @param {string} [wANParameters.office365LocalBreakoutCategory] The office + * local breakout category. Possible values include: 'Optimize', + * 'OptimizeAndAllow', 'All', 'None' + * + * @param {array} [wANParameters.p2SVpnServerConfigurations] list of all + * P2SVpnServerConfigurations associated with the virtual wan. + * * @param {string} [wANParameters.provisioningState] The provisioning state of * the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' @@ -2062,6 +2142,22 @@ class VirtualWANs { * @param {boolean} [wANParameters.disableVpnEncryption] Vpn encryption to be * disabled or not. * + * @param {string} [wANParameters.securityProviderName] The Security Provider + * name. + * + * @param {boolean} [wANParameters.allowBranchToBranchTraffic] True if branch + * to branch traffic is allowed. + * + * @param {boolean} [wANParameters.allowVnetToVnetTraffic] True if Vnet to Vnet + * traffic is allowed. + * + * @param {string} [wANParameters.office365LocalBreakoutCategory] The office + * local breakout category. Possible values include: 'Optimize', + * 'OptimizeAndAllow', 'All', 'None' + * + * @param {array} [wANParameters.p2SVpnServerConfigurations] list of all + * P2SVpnServerConfigurations associated with the virtual wan. + * * @param {string} [wANParameters.provisioningState] The provisioning state of * the resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', * 'Failed' diff --git a/lib/services/networkManagement2/lib/operations/vpnConnections.js b/lib/services/networkManagement2/lib/operations/vpnConnections.js index d8d29ad293..16f5bb8136 100644 --- a/lib/services/networkManagement2/lib/operations/vpnConnections.js +++ b/lib/services/networkManagement2/lib/operations/vpnConnections.js @@ -190,6 +190,13 @@ function _get(resourceGroupName, gatewayName, connectionName, options, callback) * status. Possible values include: 'Unknown', 'Connecting', 'Connected', * 'NotConnected' * + * @param {string} [vpnConnectionParameters.vpnConnectionProtocolType] + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1' + * + * @param {number} [vpnConnectionParameters.connectionBandwidth] Expected + * bandwidth in MBPS. + * * @param {string} [vpnConnectionParameters.sharedKey] SharedKey for the vpn * connection. * @@ -198,15 +205,20 @@ function _get(resourceGroupName, gatewayName, connectionName, options, callback) * @param {array} [vpnConnectionParameters.ipsecPolicies] The IPSec Policies to * be considered by this connection. * + * @param {boolean} [vpnConnectionParameters.enableRateLimiting] EnableBgp flag + * + * @param {boolean} [vpnConnectionParameters.enableInternetSecurity] Enable + * internet security + * * @param {string} [vpnConnectionParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {string} [vpnConnectionParameters.id] Resource ID. - * - * @param {string} [vpnConnectionParameters.location] Resource location. + * @param {string} [vpnConnectionParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. * - * @param {object} [vpnConnectionParameters.tags] Resource tags. + * @param {string} [vpnConnectionParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -513,6 +525,13 @@ function _listByVpnGateway(resourceGroupName, gatewayName, options, callback) { * status. Possible values include: 'Unknown', 'Connecting', 'Connected', * 'NotConnected' * + * @param {string} [vpnConnectionParameters.vpnConnectionProtocolType] + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1' + * + * @param {number} [vpnConnectionParameters.connectionBandwidth] Expected + * bandwidth in MBPS. + * * @param {string} [vpnConnectionParameters.sharedKey] SharedKey for the vpn * connection. * @@ -521,15 +540,20 @@ function _listByVpnGateway(resourceGroupName, gatewayName, options, callback) { * @param {array} [vpnConnectionParameters.ipsecPolicies] The IPSec Policies to * be considered by this connection. * + * @param {boolean} [vpnConnectionParameters.enableRateLimiting] EnableBgp flag + * + * @param {boolean} [vpnConnectionParameters.enableInternetSecurity] Enable + * internet security + * * @param {string} [vpnConnectionParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {string} [vpnConnectionParameters.id] Resource ID. - * - * @param {string} [vpnConnectionParameters.location] Resource location. + * @param {string} [vpnConnectionParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. * - * @param {object} [vpnConnectionParameters.tags] Resource tags. + * @param {string} [vpnConnectionParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -1099,6 +1123,13 @@ class VpnConnections { * status. Possible values include: 'Unknown', 'Connecting', 'Connected', * 'NotConnected' * + * @param {string} [vpnConnectionParameters.vpnConnectionProtocolType] + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1' + * + * @param {number} [vpnConnectionParameters.connectionBandwidth] Expected + * bandwidth in MBPS. + * * @param {string} [vpnConnectionParameters.sharedKey] SharedKey for the vpn * connection. * @@ -1107,15 +1138,20 @@ class VpnConnections { * @param {array} [vpnConnectionParameters.ipsecPolicies] The IPSec Policies to * be considered by this connection. * + * @param {boolean} [vpnConnectionParameters.enableRateLimiting] EnableBgp flag + * + * @param {boolean} [vpnConnectionParameters.enableInternetSecurity] Enable + * internet security + * * @param {string} [vpnConnectionParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {string} [vpnConnectionParameters.id] Resource ID. + * @param {string} [vpnConnectionParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. * - * @param {string} [vpnConnectionParameters.location] Resource location. - * - * @param {object} [vpnConnectionParameters.tags] Resource tags. + * @param {string} [vpnConnectionParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -1167,6 +1203,13 @@ class VpnConnections { * status. Possible values include: 'Unknown', 'Connecting', 'Connected', * 'NotConnected' * + * @param {string} [vpnConnectionParameters.vpnConnectionProtocolType] + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1' + * + * @param {number} [vpnConnectionParameters.connectionBandwidth] Expected + * bandwidth in MBPS. + * * @param {string} [vpnConnectionParameters.sharedKey] SharedKey for the vpn * connection. * @@ -1175,15 +1218,20 @@ class VpnConnections { * @param {array} [vpnConnectionParameters.ipsecPolicies] The IPSec Policies to * be considered by this connection. * + * @param {boolean} [vpnConnectionParameters.enableRateLimiting] EnableBgp flag + * + * @param {boolean} [vpnConnectionParameters.enableInternetSecurity] Enable + * internet security + * * @param {string} [vpnConnectionParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {string} [vpnConnectionParameters.id] Resource ID. - * - * @param {string} [vpnConnectionParameters.location] Resource location. + * @param {string} [vpnConnectionParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. * - * @param {object} [vpnConnectionParameters.tags] Resource tags. + * @param {string} [vpnConnectionParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -1433,6 +1481,13 @@ class VpnConnections { * status. Possible values include: 'Unknown', 'Connecting', 'Connected', * 'NotConnected' * + * @param {string} [vpnConnectionParameters.vpnConnectionProtocolType] + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1' + * + * @param {number} [vpnConnectionParameters.connectionBandwidth] Expected + * bandwidth in MBPS. + * * @param {string} [vpnConnectionParameters.sharedKey] SharedKey for the vpn * connection. * @@ -1441,15 +1496,20 @@ class VpnConnections { * @param {array} [vpnConnectionParameters.ipsecPolicies] The IPSec Policies to * be considered by this connection. * + * @param {boolean} [vpnConnectionParameters.enableRateLimiting] EnableBgp flag + * + * @param {boolean} [vpnConnectionParameters.enableInternetSecurity] Enable + * internet security + * * @param {string} [vpnConnectionParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {string} [vpnConnectionParameters.id] Resource ID. - * - * @param {string} [vpnConnectionParameters.location] Resource location. + * @param {string} [vpnConnectionParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. * - * @param {object} [vpnConnectionParameters.tags] Resource tags. + * @param {string} [vpnConnectionParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -1501,6 +1561,13 @@ class VpnConnections { * status. Possible values include: 'Unknown', 'Connecting', 'Connected', * 'NotConnected' * + * @param {string} [vpnConnectionParameters.vpnConnectionProtocolType] + * Connection protocol used for this connection. Possible values include: + * 'IKEv2', 'IKEv1' + * + * @param {number} [vpnConnectionParameters.connectionBandwidth] Expected + * bandwidth in MBPS. + * * @param {string} [vpnConnectionParameters.sharedKey] SharedKey for the vpn * connection. * @@ -1509,15 +1576,20 @@ class VpnConnections { * @param {array} [vpnConnectionParameters.ipsecPolicies] The IPSec Policies to * be considered by this connection. * + * @param {boolean} [vpnConnectionParameters.enableRateLimiting] EnableBgp flag + * + * @param {boolean} [vpnConnectionParameters.enableInternetSecurity] Enable + * internet security + * * @param {string} [vpnConnectionParameters.provisioningState] The provisioning * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {string} [vpnConnectionParameters.id] Resource ID. + * @param {string} [vpnConnectionParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. * - * @param {string} [vpnConnectionParameters.location] Resource location. - * - * @param {object} [vpnConnectionParameters.tags] Resource tags. + * @param {string} [vpnConnectionParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * diff --git a/lib/services/networkManagement2/lib/operations/vpnGateways.js b/lib/services/networkManagement2/lib/operations/vpnGateways.js index 42f8302535..6fae3465b6 100644 --- a/lib/services/networkManagement2/lib/operations/vpnGateways.js +++ b/lib/services/networkManagement2/lib/operations/vpnGateways.js @@ -194,14 +194,8 @@ function _get(resourceGroupName, gatewayName, options, callback) { * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {object} [vpnGatewayParameters.policies] The policies applied to this - * vpn gateway. - * - * @param {boolean} [vpnGatewayParameters.policies.allowBranchToBranchTraffic] - * True if branch to branch traffic is allowed. - * - * @param {boolean} [vpnGatewayParameters.policies.allowVnetToVnetTraffic] True - * if Vnet to Vnet traffic is allowed. + * @param {number} [vpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this vpn gateway. * * @param {string} [vpnGatewayParameters.id] Resource ID. * @@ -730,14 +724,8 @@ function _list(options, callback) { * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {object} [vpnGatewayParameters.policies] The policies applied to this - * vpn gateway. - * - * @param {boolean} [vpnGatewayParameters.policies.allowBranchToBranchTraffic] - * True if branch to branch traffic is allowed. - * - * @param {boolean} [vpnGatewayParameters.policies.allowVnetToVnetTraffic] True - * if Vnet to Vnet traffic is allowed. + * @param {number} [vpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this vpn gateway. * * @param {string} [vpnGatewayParameters.id] Resource ID. * @@ -1623,14 +1611,8 @@ class VpnGateways { * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {object} [vpnGatewayParameters.policies] The policies applied to this - * vpn gateway. - * - * @param {boolean} [vpnGatewayParameters.policies.allowBranchToBranchTraffic] - * True if branch to branch traffic is allowed. - * - * @param {boolean} [vpnGatewayParameters.policies.allowVnetToVnetTraffic] True - * if Vnet to Vnet traffic is allowed. + * @param {number} [vpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this vpn gateway. * * @param {string} [vpnGatewayParameters.id] Resource ID. * @@ -1698,14 +1680,8 @@ class VpnGateways { * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {object} [vpnGatewayParameters.policies] The policies applied to this - * vpn gateway. - * - * @param {boolean} [vpnGatewayParameters.policies.allowBranchToBranchTraffic] - * True if branch to branch traffic is allowed. - * - * @param {boolean} [vpnGatewayParameters.policies.allowVnetToVnetTraffic] True - * if Vnet to Vnet traffic is allowed. + * @param {number} [vpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this vpn gateway. * * @param {string} [vpnGatewayParameters.id] Resource ID. * @@ -2136,14 +2112,8 @@ class VpnGateways { * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {object} [vpnGatewayParameters.policies] The policies applied to this - * vpn gateway. - * - * @param {boolean} [vpnGatewayParameters.policies.allowBranchToBranchTraffic] - * True if branch to branch traffic is allowed. - * - * @param {boolean} [vpnGatewayParameters.policies.allowVnetToVnetTraffic] True - * if Vnet to Vnet traffic is allowed. + * @param {number} [vpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this vpn gateway. * * @param {string} [vpnGatewayParameters.id] Resource ID. * @@ -2211,14 +2181,8 @@ class VpnGateways { * state of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * - * @param {object} [vpnGatewayParameters.policies] The policies applied to this - * vpn gateway. - * - * @param {boolean} [vpnGatewayParameters.policies.allowBranchToBranchTraffic] - * True if branch to branch traffic is allowed. - * - * @param {boolean} [vpnGatewayParameters.policies.allowVnetToVnetTraffic] True - * if Vnet to Vnet traffic is allowed. + * @param {number} [vpnGatewayParameters.vpnGatewayScaleUnit] The scale unit + * for this vpn gateway. * * @param {string} [vpnGatewayParameters.id] Resource ID. * diff --git a/lib/services/networkManagement2/lib/operations/vpnSites.js b/lib/services/networkManagement2/lib/operations/vpnSites.js index d52dd1f65e..a4120590ad 100644 --- a/lib/services/networkManagement2/lib/operations/vpnSites.js +++ b/lib/services/networkManagement2/lib/operations/vpnSites.js @@ -171,10 +171,10 @@ function _get(resourceGroupName, vpnSiteName, options, callback) { * @param {object} vpnSiteParameters Parameters supplied to create or update * VpnSite. * - * @param {object} [vpnSiteParameters.virtualWAN] The VirtualWAN to which the + * @param {object} [vpnSiteParameters.virtualWan] The VirtualWAN to which the * vpnSite belongs * - * @param {string} [vpnSiteParameters.virtualWAN.id] Resource ID. + * @param {string} [vpnSiteParameters.virtualWan.id] Resource ID. * * @param {object} [vpnSiteParameters.deviceProperties] The device properties * @@ -213,6 +213,8 @@ function _get(resourceGroupName, vpnSiteName, options, callback) { * of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * + * @param {boolean} [vpnSiteParameters.isSecuritySite] IsSecuritySite flag + * * @param {string} [vpnSiteParameters.id] Resource ID. * * @param {string} [vpnSiteParameters.location] Resource location. @@ -717,10 +719,10 @@ function _list(options, callback) { * @param {object} vpnSiteParameters Parameters supplied to create or update * VpnSite. * - * @param {object} [vpnSiteParameters.virtualWAN] The VirtualWAN to which the + * @param {object} [vpnSiteParameters.virtualWan] The VirtualWAN to which the * vpnSite belongs * - * @param {string} [vpnSiteParameters.virtualWAN.id] Resource ID. + * @param {string} [vpnSiteParameters.virtualWan.id] Resource ID. * * @param {object} [vpnSiteParameters.deviceProperties] The device properties * @@ -759,6 +761,8 @@ function _list(options, callback) { * of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * + * @param {boolean} [vpnSiteParameters.isSecuritySite] IsSecuritySite flag + * * @param {string} [vpnSiteParameters.id] Resource ID. * * @param {string} [vpnSiteParameters.location] Resource location. @@ -1620,10 +1624,10 @@ class VpnSites { * @param {object} vpnSiteParameters Parameters supplied to create or update * VpnSite. * - * @param {object} [vpnSiteParameters.virtualWAN] The VirtualWAN to which the + * @param {object} [vpnSiteParameters.virtualWan] The VirtualWAN to which the * vpnSite belongs * - * @param {string} [vpnSiteParameters.virtualWAN.id] Resource ID. + * @param {string} [vpnSiteParameters.virtualWan.id] Resource ID. * * @param {object} [vpnSiteParameters.deviceProperties] The device properties * @@ -1662,6 +1666,8 @@ class VpnSites { * of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * + * @param {boolean} [vpnSiteParameters.isSecuritySite] IsSecuritySite flag + * * @param {string} [vpnSiteParameters.id] Resource ID. * * @param {string} [vpnSiteParameters.location] Resource location. @@ -1705,10 +1711,10 @@ class VpnSites { * @param {object} vpnSiteParameters Parameters supplied to create or update * VpnSite. * - * @param {object} [vpnSiteParameters.virtualWAN] The VirtualWAN to which the + * @param {object} [vpnSiteParameters.virtualWan] The VirtualWAN to which the * vpnSite belongs * - * @param {string} [vpnSiteParameters.virtualWAN.id] Resource ID. + * @param {string} [vpnSiteParameters.virtualWan.id] Resource ID. * * @param {object} [vpnSiteParameters.deviceProperties] The device properties * @@ -1747,6 +1753,8 @@ class VpnSites { * of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * + * @param {boolean} [vpnSiteParameters.isSecuritySite] IsSecuritySite flag + * * @param {string} [vpnSiteParameters.id] Resource ID. * * @param {string} [vpnSiteParameters.location] Resource location. @@ -2153,10 +2161,10 @@ class VpnSites { * @param {object} vpnSiteParameters Parameters supplied to create or update * VpnSite. * - * @param {object} [vpnSiteParameters.virtualWAN] The VirtualWAN to which the + * @param {object} [vpnSiteParameters.virtualWan] The VirtualWAN to which the * vpnSite belongs * - * @param {string} [vpnSiteParameters.virtualWAN.id] Resource ID. + * @param {string} [vpnSiteParameters.virtualWan.id] Resource ID. * * @param {object} [vpnSiteParameters.deviceProperties] The device properties * @@ -2195,6 +2203,8 @@ class VpnSites { * of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * + * @param {boolean} [vpnSiteParameters.isSecuritySite] IsSecuritySite flag + * * @param {string} [vpnSiteParameters.id] Resource ID. * * @param {string} [vpnSiteParameters.location] Resource location. @@ -2238,10 +2248,10 @@ class VpnSites { * @param {object} vpnSiteParameters Parameters supplied to create or update * VpnSite. * - * @param {object} [vpnSiteParameters.virtualWAN] The VirtualWAN to which the + * @param {object} [vpnSiteParameters.virtualWan] The VirtualWAN to which the * vpnSite belongs * - * @param {string} [vpnSiteParameters.virtualWAN.id] Resource ID. + * @param {string} [vpnSiteParameters.virtualWan.id] Resource ID. * * @param {object} [vpnSiteParameters.deviceProperties] The device properties * @@ -2280,6 +2290,8 @@ class VpnSites { * of the resource. Possible values include: 'Succeeded', 'Updating', * 'Deleting', 'Failed' * + * @param {boolean} [vpnSiteParameters.isSecuritySite] IsSecuritySite flag + * * @param {string} [vpnSiteParameters.id] Resource ID. * * @param {string} [vpnSiteParameters.location] Resource location.