From ff72cbeeeb10369a857ec553955a26fd1bf4753b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 6 Nov 2018 00:25:29 +0000 Subject: [PATCH] Generated from d0417082c41cfae8f0234ee02fe32b506bf4e605 New SKU for ER (#4342) --- .../v2017_10_01/VirtualNetworkGateways.java | 11 +- .../BackendAddressPoolImpl.java | 1 + .../ConnectionMonitorResultImpl.java | 2 +- .../ExpressRouteCircuitAuthorizationImpl.java | 2 +- .../ExpressRouteCircuitPeeringImpl.java | 2 +- .../FrontendIPConfigurationImpl.java | 1 + .../implementation/InboundNatRuleImpl.java | 2 +- .../implementation/LoadBalancingRuleImpl.java | 1 + ...ceNetworkInterfaceIPConfigurationImpl.java | 1 + .../NetworkSecurityGroupSecurityRuleImpl.java | 2 +- ...orkSecurityGroupSecurityRuleModelImpl.java | 1 + .../PacketCaptureResultImpl.java | 2 +- .../implementation/PacketCapturesInner.java | 6 +- .../v2017_10_01/implementation/ProbeImpl.java | 1 + .../implementation/RouteFilterRuleImpl.java | 2 +- .../v2017_10_01/implementation/RouteImpl.java | 2 +- .../implementation/SubnetImpl.java | 2 +- ...etNetworkInterfaceIPConfigurationImpl.java | 1 + .../VirtualNetworkGatewaysImpl.java | 30 +- .../VirtualNetworkPeeringImpl.java | 2 +- network/resource-manager/v2018_04_01/pom.xml | 266 +++++++------- .../v2018_04_01/VirtualNetworkGateways.java | 11 +- .../BackendAddressPoolImpl.java | 1 + .../ConnectionMonitorResultImpl.java | 2 +- .../ExpressRouteCircuitAuthorizationImpl.java | 2 +- .../ExpressRouteCircuitConnectionImpl.java | 2 +- .../ExpressRouteCircuitPeeringImpl.java | 2 +- ...xpressRouteCrossConnectionPeeringImpl.java | 2 +- .../FrontendIPConfigurationImpl.java | 1 + .../HubVirtualNetworkConnectionImpl.java | 1 + .../implementation/InboundNatRuleImpl.java | 2 +- .../implementation/LoadBalancingRuleImpl.java | 1 + ...ceNetworkInterfaceIPConfigurationImpl.java | 1 + .../NetworkSecurityGroupSecurityRuleImpl.java | 2 +- ...orkSecurityGroupSecurityRuleModelImpl.java | 1 + .../PacketCaptureResultImpl.java | 2 +- .../implementation/PacketCapturesInner.java | 6 +- .../v2018_04_01/implementation/ProbeImpl.java | 1 + .../implementation/RouteFilterRuleImpl.java | 2 +- .../v2018_04_01/implementation/RouteImpl.java | 2 +- .../implementation/SubnetImpl.java | 2 +- ...etNetworkInterfaceIPConfigurationImpl.java | 1 + .../VirtualNetworkGatewaysImpl.java | 30 +- .../VirtualNetworkPeeringImpl.java | 2 +- .../implementation/VpnConnectionImpl.java | 2 +- network/resource-manager/v2018_06_01/pom.xml | 266 +++++++------- .../v2018_06_01/ConnectionStateSnapshot.java | 130 +++++++ .../network/v2018_06_01/ErrorResponse.java | 43 +++ .../v2018_06_01/ErrorResponseException.java | 44 +++ .../EvaluatedNetworkSecurityGroup.java | 85 +++++ .../network/v2018_06_01/MatchedRule.java | 70 ++++ ...workConfigurationDiagnosticParameters.java | 72 ++++ ...etworkConfigurationDiagnosticResponse.java | 26 ++ .../NetworkConfigurationDiagnosticResult.java | 70 ++++ .../NetworkSecurityGroupResult.java | 60 ++++ .../NetworkSecurityRulesEvaluationResult.java | 173 +++++++++ .../network/v2018_06_01/NetworkWatchers.java | 11 + .../network/v2018_06_01/TrafficQuery.java | 150 ++++++++ .../v2018_06_01/VirtualNetworkGateways.java | 20 +- .../BackendAddressPoolImpl.java | 1 + .../ConnectionMonitorResultImpl.java | 2 +- .../ConnectionMonitorsInner.java | 68 ++-- .../ExpressRouteCircuitAuthorizationImpl.java | 2 +- .../ExpressRouteCircuitConnectionImpl.java | 2 +- .../ExpressRouteCircuitPeeringImpl.java | 2 +- ...xpressRouteCrossConnectionPeeringImpl.java | 2 +- .../FrontendIPConfigurationImpl.java | 1 + .../HubVirtualNetworkConnectionImpl.java | 1 + .../implementation/InboundNatRuleImpl.java | 2 +- .../implementation/LoadBalancingRuleImpl.java | 1 + ...rkConfigurationDiagnosticResponseImpl.java | 33 ++ ...kConfigurationDiagnosticResponseInner.java | 34 ++ ...ceNetworkInterfaceIPConfigurationImpl.java | 1 + .../NetworkSecurityGroupSecurityRuleImpl.java | 2 +- ...orkSecurityGroupSecurityRuleModelImpl.java | 1 + .../implementation/NetworkWatchersImpl.java | 14 + .../implementation/NetworkWatchersInner.java | 339 ++++++++++++++---- .../PacketCaptureResultImpl.java | 2 +- .../implementation/PacketCapturesInner.java | 64 ++-- .../v2018_06_01/implementation/ProbeImpl.java | 1 + .../implementation/RouteFilterRuleImpl.java | 2 +- .../v2018_06_01/implementation/RouteImpl.java | 2 +- .../implementation/SubnetImpl.java | 2 +- ...etNetworkInterfaceIPConfigurationImpl.java | 1 + .../VirtualNetworkGatewaysImpl.java | 34 +- .../VirtualNetworkGatewaysInner.java | 158 ++++++++ .../VirtualNetworkPeeringImpl.java | 2 +- .../implementation/VpnConnectionImpl.java | 2 +- 88 files changed, 1911 insertions(+), 508 deletions(-) create mode 100644 network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ErrorResponse.java create mode 100644 network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ErrorResponseException.java create mode 100644 network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/EvaluatedNetworkSecurityGroup.java create mode 100644 network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/MatchedRule.java create mode 100644 network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkConfigurationDiagnosticParameters.java create mode 100644 network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkConfigurationDiagnosticResponse.java create mode 100644 network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkConfigurationDiagnosticResult.java create mode 100644 network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkSecurityGroupResult.java create mode 100644 network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkSecurityRulesEvaluationResult.java create mode 100644 network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/TrafficQuery.java create mode 100644 network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkConfigurationDiagnosticResponseImpl.java create mode 100644 network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkConfigurationDiagnosticResponseInner.java diff --git a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/VirtualNetworkGateways.java b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/VirtualNetworkGateways.java index ea7f6901d643..410f9b6dcb4e 100644 --- a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/VirtualNetworkGateways.java +++ b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/VirtualNetworkGateways.java @@ -14,7 +14,6 @@ import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; import rx.Observable; import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; -import rx.Completable; import com.microsoft.azure.management.network.v2017_10_01.implementation.VirtualNetworkGatewaysInner; import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.management.network.v2017_10_01.VirtualNetworkGatewayConnectionListEntity; @@ -42,7 +41,7 @@ public interface VirtualNetworkGateways extends SupportsCreating generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters); /** * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. @@ -53,7 +52,7 @@ public interface VirtualNetworkGateways extends SupportsCreating generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters); /** * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. @@ -63,7 +62,7 @@ public interface VirtualNetworkGateways extends SupportsCreating getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName); /** * The GetBgpPeerStatus operation retrieves the status of all BGP peers. @@ -83,7 +82,7 @@ public interface VirtualNetworkGateways extends SupportsCreating supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName); /** * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. @@ -125,6 +124,6 @@ public interface VirtualNetworkGateways extends SupportsCreating vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters); } diff --git a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/BackendAddressPoolImpl.java b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/BackendAddressPoolImpl.java index 3147ebe0616e..018ba0972ddf 100644 --- a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/BackendAddressPoolImpl.java +++ b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/BackendAddressPoolImpl.java @@ -25,6 +25,7 @@ class BackendAddressPoolImpl extends IndexableRefreshableWrapperImpl> getStatu } final String apiVersion = "2017-10-01"; Observable> observable = service.getStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); } /** diff --git a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/ProbeImpl.java b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/ProbeImpl.java index 4fe4ecf9c33a..263df39c8a50 100644 --- a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/ProbeImpl.java +++ b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/ProbeImpl.java @@ -24,6 +24,7 @@ class ProbeImpl extends IndexableRefreshableWrapperImpl imple ProbeImpl(ProbeInner inner, NetworkManager manager) { super(null, inner); this.manager = manager; + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.loadBalancerName = IdParsingUtils.getValueFromIdByName(inner.id(), "loadBalancers"); this.probeName = IdParsingUtils.getValueFromIdByName(inner.id(), "probes"); diff --git a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteFilterRuleImpl.java b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteFilterRuleImpl.java index da65206e7f5f..a95d3984483f 100644 --- a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteFilterRuleImpl.java +++ b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteFilterRuleImpl.java @@ -38,7 +38,7 @@ class RouteFilterRuleImpl extends CreatableUpdatableImpl imp this.manager = manager; // Set resource name this.routeName = inner.name(); - // resource ancestor names + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.routeTableName = IdParsingUtils.getValueFromIdByName(inner.id(), "routeTables"); this.routeName = IdParsingUtils.getValueFromIdByName(inner.id(), "routes"); diff --git a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/SubnetImpl.java b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/SubnetImpl.java index c2ece0d9d4fb..67a41bcc43f7 100644 --- a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/SubnetImpl.java +++ b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/SubnetImpl.java @@ -37,7 +37,7 @@ class SubnetImpl extends CreatableUpdatableImpl this.manager = manager; // Set resource name this.subnetName = inner.name(); - // resource ancestor names + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.virtualNetworkName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualNetworks"); this.subnetName = IdParsingUtils.getValueFromIdByName(inner.id(), "subnets"); diff --git a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java index 0d51cbbeecb6..7f1d1ec7c1f6 100644 --- a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java +++ b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java @@ -33,6 +33,7 @@ class VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl extends Indexabl VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl(NetworkInterfaceIPConfigurationInner inner, NetworkManager manager) { super(null, inner); this.manager = manager; + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.virtualMachineScaleSetName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualMachineScaleSets"); this.virtualmachineIndex = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualMachines"); diff --git a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewaysImpl.java b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewaysImpl.java index 2d0a17b86fdd..f4677fb877b6 100644 --- a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewaysImpl.java +++ b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkGatewaysImpl.java @@ -119,22 +119,22 @@ public VirtualNetworkGateway call(VirtualNetworkGatewayInner inner) { } @Override - public Completable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + public Observable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { VirtualNetworkGatewaysInner client = this.inner(); - return client.generatevpnclientpackageAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toCompletable(); - } + return client.generatevpnclientpackageAsync(resourceGroupName, virtualNetworkGatewayName, parameters) + ;} @Override - public Completable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + public Observable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { VirtualNetworkGatewaysInner client = this.inner(); - return client.generateVpnProfileAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toCompletable(); - } + return client.generateVpnProfileAsync(resourceGroupName, virtualNetworkGatewayName, parameters) + ;} @Override - public Completable getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { VirtualNetworkGatewaysInner client = this.inner(); - return client.getVpnProfilePackageUrlAsync(resourceGroupName, virtualNetworkGatewayName).toCompletable(); - } + return client.getVpnProfilePackageUrlAsync(resourceGroupName, virtualNetworkGatewayName) + ;} @Override public Observable getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName) { @@ -149,10 +149,10 @@ public BgpPeerStatusListResult call(BgpPeerStatusListResultInner inner) { } @Override - public Completable supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { VirtualNetworkGatewaysInner client = this.inner(); - return client.supportedVpnDevicesAsync(resourceGroupName, virtualNetworkGatewayName).toCompletable(); - } + return client.supportedVpnDevicesAsync(resourceGroupName, virtualNetworkGatewayName) + ;} @Override public Observable getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName) { @@ -211,9 +211,9 @@ public VirtualNetworkGatewayConnectionListEntity call(VirtualNetworkGatewayConne } @Override - public Completable vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { + public Observable vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { VirtualNetworkGatewaysInner client = this.inner(); - return client.vpnDeviceConfigurationScriptAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toCompletable(); - } + return client.vpnDeviceConfigurationScriptAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + ;} } diff --git a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringImpl.java b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringImpl.java index e9e1f8decb76..71395cfd93c0 100644 --- a/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringImpl.java +++ b/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringImpl.java @@ -34,7 +34,7 @@ class VirtualNetworkPeeringImpl extends CreatableUpdatableImpl - - 4.0.0 - com.microsoft.azure.network.v2018_04_01 - - com.microsoft.azure - azure-arm-parent - 0.0.3-beta - ../../../pom.xml - - azure-mgmt-network - 1.0.0-beta - jar - Microsoft Azure SDK for Network Management - This package contains Microsoft Network Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-arm-client-runtime - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - com.microsoft.azure - azure-mgmt-resources - test - - - com.microsoft.azure - azure-arm-client-runtime - test-jar - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.8 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
+ + + 4.0.0 + com.microsoft.azure.network.v2018_04_01 + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-network + 1.0.0-beta + jar + Microsoft Azure SDK for Network Management + This package contains Microsoft Network Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/VirtualNetworkGateways.java b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/VirtualNetworkGateways.java index d59636c5ee5e..d495912152ce 100644 --- a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/VirtualNetworkGateways.java +++ b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/VirtualNetworkGateways.java @@ -14,7 +14,6 @@ import com.microsoft.azure.arm.resources.collection.SupportsGettingByResourceGroup; import rx.Observable; import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; -import rx.Completable; import com.microsoft.azure.management.network.v2018_04_01.implementation.VpnClientIPsecParametersInner; import com.microsoft.azure.management.network.v2018_04_01.implementation.VirtualNetworkGatewaysInner; import com.microsoft.azure.arm.model.HasInner; @@ -43,7 +42,7 @@ public interface VirtualNetworkGateways extends SupportsCreating generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters); /** * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. @@ -54,7 +53,7 @@ public interface VirtualNetworkGateways extends SupportsCreating generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters); /** * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. @@ -64,7 +63,7 @@ public interface VirtualNetworkGateways extends SupportsCreating getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName); /** * The GetBgpPeerStatus operation retrieves the status of all BGP peers. @@ -84,7 +83,7 @@ public interface VirtualNetworkGateways extends SupportsCreating supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName); /** * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. @@ -147,6 +146,6 @@ public interface VirtualNetworkGateways extends SupportsCreating vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters); } diff --git a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/BackendAddressPoolImpl.java b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/BackendAddressPoolImpl.java index c5eafd14fe5b..0653722b28ce 100644 --- a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/BackendAddressPoolImpl.java +++ b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/BackendAddressPoolImpl.java @@ -25,6 +25,7 @@ class BackendAddressPoolImpl extends IndexableRefreshableWrapperImpl> getStatu } final String apiVersion = "2018-04-01"; Observable> observable = service.getStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); } /** diff --git a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ProbeImpl.java b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ProbeImpl.java index 47f5cc6e7033..8ab45fb80a2f 100644 --- a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ProbeImpl.java +++ b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ProbeImpl.java @@ -24,6 +24,7 @@ class ProbeImpl extends IndexableRefreshableWrapperImpl imple ProbeImpl(ProbeInner inner, NetworkManager manager) { super(null, inner); this.manager = manager; + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.loadBalancerName = IdParsingUtils.getValueFromIdByName(inner.id(), "loadBalancers"); this.probeName = IdParsingUtils.getValueFromIdByName(inner.id(), "probes"); diff --git a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFilterRuleImpl.java b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFilterRuleImpl.java index 398584ae738f..65e3b33d2867 100644 --- a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFilterRuleImpl.java +++ b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/RouteFilterRuleImpl.java @@ -37,7 +37,7 @@ class RouteFilterRuleImpl extends CreatableUpdatableImpl imp this.manager = manager; // Set resource name this.routeName = inner.name(); - // resource ancestor names + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.routeTableName = IdParsingUtils.getValueFromIdByName(inner.id(), "routeTables"); this.routeName = IdParsingUtils.getValueFromIdByName(inner.id(), "routes"); diff --git a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/SubnetImpl.java b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/SubnetImpl.java index 036b0d0281a8..771a6c86b074 100644 --- a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/SubnetImpl.java +++ b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/SubnetImpl.java @@ -37,7 +37,7 @@ class SubnetImpl extends CreatableUpdatableImpl this.manager = manager; // Set resource name this.subnetName = inner.name(); - // resource ancestor names + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.virtualNetworkName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualNetworks"); this.subnetName = IdParsingUtils.getValueFromIdByName(inner.id(), "subnets"); diff --git a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java index 0ba3f67c8e48..051168b5a04d 100644 --- a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java +++ b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java @@ -33,6 +33,7 @@ class VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl extends Indexabl VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl(NetworkInterfaceIPConfigurationInner inner, NetworkManager manager) { super(null, inner); this.manager = manager; + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.virtualMachineScaleSetName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualMachineScaleSets"); this.virtualmachineIndex = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualMachines"); diff --git a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysImpl.java b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysImpl.java index f121fd0db0ae..058cf280ec0a 100644 --- a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysImpl.java +++ b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysImpl.java @@ -120,22 +120,22 @@ public VirtualNetworkGateway call(VirtualNetworkGatewayInner inner) { } @Override - public Completable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + public Observable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { VirtualNetworkGatewaysInner client = this.inner(); - return client.generatevpnclientpackageAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toCompletable(); - } + return client.generatevpnclientpackageAsync(resourceGroupName, virtualNetworkGatewayName, parameters) + ;} @Override - public Completable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + public Observable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { VirtualNetworkGatewaysInner client = this.inner(); - return client.generateVpnProfileAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toCompletable(); - } + return client.generateVpnProfileAsync(resourceGroupName, virtualNetworkGatewayName, parameters) + ;} @Override - public Completable getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { VirtualNetworkGatewaysInner client = this.inner(); - return client.getVpnProfilePackageUrlAsync(resourceGroupName, virtualNetworkGatewayName).toCompletable(); - } + return client.getVpnProfilePackageUrlAsync(resourceGroupName, virtualNetworkGatewayName) + ;} @Override public Observable getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName) { @@ -150,10 +150,10 @@ public BgpPeerStatusListResult call(BgpPeerStatusListResultInner inner) { } @Override - public Completable supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { VirtualNetworkGatewaysInner client = this.inner(); - return client.supportedVpnDevicesAsync(resourceGroupName, virtualNetworkGatewayName).toCompletable(); - } + return client.supportedVpnDevicesAsync(resourceGroupName, virtualNetworkGatewayName) + ;} @Override public Observable getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName) { @@ -236,9 +236,9 @@ public VirtualNetworkGatewayConnectionListEntity call(VirtualNetworkGatewayConne } @Override - public Completable vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { + public Observable vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { VirtualNetworkGatewaysInner client = this.inner(); - return client.vpnDeviceConfigurationScriptAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toCompletable(); - } + return client.vpnDeviceConfigurationScriptAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + ;} } diff --git a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkPeeringImpl.java b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkPeeringImpl.java index 79d23712a865..f79d3ec9f546 100644 --- a/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkPeeringImpl.java +++ b/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkPeeringImpl.java @@ -34,7 +34,7 @@ class VirtualNetworkPeeringImpl extends CreatableUpdatableImpl - - 4.0.0 - com.microsoft.azure.network.v2018_06_01 - - com.microsoft.azure - azure-arm-parent - 0.0.3-beta - ../../../pom.xml - - azure-mgmt-network - 1.0.0-beta - jar - Microsoft Azure SDK for Network Management - This package contains Microsoft Network Management SDK. - https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - - - scm:git:https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - UTF-8 - - - - - microsoft - Microsoft - - - - - com.microsoft.azure - azure-client-runtime - - - com.microsoft.azure - azure-arm-client-runtime - - - junit - junit - test - - - com.microsoft.azure - azure-client-authentication - test - - - com.microsoft.azure - azure-mgmt-resources - test - - - com.microsoft.azure - azure-arm-client-runtime - test-jar - test - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - true - true - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - com.microsoft.azure.management.apigeneration.LangDefinitionProcessor - - - true - true - - true - true - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.8 - - *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search - - - /** -
* Copyright (c) Microsoft Corporation. All rights reserved. -
* Licensed under the MIT License. See License.txt in the project root for -
* license information. -
*/ - ]]> -
-
-
-
-
-
+ + + 4.0.0 + com.microsoft.azure.network.v2018_06_01 + + com.microsoft.azure + azure-arm-parent + 0.0.3-beta + ../../../pom.xml + + azure-mgmt-network + 1.0.0-beta + jar + Microsoft Azure SDK for Network Management + This package contains Microsoft Network Management SDK. + https://github.com/Azure/azure-sdk-for-java + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + UTF-8 + + + + + microsoft + Microsoft + + + + + com.microsoft.azure + azure-client-runtime + + + com.microsoft.azure + azure-arm-client-runtime + + + junit + junit + test + + + com.microsoft.azure + azure-client-authentication + test + + + com.microsoft.azure + azure-mgmt-resources + test + + + com.microsoft.azure + azure-arm-client-runtime + test-jar + test + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.7 + 1.7 + + + com.microsoft.azure.management.apigeneration.LangDefinitionProcessor + + + true + true + + true + true + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.8 + + *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search + + + /** +
* Copyright (c) Microsoft Corporation. All rights reserved. +
* Licensed under the MIT License. See License.txt in the project root for +
* license information. +
*/ + ]]> +
+
+
+
+
+
diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ConnectionStateSnapshot.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ConnectionStateSnapshot.java index 7048fd55a4b8..b7ac63365a21 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ConnectionStateSnapshot.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ConnectionStateSnapshot.java @@ -42,6 +42,36 @@ public class ConnectionStateSnapshot { @JsonProperty(value = "evaluationState") private EvaluationState evaluationState; + /** + * Average latency in ms. + */ + @JsonProperty(value = "avgLatencyInMs") + private Integer avgLatencyInMs; + + /** + * Minimum latency in ms. + */ + @JsonProperty(value = "minLatencyInMs") + private Integer minLatencyInMs; + + /** + * Maximum latency in ms. + */ + @JsonProperty(value = "maxLatencyInMs") + private Integer maxLatencyInMs; + + /** + * The number of sent probes. + */ + @JsonProperty(value = "probesSent") + private Integer probesSent; + + /** + * The number of failed probes. + */ + @JsonProperty(value = "probesFailed") + private Integer probesFailed; + /** * List of hops between the source and the destination. */ @@ -128,6 +158,106 @@ public ConnectionStateSnapshot withEvaluationState(EvaluationState evaluationSta return this; } + /** + * Get average latency in ms. + * + * @return the avgLatencyInMs value + */ + public Integer avgLatencyInMs() { + return this.avgLatencyInMs; + } + + /** + * Set average latency in ms. + * + * @param avgLatencyInMs the avgLatencyInMs value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withAvgLatencyInMs(Integer avgLatencyInMs) { + this.avgLatencyInMs = avgLatencyInMs; + return this; + } + + /** + * Get minimum latency in ms. + * + * @return the minLatencyInMs value + */ + public Integer minLatencyInMs() { + return this.minLatencyInMs; + } + + /** + * Set minimum latency in ms. + * + * @param minLatencyInMs the minLatencyInMs value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withMinLatencyInMs(Integer minLatencyInMs) { + this.minLatencyInMs = minLatencyInMs; + return this; + } + + /** + * Get maximum latency in ms. + * + * @return the maxLatencyInMs value + */ + public Integer maxLatencyInMs() { + return this.maxLatencyInMs; + } + + /** + * Set maximum latency in ms. + * + * @param maxLatencyInMs the maxLatencyInMs value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withMaxLatencyInMs(Integer maxLatencyInMs) { + this.maxLatencyInMs = maxLatencyInMs; + return this; + } + + /** + * Get the number of sent probes. + * + * @return the probesSent value + */ + public Integer probesSent() { + return this.probesSent; + } + + /** + * Set the number of sent probes. + * + * @param probesSent the probesSent value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withProbesSent(Integer probesSent) { + this.probesSent = probesSent; + return this; + } + + /** + * Get the number of failed probes. + * + * @return the probesFailed value + */ + public Integer probesFailed() { + return this.probesFailed; + } + + /** + * Set the number of failed probes. + * + * @param probesFailed the probesFailed value to set + * @return the ConnectionStateSnapshot object itself. + */ + public ConnectionStateSnapshot withProbesFailed(Integer probesFailed) { + this.probesFailed = probesFailed; + return this; + } + /** * Get list of hops between the source and the destination. * diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ErrorResponse.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ErrorResponse.java new file mode 100644 index 000000000000..ebc7b2804da1 --- /dev/null +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ErrorResponse.java @@ -0,0 +1,43 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.network.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The error object. + */ +public class ErrorResponse { + /** + * Error. + */ + @JsonProperty(value = "error") + private ErrorDetails error; + + /** + * Get the error value. + * + * @return the error value + */ + public ErrorDetails error() { + return this.error; + } + + /** + * Set the error value. + * + * @param error the error value to set + * @return the ErrorResponse object itself. + */ + public ErrorResponse withError(ErrorDetails error) { + this.error = error; + return this; + } + +} diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ErrorResponseException.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ErrorResponseException.java new file mode 100644 index 000000000000..01fd627d673e --- /dev/null +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ErrorResponseException.java @@ -0,0 +1,44 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.network.v2018_06_01; + +import com.microsoft.rest.RestException; +import okhttp3.ResponseBody; +import retrofit2.Response; + +/** + * Exception thrown for an invalid response with ErrorResponse information. + */ +public class ErrorResponseException extends RestException { + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + */ + public ErrorResponseException(final String message, final Response response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorResponseException class. + * + * @param message the exception message or the response content if a message is not available + * @param response the HTTP response + * @param body the deserialized response body + */ + public ErrorResponseException(final String message, final Response response, final ErrorResponse body) { + super(message, response, body); + } + + @Override + public ErrorResponse body() { + return (ErrorResponse) super.body(); + } +} diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/EvaluatedNetworkSecurityGroup.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/EvaluatedNetworkSecurityGroup.java new file mode 100644 index 000000000000..ff9dc1fc588e --- /dev/null +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/EvaluatedNetworkSecurityGroup.java @@ -0,0 +1,85 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.network.v2018_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results of network security group evaluation. + */ +public class EvaluatedNetworkSecurityGroup { + /** + * Network security group ID. + */ + @JsonProperty(value = "networkSecurityGroupId") + private String networkSecurityGroupId; + + /** + * The matchedRule property. + */ + @JsonProperty(value = "matchedRule") + private MatchedRule matchedRule; + + /** + * List of network security rules evaluation results. + */ + @JsonProperty(value = "rulesEvaluationResult", access = JsonProperty.Access.WRITE_ONLY) + private List rulesEvaluationResult; + + /** + * Get network security group ID. + * + * @return the networkSecurityGroupId value + */ + public String networkSecurityGroupId() { + return this.networkSecurityGroupId; + } + + /** + * Set network security group ID. + * + * @param networkSecurityGroupId the networkSecurityGroupId value to set + * @return the EvaluatedNetworkSecurityGroup object itself. + */ + public EvaluatedNetworkSecurityGroup withNetworkSecurityGroupId(String networkSecurityGroupId) { + this.networkSecurityGroupId = networkSecurityGroupId; + return this; + } + + /** + * Get the matchedRule value. + * + * @return the matchedRule value + */ + public MatchedRule matchedRule() { + return this.matchedRule; + } + + /** + * Set the matchedRule value. + * + * @param matchedRule the matchedRule value to set + * @return the EvaluatedNetworkSecurityGroup object itself. + */ + public EvaluatedNetworkSecurityGroup withMatchedRule(MatchedRule matchedRule) { + this.matchedRule = matchedRule; + return this; + } + + /** + * Get list of network security rules evaluation results. + * + * @return the rulesEvaluationResult value + */ + public List rulesEvaluationResult() { + return this.rulesEvaluationResult; + } + +} diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/MatchedRule.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/MatchedRule.java new file mode 100644 index 000000000000..c29c5b5cb061 --- /dev/null +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/MatchedRule.java @@ -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. + */ + +package com.microsoft.azure.management.network.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Matched rule. + */ +public class MatchedRule { + /** + * Name of the matched network security rule. + */ + @JsonProperty(value = "ruleName") + private String ruleName; + + /** + * The network traffic is allowed or denied. Possible values are 'Allow' + * and 'Deny'. + */ + @JsonProperty(value = "action") + private String action; + + /** + * Get name of the matched network security rule. + * + * @return the ruleName value + */ + public String ruleName() { + return this.ruleName; + } + + /** + * Set name of the matched network security rule. + * + * @param ruleName the ruleName value to set + * @return the MatchedRule object itself. + */ + public MatchedRule withRuleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get the network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. + * + * @return the action value + */ + public String action() { + return this.action; + } + + /** + * Set the network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. + * + * @param action the action value to set + * @return the MatchedRule object itself. + */ + public MatchedRule withAction(String action) { + this.action = action; + return this; + } + +} diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkConfigurationDiagnosticParameters.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkConfigurationDiagnosticParameters.java new file mode 100644 index 000000000000..224226c2db34 --- /dev/null +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkConfigurationDiagnosticParameters.java @@ -0,0 +1,72 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.network.v2018_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters to get network configuration diagnostic. + */ +public class NetworkConfigurationDiagnosticParameters { + /** + * The ID of the target resource to perform network configuration + * diagnostic. Valid options are VM, NetworkInterface, + * VMSS/NetworkInterface and Application Gateway. + */ + @JsonProperty(value = "targetResourceId", required = true) + private String targetResourceId; + + /** + * List of traffic queries. + */ + @JsonProperty(value = "queries", required = true) + private List queries; + + /** + * Get the ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway. + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Set the ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway. + * + * @param targetResourceId the targetResourceId value to set + * @return the NetworkConfigurationDiagnosticParameters object itself. + */ + public NetworkConfigurationDiagnosticParameters withTargetResourceId(String targetResourceId) { + this.targetResourceId = targetResourceId; + return this; + } + + /** + * Get list of traffic queries. + * + * @return the queries value + */ + public List queries() { + return this.queries; + } + + /** + * Set list of traffic queries. + * + * @param queries the queries value to set + * @return the NetworkConfigurationDiagnosticParameters object itself. + */ + public NetworkConfigurationDiagnosticParameters withQueries(List queries) { + this.queries = queries; + return this; + } + +} diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkConfigurationDiagnosticResponse.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkConfigurationDiagnosticResponse.java new file mode 100644 index 000000000000..e4cc4bfe17bc --- /dev/null +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkConfigurationDiagnosticResponse.java @@ -0,0 +1,26 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.network.v2018_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2018_06_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2018_06_01.implementation.NetworkConfigurationDiagnosticResponseInner; +import java.util.List; + +/** + * Type representing NetworkConfigurationDiagnosticResponse. + */ +public interface NetworkConfigurationDiagnosticResponse extends HasInner, HasManager { + /** + * @return the results value. + */ + List results(); + +} diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkConfigurationDiagnosticResult.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkConfigurationDiagnosticResult.java new file mode 100644 index 000000000000..eab7413d051b --- /dev/null +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkConfigurationDiagnosticResult.java @@ -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. + */ + +package com.microsoft.azure.management.network.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network configuration diagnostic result corresponded to provided traffic + * query. + */ +public class NetworkConfigurationDiagnosticResult { + /** + * The trafficQuery property. + */ + @JsonProperty(value = "trafficQuery") + private TrafficQuery trafficQuery; + + /** + * The networkSecurityGroupResult property. + */ + @JsonProperty(value = "networkSecurityGroupResult") + private NetworkSecurityGroupResult networkSecurityGroupResult; + + /** + * Get the trafficQuery value. + * + * @return the trafficQuery value + */ + public TrafficQuery trafficQuery() { + return this.trafficQuery; + } + + /** + * Set the trafficQuery value. + * + * @param trafficQuery the trafficQuery value to set + * @return the NetworkConfigurationDiagnosticResult object itself. + */ + public NetworkConfigurationDiagnosticResult withTrafficQuery(TrafficQuery trafficQuery) { + this.trafficQuery = trafficQuery; + return this; + } + + /** + * Get the networkSecurityGroupResult value. + * + * @return the networkSecurityGroupResult value + */ + public NetworkSecurityGroupResult networkSecurityGroupResult() { + return this.networkSecurityGroupResult; + } + + /** + * Set the networkSecurityGroupResult value. + * + * @param networkSecurityGroupResult the networkSecurityGroupResult value to set + * @return the NetworkConfigurationDiagnosticResult object itself. + */ + public NetworkConfigurationDiagnosticResult withNetworkSecurityGroupResult(NetworkSecurityGroupResult networkSecurityGroupResult) { + this.networkSecurityGroupResult = networkSecurityGroupResult; + return this; + } + +} diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkSecurityGroupResult.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkSecurityGroupResult.java new file mode 100644 index 000000000000..fb373a464c1e --- /dev/null +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkSecurityGroupResult.java @@ -0,0 +1,60 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.network.v2018_06_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network configuration diagnostic result corresponded provided traffic query. + */ +public class NetworkSecurityGroupResult { + /** + * The network traffic is allowed or denied. Possible values are 'Allow' + * and 'Deny'. Possible values include: 'Allow', 'Deny'. + */ + @JsonProperty(value = "securityRuleAccessResult") + private SecurityRuleAccess securityRuleAccessResult; + + /** + * List of results network security groups diagnostic. + */ + @JsonProperty(value = "evaluatedNetworkSecurityGroups", access = JsonProperty.Access.WRITE_ONLY) + private List evaluatedNetworkSecurityGroups; + + /** + * Get the network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny'. + * + * @return the securityRuleAccessResult value + */ + public SecurityRuleAccess securityRuleAccessResult() { + return this.securityRuleAccessResult; + } + + /** + * Set the network traffic is allowed or denied. Possible values are 'Allow' and 'Deny'. Possible values include: 'Allow', 'Deny'. + * + * @param securityRuleAccessResult the securityRuleAccessResult value to set + * @return the NetworkSecurityGroupResult object itself. + */ + public NetworkSecurityGroupResult withSecurityRuleAccessResult(SecurityRuleAccess securityRuleAccessResult) { + this.securityRuleAccessResult = securityRuleAccessResult; + return this; + } + + /** + * Get list of results network security groups diagnostic. + * + * @return the evaluatedNetworkSecurityGroups value + */ + public List evaluatedNetworkSecurityGroups() { + return this.evaluatedNetworkSecurityGroups; + } + +} diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkSecurityRulesEvaluationResult.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkSecurityRulesEvaluationResult.java new file mode 100644 index 000000000000..82615fa2c8a5 --- /dev/null +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkSecurityRulesEvaluationResult.java @@ -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. + */ + +package com.microsoft.azure.management.network.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Network security rules evaluation result. + */ +public class NetworkSecurityRulesEvaluationResult { + /** + * Name of the network security rule. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Value indicating whether protocol is matched. + */ + @JsonProperty(value = "protocolMatched") + private Boolean protocolMatched; + + /** + * Value indicating whether source is matched. + */ + @JsonProperty(value = "sourceMatched") + private Boolean sourceMatched; + + /** + * Value indicating whether source port is matched. + */ + @JsonProperty(value = "sourcePortMatched") + private Boolean sourcePortMatched; + + /** + * Value indicating whether destination is matched. + */ + @JsonProperty(value = "destinationMatched") + private Boolean destinationMatched; + + /** + * Value indicating whether destination port is matched. + */ + @JsonProperty(value = "destinationPortMatched") + private Boolean destinationPortMatched; + + /** + * Get name of the network security rule. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the network security rule. + * + * @param name the name value to set + * @return the NetworkSecurityRulesEvaluationResult object itself. + */ + public NetworkSecurityRulesEvaluationResult withName(String name) { + this.name = name; + return this; + } + + /** + * Get value indicating whether protocol is matched. + * + * @return the protocolMatched value + */ + public Boolean protocolMatched() { + return this.protocolMatched; + } + + /** + * Set value indicating whether protocol is matched. + * + * @param protocolMatched the protocolMatched value to set + * @return the NetworkSecurityRulesEvaluationResult object itself. + */ + public NetworkSecurityRulesEvaluationResult withProtocolMatched(Boolean protocolMatched) { + this.protocolMatched = protocolMatched; + return this; + } + + /** + * Get value indicating whether source is matched. + * + * @return the sourceMatched value + */ + public Boolean sourceMatched() { + return this.sourceMatched; + } + + /** + * Set value indicating whether source is matched. + * + * @param sourceMatched the sourceMatched value to set + * @return the NetworkSecurityRulesEvaluationResult object itself. + */ + public NetworkSecurityRulesEvaluationResult withSourceMatched(Boolean sourceMatched) { + this.sourceMatched = sourceMatched; + return this; + } + + /** + * Get value indicating whether source port is matched. + * + * @return the sourcePortMatched value + */ + public Boolean sourcePortMatched() { + return this.sourcePortMatched; + } + + /** + * Set value indicating whether source port is matched. + * + * @param sourcePortMatched the sourcePortMatched value to set + * @return the NetworkSecurityRulesEvaluationResult object itself. + */ + public NetworkSecurityRulesEvaluationResult withSourcePortMatched(Boolean sourcePortMatched) { + this.sourcePortMatched = sourcePortMatched; + return this; + } + + /** + * Get value indicating whether destination is matched. + * + * @return the destinationMatched value + */ + public Boolean destinationMatched() { + return this.destinationMatched; + } + + /** + * Set value indicating whether destination is matched. + * + * @param destinationMatched the destinationMatched value to set + * @return the NetworkSecurityRulesEvaluationResult object itself. + */ + public NetworkSecurityRulesEvaluationResult withDestinationMatched(Boolean destinationMatched) { + this.destinationMatched = destinationMatched; + return this; + } + + /** + * Get value indicating whether destination port is matched. + * + * @return the destinationPortMatched value + */ + public Boolean destinationPortMatched() { + return this.destinationPortMatched; + } + + /** + * Set value indicating whether destination port is matched. + * + * @param destinationPortMatched the destinationPortMatched value to set + * @return the NetworkSecurityRulesEvaluationResult object itself. + */ + public NetworkSecurityRulesEvaluationResult withDestinationPortMatched(Boolean destinationPortMatched) { + this.destinationPortMatched = destinationPortMatched; + return this; + } + +} diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkWatchers.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkWatchers.java index a462c56dd7af..f569672a812b 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkWatchers.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/NetworkWatchers.java @@ -144,4 +144,15 @@ public interface NetworkWatchers extends SupportsCreating listAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParameters parameters); + /** + * Get network configuration diagnostic. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters); + } diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/TrafficQuery.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/TrafficQuery.java new file mode 100644 index 000000000000..e7e6df6da5e8 --- /dev/null +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/TrafficQuery.java @@ -0,0 +1,150 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.network.v2018_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters to compare with network configuration. + */ +public class TrafficQuery { + /** + * The direction of the traffic. Accepted values are 'Inbound' and + * 'Outbound'. Possible values include: 'Inbound', 'Outbound'. + */ + @JsonProperty(value = "direction", required = true) + private Direction direction; + + /** + * Protocol to be verified on. Accepted values are '*', TCP, UDP. + */ + @JsonProperty(value = "protocol", required = true) + private String protocol; + + /** + * Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. + */ + @JsonProperty(value = "source", required = true) + private String source; + + /** + * Traffic destination. Accepted values are: '*', IP Address/CIDR, Service + * Tag. + */ + @JsonProperty(value = "destination", required = true) + private String destination; + + /** + * Traffice destination port. Accepted values are '*', port (for example, + * 3389) and port range (for example, 80-100). + */ + @JsonProperty(value = "destinationPort", required = true) + private String destinationPort; + + /** + * Get the direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'. + * + * @return the direction value + */ + public Direction direction() { + return this.direction; + } + + /** + * Set the direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'. + * + * @param direction the direction value to set + * @return the TrafficQuery object itself. + */ + public TrafficQuery withDirection(Direction direction) { + this.direction = direction; + return this; + } + + /** + * Get protocol to be verified on. Accepted values are '*', TCP, UDP. + * + * @return the protocol value + */ + public String protocol() { + return this.protocol; + } + + /** + * Set protocol to be verified on. Accepted values are '*', TCP, UDP. + * + * @param protocol the protocol value to set + * @return the TrafficQuery object itself. + */ + public TrafficQuery withProtocol(String protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. + * + * @return the source value + */ + public String source() { + return this.source; + } + + /** + * Set traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. + * + * @param source the source value to set + * @return the TrafficQuery object itself. + */ + public TrafficQuery withSource(String source) { + this.source = source; + return this; + } + + /** + * Get traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. + * + * @return the destination value + */ + public String destination() { + return this.destination; + } + + /** + * Set traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag. + * + * @param destination the destination value to set + * @return the TrafficQuery object itself. + */ + public TrafficQuery withDestination(String destination) { + this.destination = destination; + return this; + } + + /** + * Get traffice destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100). + * + * @return the destinationPort value + */ + public String destinationPort() { + return this.destinationPort; + } + + /** + * Set traffice destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100). + * + * @param destinationPort the destinationPort value to set + * @return the TrafficQuery object itself. + */ + public TrafficQuery withDestinationPort(String destinationPort) { + this.destinationPort = destinationPort; + return this; + } + +} diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/VirtualNetworkGateways.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/VirtualNetworkGateways.java index 2d4cdfa896bb..6fdd150b1835 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/VirtualNetworkGateways.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/VirtualNetworkGateways.java @@ -34,6 +34,16 @@ public interface VirtualNetworkGateways extends SupportsCreating resetAsync(String resourceGroupName, String virtualNetworkGatewayName); + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable resetVpnClientSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayName); + /** * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. * @@ -43,7 +53,7 @@ public interface VirtualNetworkGateways extends SupportsCreating generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters); /** * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. @@ -54,7 +64,7 @@ public interface VirtualNetworkGateways extends SupportsCreating generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters); /** * Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified resource group. The profile needs to be generated first using generateVpnProfile. @@ -64,7 +74,7 @@ public interface VirtualNetworkGateways extends SupportsCreating getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName); /** * The GetBgpPeerStatus operation retrieves the status of all BGP peers. @@ -84,7 +94,7 @@ public interface VirtualNetworkGateways extends SupportsCreating supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName); /** * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. @@ -147,6 +157,6 @@ public interface VirtualNetworkGateways extends SupportsCreating vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters); } diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/BackendAddressPoolImpl.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/BackendAddressPoolImpl.java index de72721f686b..00ea2682d4ae 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/BackendAddressPoolImpl.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/BackendAddressPoolImpl.java @@ -25,6 +25,7 @@ class BackendAddressPoolImpl extends IndexableRefreshableWrapperImpl> createOrUpdateW * @param connectionMonitorName The name of the connection monitor. * @param parameters Parameters that define the operation to create a connection monitor. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ConnectionMonitorResultInner object if successful. */ @@ -281,11 +281,11 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -296,7 +296,7 @@ private ServiceResponse beginCreateOrUpdateDelegat * @param networkWatcherName The name of the Network Watcher resource. * @param connectionMonitorName The name of the connection monitor. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ConnectionMonitorResultInner object if successful. */ @@ -373,10 +373,10 @@ public Observable> call(Response getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -387,7 +387,7 @@ private ServiceResponse getDelegate(Response> deleteWithServiceResponseAsync(String r * @param networkWatcherName The name of the Network Watcher resource. * @param connectionMonitorName The name of the connection monitor. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void beginDelete(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { @@ -536,11 +536,11 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -551,7 +551,7 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param networkWatcherName The name of the Network Watcher resource. * @param connectionMonitorName The name of the connection monitor. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void stop(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { @@ -624,7 +624,7 @@ public Observable> stopWithServiceResponseAsync(String res * @param networkWatcherName The name of the Network Watcher resource. * @param connectionMonitorName The name of the connection monitor. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void beginStop(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { @@ -700,11 +700,11 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginStopDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginStopDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -715,7 +715,7 @@ private ServiceResponse beginStopDelegate(Response response) * @param networkWatcherName The name of the Network Watcher resource. * @param connectionMonitorName The name of the connection monitor. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void start(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { @@ -788,7 +788,7 @@ public Observable> startWithServiceResponseAsync(String re * @param networkWatcherName The name of the Network Watcher resource. * @param connectionMonitorName The name of the connection monitor. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void beginStart(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { @@ -864,11 +864,11 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginStartDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginStartDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -879,7 +879,7 @@ private ServiceResponse beginStartDelegate(Response response * @param networkWatcherName The name of the Network Watcher resource. * @param connectionMonitorName The name given to the connection monitor. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ConnectionMonitorQueryResultInner object if successful. */ @@ -953,7 +953,7 @@ public Observable> queryWithS * @param networkWatcherName The name of the Network Watcher resource. * @param connectionMonitorName The name given to the connection monitor. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ConnectionMonitorQueryResultInner object if successful. */ @@ -1030,11 +1030,11 @@ public Observable> call(Respo }); } - private ServiceResponse beginQueryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginQueryDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1044,7 +1044,7 @@ private ServiceResponse beginQueryDelegate(Re * @param resourceGroupName The name of the resource group containing Network Watcher. * @param networkWatcherName The name of the Network Watcher resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the List<ConnectionMonitorResultInner> object if successful. */ @@ -1120,10 +1120,10 @@ public Observable>> call(Resp }); } - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ExpressRouteCircuitAuthorizationImpl.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ExpressRouteCircuitAuthorizationImpl.java index 6729ac9c65a8..93dacff4d5d3 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ExpressRouteCircuitAuthorizationImpl.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ExpressRouteCircuitAuthorizationImpl.java @@ -32,7 +32,7 @@ class ExpressRouteCircuitAuthorizationImpl extends CreatableUpdatableImpl implements NetworkConfigurationDiagnosticResponse { + private final NetworkManager manager; + NetworkConfigurationDiagnosticResponseImpl(NetworkConfigurationDiagnosticResponseInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public List results() { + return this.inner().results(); + } + +} diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkConfigurationDiagnosticResponseInner.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkConfigurationDiagnosticResponseInner.java new file mode 100644 index 000000000000..943542f188a3 --- /dev/null +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkConfigurationDiagnosticResponseInner.java @@ -0,0 +1,34 @@ +/** + * 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. + */ + +package com.microsoft.azure.management.network.v2018_06_01.implementation; + +import java.util.List; +import com.microsoft.azure.management.network.v2018_06_01.NetworkConfigurationDiagnosticResult; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Results of network configuration diagnostic on the target resource. + */ +public class NetworkConfigurationDiagnosticResponseInner { + /** + * List of network configuration diagnostic results. + */ + @JsonProperty(value = "results", access = JsonProperty.Access.WRITE_ONLY) + private List results; + + /** + * Get list of network configuration diagnostic results. + * + * @return the results value + */ + public List results() { + return this.results; + } + +} diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkInterfaceNetworkInterfaceIPConfigurationImpl.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkInterfaceNetworkInterfaceIPConfigurationImpl.java index e06a5072de88..ffce6e598219 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkInterfaceNetworkInterfaceIPConfigurationImpl.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkInterfaceNetworkInterfaceIPConfigurationImpl.java @@ -31,6 +31,7 @@ class NetworkInterfaceNetworkInterfaceIPConfigurationImpl extends IndexableRefre NetworkInterfaceNetworkInterfaceIPConfigurationImpl(NetworkInterfaceIPConfigurationInner inner, NetworkManager manager) { super(null, inner); this.manager = manager; + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.networkInterfaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "networkInterfaces"); this.ipConfigurationName = IdParsingUtils.getValueFromIdByName(inner.id(), "ipConfigurations"); diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkSecurityGroupSecurityRuleImpl.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkSecurityGroupSecurityRuleImpl.java index d6b3b2937da2..117a85e6ba86 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkSecurityGroupSecurityRuleImpl.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkSecurityGroupSecurityRuleImpl.java @@ -37,7 +37,7 @@ class NetworkSecurityGroupSecurityRuleImpl extends CreatableUpdatableImpl implements NetworkWatchers { protected NetworkWatchersImpl(NetworkManager manager) { @@ -273,6 +275,18 @@ public AvailableProvidersList call(AvailableProvidersListInner inner) { }); } + @Override + public Observable getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + NetworkWatchersInner client = this.inner(); + return client.getNetworkConfigurationDiagnosticAsync(resourceGroupName, networkWatcherName, parameters) + .map(new Func1() { + @Override + public NetworkConfigurationDiagnosticResponse call(NetworkConfigurationDiagnosticResponseInner inner) { + return new NetworkConfigurationDiagnosticResponseImpl(inner, manager()); + } + }); + } + @Override protected NetworkWatcherImpl wrapModel(NetworkWatcherInner inner) { return new NetworkWatcherImpl(inner.name(), inner, manager()); diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkWatchersInner.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkWatchersInner.java index 55944e5794da..282c0d8e345c 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkWatchersInner.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/NetworkWatchersInner.java @@ -13,11 +13,12 @@ import com.microsoft.azure.arm.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.network.v2018_06_01.AvailableProvidersListParameters; import com.microsoft.azure.management.network.v2018_06_01.AzureReachabilityReportParameters; import com.microsoft.azure.management.network.v2018_06_01.ConnectivityParameters; +import com.microsoft.azure.management.network.v2018_06_01.ErrorResponseException; import com.microsoft.azure.management.network.v2018_06_01.FlowLogStatusParameters; +import com.microsoft.azure.management.network.v2018_06_01.NetworkConfigurationDiagnosticParameters; import com.microsoft.azure.management.network.v2018_06_01.NextHopParameters; import com.microsoft.azure.management.network.v2018_06_01.QueryTroubleshootingParameters; import com.microsoft.azure.management.network.v2018_06_01.SecurityGroupViewParameters; @@ -48,6 +49,10 @@ import retrofit2.Response; import rx.functions.Func1; import rx.Observable; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined @@ -187,6 +192,14 @@ interface NetworkWatchersService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList") Observable> beginListAvailableProviders(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body AvailableProvidersListParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2018_06_01.NetworkWatchers getNetworkConfigurationDiagnostic" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic") + Observable> getNetworkConfigurationDiagnostic(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body NetworkConfigurationDiagnosticParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2018_06_01.NetworkWatchers beginGetNetworkConfigurationDiagnostic" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic") + Observable> beginGetNetworkConfigurationDiagnostic(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body NetworkConfigurationDiagnosticParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -196,7 +209,7 @@ interface NetworkWatchersService { * @param networkWatcherName The name of the network watcher. * @param parameters Parameters that define the network watcher resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the NetworkWatcherInner object if successful. */ @@ -274,11 +287,11 @@ public Observable> call(Response createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse createOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -288,7 +301,7 @@ private ServiceResponse createOrUpdateDelegate(Response> call(Response getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -372,7 +385,7 @@ private ServiceResponse getByResourceGroupDelegate(Response * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void delete(String resourceGroupName, String networkWatcherName) { @@ -438,7 +451,7 @@ public Observable> deleteWithServiceResponseAsync(String r * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void beginDelete(String resourceGroupName, String networkWatcherName) { @@ -508,11 +521,11 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -522,7 +535,7 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the NetworkWatcherInner object if successful. */ @@ -603,7 +616,7 @@ public Observable> call(Response> call(Response updateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse updateTagsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -766,10 +779,10 @@ public Observable>> call(Response> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listByResourceGroupDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -845,10 +858,10 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -859,7 +872,7 @@ private ServiceResponse> listDelegate(Response> call(Response re }); } - private ServiceResponse getTopologyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getTopologyDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -951,7 +964,7 @@ private ServiceResponse getTopologyDelegate(Response> verifyIPFlowWi * @param networkWatcherName The name of the network watcher. * @param parameters Parameters that define the IP flow to be verified. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VerificationIPFlowResultInner object if successful. */ @@ -1104,11 +1117,11 @@ public Observable> call(Response< }); } - private ServiceResponse beginVerifyIPFlowDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginVerifyIPFlowDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1119,7 +1132,7 @@ private ServiceResponse beginVerifyIPFlowDelegate * @param networkWatcherName The name of the network watcher. * @param parameters Parameters that define the source and destination endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the NextHopResultInner object if successful. */ @@ -1194,7 +1207,7 @@ public Observable> getNextHopWithServiceResp * @param networkWatcherName The name of the network watcher. * @param parameters Parameters that define the source and destination endpoint. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the NextHopResultInner object if successful. */ @@ -1272,11 +1285,11 @@ public Observable> call(Response beginGetNextHopDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginGetNextHopDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1287,7 +1300,7 @@ private ServiceResponse beginGetNextHopDelegate(Response> getVMSecurityRu * @param networkWatcherName The name of the network watcher. * @param targetResourceId ID of the target VM. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SecurityGroupViewResultInner object if successful. */ @@ -1442,11 +1455,11 @@ public Observable> call(Response beginGetVMSecurityRulesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginGetVMSecurityRulesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1457,7 +1470,7 @@ private ServiceResponse beginGetVMSecurityRulesDel * @param networkWatcherName The name of the network watcher resource. * @param parameters Parameters that define the resource to troubleshoot. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the TroubleshootingResultInner object if successful. */ @@ -1532,7 +1545,7 @@ public Observable> getTroubleshootin * @param networkWatcherName The name of the network watcher resource. * @param parameters Parameters that define the resource to troubleshoot. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the TroubleshootingResultInner object if successful. */ @@ -1610,11 +1623,11 @@ public Observable> call(Response beginGetTroubleshootingDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginGetTroubleshootingDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1625,7 +1638,7 @@ private ServiceResponse beginGetTroubleshootingDeleg * @param networkWatcherName The name of the network watcher resource. * @param targetResourceId The target resource ID to query the troubleshooting result. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the TroubleshootingResultInner object if successful. */ @@ -1701,7 +1714,7 @@ public Observable> getTroubleshootin * @param networkWatcherName The name of the network watcher resource. * @param targetResourceId The target resource ID to query the troubleshooting result. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the TroubleshootingResultInner object if successful. */ @@ -1780,11 +1793,11 @@ public Observable> call(Response beginGetTroubleshootingResultDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginGetTroubleshootingResultDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1795,7 +1808,7 @@ private ServiceResponse beginGetTroubleshootingResul * @param networkWatcherName The name of the network watcher resource. * @param parameters Parameters that define the configuration of flow log. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the FlowLogInformationInner object if successful. */ @@ -1870,7 +1883,7 @@ public Observable> setFlowLogConfigurat * @param networkWatcherName The name of the network watcher resource. * @param parameters Parameters that define the configuration of flow log. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the FlowLogInformationInner object if successful. */ @@ -1948,11 +1961,11 @@ public Observable> call(Response beginSetFlowLogConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginSetFlowLogConfigurationDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -1963,7 +1976,7 @@ private ServiceResponse beginSetFlowLogConfigurationDel * @param networkWatcherName The name of the network watcher resource. * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the FlowLogInformationInner object if successful. */ @@ -2039,7 +2052,7 @@ public Observable> getFlowLogStatusWith * @param networkWatcherName The name of the network watcher resource. * @param targetResourceId The target resource where getting the flow log and traffic analytics (optional) status. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the FlowLogInformationInner object if successful. */ @@ -2118,11 +2131,11 @@ public Observable> call(Response beginGetFlowLogStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginGetFlowLogStatusDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -2133,7 +2146,7 @@ private ServiceResponse beginGetFlowLogStatusDelegate(R * @param networkWatcherName The name of the network watcher resource. * @param parameters Parameters that determine how the connectivity check will be performed. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ConnectivityInformationInner object if successful. */ @@ -2208,7 +2221,7 @@ public Observable> checkConnectivi * @param networkWatcherName The name of the network watcher resource. * @param parameters Parameters that determine how the connectivity check will be performed. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ConnectivityInformationInner object if successful. */ @@ -2286,11 +2299,11 @@ public Observable> call(Response beginCheckConnectivityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginCheckConnectivityDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -2301,7 +2314,7 @@ private ServiceResponse beginCheckConnectivityDele * @param networkWatcherName The name of the network watcher resource. * @param parameters Parameters that determine Azure reachability report configuration. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the AzureReachabilityReportInner object if successful. */ @@ -2376,7 +2389,7 @@ public Observable> getAzureReachab * @param networkWatcherName The name of the network watcher resource. * @param parameters Parameters that determine Azure reachability report configuration. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the AzureReachabilityReportInner object if successful. */ @@ -2454,11 +2467,11 @@ public Observable> call(Response beginGetAzureReachabilityReportDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginGetAzureReachabilityReportDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -2469,7 +2482,7 @@ private ServiceResponse beginGetAzureReachabilityR * @param networkWatcherName The name of the network watcher resource. * @param parameters Parameters that scope the list of available providers. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the AvailableProvidersListInner object if successful. */ @@ -2544,7 +2557,7 @@ public Observable> listAvailablePro * @param networkWatcherName The name of the network watcher resource. * @param parameters Parameters that scope the list of available providers. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the AvailableProvidersListInner object if successful. */ @@ -2622,11 +2635,179 @@ public Observable> call(Response beginListAvailableProvidersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginListAvailableProvidersDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Get network configuration diagnostic. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkConfigurationDiagnosticResponseInner object if successful. + */ + public NetworkConfigurationDiagnosticResponseInner getNetworkConfigurationDiagnostic(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + return getNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); + } + + /** + * Get network configuration diagnostic. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Get network configuration diagnostic. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable getNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + return getNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, NetworkConfigurationDiagnosticResponseInner>() { + @Override + public NetworkConfigurationDiagnosticResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get network configuration diagnostic. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getNetworkConfigurationDiagnosticWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-06-01"; + Observable> observable = service.getNetworkConfigurationDiagnostic(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Get network configuration diagnostic. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NetworkConfigurationDiagnosticResponseInner object if successful. + */ + public NetworkConfigurationDiagnosticResponseInner beginGetNetworkConfigurationDiagnostic(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + return beginGetNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); + } + + /** + * Get network configuration diagnostic. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginGetNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + } + + /** + * Get network configuration diagnostic. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkConfigurationDiagnosticResponseInner object + */ + public Observable beginGetNetworkConfigurationDiagnosticAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + return beginGetNetworkConfigurationDiagnosticWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, NetworkConfigurationDiagnosticResponseInner>() { + @Override + public NetworkConfigurationDiagnosticResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get network configuration diagnostic. + * + * @param resourceGroupName The name of the resource group. + * @param networkWatcherName The name of the network watcher. + * @param parameters Parameters to get network configuration diagnostic. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NetworkConfigurationDiagnosticResponseInner object + */ + public Observable> beginGetNetworkConfigurationDiagnosticWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, NetworkConfigurationDiagnosticParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkWatcherName == null) { + throw new IllegalArgumentException("Parameter networkWatcherName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2018-06-01"; + return service.beginGetNetworkConfigurationDiagnostic(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetNetworkConfigurationDiagnosticDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetNetworkConfigurationDiagnosticDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) .build(response); } diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/PacketCaptureResultImpl.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/PacketCaptureResultImpl.java index 260fed446c67..646fd70c318d 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/PacketCaptureResultImpl.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/PacketCaptureResultImpl.java @@ -38,7 +38,7 @@ class PacketCaptureResultImpl extends CreatableUpdatableImpl> createWithServiceRe * @param packetCaptureName The name of the packet capture session. * @param parameters Parameters that define the create packet capture operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PacketCaptureResultInner object if successful. */ @@ -273,10 +277,10 @@ public Observable> call(Response beginCreateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginCreateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -287,7 +291,7 @@ private ServiceResponse beginCreateDelegate(Response> call(Response getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -378,7 +382,7 @@ private ServiceResponse getDelegate(Response> deleteWithServiceResponseAsync(String r * @param networkWatcherName The name of the network watcher. * @param packetCaptureName The name of the packet capture session. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void beginDelete(String resourceGroupName, String networkWatcherName, String packetCaptureName) { @@ -527,11 +531,11 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -542,7 +546,7 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param networkWatcherName The name of the network watcher. * @param packetCaptureName The name of the packet capture session. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void stop(String resourceGroupName, String networkWatcherName, String packetCaptureName) { @@ -615,7 +619,7 @@ public Observable> stopWithServiceResponseAsync(String res * @param networkWatcherName The name of the network watcher. * @param packetCaptureName The name of the packet capture session. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ public void beginStop(String resourceGroupName, String networkWatcherName, String packetCaptureName) { @@ -691,11 +695,11 @@ public Observable> call(Response response) { }); } - private ServiceResponse beginStopDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginStopDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -706,7 +710,7 @@ private ServiceResponse beginStopDelegate(Response response) * @param networkWatcherName The name of the Network Watcher resource. * @param packetCaptureName The name given to the packet capture session. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PacketCaptureQueryStatusResultInner object if successful. */ @@ -770,7 +774,7 @@ public Observable> getStatu } final String apiVersion = "2018-06-01"; Observable> observable = service.getStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); } /** @@ -780,7 +784,7 @@ public Observable> getStatu * @param networkWatcherName The name of the Network Watcher resource. * @param packetCaptureName The name given to the packet capture session. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PacketCaptureQueryStatusResultInner object if successful. */ @@ -857,11 +861,11 @@ public Observable> call(Res }); } - private ServiceResponse beginGetStatusDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + private ServiceResponse beginGetStatusDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } @@ -871,7 +875,7 @@ private ServiceResponse beginGetStatusDeleg * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the Network Watcher resource. * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws CloudException thrown if the request is rejected by server + * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the List<PacketCaptureResultInner> object if successful. */ @@ -947,10 +951,10 @@ public Observable>> call(Response }); } - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) + .registerError(ErrorResponseException.class) .build(response); } diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ProbeImpl.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ProbeImpl.java index 9b748f318df1..09e813e04a79 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ProbeImpl.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ProbeImpl.java @@ -24,6 +24,7 @@ class ProbeImpl extends IndexableRefreshableWrapperImpl imple ProbeImpl(ProbeInner inner, NetworkManager manager) { super(null, inner); this.manager = manager; + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.loadBalancerName = IdParsingUtils.getValueFromIdByName(inner.id(), "loadBalancers"); this.probeName = IdParsingUtils.getValueFromIdByName(inner.id(), "probes"); diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/RouteFilterRuleImpl.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/RouteFilterRuleImpl.java index 9e803d9fac4d..48434403cc6b 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/RouteFilterRuleImpl.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/RouteFilterRuleImpl.java @@ -37,7 +37,7 @@ class RouteFilterRuleImpl extends CreatableUpdatableImpl imp this.manager = manager; // Set resource name this.routeName = inner.name(); - // resource ancestor names + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.routeTableName = IdParsingUtils.getValueFromIdByName(inner.id(), "routeTables"); this.routeName = IdParsingUtils.getValueFromIdByName(inner.id(), "routes"); diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/SubnetImpl.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/SubnetImpl.java index 912b38d60173..4c607a03d600 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/SubnetImpl.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/SubnetImpl.java @@ -37,7 +37,7 @@ class SubnetImpl extends CreatableUpdatableImpl this.manager = manager; // Set resource name this.subnetName = inner.name(); - // resource ancestor names + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.virtualNetworkName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualNetworks"); this.subnetName = IdParsingUtils.getValueFromIdByName(inner.id(), "subnets"); diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java index 9fbf5df29747..5d92ff4e81df 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl.java @@ -33,6 +33,7 @@ class VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl extends Indexabl VirtualMachineScaleSetNetworkInterfaceIPConfigurationImpl(NetworkInterfaceIPConfigurationInner inner, NetworkManager manager) { super(null, inner); this.manager = manager; + // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.virtualMachineScaleSetName = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualMachineScaleSets"); this.virtualmachineIndex = IdParsingUtils.getValueFromIdByName(inner.id(), "virtualMachines"); diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkGatewaysImpl.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkGatewaysImpl.java index 605cbe0c8669..3b49f09fecb8 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkGatewaysImpl.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkGatewaysImpl.java @@ -120,22 +120,28 @@ public VirtualNetworkGateway call(VirtualNetworkGatewayInner inner) { } @Override - public Completable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + public Completable resetVpnClientSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayName) { VirtualNetworkGatewaysInner client = this.inner(); - return client.generatevpnclientpackageAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toCompletable(); + return client.resetVpnClientSharedKeyAsync(resourceGroupName, virtualNetworkGatewayName).toCompletable(); } @Override - public Completable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + public Observable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { VirtualNetworkGatewaysInner client = this.inner(); - return client.generateVpnProfileAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toCompletable(); - } + return client.generatevpnclientpackageAsync(resourceGroupName, virtualNetworkGatewayName, parameters) + ;} @Override - public Completable getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { VirtualNetworkGatewaysInner client = this.inner(); - return client.getVpnProfilePackageUrlAsync(resourceGroupName, virtualNetworkGatewayName).toCompletable(); - } + return client.generateVpnProfileAsync(resourceGroupName, virtualNetworkGatewayName, parameters) + ;} + + @Override + public Observable getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { + VirtualNetworkGatewaysInner client = this.inner(); + return client.getVpnProfilePackageUrlAsync(resourceGroupName, virtualNetworkGatewayName) + ;} @Override public Observable getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName) { @@ -150,10 +156,10 @@ public BgpPeerStatusListResult call(BgpPeerStatusListResultInner inner) { } @Override - public Completable supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { VirtualNetworkGatewaysInner client = this.inner(); - return client.supportedVpnDevicesAsync(resourceGroupName, virtualNetworkGatewayName).toCompletable(); - } + return client.supportedVpnDevicesAsync(resourceGroupName, virtualNetworkGatewayName) + ;} @Override public Observable getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName) { @@ -236,9 +242,9 @@ public VirtualNetworkGatewayConnectionListEntity call(VirtualNetworkGatewayConne } @Override - public Completable vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { + public Observable vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParameters parameters) { VirtualNetworkGatewaysInner client = this.inner(); - return client.vpnDeviceConfigurationScriptAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toCompletable(); - } + return client.vpnDeviceConfigurationScriptAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + ;} } diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkGatewaysInner.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkGatewaysInner.java index bdc1fc7f4891..ed60768343ff 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkGatewaysInner.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkGatewaysInner.java @@ -113,6 +113,14 @@ interface VirtualNetworkGatewaysService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset") Observable> beginReset(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("gatewayVip") String gatewayVip, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2018_06_01.VirtualNetworkGateways resetVpnClientSharedKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey") + Observable> resetVpnClientSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2018_06_01.VirtualNetworkGateways beginResetVpnClientSharedKey" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey") + Observable> beginResetVpnClientSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2018_06_01.VirtualNetworkGateways generatevpnclientpackage" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage") Observable> generatevpnclientpackage(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -1451,6 +1459,156 @@ private ServiceResponse beginResetDelegate(Response< .build(response); } + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void resetVpnClientSharedKey(String resourceGroupName, String virtualNetworkGatewayName) { + resetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture resetVpnClientSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable resetVpnClientSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return resetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> resetVpnClientSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + Observable> observable = service.resetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginResetVpnClientSharedKey(String resourceGroupName, String virtualNetworkGatewayName) { + beginResetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginResetVpnClientSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginResetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginResetVpnClientSharedKeyAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginResetVpnClientSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Resets the VPN client shared key of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginResetVpnClientSharedKeyWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-06-01"; + return service.beginResetVpnClientSharedKey(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginResetVpnClientSharedKeyDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginResetVpnClientSharedKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. * diff --git a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkPeeringImpl.java b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkPeeringImpl.java index fc50beecef8a..41450c99799b 100644 --- a/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkPeeringImpl.java +++ b/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/VirtualNetworkPeeringImpl.java @@ -34,7 +34,7 @@ class VirtualNetworkPeeringImpl extends CreatableUpdatableImpl