From 776139e2c502f720ea2963fb067b3055df91866f Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Fri, 23 Mar 2018 11:01:37 -0700 Subject: [PATCH] Revert "[AutoPR network/resource-manager] Merge Network-2018-02-01 to Master Networking Swagger Changes for Feb 2018 (#372)" This reverts commit bc67af9a2fbe6944aaa61415cbf0182c1ae283ce. --- .../azure/management/network/Access.java | 52 +- .../ApplicationGatewayBackendAddress.java | 2 +- ...ationGatewayBackendHealthServerHealth.java | 58 +- ...ApplicationGatewayCookieBasedAffinity.java | 52 +- .../ApplicationGatewayFirewallMode.java | 52 +- .../ApplicationGatewayOperationalState.java | 56 +- .../network/ApplicationGatewayProtocol.java | 52 +- .../ApplicationGatewayRedirectType.java | 56 +- ...licationGatewayRequestRoutingRuleType.java | 52 +- .../network/ApplicationGatewaySkuName.java | 58 +- .../ApplicationGatewaySslCipherSuite.java | 98 +- .../ApplicationGatewaySslPolicyName.java | 54 +- .../ApplicationGatewaySslPolicyType.java | 52 +- .../ApplicationGatewaySslProtocol.java | 54 +- .../network/ApplicationGatewayTier.java | 52 +- ...ayWebApplicationFirewallConfiguration.java | 52 - .../management/network/AssociationType.java | 52 +- .../network/AuthenticationMethod.java | 52 +- .../network/AuthorizationUseStatus.java | 52 +- .../management/network/Availability.java | 95 - .../network/AvailableProvidersListCity.java | 70 - .../AvailableProvidersListCountry.java | 96 - .../network/AvailableProvidersListState.java | 96 - .../network/AzureReachabilityReportItem.java | 96 - .../AzureReachabilityReportLatencyInfo.java | 71 - .../AzureReachabilityReportLocation.java | 95 - .../management/network/BgpPeerState.java | 58 +- .../network/CircuitConnectionStatus.java | 44 - .../network/ConnectionMonitorDestination.java | 95 - .../network/ConnectionMonitorParameters.java | 122 - .../network/ConnectionMonitorSource.java | 69 - .../management/network/ConnectionState.java | 44 - .../network/ConnectionStateSnapshot.java | 140 -- .../management/network/ConnectionStatus.java | 56 +- .../azure/management/network/DhGroup.java | 64 +- .../azure/management/network/Dimension.java | 95 - .../azure/management/network/Direction.java | 52 +- .../EffectiveNetworkSecurityGroup.java | 124 - .../management/network/EffectiveRoute.java | 180 -- .../network/EffectiveRouteSource.java | 56 +- .../network/EffectiveRouteState.java | 52 +- .../EffectiveSecurityRuleProtocol.java | 54 +- .../management/network/EvaluationState.java | 44 - ...uitPeeringAdvertisedPublicPrefixState.java | 56 +- .../ExpressRouteCircuitPeeringState.java | 52 +- .../ExpressRouteCircuitPeeringType.java | 54 +- .../network/ExpressRouteCircuitReference.java | 43 - .../network/ExpressRouteCircuitSkuFamily.java | 52 +- .../network/ExpressRouteCircuitSkuTier.java | 52 +- ...outeCrossConnectionRoutesTableSummary.java | 123 - ...ssConnectionServiceProviderProperties.java | 62 - .../network/ExpressRoutePeeringState.java | 41 - .../network/ExpressRoutePeeringType.java | 44 - .../network/IPAllocationMethod.java | 52 +- .../azure/management/network/IPVersion.java | 52 +- .../management/network/IkeEncryption.java | 62 +- .../management/network/IkeIntegrity.java | 60 +- .../azure/management/network/IpTag.java | 70 - .../management/network/IpsecEncryption.java | 66 +- .../management/network/IpsecIntegrity.java | 60 +- .../azure/management/network/IpsecPolicy.java | 9 +- .../azure/management/network/IssueType.java | 66 +- .../network/LoadBalancerSkuName.java | 52 +- .../management/network/LoadDistribution.java | 54 +- .../management/network/LogSpecification.java | 95 - .../network/MetricSpecification.java | 382 --- .../network/NetworkOperationStatus.java | 54 +- .../azure/management/network/NextHopType.java | 60 +- .../management/network/OperationDisplay.java | 121 - ...nPropertiesFormatServiceSpecification.java | 70 - .../azure/management/network/Origin.java | 54 +- .../azure/management/network/PcError.java | 58 +- .../azure/management/network/PcProtocol.java | 54 +- .../azure/management/network/PcStatus.java | 58 +- .../azure/management/network/PfsGroup.java | 66 +- .../management/network/ProbeProtocol.java | 52 +- .../network/ProcessorArchitecture.java | 52 +- .../azure/management/network/Protocol.java | 52 +- .../management/network/ProvisioningState.java | 56 +- .../network/PublicIPAddressSkuName.java | 52 +- .../management/network/RouteNextHopType.java | 58 +- .../network/SecurityRuleAccess.java | 52 +- .../network/SecurityRuleDirection.java | 52 +- .../network/SecurityRuleProtocol.java | 54 +- .../ServiceProviderProvisioningState.java | 56 +- .../azure/management/network/Severity.java | 52 +- .../azure/management/network/TagsObject.java | 44 - .../management/network/TransportProtocol.java | 53 +- ...VirtualNetworkGatewayConnectionStatus.java | 56 +- .../VirtualNetworkGatewayConnectionType.java | 56 +- .../network/VirtualNetworkGatewaySkuName.java | 62 +- .../network/VirtualNetworkGatewaySkuTier.java | 62 +- .../network/VirtualNetworkGatewayType.java | 52 +- .../network/VirtualNetworkPeeringState.java | 54 +- .../network/VpnClientConfiguration.java | 26 - .../management/network/VpnClientProtocol.java | 52 +- .../azure/management/network/VpnType.java | 52 +- .../ApplicationGatewayInner.java | 51 +- .../ApplicationGatewaysInner.java | 518 +--- .../ApplicationSecurityGroupInner.java | 68 - .../ApplicationSecurityGroupsInner.java | 962 -------- .../AvailableEndpointServicesInner.java | 295 --- .../AvailableProvidersListInner.java | 45 - ...AvailableProvidersListParametersInner.java | 122 - .../AzureReachabilityReportInner.java | 99 - ...zureReachabilityReportParametersInner.java | 150 -- .../BgpServiceCommunitiesInner.java | 6 +- .../ConnectionMonitorInner.java | 179 -- .../ConnectionMonitorQueryResultInner.java | 45 - .../ConnectionMonitorResultInner.java | 331 --- .../ConnectionMonitorsInner.java | 1150 --------- .../DdosProtectionPlanInner.java | 86 - .../DdosProtectionPlansInner.java | 962 -------- .../DefaultSecurityRulesInner.java | 12 +- ...veNetworkSecurityGroupListResultInner.java | 60 - .../EffectiveRouteListResultInner.java | 60 - .../EndpointServiceResultInner.java | 48 - ...xpressRouteCircuitAuthorizationsInner.java | 40 +- .../ExpressRouteCircuitConnectionInner.java | 202 -- .../ExpressRouteCircuitConnectionsInner.java | 563 ----- .../ExpressRouteCircuitPeeringInner.java | 58 +- .../ExpressRouteCircuitPeeringsInner.java | 36 +- .../ExpressRouteCircuitsArpTablesInner.java | 248 -- .../ExpressRouteCircuitsInner.java | 427 +--- ...sRouteCircuitsRouteTableSummarysInner.java | 248 -- ...ExpressRouteCircuitsRoutesTablesInner.java | 248 -- .../ExpressRouteCrossConnectionInner.java | 226 -- ...pressRouteCrossConnectionPeeringInner.java | 403 --- ...ressRouteCrossConnectionPeeringsInner.java | 776 ------ .../ExpressRouteCrossConnectionsInner.java | 1706 ------------- ...ionsRoutesTableSummaryListResultInner.java | 61 - ...ExpressRouteCrossConnectionsTagsInner.java | 390 --- .../ExpressRouteServiceProvidersInner.java | 6 +- .../FrontendIPConfigurationInner.java | 66 +- .../implementation/InboundNatPoolInner.java | 60 +- .../implementation/InboundNatRuleInner.java | 5 +- .../implementation/InboundNatRulesInner.java | 48 +- .../LoadBalancerBackendAddressPoolsInner.java | 12 +- ...BalancerFrontendIPConfigurationsInner.java | 12 +- .../implementation/LoadBalancerInner.java | 27 + .../LoadBalancerLoadBalancingRulesInner.java | 12 +- .../LoadBalancerNetworkInterfacesInner.java | 6 +- .../LoadBalancerProbesInner.java | 12 +- .../implementation/LoadBalancersInner.java | 385 +-- .../LoadBalancingRuleInner.java | 11 +- .../LocalNetworkGatewaysInner.java | 373 +-- .../NetworkInterfaceIPConfigurationInner.java | 32 +- ...NetworkInterfaceIPConfigurationsInner.java | 12 +- .../implementation/NetworkInterfaceInner.java | 6 +- .../NetworkInterfaceLoadBalancersInner.java | 26 +- .../NetworkInterfacesInner.java | 1765 ++++++-------- .../NetworkManagementClientImpl.java | 215 +- .../NetworkSecurityGroupsInner.java | 383 +-- .../implementation/NetworkWatchersInner.java | 712 +----- .../implementation/OperationInner.java | 125 - .../implementation/OperationsInner.java | 283 --- .../implementation/PacketCapturesInner.java | 62 +- .../PatchRouteFilterRuleInner.java | 27 + .../implementation/PublicIPAddressInner.java | 27 - .../PublicIPAddressesInner.java | 393 +-- .../implementation/RouteFilterRuleInner.java | 27 + .../implementation/RouteFilterRulesInner.java | 50 +- .../implementation/RouteFiltersInner.java | 62 +- .../implementation/RouteTableInner.java | 27 - .../implementation/RouteTablesInner.java | 383 +-- .../network/implementation/RoutesInner.java | 38 +- .../implementation/SecurityRuleInner.java | 56 +- .../implementation/SecurityRulesInner.java | 40 +- .../network/implementation/SubnetInner.java | 15 +- .../network/implementation/SubnetsInner.java | 44 +- .../TopologyParametersInner.java | 96 - .../network/implementation/UsageInner.java | 15 - .../network/implementation/UsagesInner.java | 26 +- .../VirtualNetworkGatewayConnectionInner.java | 18 +- ...VirtualNetworkGatewayConnectionsInner.java | 401 +-- .../VirtualNetworkGatewaysInner.java | 2169 +++++------------ .../implementation/VirtualNetworkInner.java | 82 - .../VirtualNetworkPeeringInner.java | 32 +- .../VirtualNetworkPeeringsInner.java | 38 +- .../implementation/VirtualNetworksInner.java | 401 +-- .../VpnClientIPsecParametersInner.java | 242 -- .../VpnDeviceScriptParametersInner.java | 95 - 182 files changed, 4450 insertions(+), 22278 deletions(-) delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Availability.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCity.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCountry.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListState.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportItem.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLatencyInfo.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLocation.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/CircuitConnectionStatus.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorDestination.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorParameters.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSource.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionState.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStateSnapshot.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Dimension.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroup.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRoute.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EvaluationState.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitReference.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionRoutesTableSummary.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionServiceProviderProperties.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpTag.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LogSpecification.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/MetricSpecification.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationDisplay.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationPropertiesFormatServiceSpecification.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TagsObject.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupsInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableEndpointServicesInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListParametersInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportParametersInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorQueryResultInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorResultInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorsInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveNetworkSecurityGroupListResultInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveRouteListResultInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EndpointServiceResultInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionsInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsArpTablesInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsRouteTableSummarysInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsRoutesTablesInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsTagsInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationsInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyParametersInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientIPsecParametersInner.java delete mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnDeviceScriptParametersInner.java diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Access.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Access.java index f2153801716..ce4201744d0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Access.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Access.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for Access. */ -public final class Access extends ExpandableStringEnum { +public final class Access { /** Static value Allow for Access. */ - public static final Access ALLOW = fromString("Allow"); + public static final Access ALLOW = new Access("Allow"); /** Static value Deny for Access. */ - public static final Access DENY = fromString("Deny"); + public static final Access DENY = new Access("Deny"); + + private String value; /** - * Creates or finds a Access from its string representation. - * @param name a name to look for - * @return the corresponding Access + * Creates a custom value for Access. + * @param value the custom value */ - @JsonCreator - public static Access fromString(String name) { - return fromString(name, Access.class); + public Access(String value) { + this.value = value; } - /** - * @return known Access values - */ - public static Collection values() { - return values(Access.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof Access)) { + return false; + } + if (obj == this) { + return true; + } + Access rhs = (Access) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendAddress.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendAddress.java index 5c78996a255..c82875be86c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendAddress.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendAddress.java @@ -61,7 +61,7 @@ public String ipAddress() { * @param ipAddress the ipAddress value to set * @return the ApplicationGatewayBackendAddress object itself. */ - public ApplicationGatewayBackendAddress withIpAddress(String ipAddress) { + public ApplicationGatewayBackendAddress withIPAddress(String ipAddress) { this.ipAddress = ipAddress; return this; } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthServerHealth.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthServerHealth.java index bd3103cb74a..7a4002b35c2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthServerHealth.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthServerHealth.java @@ -8,43 +8,61 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewayBackendHealthServerHealth. */ -public final class ApplicationGatewayBackendHealthServerHealth extends ExpandableStringEnum { +public final class ApplicationGatewayBackendHealthServerHealth { /** Static value Unknown for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth UNKNOWN = fromString("Unknown"); + public static final ApplicationGatewayBackendHealthServerHealth UNKNOWN = new ApplicationGatewayBackendHealthServerHealth("Unknown"); /** Static value Up for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth UP = fromString("Up"); + public static final ApplicationGatewayBackendHealthServerHealth UP = new ApplicationGatewayBackendHealthServerHealth("Up"); /** Static value Down for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth DOWN = fromString("Down"); + public static final ApplicationGatewayBackendHealthServerHealth DOWN = new ApplicationGatewayBackendHealthServerHealth("Down"); /** Static value Partial for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth PARTIAL = fromString("Partial"); + public static final ApplicationGatewayBackendHealthServerHealth PARTIAL = new ApplicationGatewayBackendHealthServerHealth("Partial"); /** Static value Draining for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth DRAINING = fromString("Draining"); + public static final ApplicationGatewayBackendHealthServerHealth DRAINING = new ApplicationGatewayBackendHealthServerHealth("Draining"); + + private String value; /** - * Creates or finds a ApplicationGatewayBackendHealthServerHealth from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewayBackendHealthServerHealth + * Creates a custom value for ApplicationGatewayBackendHealthServerHealth. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewayBackendHealthServerHealth fromString(String name) { - return fromString(name, ApplicationGatewayBackendHealthServerHealth.class); + public ApplicationGatewayBackendHealthServerHealth(String value) { + this.value = value; } - /** - * @return known ApplicationGatewayBackendHealthServerHealth values - */ - public static Collection values() { - return values(ApplicationGatewayBackendHealthServerHealth.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewayBackendHealthServerHealth)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewayBackendHealthServerHealth rhs = (ApplicationGatewayBackendHealthServerHealth) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayCookieBasedAffinity.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayCookieBasedAffinity.java index bb652e26e9a..23ff1003902 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayCookieBasedAffinity.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayCookieBasedAffinity.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewayCookieBasedAffinity. */ -public final class ApplicationGatewayCookieBasedAffinity extends ExpandableStringEnum { +public final class ApplicationGatewayCookieBasedAffinity { /** Static value Enabled for ApplicationGatewayCookieBasedAffinity. */ - public static final ApplicationGatewayCookieBasedAffinity ENABLED = fromString("Enabled"); + public static final ApplicationGatewayCookieBasedAffinity ENABLED = new ApplicationGatewayCookieBasedAffinity("Enabled"); /** Static value Disabled for ApplicationGatewayCookieBasedAffinity. */ - public static final ApplicationGatewayCookieBasedAffinity DISABLED = fromString("Disabled"); + public static final ApplicationGatewayCookieBasedAffinity DISABLED = new ApplicationGatewayCookieBasedAffinity("Disabled"); + + private String value; /** - * Creates or finds a ApplicationGatewayCookieBasedAffinity from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewayCookieBasedAffinity + * Creates a custom value for ApplicationGatewayCookieBasedAffinity. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewayCookieBasedAffinity fromString(String name) { - return fromString(name, ApplicationGatewayCookieBasedAffinity.class); + public ApplicationGatewayCookieBasedAffinity(String value) { + this.value = value; } - /** - * @return known ApplicationGatewayCookieBasedAffinity values - */ - public static Collection values() { - return values(ApplicationGatewayCookieBasedAffinity.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewayCookieBasedAffinity)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewayCookieBasedAffinity rhs = (ApplicationGatewayCookieBasedAffinity) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallMode.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallMode.java index be16780e247..f81e77acd11 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallMode.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayFirewallMode.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewayFirewallMode. */ -public final class ApplicationGatewayFirewallMode extends ExpandableStringEnum { +public final class ApplicationGatewayFirewallMode { /** Static value Detection for ApplicationGatewayFirewallMode. */ - public static final ApplicationGatewayFirewallMode DETECTION = fromString("Detection"); + public static final ApplicationGatewayFirewallMode DETECTION = new ApplicationGatewayFirewallMode("Detection"); /** Static value Prevention for ApplicationGatewayFirewallMode. */ - public static final ApplicationGatewayFirewallMode PREVENTION = fromString("Prevention"); + public static final ApplicationGatewayFirewallMode PREVENTION = new ApplicationGatewayFirewallMode("Prevention"); + + private String value; /** - * Creates or finds a ApplicationGatewayFirewallMode from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewayFirewallMode + * Creates a custom value for ApplicationGatewayFirewallMode. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewayFirewallMode fromString(String name) { - return fromString(name, ApplicationGatewayFirewallMode.class); + public ApplicationGatewayFirewallMode(String value) { + this.value = value; } - /** - * @return known ApplicationGatewayFirewallMode values - */ - public static Collection values() { - return values(ApplicationGatewayFirewallMode.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewayFirewallMode)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewayFirewallMode rhs = (ApplicationGatewayFirewallMode) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayOperationalState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayOperationalState.java index 7d5189ff262..3150d26f005 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayOperationalState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayOperationalState.java @@ -8,40 +8,58 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewayOperationalState. */ -public final class ApplicationGatewayOperationalState extends ExpandableStringEnum { +public final class ApplicationGatewayOperationalState { /** Static value Stopped for ApplicationGatewayOperationalState. */ - public static final ApplicationGatewayOperationalState STOPPED = fromString("Stopped"); + public static final ApplicationGatewayOperationalState STOPPED = new ApplicationGatewayOperationalState("Stopped"); /** Static value Starting for ApplicationGatewayOperationalState. */ - public static final ApplicationGatewayOperationalState STARTING = fromString("Starting"); + public static final ApplicationGatewayOperationalState STARTING = new ApplicationGatewayOperationalState("Starting"); /** Static value Running for ApplicationGatewayOperationalState. */ - public static final ApplicationGatewayOperationalState RUNNING = fromString("Running"); + public static final ApplicationGatewayOperationalState RUNNING = new ApplicationGatewayOperationalState("Running"); /** Static value Stopping for ApplicationGatewayOperationalState. */ - public static final ApplicationGatewayOperationalState STOPPING = fromString("Stopping"); + public static final ApplicationGatewayOperationalState STOPPING = new ApplicationGatewayOperationalState("Stopping"); + + private String value; /** - * Creates or finds a ApplicationGatewayOperationalState from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewayOperationalState + * Creates a custom value for ApplicationGatewayOperationalState. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewayOperationalState fromString(String name) { - return fromString(name, ApplicationGatewayOperationalState.class); + public ApplicationGatewayOperationalState(String value) { + this.value = value; } - /** - * @return known ApplicationGatewayOperationalState values - */ - public static Collection values() { - return values(ApplicationGatewayOperationalState.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewayOperationalState)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewayOperationalState rhs = (ApplicationGatewayOperationalState) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayProtocol.java index ceed6ab34c6..a06b960129e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayProtocol.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewayProtocol. */ -public final class ApplicationGatewayProtocol extends ExpandableStringEnum { +public final class ApplicationGatewayProtocol { /** Static value Http for ApplicationGatewayProtocol. */ - public static final ApplicationGatewayProtocol HTTP = fromString("Http"); + public static final ApplicationGatewayProtocol HTTP = new ApplicationGatewayProtocol("Http"); /** Static value Https for ApplicationGatewayProtocol. */ - public static final ApplicationGatewayProtocol HTTPS = fromString("Https"); + public static final ApplicationGatewayProtocol HTTPS = new ApplicationGatewayProtocol("Https"); + + private String value; /** - * Creates or finds a ApplicationGatewayProtocol from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewayProtocol + * Creates a custom value for ApplicationGatewayProtocol. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewayProtocol fromString(String name) { - return fromString(name, ApplicationGatewayProtocol.class); + public ApplicationGatewayProtocol(String value) { + this.value = value; } - /** - * @return known ApplicationGatewayProtocol values - */ - public static Collection values() { - return values(ApplicationGatewayProtocol.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewayProtocol)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewayProtocol rhs = (ApplicationGatewayProtocol) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRedirectType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRedirectType.java index 22de2a2c7cb..24d82f76d55 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRedirectType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRedirectType.java @@ -8,40 +8,58 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewayRedirectType. */ -public final class ApplicationGatewayRedirectType extends ExpandableStringEnum { +public final class ApplicationGatewayRedirectType { /** Static value Permanent for ApplicationGatewayRedirectType. */ - public static final ApplicationGatewayRedirectType PERMANENT = fromString("Permanent"); + public static final ApplicationGatewayRedirectType PERMANENT = new ApplicationGatewayRedirectType("Permanent"); /** Static value Found for ApplicationGatewayRedirectType. */ - public static final ApplicationGatewayRedirectType FOUND = fromString("Found"); + public static final ApplicationGatewayRedirectType FOUND = new ApplicationGatewayRedirectType("Found"); /** Static value SeeOther for ApplicationGatewayRedirectType. */ - public static final ApplicationGatewayRedirectType SEE_OTHER = fromString("SeeOther"); + public static final ApplicationGatewayRedirectType SEE_OTHER = new ApplicationGatewayRedirectType("SeeOther"); /** Static value Temporary for ApplicationGatewayRedirectType. */ - public static final ApplicationGatewayRedirectType TEMPORARY = fromString("Temporary"); + public static final ApplicationGatewayRedirectType TEMPORARY = new ApplicationGatewayRedirectType("Temporary"); + + private String value; /** - * Creates or finds a ApplicationGatewayRedirectType from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewayRedirectType + * Creates a custom value for ApplicationGatewayRedirectType. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewayRedirectType fromString(String name) { - return fromString(name, ApplicationGatewayRedirectType.class); + public ApplicationGatewayRedirectType(String value) { + this.value = value; } - /** - * @return known ApplicationGatewayRedirectType values - */ - public static Collection values() { - return values(ApplicationGatewayRedirectType.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewayRedirectType)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewayRedirectType rhs = (ApplicationGatewayRedirectType) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRequestRoutingRuleType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRequestRoutingRuleType.java index 7950ab166b6..304f48e1737 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRequestRoutingRuleType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayRequestRoutingRuleType.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewayRequestRoutingRuleType. */ -public final class ApplicationGatewayRequestRoutingRuleType extends ExpandableStringEnum { +public final class ApplicationGatewayRequestRoutingRuleType { /** Static value Basic for ApplicationGatewayRequestRoutingRuleType. */ - public static final ApplicationGatewayRequestRoutingRuleType BASIC = fromString("Basic"); + public static final ApplicationGatewayRequestRoutingRuleType BASIC = new ApplicationGatewayRequestRoutingRuleType("Basic"); /** Static value PathBasedRouting for ApplicationGatewayRequestRoutingRuleType. */ - public static final ApplicationGatewayRequestRoutingRuleType PATH_BASED_ROUTING = fromString("PathBasedRouting"); + public static final ApplicationGatewayRequestRoutingRuleType PATH_BASED_ROUTING = new ApplicationGatewayRequestRoutingRuleType("PathBasedRouting"); + + private String value; /** - * Creates or finds a ApplicationGatewayRequestRoutingRuleType from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewayRequestRoutingRuleType + * Creates a custom value for ApplicationGatewayRequestRoutingRuleType. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewayRequestRoutingRuleType fromString(String name) { - return fromString(name, ApplicationGatewayRequestRoutingRuleType.class); + public ApplicationGatewayRequestRoutingRuleType(String value) { + this.value = value; } - /** - * @return known ApplicationGatewayRequestRoutingRuleType values - */ - public static Collection values() { - return values(ApplicationGatewayRequestRoutingRuleType.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewayRequestRoutingRuleType)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewayRequestRoutingRuleType rhs = (ApplicationGatewayRequestRoutingRuleType) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySkuName.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySkuName.java index 54575f5185d..56776cf97c9 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySkuName.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySkuName.java @@ -8,43 +8,61 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewaySkuName. */ -public final class ApplicationGatewaySkuName extends ExpandableStringEnum { +public final class ApplicationGatewaySkuName { /** Static value Standard_Small for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName STANDARD_SMALL = fromString("Standard_Small"); + public static final ApplicationGatewaySkuName STANDARD_SMALL = new ApplicationGatewaySkuName("Standard_Small"); /** Static value Standard_Medium for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName STANDARD_MEDIUM = fromString("Standard_Medium"); + public static final ApplicationGatewaySkuName STANDARD_MEDIUM = new ApplicationGatewaySkuName("Standard_Medium"); /** Static value Standard_Large for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName STANDARD_LARGE = fromString("Standard_Large"); + public static final ApplicationGatewaySkuName STANDARD_LARGE = new ApplicationGatewaySkuName("Standard_Large"); /** Static value WAF_Medium for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName WAF_MEDIUM = fromString("WAF_Medium"); + public static final ApplicationGatewaySkuName WAF_MEDIUM = new ApplicationGatewaySkuName("WAF_Medium"); /** Static value WAF_Large for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName WAF_LARGE = fromString("WAF_Large"); + public static final ApplicationGatewaySkuName WAF_LARGE = new ApplicationGatewaySkuName("WAF_Large"); + + private String value; /** - * Creates or finds a ApplicationGatewaySkuName from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewaySkuName + * Creates a custom value for ApplicationGatewaySkuName. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewaySkuName fromString(String name) { - return fromString(name, ApplicationGatewaySkuName.class); + public ApplicationGatewaySkuName(String value) { + this.value = value; } - /** - * @return known ApplicationGatewaySkuName values - */ - public static Collection values() { - return values(ApplicationGatewaySkuName.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewaySkuName)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewaySkuName rhs = (ApplicationGatewaySkuName) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslCipherSuite.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslCipherSuite.java index 33161d9e345..76a6c4d6510 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslCipherSuite.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslCipherSuite.java @@ -8,103 +8,121 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewaySslCipherSuite. */ -public final class ApplicationGatewaySslCipherSuite extends ExpandableStringEnum { +public final class ApplicationGatewaySslCipherSuite { /** Static value TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = fromString("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"); /** Static value TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = fromString("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"); /** Static value TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = fromString("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"); /** Static value TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = fromString("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"); /** Static value TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = fromString("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = new ApplicationGatewaySslCipherSuite("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"); /** Static value TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = fromString("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"); /** Static value TLS_DHE_RSA_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA = fromString("TLS_DHE_RSA_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_DHE_RSA_WITH_AES_256_CBC_SHA"); /** Static value TLS_DHE_RSA_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA = fromString("TLS_DHE_RSA_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_DHE_RSA_WITH_AES_128_CBC_SHA"); /** Static value TLS_RSA_WITH_AES_256_GCM_SHA384 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_GCM_SHA384 = fromString("TLS_RSA_WITH_AES_256_GCM_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_GCM_SHA384 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_256_GCM_SHA384"); /** Static value TLS_RSA_WITH_AES_128_GCM_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_GCM_SHA256 = fromString("TLS_RSA_WITH_AES_128_GCM_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_GCM_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_128_GCM_SHA256"); /** Static value TLS_RSA_WITH_AES_256_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = fromString("TLS_RSA_WITH_AES_256_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_256_CBC_SHA256"); /** Static value TLS_RSA_WITH_AES_128_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = fromString("TLS_RSA_WITH_AES_128_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_128_CBC_SHA256"); /** Static value TLS_RSA_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA = fromString("TLS_RSA_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_256_CBC_SHA"); /** Static value TLS_RSA_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_CBC_SHA = fromString("TLS_RSA_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_128_CBC_SHA"); /** Static value TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = fromString("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"); /** Static value TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = fromString("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"); /** Static value TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = fromString("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"); /** Static value TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = fromString("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"); /** Static value TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = fromString("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"); /** Static value TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = fromString("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"); /** Static value TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = fromString("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"); /** Static value TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = fromString("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = new ApplicationGatewaySslCipherSuite("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"); /** Static value TLS_DHE_DSS_WITH_AES_256_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA = fromString("TLS_DHE_DSS_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_DHE_DSS_WITH_AES_256_CBC_SHA"); /** Static value TLS_DHE_DSS_WITH_AES_128_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA = fromString("TLS_DHE_DSS_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_DHE_DSS_WITH_AES_128_CBC_SHA"); /** Static value TLS_RSA_WITH_3DES_EDE_CBC_SHA for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_3DES_EDE_CBC_SHA = fromString("TLS_RSA_WITH_3DES_EDE_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_3DES_EDE_CBC_SHA = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_3DES_EDE_CBC_SHA"); + + private String value; /** - * Creates or finds a ApplicationGatewaySslCipherSuite from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewaySslCipherSuite + * Creates a custom value for ApplicationGatewaySslCipherSuite. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewaySslCipherSuite fromString(String name) { - return fromString(name, ApplicationGatewaySslCipherSuite.class); + public ApplicationGatewaySslCipherSuite(String value) { + this.value = value; } - /** - * @return known ApplicationGatewaySslCipherSuite values - */ - public static Collection values() { - return values(ApplicationGatewaySslCipherSuite.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewaySslCipherSuite)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewaySslCipherSuite rhs = (ApplicationGatewaySslCipherSuite) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicyName.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicyName.java index 51e837ebd9a..6715f14c1c5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicyName.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicyName.java @@ -8,37 +8,55 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewaySslPolicyName. */ -public final class ApplicationGatewaySslPolicyName extends ExpandableStringEnum { +public final class ApplicationGatewaySslPolicyName { /** Static value AppGwSslPolicy20150501 for ApplicationGatewaySslPolicyName. */ - public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20150501 = fromString("AppGwSslPolicy20150501"); + public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20150501 = new ApplicationGatewaySslPolicyName("AppGwSslPolicy20150501"); /** Static value AppGwSslPolicy20170401 for ApplicationGatewaySslPolicyName. */ - public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401 = fromString("AppGwSslPolicy20170401"); + public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401 = new ApplicationGatewaySslPolicyName("AppGwSslPolicy20170401"); /** Static value AppGwSslPolicy20170401S for ApplicationGatewaySslPolicyName. */ - public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401S = fromString("AppGwSslPolicy20170401S"); + public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401S = new ApplicationGatewaySslPolicyName("AppGwSslPolicy20170401S"); + + private String value; /** - * Creates or finds a ApplicationGatewaySslPolicyName from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewaySslPolicyName + * Creates a custom value for ApplicationGatewaySslPolicyName. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewaySslPolicyName fromString(String name) { - return fromString(name, ApplicationGatewaySslPolicyName.class); + public ApplicationGatewaySslPolicyName(String value) { + this.value = value; } - /** - * @return known ApplicationGatewaySslPolicyName values - */ - public static Collection values() { - return values(ApplicationGatewaySslPolicyName.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewaySslPolicyName)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewaySslPolicyName rhs = (ApplicationGatewaySslPolicyName) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicyType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicyType.java index 83c892ab1da..64fea67486c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicyType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslPolicyType.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewaySslPolicyType. */ -public final class ApplicationGatewaySslPolicyType extends ExpandableStringEnum { +public final class ApplicationGatewaySslPolicyType { /** Static value Predefined for ApplicationGatewaySslPolicyType. */ - public static final ApplicationGatewaySslPolicyType PREDEFINED = fromString("Predefined"); + public static final ApplicationGatewaySslPolicyType PREDEFINED = new ApplicationGatewaySslPolicyType("Predefined"); /** Static value Custom for ApplicationGatewaySslPolicyType. */ - public static final ApplicationGatewaySslPolicyType CUSTOM = fromString("Custom"); + public static final ApplicationGatewaySslPolicyType CUSTOM = new ApplicationGatewaySslPolicyType("Custom"); + + private String value; /** - * Creates or finds a ApplicationGatewaySslPolicyType from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewaySslPolicyType + * Creates a custom value for ApplicationGatewaySslPolicyType. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewaySslPolicyType fromString(String name) { - return fromString(name, ApplicationGatewaySslPolicyType.class); + public ApplicationGatewaySslPolicyType(String value) { + this.value = value; } - /** - * @return known ApplicationGatewaySslPolicyType values - */ - public static Collection values() { - return values(ApplicationGatewaySslPolicyType.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewaySslPolicyType)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewaySslPolicyType rhs = (ApplicationGatewaySslPolicyType) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslProtocol.java index 299136422b5..f086b73f5c8 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewaySslProtocol.java @@ -8,37 +8,55 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewaySslProtocol. */ -public final class ApplicationGatewaySslProtocol extends ExpandableStringEnum { +public final class ApplicationGatewaySslProtocol { /** Static value TLSv1_0 for ApplicationGatewaySslProtocol. */ - public static final ApplicationGatewaySslProtocol TLSV1_0 = fromString("TLSv1_0"); + public static final ApplicationGatewaySslProtocol TLSV1_0 = new ApplicationGatewaySslProtocol("TLSv1_0"); /** Static value TLSv1_1 for ApplicationGatewaySslProtocol. */ - public static final ApplicationGatewaySslProtocol TLSV1_1 = fromString("TLSv1_1"); + public static final ApplicationGatewaySslProtocol TLSV1_1 = new ApplicationGatewaySslProtocol("TLSv1_1"); /** Static value TLSv1_2 for ApplicationGatewaySslProtocol. */ - public static final ApplicationGatewaySslProtocol TLSV1_2 = fromString("TLSv1_2"); + public static final ApplicationGatewaySslProtocol TLSV1_2 = new ApplicationGatewaySslProtocol("TLSv1_2"); + + private String value; /** - * Creates or finds a ApplicationGatewaySslProtocol from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewaySslProtocol + * Creates a custom value for ApplicationGatewaySslProtocol. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewaySslProtocol fromString(String name) { - return fromString(name, ApplicationGatewaySslProtocol.class); + public ApplicationGatewaySslProtocol(String value) { + this.value = value; } - /** - * @return known ApplicationGatewaySslProtocol values - */ - public static Collection values() { - return values(ApplicationGatewaySslProtocol.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewaySslProtocol)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewaySslProtocol rhs = (ApplicationGatewaySslProtocol) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayTier.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayTier.java index ddff0cc232d..f11e689d3bc 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayTier.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayTier.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ApplicationGatewayTier. */ -public final class ApplicationGatewayTier extends ExpandableStringEnum { +public final class ApplicationGatewayTier { /** Static value Standard for ApplicationGatewayTier. */ - public static final ApplicationGatewayTier STANDARD = fromString("Standard"); + public static final ApplicationGatewayTier STANDARD = new ApplicationGatewayTier("Standard"); /** Static value WAF for ApplicationGatewayTier. */ - public static final ApplicationGatewayTier WAF = fromString("WAF"); + public static final ApplicationGatewayTier WAF = new ApplicationGatewayTier("WAF"); + + private String value; /** - * Creates or finds a ApplicationGatewayTier from its string representation. - * @param name a name to look for - * @return the corresponding ApplicationGatewayTier + * Creates a custom value for ApplicationGatewayTier. + * @param value the custom value */ - @JsonCreator - public static ApplicationGatewayTier fromString(String name) { - return fromString(name, ApplicationGatewayTier.class); + public ApplicationGatewayTier(String value) { + this.value = value; } - /** - * @return known ApplicationGatewayTier values - */ - public static Collection values() { - return values(ApplicationGatewayTier.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ApplicationGatewayTier)) { + return false; + } + if (obj == this) { + return true; + } + ApplicationGatewayTier rhs = (ApplicationGatewayTier) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayWebApplicationFirewallConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayWebApplicationFirewallConfiguration.java index 100e59fabbf..9507819bcff 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayWebApplicationFirewallConfiguration.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayWebApplicationFirewallConfiguration.java @@ -47,18 +47,6 @@ public class ApplicationGatewayWebApplicationFirewallConfiguration { @JsonProperty(value = "disabledRuleGroups") private List disabledRuleGroups; - /** - * Whether allow WAF to check request Body. - */ - @JsonProperty(value = "requestBodyCheck") - private Boolean requestBodyCheck; - - /** - * Maxium request body size for WAF. - */ - @JsonProperty(value = "maxRequestBodySize") - private Integer maxRequestBodySize; - /** * Get the enabled value. * @@ -159,44 +147,4 @@ public ApplicationGatewayWebApplicationFirewallConfiguration withDisabledRuleGro return this; } - /** - * Get the requestBodyCheck value. - * - * @return the requestBodyCheck value - */ - public Boolean requestBodyCheck() { - return this.requestBodyCheck; - } - - /** - * Set the requestBodyCheck value. - * - * @param requestBodyCheck the requestBodyCheck value to set - * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. - */ - public ApplicationGatewayWebApplicationFirewallConfiguration withRequestBodyCheck(Boolean requestBodyCheck) { - this.requestBodyCheck = requestBodyCheck; - return this; - } - - /** - * Get the maxRequestBodySize value. - * - * @return the maxRequestBodySize value - */ - public Integer maxRequestBodySize() { - return this.maxRequestBodySize; - } - - /** - * Set the maxRequestBodySize value. - * - * @param maxRequestBodySize the maxRequestBodySize value to set - * @return the ApplicationGatewayWebApplicationFirewallConfiguration object itself. - */ - public ApplicationGatewayWebApplicationFirewallConfiguration withMaxRequestBodySize(Integer maxRequestBodySize) { - this.maxRequestBodySize = maxRequestBodySize; - return this; - } - } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AssociationType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AssociationType.java index 3cd3c4845bf..cea87a35c95 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AssociationType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AssociationType.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for AssociationType. */ -public final class AssociationType extends ExpandableStringEnum { +public final class AssociationType { /** Static value Associated for AssociationType. */ - public static final AssociationType ASSOCIATED = fromString("Associated"); + public static final AssociationType ASSOCIATED = new AssociationType("Associated"); /** Static value Contains for AssociationType. */ - public static final AssociationType CONTAINS = fromString("Contains"); + public static final AssociationType CONTAINS = new AssociationType("Contains"); + + private String value; /** - * Creates or finds a AssociationType from its string representation. - * @param name a name to look for - * @return the corresponding AssociationType + * Creates a custom value for AssociationType. + * @param value the custom value */ - @JsonCreator - public static AssociationType fromString(String name) { - return fromString(name, AssociationType.class); + public AssociationType(String value) { + this.value = value; } - /** - * @return known AssociationType values - */ - public static Collection values() { - return values(AssociationType.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof AssociationType)) { + return false; + } + if (obj == this) { + return true; + } + AssociationType rhs = (AssociationType) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthenticationMethod.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthenticationMethod.java index 2a162792b72..187b50de1bd 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthenticationMethod.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthenticationMethod.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for AuthenticationMethod. */ -public final class AuthenticationMethod extends ExpandableStringEnum { +public final class AuthenticationMethod { /** Static value EAPTLS for AuthenticationMethod. */ - public static final AuthenticationMethod EAPTLS = fromString("EAPTLS"); + public static final AuthenticationMethod EAPTLS = new AuthenticationMethod("EAPTLS"); /** Static value EAPMSCHAPv2 for AuthenticationMethod. */ - public static final AuthenticationMethod EAPMSCHAPV2 = fromString("EAPMSCHAPv2"); + public static final AuthenticationMethod EAPMSCHAPV2 = new AuthenticationMethod("EAPMSCHAPv2"); + + private String value; /** - * Creates or finds a AuthenticationMethod from its string representation. - * @param name a name to look for - * @return the corresponding AuthenticationMethod + * Creates a custom value for AuthenticationMethod. + * @param value the custom value */ - @JsonCreator - public static AuthenticationMethod fromString(String name) { - return fromString(name, AuthenticationMethod.class); + public AuthenticationMethod(String value) { + this.value = value; } - /** - * @return known AuthenticationMethod values - */ - public static Collection values() { - return values(AuthenticationMethod.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof AuthenticationMethod)) { + return false; + } + if (obj == this) { + return true; + } + AuthenticationMethod rhs = (AuthenticationMethod) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthorizationUseStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthorizationUseStatus.java index 48b19016c22..8b9ace9e7ab 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthorizationUseStatus.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AuthorizationUseStatus.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for AuthorizationUseStatus. */ -public final class AuthorizationUseStatus extends ExpandableStringEnum { +public final class AuthorizationUseStatus { /** Static value Available for AuthorizationUseStatus. */ - public static final AuthorizationUseStatus AVAILABLE = fromString("Available"); + public static final AuthorizationUseStatus AVAILABLE = new AuthorizationUseStatus("Available"); /** Static value InUse for AuthorizationUseStatus. */ - public static final AuthorizationUseStatus IN_USE = fromString("InUse"); + public static final AuthorizationUseStatus IN_USE = new AuthorizationUseStatus("InUse"); + + private String value; /** - * Creates or finds a AuthorizationUseStatus from its string representation. - * @param name a name to look for - * @return the corresponding AuthorizationUseStatus + * Creates a custom value for AuthorizationUseStatus. + * @param value the custom value */ - @JsonCreator - public static AuthorizationUseStatus fromString(String name) { - return fromString(name, AuthorizationUseStatus.class); + public AuthorizationUseStatus(String value) { + this.value = value; } - /** - * @return known AuthorizationUseStatus values - */ - public static Collection values() { - return values(AuthorizationUseStatus.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof AuthorizationUseStatus)) { + return false; + } + if (obj == this) { + return true; + } + AuthorizationUseStatus rhs = (AuthorizationUseStatus) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Availability.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Availability.java deleted file mode 100644 index f668bf0aa8b..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Availability.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Availability of the metric. - */ -public class Availability { - /** - * The time grain of the availability. - */ - @JsonProperty(value = "timeGrain") - private String timeGrain; - - /** - * The retention of the availability. - */ - @JsonProperty(value = "retention") - private String retention; - - /** - * Duration of the availability blob. - */ - @JsonProperty(value = "blobDuration") - private String blobDuration; - - /** - * Get the timeGrain value. - * - * @return the timeGrain value - */ - public String timeGrain() { - return this.timeGrain; - } - - /** - * Set the timeGrain value. - * - * @param timeGrain the timeGrain value to set - * @return the Availability object itself. - */ - public Availability withTimeGrain(String timeGrain) { - this.timeGrain = timeGrain; - return this; - } - - /** - * Get the retention value. - * - * @return the retention value - */ - public String retention() { - return this.retention; - } - - /** - * Set the retention value. - * - * @param retention the retention value to set - * @return the Availability object itself. - */ - public Availability withRetention(String retention) { - this.retention = retention; - return this; - } - - /** - * Get the blobDuration value. - * - * @return the blobDuration value - */ - public String blobDuration() { - return this.blobDuration; - } - - /** - * Set the blobDuration value. - * - * @param blobDuration the blobDuration value to set - * @return the Availability object itself. - */ - public Availability withBlobDuration(String blobDuration) { - this.blobDuration = blobDuration; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCity.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCity.java deleted file mode 100644 index 31d51196111..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCity.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * City or town details. - */ -public class AvailableProvidersListCity { - /** - * The city or town name. - */ - @JsonProperty(value = "cityName") - private String cityName; - - /** - * A list of Internet service providers. - */ - @JsonProperty(value = "providers") - private List providers; - - /** - * Get the cityName value. - * - * @return the cityName value - */ - public String cityName() { - return this.cityName; - } - - /** - * Set the cityName value. - * - * @param cityName the cityName value to set - * @return the AvailableProvidersListCity object itself. - */ - public AvailableProvidersListCity withCityName(String cityName) { - this.cityName = cityName; - return this; - } - - /** - * Get the providers value. - * - * @return the providers value - */ - public List providers() { - return this.providers; - } - - /** - * Set the providers value. - * - * @param providers the providers value to set - * @return the AvailableProvidersListCity object itself. - */ - public AvailableProvidersListCity withProviders(List providers) { - this.providers = providers; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCountry.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCountry.java deleted file mode 100644 index 3d91fbfcd46..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCountry.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Country details. - */ -public class AvailableProvidersListCountry { - /** - * The country name. - */ - @JsonProperty(value = "countryName") - private String countryName; - - /** - * A list of Internet service providers. - */ - @JsonProperty(value = "providers") - private List providers; - - /** - * List of available states in the country. - */ - @JsonProperty(value = "states") - private List states; - - /** - * Get the countryName value. - * - * @return the countryName value - */ - public String countryName() { - return this.countryName; - } - - /** - * Set the countryName value. - * - * @param countryName the countryName value to set - * @return the AvailableProvidersListCountry object itself. - */ - public AvailableProvidersListCountry withCountryName(String countryName) { - this.countryName = countryName; - return this; - } - - /** - * Get the providers value. - * - * @return the providers value - */ - public List providers() { - return this.providers; - } - - /** - * Set the providers value. - * - * @param providers the providers value to set - * @return the AvailableProvidersListCountry object itself. - */ - public AvailableProvidersListCountry withProviders(List providers) { - this.providers = providers; - return this; - } - - /** - * Get the states value. - * - * @return the states value - */ - public List states() { - return this.states; - } - - /** - * Set the states value. - * - * @param states the states value to set - * @return the AvailableProvidersListCountry object itself. - */ - public AvailableProvidersListCountry withStates(List states) { - this.states = states; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListState.java deleted file mode 100644 index 6815fc824eb..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListState.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * State details. - */ -public class AvailableProvidersListState { - /** - * The state name. - */ - @JsonProperty(value = "stateName") - private String stateName; - - /** - * A list of Internet service providers. - */ - @JsonProperty(value = "providers") - private List providers; - - /** - * List of available cities or towns in the state. - */ - @JsonProperty(value = "cities") - private List cities; - - /** - * Get the stateName value. - * - * @return the stateName value - */ - public String stateName() { - return this.stateName; - } - - /** - * Set the stateName value. - * - * @param stateName the stateName value to set - * @return the AvailableProvidersListState object itself. - */ - public AvailableProvidersListState withStateName(String stateName) { - this.stateName = stateName; - return this; - } - - /** - * Get the providers value. - * - * @return the providers value - */ - public List providers() { - return this.providers; - } - - /** - * Set the providers value. - * - * @param providers the providers value to set - * @return the AvailableProvidersListState object itself. - */ - public AvailableProvidersListState withProviders(List providers) { - this.providers = providers; - return this; - } - - /** - * Get the cities value. - * - * @return the cities value - */ - public List cities() { - return this.cities; - } - - /** - * Set the cities value. - * - * @param cities the cities value to set - * @return the AvailableProvidersListState object itself. - */ - public AvailableProvidersListState withCities(List cities) { - this.cities = cities; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportItem.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportItem.java deleted file mode 100644 index a79899fa397..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportItem.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Azure reachability report details for a given provider location. - */ -public class AzureReachabilityReportItem { - /** - * The Internet service provider. - */ - @JsonProperty(value = "provider") - private String provider; - - /** - * The Azure region. - */ - @JsonProperty(value = "azureLocation") - private String azureLocation; - - /** - * List of latency details for each of the time series. - */ - @JsonProperty(value = "latencies") - private List latencies; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider value. - * - * @param provider the provider value to set - * @return the AzureReachabilityReportItem object itself. - */ - public AzureReachabilityReportItem withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the azureLocation value. - * - * @return the azureLocation value - */ - public String azureLocation() { - return this.azureLocation; - } - - /** - * Set the azureLocation value. - * - * @param azureLocation the azureLocation value to set - * @return the AzureReachabilityReportItem object itself. - */ - public AzureReachabilityReportItem withAzureLocation(String azureLocation) { - this.azureLocation = azureLocation; - return this; - } - - /** - * Get the latencies value. - * - * @return the latencies value - */ - public List latencies() { - return this.latencies; - } - - /** - * Set the latencies value. - * - * @param latencies the latencies value to set - * @return the AzureReachabilityReportItem object itself. - */ - public AzureReachabilityReportItem withLatencies(List latencies) { - this.latencies = latencies; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLatencyInfo.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLatencyInfo.java deleted file mode 100644 index b30967befb6..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLatencyInfo.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Details on latency for a time series. - */ -public class AzureReachabilityReportLatencyInfo { - /** - * The time stamp. - */ - @JsonProperty(value = "timeStamp") - private DateTime timeStamp; - - /** - * The relative latency score between 1 and 100, higher values indicating a - * faster connection. - */ - @JsonProperty(value = "score") - private Integer score; - - /** - * Get the timeStamp value. - * - * @return the timeStamp value - */ - public DateTime timeStamp() { - return this.timeStamp; - } - - /** - * Set the timeStamp value. - * - * @param timeStamp the timeStamp value to set - * @return the AzureReachabilityReportLatencyInfo object itself. - */ - public AzureReachabilityReportLatencyInfo withTimeStamp(DateTime timeStamp) { - this.timeStamp = timeStamp; - return this; - } - - /** - * Get the score value. - * - * @return the score value - */ - public Integer score() { - return this.score; - } - - /** - * Set the score value. - * - * @param score the score value to set - * @return the AzureReachabilityReportLatencyInfo object itself. - */ - public AzureReachabilityReportLatencyInfo withScore(Integer score) { - this.score = score; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLocation.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLocation.java deleted file mode 100644 index 30907387de8..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLocation.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters that define a geographic location. - */ -public class AzureReachabilityReportLocation { - /** - * The name of the country. - */ - @JsonProperty(value = "country", required = true) - private String country; - - /** - * The name of the state. - */ - @JsonProperty(value = "state") - private String state; - - /** - * The name of the city or town. - */ - @JsonProperty(value = "city") - private String city; - - /** - * Get the country value. - * - * @return the country value - */ - public String country() { - return this.country; - } - - /** - * Set the country value. - * - * @param country the country value to set - * @return the AzureReachabilityReportLocation object itself. - */ - public AzureReachabilityReportLocation withCountry(String country) { - this.country = country; - return this; - } - - /** - * Get the state value. - * - * @return the state value - */ - public String state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the AzureReachabilityReportLocation object itself. - */ - public AzureReachabilityReportLocation withState(String state) { - this.state = state; - return this; - } - - /** - * Get the city value. - * - * @return the city value - */ - public String city() { - return this.city; - } - - /** - * Set the city value. - * - * @param city the city value to set - * @return the AzureReachabilityReportLocation object itself. - */ - public AzureReachabilityReportLocation withCity(String city) { - this.city = city; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpPeerState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpPeerState.java index c11111cfb08..2df82519ae0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpPeerState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/BgpPeerState.java @@ -8,43 +8,61 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for BgpPeerState. */ -public final class BgpPeerState extends ExpandableStringEnum { +public final class BgpPeerState { /** Static value Unknown for BgpPeerState. */ - public static final BgpPeerState UNKNOWN = fromString("Unknown"); + public static final BgpPeerState UNKNOWN = new BgpPeerState("Unknown"); /** Static value Stopped for BgpPeerState. */ - public static final BgpPeerState STOPPED = fromString("Stopped"); + public static final BgpPeerState STOPPED = new BgpPeerState("Stopped"); /** Static value Idle for BgpPeerState. */ - public static final BgpPeerState IDLE = fromString("Idle"); + public static final BgpPeerState IDLE = new BgpPeerState("Idle"); /** Static value Connecting for BgpPeerState. */ - public static final BgpPeerState CONNECTING = fromString("Connecting"); + public static final BgpPeerState CONNECTING = new BgpPeerState("Connecting"); /** Static value Connected for BgpPeerState. */ - public static final BgpPeerState CONNECTED = fromString("Connected"); + public static final BgpPeerState CONNECTED = new BgpPeerState("Connected"); + + private String value; /** - * Creates or finds a BgpPeerState from its string representation. - * @param name a name to look for - * @return the corresponding BgpPeerState + * Creates a custom value for BgpPeerState. + * @param value the custom value */ - @JsonCreator - public static BgpPeerState fromString(String name) { - return fromString(name, BgpPeerState.class); + public BgpPeerState(String value) { + this.value = value; } - /** - * @return known BgpPeerState values - */ - public static Collection values() { - return values(BgpPeerState.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof BgpPeerState)) { + return false; + } + if (obj == this) { + return true; + } + BgpPeerState rhs = (BgpPeerState) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/CircuitConnectionStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/CircuitConnectionStatus.java deleted file mode 100644 index 8a9945553d6..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/CircuitConnectionStatus.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for CircuitConnectionStatus. - */ -public final class CircuitConnectionStatus extends ExpandableStringEnum { - /** Static value Connected for CircuitConnectionStatus. */ - public static final CircuitConnectionStatus CONNECTED = fromString("Connected"); - - /** Static value Connecting for CircuitConnectionStatus. */ - public static final CircuitConnectionStatus CONNECTING = fromString("Connecting"); - - /** Static value Disconnected for CircuitConnectionStatus. */ - public static final CircuitConnectionStatus DISCONNECTED = fromString("Disconnected"); - - /** - * Creates or finds a CircuitConnectionStatus from its string representation. - * @param name a name to look for - * @return the corresponding CircuitConnectionStatus - */ - @JsonCreator - public static CircuitConnectionStatus fromString(String name) { - return fromString(name, CircuitConnectionStatus.class); - } - - /** - * @return known CircuitConnectionStatus values - */ - public static Collection values() { - return values(CircuitConnectionStatus.class); - } -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorDestination.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorDestination.java deleted file mode 100644 index ccc96f6d7f2..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorDestination.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes the destination of connection monitor. - */ -public class ConnectionMonitorDestination { - /** - * The ID of the resource used as the destination by connection monitor. - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /** - * Address of the connection monitor destination (IP or domain name). - */ - @JsonProperty(value = "address") - private String address; - - /** - * The destination port used by connection monitor. - */ - @JsonProperty(value = "port") - private Integer port; - - /** - * Get the resourceId value. - * - * @return the resourceId value - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId value. - * - * @param resourceId the resourceId value to set - * @return the ConnectionMonitorDestination object itself. - */ - public ConnectionMonitorDestination withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the address value. - * - * @return the address value - */ - public String address() { - return this.address; - } - - /** - * Set the address value. - * - * @param address the address value to set - * @return the ConnectionMonitorDestination object itself. - */ - public ConnectionMonitorDestination withAddress(String address) { - this.address = address; - return this; - } - - /** - * Get the port value. - * - * @return the port value - */ - public Integer port() { - return this.port; - } - - /** - * Set the port value. - * - * @param port the port value to set - * @return the ConnectionMonitorDestination object itself. - */ - public ConnectionMonitorDestination withPort(Integer port) { - this.port = port; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorParameters.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorParameters.java deleted file mode 100644 index 21eb6852101..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorParameters.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters that define the operation to create a connection monitor. - */ -public class ConnectionMonitorParameters { - /** - * The source property. - */ - @JsonProperty(value = "source", required = true) - private ConnectionMonitorSource source; - - /** - * The destination property. - */ - @JsonProperty(value = "destination", required = true) - private ConnectionMonitorDestination destination; - - /** - * Determines if the connection monitor will start automatically once - * created. - */ - @JsonProperty(value = "autoStart") - private Boolean autoStart; - - /** - * Monitoring interval in seconds. - */ - @JsonProperty(value = "monitoringIntervalInSeconds") - private Integer monitoringIntervalInSeconds; - - /** - * Get the source value. - * - * @return the source value - */ - public ConnectionMonitorSource source() { - return this.source; - } - - /** - * Set the source value. - * - * @param source the source value to set - * @return the ConnectionMonitorParameters object itself. - */ - public ConnectionMonitorParameters withSource(ConnectionMonitorSource source) { - this.source = source; - return this; - } - - /** - * Get the destination value. - * - * @return the destination value - */ - public ConnectionMonitorDestination destination() { - return this.destination; - } - - /** - * Set the destination value. - * - * @param destination the destination value to set - * @return the ConnectionMonitorParameters object itself. - */ - public ConnectionMonitorParameters withDestination(ConnectionMonitorDestination destination) { - this.destination = destination; - return this; - } - - /** - * Get the autoStart value. - * - * @return the autoStart value - */ - public Boolean autoStart() { - return this.autoStart; - } - - /** - * Set the autoStart value. - * - * @param autoStart the autoStart value to set - * @return the ConnectionMonitorParameters object itself. - */ - public ConnectionMonitorParameters withAutoStart(Boolean autoStart) { - this.autoStart = autoStart; - return this; - } - - /** - * Get the monitoringIntervalInSeconds value. - * - * @return the monitoringIntervalInSeconds value - */ - public Integer monitoringIntervalInSeconds() { - return this.monitoringIntervalInSeconds; - } - - /** - * Set the monitoringIntervalInSeconds value. - * - * @param monitoringIntervalInSeconds the monitoringIntervalInSeconds value to set - * @return the ConnectionMonitorParameters object itself. - */ - public ConnectionMonitorParameters withMonitoringIntervalInSeconds(Integer monitoringIntervalInSeconds) { - this.monitoringIntervalInSeconds = monitoringIntervalInSeconds; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSource.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSource.java deleted file mode 100644 index 894858c8444..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSource.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Describes the source of connection monitor. - */ -public class ConnectionMonitorSource { - /** - * The ID of the resource used as the source by connection monitor. - */ - @JsonProperty(value = "resourceId", required = true) - private String resourceId; - - /** - * The source port used by connection monitor. - */ - @JsonProperty(value = "port") - private Integer port; - - /** - * Get the resourceId value. - * - * @return the resourceId value - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId value. - * - * @param resourceId the resourceId value to set - * @return the ConnectionMonitorSource object itself. - */ - public ConnectionMonitorSource withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the port value. - * - * @return the port value - */ - public Integer port() { - return this.port; - } - - /** - * Set the port value. - * - * @param port the port value to set - * @return the ConnectionMonitorSource object itself. - */ - public ConnectionMonitorSource withPort(Integer port) { - this.port = port; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionState.java deleted file mode 100644 index b6f2352dda5..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionState.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for ConnectionState. - */ -public final class ConnectionState extends ExpandableStringEnum { - /** Static value Reachable for ConnectionState. */ - public static final ConnectionState REACHABLE = fromString("Reachable"); - - /** Static value Unreachable for ConnectionState. */ - public static final ConnectionState UNREACHABLE = fromString("Unreachable"); - - /** Static value Unknown for ConnectionState. */ - public static final ConnectionState UNKNOWN = fromString("Unknown"); - - /** - * Creates or finds a ConnectionState from its string representation. - * @param name a name to look for - * @return the corresponding ConnectionState - */ - @JsonCreator - public static ConnectionState fromString(String name) { - return fromString(name, ConnectionState.class); - } - - /** - * @return known ConnectionState values - */ - public static Collection values() { - return values(ConnectionState.class); - } -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStateSnapshot.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStateSnapshot.java deleted file mode 100644 index 11ab5864d0a..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStateSnapshot.java +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import org.joda.time.DateTime; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Connection state snapshot. - */ -public class ConnectionStateSnapshot { - /** - * The connection state. Possible values include: 'Reachable', - * 'Unreachable', 'Unknown'. - */ - @JsonProperty(value = "connectionState") - private ConnectionState connectionState; - - /** - * The start time of the connection snapshot. - */ - @JsonProperty(value = "startTime") - private DateTime startTime; - - /** - * The end time of the connection snapshot. - */ - @JsonProperty(value = "endTime") - private DateTime endTime; - - /** - * Connectivity analysis evaluation state. Possible values include: - * 'NotStarted', 'InProgress', 'Completed'. - */ - @JsonProperty(value = "evaluationState") - private EvaluationState evaluationState; - - /** - * List of hops between the source and the destination. - */ - @JsonProperty(value = "hops", access = JsonProperty.Access.WRITE_ONLY) - private List hops; - - /** - * Get the connectionState value. - * - * @return the connectionState value - */ - public ConnectionState connectionState() { - return this.connectionState; - } - - /** - * Set the connectionState value. - * - * @param connectionState the connectionState value to set - * @return the ConnectionStateSnapshot object itself. - */ - public ConnectionStateSnapshot withConnectionState(ConnectionState connectionState) { - this.connectionState = connectionState; - return this; - } - - /** - * Get the startTime value. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime value. - * - * @param startTime the startTime value to set - * @return the ConnectionStateSnapshot object itself. - */ - public ConnectionStateSnapshot withStartTime(DateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime value. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime value. - * - * @param endTime the endTime value to set - * @return the ConnectionStateSnapshot object itself. - */ - public ConnectionStateSnapshot withEndTime(DateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the evaluationState value. - * - * @return the evaluationState value - */ - public EvaluationState evaluationState() { - return this.evaluationState; - } - - /** - * Set the evaluationState value. - * - * @param evaluationState the evaluationState value to set - * @return the ConnectionStateSnapshot object itself. - */ - public ConnectionStateSnapshot withEvaluationState(EvaluationState evaluationState) { - this.evaluationState = evaluationState; - return this; - } - - /** - * Get the hops value. - * - * @return the hops value - */ - public List hops() { - return this.hops; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStatus.java index c9b018887be..753ffeaf59e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStatus.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStatus.java @@ -8,40 +8,58 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ConnectionStatus. */ -public final class ConnectionStatus extends ExpandableStringEnum { +public final class ConnectionStatus { /** Static value Unknown for ConnectionStatus. */ - public static final ConnectionStatus UNKNOWN = fromString("Unknown"); + public static final ConnectionStatus UNKNOWN = new ConnectionStatus("Unknown"); /** Static value Connected for ConnectionStatus. */ - public static final ConnectionStatus CONNECTED = fromString("Connected"); + public static final ConnectionStatus CONNECTED = new ConnectionStatus("Connected"); /** Static value Disconnected for ConnectionStatus. */ - public static final ConnectionStatus DISCONNECTED = fromString("Disconnected"); + public static final ConnectionStatus DISCONNECTED = new ConnectionStatus("Disconnected"); /** Static value Degraded for ConnectionStatus. */ - public static final ConnectionStatus DEGRADED = fromString("Degraded"); + public static final ConnectionStatus DEGRADED = new ConnectionStatus("Degraded"); + + private String value; /** - * Creates or finds a ConnectionStatus from its string representation. - * @param name a name to look for - * @return the corresponding ConnectionStatus + * Creates a custom value for ConnectionStatus. + * @param value the custom value */ - @JsonCreator - public static ConnectionStatus fromString(String name) { - return fromString(name, ConnectionStatus.class); + public ConnectionStatus(String value) { + this.value = value; } - /** - * @return known ConnectionStatus values - */ - public static Collection values() { - return values(ConnectionStatus.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ConnectionStatus)) { + return false; + } + if (obj == this) { + return true; + } + ConnectionStatus rhs = (ConnectionStatus) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/DhGroup.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/DhGroup.java index 1f65e1fca5c..03348404d0d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/DhGroup.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/DhGroup.java @@ -8,52 +8,70 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for DhGroup. */ -public final class DhGroup extends ExpandableStringEnum { +public final class DhGroup { /** Static value None for DhGroup. */ - public static final DhGroup NONE = fromString("None"); + public static final DhGroup NONE = new DhGroup("None"); /** Static value DHGroup1 for DhGroup. */ - public static final DhGroup DHGROUP1 = fromString("DHGroup1"); + public static final DhGroup DHGROUP1 = new DhGroup("DHGroup1"); /** Static value DHGroup2 for DhGroup. */ - public static final DhGroup DHGROUP2 = fromString("DHGroup2"); + public static final DhGroup DHGROUP2 = new DhGroup("DHGroup2"); /** Static value DHGroup14 for DhGroup. */ - public static final DhGroup DHGROUP14 = fromString("DHGroup14"); + public static final DhGroup DHGROUP14 = new DhGroup("DHGroup14"); /** Static value DHGroup2048 for DhGroup. */ - public static final DhGroup DHGROUP2048 = fromString("DHGroup2048"); + public static final DhGroup DHGROUP2048 = new DhGroup("DHGroup2048"); /** Static value ECP256 for DhGroup. */ - public static final DhGroup ECP256 = fromString("ECP256"); + public static final DhGroup ECP256 = new DhGroup("ECP256"); /** Static value ECP384 for DhGroup. */ - public static final DhGroup ECP384 = fromString("ECP384"); + public static final DhGroup ECP384 = new DhGroup("ECP384"); /** Static value DHGroup24 for DhGroup. */ - public static final DhGroup DHGROUP24 = fromString("DHGroup24"); + public static final DhGroup DHGROUP24 = new DhGroup("DHGroup24"); + + private String value; /** - * Creates or finds a DhGroup from its string representation. - * @param name a name to look for - * @return the corresponding DhGroup + * Creates a custom value for DhGroup. + * @param value the custom value */ - @JsonCreator - public static DhGroup fromString(String name) { - return fromString(name, DhGroup.class); + public DhGroup(String value) { + this.value = value; } - /** - * @return known DhGroup values - */ - public static Collection values() { - return values(DhGroup.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof DhGroup)) { + return false; + } + if (obj == this) { + return true; + } + DhGroup rhs = (DhGroup) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Dimension.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Dimension.java deleted file mode 100644 index dc600f491d8..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Dimension.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Dimension of the metric. - */ -public class Dimension { - /** - * The name of the dimension. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The display name of the dimension. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /** - * The internal name of the dimension. - */ - @JsonProperty(value = "internalName") - private String internalName; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the Dimension object itself. - */ - public Dimension withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the Dimension object itself. - */ - public Dimension withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the internalName value. - * - * @return the internalName value - */ - public String internalName() { - return this.internalName; - } - - /** - * Set the internalName value. - * - * @param internalName the internalName value to set - * @return the Dimension object itself. - */ - public Dimension withInternalName(String internalName) { - this.internalName = internalName; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Direction.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Direction.java index 325a1acb18d..9ec4ab55ada 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Direction.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Direction.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for Direction. */ -public final class Direction extends ExpandableStringEnum { +public final class Direction { /** Static value Inbound for Direction. */ - public static final Direction INBOUND = fromString("Inbound"); + public static final Direction INBOUND = new Direction("Inbound"); /** Static value Outbound for Direction. */ - public static final Direction OUTBOUND = fromString("Outbound"); + public static final Direction OUTBOUND = new Direction("Outbound"); + + private String value; /** - * Creates or finds a Direction from its string representation. - * @param name a name to look for - * @return the corresponding Direction + * Creates a custom value for Direction. + * @param value the custom value */ - @JsonCreator - public static Direction fromString(String name) { - return fromString(name, Direction.class); + public Direction(String value) { + this.value = value; } - /** - * @return known Direction values - */ - public static Collection values() { - return values(Direction.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof Direction)) { + return false; + } + if (obj == this) { + return true; + } + Direction rhs = (Direction) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroup.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroup.java deleted file mode 100644 index 403dda8d3bd..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroup.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.microsoft.azure.SubResource; -import java.util.List; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Effective network security group. - */ -public class EffectiveNetworkSecurityGroup { - /** - * The ID of network security group that is applied. - */ - @JsonProperty(value = "networkSecurityGroup") - private SubResource networkSecurityGroup; - - /** - * Associated resources. - */ - @JsonProperty(value = "association") - private EffectiveNetworkSecurityGroupAssociation association; - - /** - * A collection of effective security rules. - */ - @JsonProperty(value = "effectiveSecurityRules") - private List effectiveSecurityRules; - - /** - * Mapping of tags to list of IP Addresses included within the tag. - */ - @JsonProperty(value = "tagMap") - private Map> tagMap; - - /** - * Get the networkSecurityGroup value. - * - * @return the networkSecurityGroup value - */ - public SubResource networkSecurityGroup() { - return this.networkSecurityGroup; - } - - /** - * Set the networkSecurityGroup value. - * - * @param networkSecurityGroup the networkSecurityGroup value to set - * @return the EffectiveNetworkSecurityGroup object itself. - */ - public EffectiveNetworkSecurityGroup withNetworkSecurityGroup(SubResource networkSecurityGroup) { - this.networkSecurityGroup = networkSecurityGroup; - return this; - } - - /** - * Get the association value. - * - * @return the association value - */ - public EffectiveNetworkSecurityGroupAssociation association() { - return this.association; - } - - /** - * Set the association value. - * - * @param association the association value to set - * @return the EffectiveNetworkSecurityGroup object itself. - */ - public EffectiveNetworkSecurityGroup withAssociation(EffectiveNetworkSecurityGroupAssociation association) { - this.association = association; - return this; - } - - /** - * Get the effectiveSecurityRules value. - * - * @return the effectiveSecurityRules value - */ - public List effectiveSecurityRules() { - return this.effectiveSecurityRules; - } - - /** - * Set the effectiveSecurityRules value. - * - * @param effectiveSecurityRules the effectiveSecurityRules value to set - * @return the EffectiveNetworkSecurityGroup object itself. - */ - public EffectiveNetworkSecurityGroup withEffectiveSecurityRules(List effectiveSecurityRules) { - this.effectiveSecurityRules = effectiveSecurityRules; - return this; - } - - /** - * Get the tagMap value. - * - * @return the tagMap value - */ - public Map> tagMap() { - return this.tagMap; - } - - /** - * Set the tagMap value. - * - * @param tagMap the tagMap value to set - * @return the EffectiveNetworkSecurityGroup object itself. - */ - public EffectiveNetworkSecurityGroup withTagMap(Map> tagMap) { - this.tagMap = tagMap; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRoute.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRoute.java deleted file mode 100644 index a3e34349491..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRoute.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Effective Route. - */ -public class EffectiveRoute { - /** - * The name of the user defined route. This is optional. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Who created the route. Possible values are: 'Unknown', 'User', - * 'VirtualNetworkGateway', and 'Default'. Possible values include: - * 'Unknown', 'User', 'VirtualNetworkGateway', 'Default'. - */ - @JsonProperty(value = "source") - private EffectiveRouteSource source; - - /** - * The value of effective route. Possible values are: 'Active' and - * 'Invalid'. Possible values include: 'Active', 'Invalid'. - */ - @JsonProperty(value = "state") - private EffectiveRouteState state; - - /** - * The address prefixes of the effective routes in CIDR notation. - */ - @JsonProperty(value = "addressPrefix") - private List addressPrefix; - - /** - * The IP address of the next hop of the effective route. - */ - @JsonProperty(value = "nextHopIpAddress") - private List nextHopIpAddress; - - /** - * The type of Azure hop the packet should be sent to. Possible values are: - * 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', - * and 'None'. Possible values include: 'VirtualNetworkGateway', - * 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'. - */ - @JsonProperty(value = "nextHopType") - private RouteNextHopType nextHopType; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the EffectiveRoute object itself. - */ - public EffectiveRoute withName(String name) { - this.name = name; - return this; - } - - /** - * Get the source value. - * - * @return the source value - */ - public EffectiveRouteSource source() { - return this.source; - } - - /** - * Set the source value. - * - * @param source the source value to set - * @return the EffectiveRoute object itself. - */ - public EffectiveRoute withSource(EffectiveRouteSource source) { - this.source = source; - return this; - } - - /** - * Get the state value. - * - * @return the state value - */ - public EffectiveRouteState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the EffectiveRoute object itself. - */ - public EffectiveRoute withState(EffectiveRouteState state) { - this.state = state; - return this; - } - - /** - * Get the addressPrefix value. - * - * @return the addressPrefix value - */ - public List addressPrefix() { - return this.addressPrefix; - } - - /** - * Set the addressPrefix value. - * - * @param addressPrefix the addressPrefix value to set - * @return the EffectiveRoute object itself. - */ - public EffectiveRoute withAddressPrefix(List addressPrefix) { - this.addressPrefix = addressPrefix; - return this; - } - - /** - * Get the nextHopIpAddress value. - * - * @return the nextHopIpAddress value - */ - public List nextHopIpAddress() { - return this.nextHopIpAddress; - } - - /** - * Set the nextHopIpAddress value. - * - * @param nextHopIpAddress the nextHopIpAddress value to set - * @return the EffectiveRoute object itself. - */ - public EffectiveRoute withNextHopIpAddress(List nextHopIpAddress) { - this.nextHopIpAddress = nextHopIpAddress; - return this; - } - - /** - * Get the nextHopType value. - * - * @return the nextHopType value - */ - public RouteNextHopType nextHopType() { - return this.nextHopType; - } - - /** - * Set the nextHopType value. - * - * @param nextHopType the nextHopType value to set - * @return the EffectiveRoute object itself. - */ - public EffectiveRoute withNextHopType(RouteNextHopType nextHopType) { - this.nextHopType = nextHopType; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteSource.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteSource.java index a0da77b3daf..ff8a569c247 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteSource.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteSource.java @@ -8,40 +8,58 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for EffectiveRouteSource. */ -public final class EffectiveRouteSource extends ExpandableStringEnum { +public final class EffectiveRouteSource { /** Static value Unknown for EffectiveRouteSource. */ - public static final EffectiveRouteSource UNKNOWN = fromString("Unknown"); + public static final EffectiveRouteSource UNKNOWN = new EffectiveRouteSource("Unknown"); /** Static value User for EffectiveRouteSource. */ - public static final EffectiveRouteSource USER = fromString("User"); + public static final EffectiveRouteSource USER = new EffectiveRouteSource("User"); /** Static value VirtualNetworkGateway for EffectiveRouteSource. */ - public static final EffectiveRouteSource VIRTUAL_NETWORK_GATEWAY = fromString("VirtualNetworkGateway"); + public static final EffectiveRouteSource VIRTUAL_NETWORK_GATEWAY = new EffectiveRouteSource("VirtualNetworkGateway"); /** Static value Default for EffectiveRouteSource. */ - public static final EffectiveRouteSource DEFAULT = fromString("Default"); + public static final EffectiveRouteSource DEFAULT = new EffectiveRouteSource("Default"); + + private String value; /** - * Creates or finds a EffectiveRouteSource from its string representation. - * @param name a name to look for - * @return the corresponding EffectiveRouteSource + * Creates a custom value for EffectiveRouteSource. + * @param value the custom value */ - @JsonCreator - public static EffectiveRouteSource fromString(String name) { - return fromString(name, EffectiveRouteSource.class); + public EffectiveRouteSource(String value) { + this.value = value; } - /** - * @return known EffectiveRouteSource values - */ - public static Collection values() { - return values(EffectiveRouteSource.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof EffectiveRouteSource)) { + return false; + } + if (obj == this) { + return true; + } + EffectiveRouteSource rhs = (EffectiveRouteSource) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteState.java index b3a78f4385b..d5b9bd21f9f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRouteState.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for EffectiveRouteState. */ -public final class EffectiveRouteState extends ExpandableStringEnum { +public final class EffectiveRouteState { /** Static value Active for EffectiveRouteState. */ - public static final EffectiveRouteState ACTIVE = fromString("Active"); + public static final EffectiveRouteState ACTIVE = new EffectiveRouteState("Active"); /** Static value Invalid for EffectiveRouteState. */ - public static final EffectiveRouteState INVALID = fromString("Invalid"); + public static final EffectiveRouteState INVALID = new EffectiveRouteState("Invalid"); + + private String value; /** - * Creates or finds a EffectiveRouteState from its string representation. - * @param name a name to look for - * @return the corresponding EffectiveRouteState + * Creates a custom value for EffectiveRouteState. + * @param value the custom value */ - @JsonCreator - public static EffectiveRouteState fromString(String name) { - return fromString(name, EffectiveRouteState.class); + public EffectiveRouteState(String value) { + this.value = value; } - /** - * @return known EffectiveRouteState values - */ - public static Collection values() { - return values(EffectiveRouteState.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof EffectiveRouteState)) { + return false; + } + if (obj == this) { + return true; + } + EffectiveRouteState rhs = (EffectiveRouteState) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveSecurityRuleProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveSecurityRuleProtocol.java index 3fec7790007..3d76690e139 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveSecurityRuleProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveSecurityRuleProtocol.java @@ -8,37 +8,55 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for EffectiveSecurityRuleProtocol. */ -public final class EffectiveSecurityRuleProtocol extends ExpandableStringEnum { +public final class EffectiveSecurityRuleProtocol { /** Static value Tcp for EffectiveSecurityRuleProtocol. */ - public static final EffectiveSecurityRuleProtocol TCP = fromString("Tcp"); + public static final EffectiveSecurityRuleProtocol TCP = new EffectiveSecurityRuleProtocol("Tcp"); /** Static value Udp for EffectiveSecurityRuleProtocol. */ - public static final EffectiveSecurityRuleProtocol UDP = fromString("Udp"); + public static final EffectiveSecurityRuleProtocol UDP = new EffectiveSecurityRuleProtocol("Udp"); /** Static value All for EffectiveSecurityRuleProtocol. */ - public static final EffectiveSecurityRuleProtocol ALL = fromString("All"); + public static final EffectiveSecurityRuleProtocol ALL = new EffectiveSecurityRuleProtocol("All"); + + private String value; /** - * Creates or finds a EffectiveSecurityRuleProtocol from its string representation. - * @param name a name to look for - * @return the corresponding EffectiveSecurityRuleProtocol + * Creates a custom value for EffectiveSecurityRuleProtocol. + * @param value the custom value */ - @JsonCreator - public static EffectiveSecurityRuleProtocol fromString(String name) { - return fromString(name, EffectiveSecurityRuleProtocol.class); + public EffectiveSecurityRuleProtocol(String value) { + this.value = value; } - /** - * @return known EffectiveSecurityRuleProtocol values - */ - public static Collection values() { - return values(EffectiveSecurityRuleProtocol.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof EffectiveSecurityRuleProtocol)) { + return false; + } + if (obj == this) { + return true; + } + EffectiveSecurityRuleProtocol rhs = (EffectiveSecurityRuleProtocol) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EvaluationState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EvaluationState.java deleted file mode 100644 index feebdb22127..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EvaluationState.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for EvaluationState. - */ -public final class EvaluationState extends ExpandableStringEnum { - /** Static value NotStarted for EvaluationState. */ - public static final EvaluationState NOT_STARTED = fromString("NotStarted"); - - /** Static value InProgress for EvaluationState. */ - public static final EvaluationState IN_PROGRESS = fromString("InProgress"); - - /** Static value Completed for EvaluationState. */ - public static final EvaluationState COMPLETED = fromString("Completed"); - - /** - * Creates or finds a EvaluationState from its string representation. - * @param name a name to look for - * @return the corresponding EvaluationState - */ - @JsonCreator - public static EvaluationState fromString(String name) { - return fromString(name, EvaluationState.class); - } - - /** - * @return known EvaluationState values - */ - public static Collection values() { - return values(EvaluationState.class); - } -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.java index 12a070c9471..25039341f87 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.java @@ -8,40 +8,58 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ -public final class ExpressRouteCircuitPeeringAdvertisedPublicPrefixState extends ExpandableStringEnum { +public final class ExpressRouteCircuitPeeringAdvertisedPublicPrefixState { /** Static value NotConfigured for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ - public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState NOT_CONFIGURED = fromString("NotConfigured"); + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState NOT_CONFIGURED = new ExpressRouteCircuitPeeringAdvertisedPublicPrefixState("NotConfigured"); /** Static value Configuring for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ - public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURING = fromString("Configuring"); + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURING = new ExpressRouteCircuitPeeringAdvertisedPublicPrefixState("Configuring"); /** Static value Configured for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ - public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURED = fromString("Configured"); + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURED = new ExpressRouteCircuitPeeringAdvertisedPublicPrefixState("Configured"); /** Static value ValidationNeeded for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ - public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState VALIDATION_NEEDED = fromString("ValidationNeeded"); + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState VALIDATION_NEEDED = new ExpressRouteCircuitPeeringAdvertisedPublicPrefixState("ValidationNeeded"); + + private String value; /** - * Creates or finds a ExpressRouteCircuitPeeringAdvertisedPublicPrefixState from its string representation. - * @param name a name to look for - * @return the corresponding ExpressRouteCircuitPeeringAdvertisedPublicPrefixState + * Creates a custom value for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. + * @param value the custom value */ - @JsonCreator - public static ExpressRouteCircuitPeeringAdvertisedPublicPrefixState fromString(String name) { - return fromString(name, ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.class); + public ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(String value) { + this.value = value; } - /** - * @return known ExpressRouteCircuitPeeringAdvertisedPublicPrefixState values - */ - public static Collection values() { - return values(ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ExpressRouteCircuitPeeringAdvertisedPublicPrefixState)) { + return false; + } + if (obj == this) { + return true; + } + ExpressRouteCircuitPeeringAdvertisedPublicPrefixState rhs = (ExpressRouteCircuitPeeringAdvertisedPublicPrefixState) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringState.java index 49ac407f0ec..ea180c1330d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringState.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ExpressRouteCircuitPeeringState. */ -public final class ExpressRouteCircuitPeeringState extends ExpandableStringEnum { +public final class ExpressRouteCircuitPeeringState { /** Static value Disabled for ExpressRouteCircuitPeeringState. */ - public static final ExpressRouteCircuitPeeringState DISABLED = fromString("Disabled"); + public static final ExpressRouteCircuitPeeringState DISABLED = new ExpressRouteCircuitPeeringState("Disabled"); /** Static value Enabled for ExpressRouteCircuitPeeringState. */ - public static final ExpressRouteCircuitPeeringState ENABLED = fromString("Enabled"); + public static final ExpressRouteCircuitPeeringState ENABLED = new ExpressRouteCircuitPeeringState("Enabled"); + + private String value; /** - * Creates or finds a ExpressRouteCircuitPeeringState from its string representation. - * @param name a name to look for - * @return the corresponding ExpressRouteCircuitPeeringState + * Creates a custom value for ExpressRouteCircuitPeeringState. + * @param value the custom value */ - @JsonCreator - public static ExpressRouteCircuitPeeringState fromString(String name) { - return fromString(name, ExpressRouteCircuitPeeringState.class); + public ExpressRouteCircuitPeeringState(String value) { + this.value = value; } - /** - * @return known ExpressRouteCircuitPeeringState values - */ - public static Collection values() { - return values(ExpressRouteCircuitPeeringState.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ExpressRouteCircuitPeeringState)) { + return false; + } + if (obj == this) { + return true; + } + ExpressRouteCircuitPeeringState rhs = (ExpressRouteCircuitPeeringState) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringType.java index 0e5b3255861..1458c615cfe 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitPeeringType.java @@ -8,37 +8,55 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ExpressRouteCircuitPeeringType. */ -public final class ExpressRouteCircuitPeeringType extends ExpandableStringEnum { +public final class ExpressRouteCircuitPeeringType { /** Static value AzurePublicPeering for ExpressRouteCircuitPeeringType. */ - public static final ExpressRouteCircuitPeeringType AZURE_PUBLIC_PEERING = fromString("AzurePublicPeering"); + public static final ExpressRouteCircuitPeeringType AZURE_PUBLIC_PEERING = new ExpressRouteCircuitPeeringType("AzurePublicPeering"); /** Static value AzurePrivatePeering for ExpressRouteCircuitPeeringType. */ - public static final ExpressRouteCircuitPeeringType AZURE_PRIVATE_PEERING = fromString("AzurePrivatePeering"); + public static final ExpressRouteCircuitPeeringType AZURE_PRIVATE_PEERING = new ExpressRouteCircuitPeeringType("AzurePrivatePeering"); /** Static value MicrosoftPeering for ExpressRouteCircuitPeeringType. */ - public static final ExpressRouteCircuitPeeringType MICROSOFT_PEERING = fromString("MicrosoftPeering"); + public static final ExpressRouteCircuitPeeringType MICROSOFT_PEERING = new ExpressRouteCircuitPeeringType("MicrosoftPeering"); + + private String value; /** - * Creates or finds a ExpressRouteCircuitPeeringType from its string representation. - * @param name a name to look for - * @return the corresponding ExpressRouteCircuitPeeringType + * Creates a custom value for ExpressRouteCircuitPeeringType. + * @param value the custom value */ - @JsonCreator - public static ExpressRouteCircuitPeeringType fromString(String name) { - return fromString(name, ExpressRouteCircuitPeeringType.class); + public ExpressRouteCircuitPeeringType(String value) { + this.value = value; } - /** - * @return known ExpressRouteCircuitPeeringType values - */ - public static Collection values() { - return values(ExpressRouteCircuitPeeringType.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ExpressRouteCircuitPeeringType)) { + return false; + } + if (obj == this) { + return true; + } + ExpressRouteCircuitPeeringType rhs = (ExpressRouteCircuitPeeringType) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitReference.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitReference.java deleted file mode 100644 index 522751abe45..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitReference.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The ExpressRouteCircuitReference model. - */ -public class ExpressRouteCircuitReference { - /** - * Corresponding Express Route Circuit Id. - */ - @JsonProperty(value = "id") - private String id; - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Set the id value. - * - * @param id the id value to set - * @return the ExpressRouteCircuitReference object itself. - */ - public ExpressRouteCircuitReference withId(String id) { - this.id = id; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuFamily.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuFamily.java index 84059904697..87c97ea5466 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuFamily.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuFamily.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ExpressRouteCircuitSkuFamily. */ -public final class ExpressRouteCircuitSkuFamily extends ExpandableStringEnum { +public final class ExpressRouteCircuitSkuFamily { /** Static value UnlimitedData for ExpressRouteCircuitSkuFamily. */ - public static final ExpressRouteCircuitSkuFamily UNLIMITED_DATA = fromString("UnlimitedData"); + public static final ExpressRouteCircuitSkuFamily UNLIMITED_DATA = new ExpressRouteCircuitSkuFamily("UnlimitedData"); /** Static value MeteredData for ExpressRouteCircuitSkuFamily. */ - public static final ExpressRouteCircuitSkuFamily METERED_DATA = fromString("MeteredData"); + public static final ExpressRouteCircuitSkuFamily METERED_DATA = new ExpressRouteCircuitSkuFamily("MeteredData"); + + private String value; /** - * Creates or finds a ExpressRouteCircuitSkuFamily from its string representation. - * @param name a name to look for - * @return the corresponding ExpressRouteCircuitSkuFamily + * Creates a custom value for ExpressRouteCircuitSkuFamily. + * @param value the custom value */ - @JsonCreator - public static ExpressRouteCircuitSkuFamily fromString(String name) { - return fromString(name, ExpressRouteCircuitSkuFamily.class); + public ExpressRouteCircuitSkuFamily(String value) { + this.value = value; } - /** - * @return known ExpressRouteCircuitSkuFamily values - */ - public static Collection values() { - return values(ExpressRouteCircuitSkuFamily.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ExpressRouteCircuitSkuFamily)) { + return false; + } + if (obj == this) { + return true; + } + ExpressRouteCircuitSkuFamily rhs = (ExpressRouteCircuitSkuFamily) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuTier.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuTier.java index 32389fc8dfe..d2c90542132 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuTier.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitSkuTier.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ExpressRouteCircuitSkuTier. */ -public final class ExpressRouteCircuitSkuTier extends ExpandableStringEnum { +public final class ExpressRouteCircuitSkuTier { /** Static value Standard for ExpressRouteCircuitSkuTier. */ - public static final ExpressRouteCircuitSkuTier STANDARD = fromString("Standard"); + public static final ExpressRouteCircuitSkuTier STANDARD = new ExpressRouteCircuitSkuTier("Standard"); /** Static value Premium for ExpressRouteCircuitSkuTier. */ - public static final ExpressRouteCircuitSkuTier PREMIUM = fromString("Premium"); + public static final ExpressRouteCircuitSkuTier PREMIUM = new ExpressRouteCircuitSkuTier("Premium"); + + private String value; /** - * Creates or finds a ExpressRouteCircuitSkuTier from its string representation. - * @param name a name to look for - * @return the corresponding ExpressRouteCircuitSkuTier + * Creates a custom value for ExpressRouteCircuitSkuTier. + * @param value the custom value */ - @JsonCreator - public static ExpressRouteCircuitSkuTier fromString(String name) { - return fromString(name, ExpressRouteCircuitSkuTier.class); + public ExpressRouteCircuitSkuTier(String value) { + this.value = value; } - /** - * @return known ExpressRouteCircuitSkuTier values - */ - public static Collection values() { - return values(ExpressRouteCircuitSkuTier.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ExpressRouteCircuitSkuTier)) { + return false; + } + if (obj == this) { + return true; + } + ExpressRouteCircuitSkuTier rhs = (ExpressRouteCircuitSkuTier) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionRoutesTableSummary.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionRoutesTableSummary.java deleted file mode 100644 index c2969b7a376..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionRoutesTableSummary.java +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * The routes table associated with the ExpressRouteCircuit. - */ -public class ExpressRouteCrossConnectionRoutesTableSummary { - /** - * IP address of Neighbor router. - */ - @JsonProperty(value = "neighbor") - private String neighbor; - - /** - * Autonomous system number. - */ - @JsonProperty(value = "asn") - private Integer asn; - - /** - * The length of time that the BGP session has been in the Established - * state, or the current status if not in the Established state. - */ - @JsonProperty(value = "upDown") - private String upDown; - - /** - * Current state of the BGP session, and the number of prefixes that have - * been received from a neighbor or peer group. - */ - @JsonProperty(value = "stateOrPrefixesReceived") - private String stateOrPrefixesReceived; - - /** - * Get the neighbor value. - * - * @return the neighbor value - */ - public String neighbor() { - return this.neighbor; - } - - /** - * Set the neighbor value. - * - * @param neighbor the neighbor value to set - * @return the ExpressRouteCrossConnectionRoutesTableSummary object itself. - */ - public ExpressRouteCrossConnectionRoutesTableSummary withNeighbor(String neighbor) { - this.neighbor = neighbor; - return this; - } - - /** - * Get the asn value. - * - * @return the asn value - */ - public Integer asn() { - return this.asn; - } - - /** - * Set the asn value. - * - * @param asn the asn value to set - * @return the ExpressRouteCrossConnectionRoutesTableSummary object itself. - */ - public ExpressRouteCrossConnectionRoutesTableSummary withAsn(Integer asn) { - this.asn = asn; - return this; - } - - /** - * Get the upDown value. - * - * @return the upDown value - */ - public String upDown() { - return this.upDown; - } - - /** - * Set the upDown value. - * - * @param upDown the upDown value to set - * @return the ExpressRouteCrossConnectionRoutesTableSummary object itself. - */ - public ExpressRouteCrossConnectionRoutesTableSummary withUpDown(String upDown) { - this.upDown = upDown; - return this; - } - - /** - * Get the stateOrPrefixesReceived value. - * - * @return the stateOrPrefixesReceived value - */ - public String stateOrPrefixesReceived() { - return this.stateOrPrefixesReceived; - } - - /** - * Set the stateOrPrefixesReceived value. - * - * @param stateOrPrefixesReceived the stateOrPrefixesReceived value to set - * @return the ExpressRouteCrossConnectionRoutesTableSummary object itself. - */ - public ExpressRouteCrossConnectionRoutesTableSummary withStateOrPrefixesReceived(String stateOrPrefixesReceived) { - this.stateOrPrefixesReceived = stateOrPrefixesReceived; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionServiceProviderProperties.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionServiceProviderProperties.java deleted file mode 100644 index 7f38cccd2c0..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionServiceProviderProperties.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Contains ServiceProviderProperties in an ExpressRouteCrossConnection. - */ -public class ExpressRouteCrossConnectionServiceProviderProperties { - /** - * The serviceProviderName. - */ - @JsonProperty(value = "serviceProviderName", access = JsonProperty.Access.WRITE_ONLY) - private String serviceProviderName; - - /** - * The peering location of the ExpressRoute circuit. - */ - @JsonProperty(value = "peeringLocation", access = JsonProperty.Access.WRITE_ONLY) - private String peeringLocation; - - /** - * The circuit bandwidth In Mbps. - */ - @JsonProperty(value = "bandwidthInMbps", access = JsonProperty.Access.WRITE_ONLY) - private Integer bandwidthInMbps; - - /** - * Get the serviceProviderName value. - * - * @return the serviceProviderName value - */ - public String serviceProviderName() { - return this.serviceProviderName; - } - - /** - * Get the peeringLocation value. - * - * @return the peeringLocation value - */ - public String peeringLocation() { - return this.peeringLocation; - } - - /** - * Get the bandwidthInMbps value. - * - * @return the bandwidthInMbps value - */ - public Integer bandwidthInMbps() { - return this.bandwidthInMbps; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java deleted file mode 100644 index 756bdadac6e..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for ExpressRoutePeeringState. - */ -public final class ExpressRoutePeeringState extends ExpandableStringEnum { - /** Static value Disabled for ExpressRoutePeeringState. */ - public static final ExpressRoutePeeringState DISABLED = fromString("Disabled"); - - /** Static value Enabled for ExpressRoutePeeringState. */ - public static final ExpressRoutePeeringState ENABLED = fromString("Enabled"); - - /** - * Creates or finds a ExpressRoutePeeringState from its string representation. - * @param name a name to look for - * @return the corresponding ExpressRoutePeeringState - */ - @JsonCreator - public static ExpressRoutePeeringState fromString(String name) { - return fromString(name, ExpressRoutePeeringState.class); - } - - /** - * @return known ExpressRoutePeeringState values - */ - public static Collection values() { - return values(ExpressRoutePeeringState.class); - } -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java deleted file mode 100644 index 5fad5585fa3..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; - -/** - * Defines values for ExpressRoutePeeringType. - */ -public final class ExpressRoutePeeringType extends ExpandableStringEnum { - /** Static value AzurePublicPeering for ExpressRoutePeeringType. */ - public static final ExpressRoutePeeringType AZURE_PUBLIC_PEERING = fromString("AzurePublicPeering"); - - /** Static value AzurePrivatePeering for ExpressRoutePeeringType. */ - public static final ExpressRoutePeeringType AZURE_PRIVATE_PEERING = fromString("AzurePrivatePeering"); - - /** Static value MicrosoftPeering for ExpressRoutePeeringType. */ - public static final ExpressRoutePeeringType MICROSOFT_PEERING = fromString("MicrosoftPeering"); - - /** - * Creates or finds a ExpressRoutePeeringType from its string representation. - * @param name a name to look for - * @return the corresponding ExpressRoutePeeringType - */ - @JsonCreator - public static ExpressRoutePeeringType fromString(String name) { - return fromString(name, ExpressRoutePeeringType.class); - } - - /** - * @return known ExpressRoutePeeringType values - */ - public static Collection values() { - return values(ExpressRoutePeeringType.class); - } -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPAllocationMethod.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPAllocationMethod.java index 139bb73cd1d..eae50093aac 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPAllocationMethod.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPAllocationMethod.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for IPAllocationMethod. */ -public final class IPAllocationMethod extends ExpandableStringEnum { +public final class IPAllocationMethod { /** Static value Static for IPAllocationMethod. */ - public static final IPAllocationMethod STATIC = fromString("Static"); + public static final IPAllocationMethod STATIC = new IPAllocationMethod("Static"); /** Static value Dynamic for IPAllocationMethod. */ - public static final IPAllocationMethod DYNAMIC = fromString("Dynamic"); + public static final IPAllocationMethod DYNAMIC = new IPAllocationMethod("Dynamic"); + + private String value; /** - * Creates or finds a IPAllocationMethod from its string representation. - * @param name a name to look for - * @return the corresponding IPAllocationMethod + * Creates a custom value for IPAllocationMethod. + * @param value the custom value */ - @JsonCreator - public static IPAllocationMethod fromString(String name) { - return fromString(name, IPAllocationMethod.class); + public IPAllocationMethod(String value) { + this.value = value; } - /** - * @return known IPAllocationMethod values - */ - public static Collection values() { - return values(IPAllocationMethod.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof IPAllocationMethod)) { + return false; + } + if (obj == this) { + return true; + } + IPAllocationMethod rhs = (IPAllocationMethod) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPVersion.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPVersion.java index 0cb7b82f33f..0afc2e2a7e0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPVersion.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IPVersion.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for IPVersion. */ -public final class IPVersion extends ExpandableStringEnum { +public final class IPVersion { /** Static value IPv4 for IPVersion. */ - public static final IPVersion IPV4 = fromString("IPv4"); + public static final IPVersion IPV4 = new IPVersion("IPv4"); /** Static value IPv6 for IPVersion. */ - public static final IPVersion IPV6 = fromString("IPv6"); + public static final IPVersion IPV6 = new IPVersion("IPv6"); + + private String value; /** - * Creates or finds a IPVersion from its string representation. - * @param name a name to look for - * @return the corresponding IPVersion + * Creates a custom value for IPVersion. + * @param value the custom value */ - @JsonCreator - public static IPVersion fromString(String name) { - return fromString(name, IPVersion.class); + public IPVersion(String value) { + this.value = value; } - /** - * @return known IPVersion values - */ - public static Collection values() { - return values(IPVersion.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof IPVersion)) { + return false; + } + if (obj == this) { + return true; + } + IPVersion rhs = (IPVersion) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeEncryption.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeEncryption.java index b55ccce065d..94372a5a6c7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeEncryption.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeEncryption.java @@ -8,49 +8,61 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for IkeEncryption. */ -public final class IkeEncryption extends ExpandableStringEnum { +public final class IkeEncryption { /** Static value DES for IkeEncryption. */ - public static final IkeEncryption DES = fromString("DES"); + public static final IkeEncryption DES = new IkeEncryption("DES"); /** Static value DES3 for IkeEncryption. */ - public static final IkeEncryption DES3 = fromString("DES3"); + public static final IkeEncryption DES3 = new IkeEncryption("DES3"); /** Static value AES128 for IkeEncryption. */ - public static final IkeEncryption AES128 = fromString("AES128"); + public static final IkeEncryption AES128 = new IkeEncryption("AES128"); /** Static value AES192 for IkeEncryption. */ - public static final IkeEncryption AES192 = fromString("AES192"); + public static final IkeEncryption AES192 = new IkeEncryption("AES192"); /** Static value AES256 for IkeEncryption. */ - public static final IkeEncryption AES256 = fromString("AES256"); + public static final IkeEncryption AES256 = new IkeEncryption("AES256"); - /** Static value GCMAES256 for IkeEncryption. */ - public static final IkeEncryption GCMAES256 = fromString("GCMAES256"); - - /** Static value GCMAES128 for IkeEncryption. */ - public static final IkeEncryption GCMAES128 = fromString("GCMAES128"); + private String value; /** - * Creates or finds a IkeEncryption from its string representation. - * @param name a name to look for - * @return the corresponding IkeEncryption + * Creates a custom value for IkeEncryption. + * @param value the custom value */ - @JsonCreator - public static IkeEncryption fromString(String name) { - return fromString(name, IkeEncryption.class); + public IkeEncryption(String value) { + this.value = value; } - /** - * @return known IkeEncryption values - */ - public static Collection values() { - return values(IkeEncryption.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof IkeEncryption)) { + return false; + } + if (obj == this) { + return true; + } + IkeEncryption rhs = (IkeEncryption) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeIntegrity.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeIntegrity.java index 6b3670c4f21..5b6941ed0b0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeIntegrity.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IkeIntegrity.java @@ -8,46 +8,58 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for IkeIntegrity. */ -public final class IkeIntegrity extends ExpandableStringEnum { +public final class IkeIntegrity { /** Static value MD5 for IkeIntegrity. */ - public static final IkeIntegrity MD5 = fromString("MD5"); + public static final IkeIntegrity MD5 = new IkeIntegrity("MD5"); /** Static value SHA1 for IkeIntegrity. */ - public static final IkeIntegrity SHA1 = fromString("SHA1"); + public static final IkeIntegrity SHA1 = new IkeIntegrity("SHA1"); /** Static value SHA256 for IkeIntegrity. */ - public static final IkeIntegrity SHA256 = fromString("SHA256"); + public static final IkeIntegrity SHA256 = new IkeIntegrity("SHA256"); /** Static value SHA384 for IkeIntegrity. */ - public static final IkeIntegrity SHA384 = fromString("SHA384"); + public static final IkeIntegrity SHA384 = new IkeIntegrity("SHA384"); - /** Static value GCMAES256 for IkeIntegrity. */ - public static final IkeIntegrity GCMAES256 = fromString("GCMAES256"); - - /** Static value GCMAES128 for IkeIntegrity. */ - public static final IkeIntegrity GCMAES128 = fromString("GCMAES128"); + private String value; /** - * Creates or finds a IkeIntegrity from its string representation. - * @param name a name to look for - * @return the corresponding IkeIntegrity + * Creates a custom value for IkeIntegrity. + * @param value the custom value */ - @JsonCreator - public static IkeIntegrity fromString(String name) { - return fromString(name, IkeIntegrity.class); + public IkeIntegrity(String value) { + this.value = value; } - /** - * @return known IkeIntegrity values - */ - public static Collection values() { - return values(IkeIntegrity.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof IkeIntegrity)) { + return false; + } + if (obj == this) { + return true; + } + IkeIntegrity rhs = (IkeIntegrity) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpTag.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpTag.java deleted file mode 100644 index cf44b31c8ee..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpTag.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Contains the IpTag associated with the public IP address. - */ -public class IpTag { - /** - * Gets or sets the ipTag type: Example FirstPartyUsage. - */ - @JsonProperty(value = "ipTagType") - private String ipTagType; - - /** - * Gets or sets value of the IpTag associated with the public IP. Example - * SQL, Storage etc. - */ - @JsonProperty(value = "tag") - private String tag; - - /** - * Get the ipTagType value. - * - * @return the ipTagType value - */ - public String ipTagType() { - return this.ipTagType; - } - - /** - * Set the ipTagType value. - * - * @param ipTagType the ipTagType value to set - * @return the IpTag object itself. - */ - public IpTag withIpTagType(String ipTagType) { - this.ipTagType = ipTagType; - return this; - } - - /** - * Get the tag value. - * - * @return the tag value - */ - public String tag() { - return this.tag; - } - - /** - * Set the tag value. - * - * @param tag the tag value to set - * @return the IpTag object itself. - */ - public IpTag withTag(String tag) { - this.tag = tag; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecEncryption.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecEncryption.java index cd624bf0332..da9af5b5a4c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecEncryption.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecEncryption.java @@ -8,55 +8,73 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for IpsecEncryption. */ -public final class IpsecEncryption extends ExpandableStringEnum { +public final class IpsecEncryption { /** Static value None for IpsecEncryption. */ - public static final IpsecEncryption NONE = fromString("None"); + public static final IpsecEncryption NONE = new IpsecEncryption("None"); /** Static value DES for IpsecEncryption. */ - public static final IpsecEncryption DES = fromString("DES"); + public static final IpsecEncryption DES = new IpsecEncryption("DES"); /** Static value DES3 for IpsecEncryption. */ - public static final IpsecEncryption DES3 = fromString("DES3"); + public static final IpsecEncryption DES3 = new IpsecEncryption("DES3"); /** Static value AES128 for IpsecEncryption. */ - public static final IpsecEncryption AES128 = fromString("AES128"); + public static final IpsecEncryption AES128 = new IpsecEncryption("AES128"); /** Static value AES192 for IpsecEncryption. */ - public static final IpsecEncryption AES192 = fromString("AES192"); + public static final IpsecEncryption AES192 = new IpsecEncryption("AES192"); /** Static value AES256 for IpsecEncryption. */ - public static final IpsecEncryption AES256 = fromString("AES256"); + public static final IpsecEncryption AES256 = new IpsecEncryption("AES256"); /** Static value GCMAES128 for IpsecEncryption. */ - public static final IpsecEncryption GCMAES128 = fromString("GCMAES128"); + public static final IpsecEncryption GCMAES128 = new IpsecEncryption("GCMAES128"); /** Static value GCMAES192 for IpsecEncryption. */ - public static final IpsecEncryption GCMAES192 = fromString("GCMAES192"); + public static final IpsecEncryption GCMAES192 = new IpsecEncryption("GCMAES192"); /** Static value GCMAES256 for IpsecEncryption. */ - public static final IpsecEncryption GCMAES256 = fromString("GCMAES256"); + public static final IpsecEncryption GCMAES256 = new IpsecEncryption("GCMAES256"); + + private String value; /** - * Creates or finds a IpsecEncryption from its string representation. - * @param name a name to look for - * @return the corresponding IpsecEncryption + * Creates a custom value for IpsecEncryption. + * @param value the custom value */ - @JsonCreator - public static IpsecEncryption fromString(String name) { - return fromString(name, IpsecEncryption.class); + public IpsecEncryption(String value) { + this.value = value; } - /** - * @return known IpsecEncryption values - */ - public static Collection values() { - return values(IpsecEncryption.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof IpsecEncryption)) { + return false; + } + if (obj == this) { + return true; + } + IpsecEncryption rhs = (IpsecEncryption) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecIntegrity.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecIntegrity.java index a7685667a32..59a97cceec5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecIntegrity.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecIntegrity.java @@ -8,46 +8,64 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for IpsecIntegrity. */ -public final class IpsecIntegrity extends ExpandableStringEnum { +public final class IpsecIntegrity { /** Static value MD5 for IpsecIntegrity. */ - public static final IpsecIntegrity MD5 = fromString("MD5"); + public static final IpsecIntegrity MD5 = new IpsecIntegrity("MD5"); /** Static value SHA1 for IpsecIntegrity. */ - public static final IpsecIntegrity SHA1 = fromString("SHA1"); + public static final IpsecIntegrity SHA1 = new IpsecIntegrity("SHA1"); /** Static value SHA256 for IpsecIntegrity. */ - public static final IpsecIntegrity SHA256 = fromString("SHA256"); + public static final IpsecIntegrity SHA256 = new IpsecIntegrity("SHA256"); /** Static value GCMAES128 for IpsecIntegrity. */ - public static final IpsecIntegrity GCMAES128 = fromString("GCMAES128"); + public static final IpsecIntegrity GCMAES128 = new IpsecIntegrity("GCMAES128"); /** Static value GCMAES192 for IpsecIntegrity. */ - public static final IpsecIntegrity GCMAES192 = fromString("GCMAES192"); + public static final IpsecIntegrity GCMAES192 = new IpsecIntegrity("GCMAES192"); /** Static value GCMAES256 for IpsecIntegrity. */ - public static final IpsecIntegrity GCMAES256 = fromString("GCMAES256"); + public static final IpsecIntegrity GCMAES256 = new IpsecIntegrity("GCMAES256"); + + private String value; /** - * Creates or finds a IpsecIntegrity from its string representation. - * @param name a name to look for - * @return the corresponding IpsecIntegrity + * Creates a custom value for IpsecIntegrity. + * @param value the custom value */ - @JsonCreator - public static IpsecIntegrity fromString(String name) { - return fromString(name, IpsecIntegrity.class); + public IpsecIntegrity(String value) { + this.value = value; } - /** - * @return known IpsecIntegrity values - */ - public static Collection values() { - return values(IpsecIntegrity.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof IpsecIntegrity)) { + return false; + } + if (obj == this) { + return true; + } + IpsecIntegrity rhs = (IpsecIntegrity) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecPolicy.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecPolicy.java index db764e329fa..1d82ea634f0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecPolicy.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpsecPolicy.java @@ -45,14 +45,14 @@ public class IpsecPolicy { /** * The IKE encryption algorithm (IKE phase 2). Possible values include: - * 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. + * 'DES', 'DES3', 'AES128', 'AES192', 'AES256'. */ @JsonProperty(value = "ikeEncryption", required = true) private IkeEncryption ikeEncryption; /** * The IKE integrity algorithm (IKE phase 2). Possible values include: - * 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. + * 'MD5', 'SHA1', 'SHA256', 'SHA384'. */ @JsonProperty(value = "ikeIntegrity", required = true) private IkeIntegrity ikeIntegrity; @@ -66,9 +66,8 @@ public class IpsecPolicy { private DhGroup dhGroup; /** - * The Pfs Groups used in IKE Phase 2 for new child SA. Possible values - * include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', - * 'PFS14', 'PFSMM'. + * The DH Groups used in IKE Phase 2 for new child SA. Possible values + * include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24'. */ @JsonProperty(value = "pfsGroup", required = true) private PfsGroup pfsGroup; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IssueType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IssueType.java index 53b744deb8e..dd17c448703 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IssueType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IssueType.java @@ -8,55 +8,73 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for IssueType. */ -public final class IssueType extends ExpandableStringEnum { +public final class IssueType { /** Static value Unknown for IssueType. */ - public static final IssueType UNKNOWN = fromString("Unknown"); + public static final IssueType UNKNOWN = new IssueType("Unknown"); /** Static value AgentStopped for IssueType. */ - public static final IssueType AGENT_STOPPED = fromString("AgentStopped"); + public static final IssueType AGENT_STOPPED = new IssueType("AgentStopped"); /** Static value GuestFirewall for IssueType. */ - public static final IssueType GUEST_FIREWALL = fromString("GuestFirewall"); + public static final IssueType GUEST_FIREWALL = new IssueType("GuestFirewall"); /** Static value DnsResolution for IssueType. */ - public static final IssueType DNS_RESOLUTION = fromString("DnsResolution"); + public static final IssueType DNS_RESOLUTION = new IssueType("DnsResolution"); /** Static value SocketBind for IssueType. */ - public static final IssueType SOCKET_BIND = fromString("SocketBind"); + public static final IssueType SOCKET_BIND = new IssueType("SocketBind"); /** Static value NetworkSecurityRule for IssueType. */ - public static final IssueType NETWORK_SECURITY_RULE = fromString("NetworkSecurityRule"); + public static final IssueType NETWORK_SECURITY_RULE = new IssueType("NetworkSecurityRule"); /** Static value UserDefinedRoute for IssueType. */ - public static final IssueType USER_DEFINED_ROUTE = fromString("UserDefinedRoute"); + public static final IssueType USER_DEFINED_ROUTE = new IssueType("UserDefinedRoute"); /** Static value PortThrottled for IssueType. */ - public static final IssueType PORT_THROTTLED = fromString("PortThrottled"); + public static final IssueType PORT_THROTTLED = new IssueType("PortThrottled"); /** Static value Platform for IssueType. */ - public static final IssueType PLATFORM = fromString("Platform"); + public static final IssueType PLATFORM = new IssueType("Platform"); + + private String value; /** - * Creates or finds a IssueType from its string representation. - * @param name a name to look for - * @return the corresponding IssueType + * Creates a custom value for IssueType. + * @param value the custom value */ - @JsonCreator - public static IssueType fromString(String name) { - return fromString(name, IssueType.class); + public IssueType(String value) { + this.value = value; } - /** - * @return known IssueType values - */ - public static Collection values() { - return values(IssueType.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof IssueType)) { + return false; + } + if (obj == this) { + return true; + } + IssueType rhs = (IssueType) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerSkuName.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerSkuName.java index 07af803b429..bd8805bb8a9 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerSkuName.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerSkuName.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for LoadBalancerSkuName. */ -public final class LoadBalancerSkuName extends ExpandableStringEnum { +public final class LoadBalancerSkuName { /** Static value Basic for LoadBalancerSkuName. */ - public static final LoadBalancerSkuName BASIC = fromString("Basic"); + public static final LoadBalancerSkuName BASIC = new LoadBalancerSkuName("Basic"); /** Static value Standard for LoadBalancerSkuName. */ - public static final LoadBalancerSkuName STANDARD = fromString("Standard"); + public static final LoadBalancerSkuName STANDARD = new LoadBalancerSkuName("Standard"); + + private String value; /** - * Creates or finds a LoadBalancerSkuName from its string representation. - * @param name a name to look for - * @return the corresponding LoadBalancerSkuName + * Creates a custom value for LoadBalancerSkuName. + * @param value the custom value */ - @JsonCreator - public static LoadBalancerSkuName fromString(String name) { - return fromString(name, LoadBalancerSkuName.class); + public LoadBalancerSkuName(String value) { + this.value = value; } - /** - * @return known LoadBalancerSkuName values - */ - public static Collection values() { - return values(LoadBalancerSkuName.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof LoadBalancerSkuName)) { + return false; + } + if (obj == this) { + return true; + } + LoadBalancerSkuName rhs = (LoadBalancerSkuName) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadDistribution.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadDistribution.java index a05f626404f..7c35ba2a4eb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadDistribution.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadDistribution.java @@ -8,37 +8,55 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for LoadDistribution. */ -public final class LoadDistribution extends ExpandableStringEnum { +public final class LoadDistribution { /** Static value Default for LoadDistribution. */ - public static final LoadDistribution DEFAULT = fromString("Default"); + public static final LoadDistribution DEFAULT = new LoadDistribution("Default"); /** Static value SourceIP for LoadDistribution. */ - public static final LoadDistribution SOURCE_IP = fromString("SourceIP"); + public static final LoadDistribution SOURCE_IP = new LoadDistribution("SourceIP"); /** Static value SourceIPProtocol for LoadDistribution. */ - public static final LoadDistribution SOURCE_IPPROTOCOL = fromString("SourceIPProtocol"); + public static final LoadDistribution SOURCE_IPPROTOCOL = new LoadDistribution("SourceIPProtocol"); + + private String value; /** - * Creates or finds a LoadDistribution from its string representation. - * @param name a name to look for - * @return the corresponding LoadDistribution + * Creates a custom value for LoadDistribution. + * @param value the custom value */ - @JsonCreator - public static LoadDistribution fromString(String name) { - return fromString(name, LoadDistribution.class); + public LoadDistribution(String value) { + this.value = value; } - /** - * @return known LoadDistribution values - */ - public static Collection values() { - return values(LoadDistribution.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof LoadDistribution)) { + return false; + } + if (obj == this) { + return true; + } + LoadDistribution rhs = (LoadDistribution) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LogSpecification.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LogSpecification.java deleted file mode 100644 index da14968066d..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LogSpecification.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Description of logging specification. - */ -public class LogSpecification { - /** - * The name of the specification. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The display name of the specification. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /** - * Duration of the blob. - */ - @JsonProperty(value = "blobDuration") - private String blobDuration; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the LogSpecification object itself. - */ - public LogSpecification withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the LogSpecification object itself. - */ - public LogSpecification withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the blobDuration value. - * - * @return the blobDuration value - */ - public String blobDuration() { - return this.blobDuration; - } - - /** - * Set the blobDuration value. - * - * @param blobDuration the blobDuration value to set - * @return the LogSpecification object itself. - */ - public LogSpecification withBlobDuration(String blobDuration) { - this.blobDuration = blobDuration; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/MetricSpecification.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/MetricSpecification.java deleted file mode 100644 index 01c4d449ae4..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/MetricSpecification.java +++ /dev/null @@ -1,382 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Description of metrics specification. - */ -public class MetricSpecification { - /** - * The name of the metric. - */ - @JsonProperty(value = "name") - private String name; - - /** - * The display name of the metric. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /** - * The description of the metric. - */ - @JsonProperty(value = "displayDescription") - private String displayDescription; - - /** - * Units the metric to be displayed in. - */ - @JsonProperty(value = "unit") - private String unit; - - /** - * The aggregation type. - */ - @JsonProperty(value = "aggregationType") - private String aggregationType; - - /** - * List of availability. - */ - @JsonProperty(value = "availabilities") - private List availabilities; - - /** - * Whether regional MDM account enabled. - */ - @JsonProperty(value = "enableRegionalMdmAccount") - private Boolean enableRegionalMdmAccount; - - /** - * Whether gaps would be filled with zeros. - */ - @JsonProperty(value = "fillGapWithZero") - private Boolean fillGapWithZero; - - /** - * Pattern for the filter of the metric. - */ - @JsonProperty(value = "metricFilterPattern") - private String metricFilterPattern; - - /** - * List of dimensions. - */ - @JsonProperty(value = "dimensions") - private List dimensions; - - /** - * Whether the metric is internal. - */ - @JsonProperty(value = "isInternal") - private Boolean isInternal; - - /** - * The source MDM account. - */ - @JsonProperty(value = "sourceMdmAccount") - private String sourceMdmAccount; - - /** - * The source MDM namespace. - */ - @JsonProperty(value = "sourceMdmNamespace") - private String sourceMdmNamespace; - - /** - * The resource Id dimension name override. - */ - @JsonProperty(value = "resourceIdDimensionNameOverride") - private String resourceIdDimensionNameOverride; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withName(String name) { - this.name = name; - return this; - } - - /** - * Get the displayName value. - * - * @return the displayName value - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName value. - * - * @param displayName the displayName value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the displayDescription value. - * - * @return the displayDescription value - */ - public String displayDescription() { - return this.displayDescription; - } - - /** - * Set the displayDescription value. - * - * @param displayDescription the displayDescription value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDisplayDescription(String displayDescription) { - this.displayDescription = displayDescription; - return this; - } - - /** - * Get the unit value. - * - * @return the unit value - */ - public String unit() { - return this.unit; - } - - /** - * Set the unit value. - * - * @param unit the unit value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withUnit(String unit) { - this.unit = unit; - return this; - } - - /** - * Get the aggregationType value. - * - * @return the aggregationType value - */ - public String aggregationType() { - return this.aggregationType; - } - - /** - * Set the aggregationType value. - * - * @param aggregationType the aggregationType value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withAggregationType(String aggregationType) { - this.aggregationType = aggregationType; - return this; - } - - /** - * Get the availabilities value. - * - * @return the availabilities value - */ - public List availabilities() { - return this.availabilities; - } - - /** - * Set the availabilities value. - * - * @param availabilities the availabilities value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withAvailabilities(List availabilities) { - this.availabilities = availabilities; - return this; - } - - /** - * Get the enableRegionalMdmAccount value. - * - * @return the enableRegionalMdmAccount value - */ - public Boolean enableRegionalMdmAccount() { - return this.enableRegionalMdmAccount; - } - - /** - * Set the enableRegionalMdmAccount value. - * - * @param enableRegionalMdmAccount the enableRegionalMdmAccount value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withEnableRegionalMdmAccount(Boolean enableRegionalMdmAccount) { - this.enableRegionalMdmAccount = enableRegionalMdmAccount; - return this; - } - - /** - * Get the fillGapWithZero value. - * - * @return the fillGapWithZero value - */ - public Boolean fillGapWithZero() { - return this.fillGapWithZero; - } - - /** - * Set the fillGapWithZero value. - * - * @param fillGapWithZero the fillGapWithZero value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { - this.fillGapWithZero = fillGapWithZero; - return this; - } - - /** - * Get the metricFilterPattern value. - * - * @return the metricFilterPattern value - */ - public String metricFilterPattern() { - return this.metricFilterPattern; - } - - /** - * Set the metricFilterPattern value. - * - * @param metricFilterPattern the metricFilterPattern value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withMetricFilterPattern(String metricFilterPattern) { - this.metricFilterPattern = metricFilterPattern; - return this; - } - - /** - * Get the dimensions value. - * - * @return the dimensions value - */ - public List dimensions() { - return this.dimensions; - } - - /** - * Set the dimensions value. - * - * @param dimensions the dimensions value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withDimensions(List dimensions) { - this.dimensions = dimensions; - return this; - } - - /** - * Get the isInternal value. - * - * @return the isInternal value - */ - public Boolean isInternal() { - return this.isInternal; - } - - /** - * Set the isInternal value. - * - * @param isInternal the isInternal value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withIsInternal(Boolean isInternal) { - this.isInternal = isInternal; - return this; - } - - /** - * Get the sourceMdmAccount value. - * - * @return the sourceMdmAccount value - */ - public String sourceMdmAccount() { - return this.sourceMdmAccount; - } - - /** - * Set the sourceMdmAccount value. - * - * @param sourceMdmAccount the sourceMdmAccount value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSourceMdmAccount(String sourceMdmAccount) { - this.sourceMdmAccount = sourceMdmAccount; - return this; - } - - /** - * Get the sourceMdmNamespace value. - * - * @return the sourceMdmNamespace value - */ - public String sourceMdmNamespace() { - return this.sourceMdmNamespace; - } - - /** - * Set the sourceMdmNamespace value. - * - * @param sourceMdmNamespace the sourceMdmNamespace value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withSourceMdmNamespace(String sourceMdmNamespace) { - this.sourceMdmNamespace = sourceMdmNamespace; - return this; - } - - /** - * Get the resourceIdDimensionNameOverride value. - * - * @return the resourceIdDimensionNameOverride value - */ - public String resourceIdDimensionNameOverride() { - return this.resourceIdDimensionNameOverride; - } - - /** - * Set the resourceIdDimensionNameOverride value. - * - * @param resourceIdDimensionNameOverride the resourceIdDimensionNameOverride value to set - * @return the MetricSpecification object itself. - */ - public MetricSpecification withResourceIdDimensionNameOverride(String resourceIdDimensionNameOverride) { - this.resourceIdDimensionNameOverride = resourceIdDimensionNameOverride; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkOperationStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkOperationStatus.java index e5c40e98cb5..72ccb2233dd 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkOperationStatus.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkOperationStatus.java @@ -8,37 +8,55 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for NetworkOperationStatus. */ -public final class NetworkOperationStatus extends ExpandableStringEnum { +public final class NetworkOperationStatus { /** Static value InProgress for NetworkOperationStatus. */ - public static final NetworkOperationStatus IN_PROGRESS = fromString("InProgress"); + public static final NetworkOperationStatus IN_PROGRESS = new NetworkOperationStatus("InProgress"); /** Static value Succeeded for NetworkOperationStatus. */ - public static final NetworkOperationStatus SUCCEEDED = fromString("Succeeded"); + public static final NetworkOperationStatus SUCCEEDED = new NetworkOperationStatus("Succeeded"); /** Static value Failed for NetworkOperationStatus. */ - public static final NetworkOperationStatus FAILED = fromString("Failed"); + public static final NetworkOperationStatus FAILED = new NetworkOperationStatus("Failed"); + + private String value; /** - * Creates or finds a NetworkOperationStatus from its string representation. - * @param name a name to look for - * @return the corresponding NetworkOperationStatus + * Creates a custom value for NetworkOperationStatus. + * @param value the custom value */ - @JsonCreator - public static NetworkOperationStatus fromString(String name) { - return fromString(name, NetworkOperationStatus.class); + public NetworkOperationStatus(String value) { + this.value = value; } - /** - * @return known NetworkOperationStatus values - */ - public static Collection values() { - return values(NetworkOperationStatus.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof NetworkOperationStatus)) { + return false; + } + if (obj == this) { + return true; + } + NetworkOperationStatus rhs = (NetworkOperationStatus) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NextHopType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NextHopType.java index 7dce1b03015..72934e6b656 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NextHopType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NextHopType.java @@ -8,46 +8,64 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for NextHopType. */ -public final class NextHopType extends ExpandableStringEnum { +public final class NextHopType { /** Static value Internet for NextHopType. */ - public static final NextHopType INTERNET = fromString("Internet"); + public static final NextHopType INTERNET = new NextHopType("Internet"); /** Static value VirtualAppliance for NextHopType. */ - public static final NextHopType VIRTUAL_APPLIANCE = fromString("VirtualAppliance"); + public static final NextHopType VIRTUAL_APPLIANCE = new NextHopType("VirtualAppliance"); /** Static value VirtualNetworkGateway for NextHopType. */ - public static final NextHopType VIRTUAL_NETWORK_GATEWAY = fromString("VirtualNetworkGateway"); + public static final NextHopType VIRTUAL_NETWORK_GATEWAY = new NextHopType("VirtualNetworkGateway"); /** Static value VnetLocal for NextHopType. */ - public static final NextHopType VNET_LOCAL = fromString("VnetLocal"); + public static final NextHopType VNET_LOCAL = new NextHopType("VnetLocal"); /** Static value HyperNetGateway for NextHopType. */ - public static final NextHopType HYPER_NET_GATEWAY = fromString("HyperNetGateway"); + public static final NextHopType HYPER_NET_GATEWAY = new NextHopType("HyperNetGateway"); /** Static value None for NextHopType. */ - public static final NextHopType NONE = fromString("None"); + public static final NextHopType NONE = new NextHopType("None"); + + private String value; /** - * Creates or finds a NextHopType from its string representation. - * @param name a name to look for - * @return the corresponding NextHopType + * Creates a custom value for NextHopType. + * @param value the custom value */ - @JsonCreator - public static NextHopType fromString(String name) { - return fromString(name, NextHopType.class); + public NextHopType(String value) { + this.value = value; } - /** - * @return known NextHopType values - */ - public static Collection values() { - return values(NextHopType.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof NextHopType)) { + return false; + } + if (obj == this) { + return true; + } + NextHopType rhs = (NextHopType) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationDisplay.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationDisplay.java deleted file mode 100644 index 91e8fba4da6..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationDisplay.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Display metadata associated with the operation. - */ -public class OperationDisplay { - /** - * Service provider: Microsoft Network. - */ - @JsonProperty(value = "provider") - private String provider; - - /** - * Resource on which the operation is performed. - */ - @JsonProperty(value = "resource") - private String resource; - - /** - * Type of the operation: get, read, delete, etc. - */ - @JsonProperty(value = "operation") - private String operation; - - /** - * Description of the operation. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the provider value. - * - * @return the provider value - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider value. - * - * @param provider the provider value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource value. - * - * @return the resource value - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource value. - * - * @param resource the resource value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation value. - * - * @return the operation value - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation value. - * - * @param operation the operation value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description value. - * - * @return the description value - */ - public String description() { - return this.description; - } - - /** - * Set the description value. - * - * @param description the description value to set - * @return the OperationDisplay object itself. - */ - public OperationDisplay withDescription(String description) { - this.description = description; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationPropertiesFormatServiceSpecification.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationPropertiesFormatServiceSpecification.java deleted file mode 100644 index 097a2cb2db4..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationPropertiesFormatServiceSpecification.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Specification of the service. - */ -public class OperationPropertiesFormatServiceSpecification { - /** - * Operation service specification. - */ - @JsonProperty(value = "metricSpecifications") - private List metricSpecifications; - - /** - * Operation log specification. - */ - @JsonProperty(value = "logSpecifications") - private List logSpecifications; - - /** - * Get the metricSpecifications value. - * - * @return the metricSpecifications value - */ - public List metricSpecifications() { - return this.metricSpecifications; - } - - /** - * Set the metricSpecifications value. - * - * @param metricSpecifications the metricSpecifications value to set - * @return the OperationPropertiesFormatServiceSpecification object itself. - */ - public OperationPropertiesFormatServiceSpecification withMetricSpecifications(List metricSpecifications) { - this.metricSpecifications = metricSpecifications; - return this; - } - - /** - * Get the logSpecifications value. - * - * @return the logSpecifications value - */ - public List logSpecifications() { - return this.logSpecifications; - } - - /** - * Set the logSpecifications value. - * - * @param logSpecifications the logSpecifications value to set - * @return the OperationPropertiesFormatServiceSpecification object itself. - */ - public OperationPropertiesFormatServiceSpecification withLogSpecifications(List logSpecifications) { - this.logSpecifications = logSpecifications; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Origin.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Origin.java index 9a8bbe337a6..db57348e220 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Origin.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Origin.java @@ -8,37 +8,55 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for Origin. */ -public final class Origin extends ExpandableStringEnum { +public final class Origin { /** Static value Local for Origin. */ - public static final Origin LOCAL = fromString("Local"); + public static final Origin LOCAL = new Origin("Local"); /** Static value Inbound for Origin. */ - public static final Origin INBOUND = fromString("Inbound"); + public static final Origin INBOUND = new Origin("Inbound"); /** Static value Outbound for Origin. */ - public static final Origin OUTBOUND = fromString("Outbound"); + public static final Origin OUTBOUND = new Origin("Outbound"); + + private String value; /** - * Creates or finds a Origin from its string representation. - * @param name a name to look for - * @return the corresponding Origin + * Creates a custom value for Origin. + * @param value the custom value */ - @JsonCreator - public static Origin fromString(String name) { - return fromString(name, Origin.class); + public Origin(String value) { + this.value = value; } - /** - * @return known Origin values - */ - public static Collection values() { - return values(Origin.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof Origin)) { + return false; + } + if (obj == this) { + return true; + } + Origin rhs = (Origin) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcError.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcError.java index b85b4a5ff7a..318994e05c1 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcError.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcError.java @@ -8,43 +8,61 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for PcError. */ -public final class PcError extends ExpandableStringEnum { +public final class PcError { /** Static value InternalError for PcError. */ - public static final PcError INTERNAL_ERROR = fromString("InternalError"); + public static final PcError INTERNAL_ERROR = new PcError("InternalError"); /** Static value AgentStopped for PcError. */ - public static final PcError AGENT_STOPPED = fromString("AgentStopped"); + public static final PcError AGENT_STOPPED = new PcError("AgentStopped"); /** Static value CaptureFailed for PcError. */ - public static final PcError CAPTURE_FAILED = fromString("CaptureFailed"); + public static final PcError CAPTURE_FAILED = new PcError("CaptureFailed"); /** Static value LocalFileFailed for PcError. */ - public static final PcError LOCAL_FILE_FAILED = fromString("LocalFileFailed"); + public static final PcError LOCAL_FILE_FAILED = new PcError("LocalFileFailed"); /** Static value StorageFailed for PcError. */ - public static final PcError STORAGE_FAILED = fromString("StorageFailed"); + public static final PcError STORAGE_FAILED = new PcError("StorageFailed"); + + private String value; /** - * Creates or finds a PcError from its string representation. - * @param name a name to look for - * @return the corresponding PcError + * Creates a custom value for PcError. + * @param value the custom value */ - @JsonCreator - public static PcError fromString(String name) { - return fromString(name, PcError.class); + public PcError(String value) { + this.value = value; } - /** - * @return known PcError values - */ - public static Collection values() { - return values(PcError.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof PcError)) { + return false; + } + if (obj == this) { + return true; + } + PcError rhs = (PcError) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcProtocol.java index 332c5408aeb..38056e9708c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcProtocol.java @@ -8,37 +8,55 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for PcProtocol. */ -public final class PcProtocol extends ExpandableStringEnum { +public final class PcProtocol { /** Static value TCP for PcProtocol. */ - public static final PcProtocol TCP = fromString("TCP"); + public static final PcProtocol TCP = new PcProtocol("TCP"); /** Static value UDP for PcProtocol. */ - public static final PcProtocol UDP = fromString("UDP"); + public static final PcProtocol UDP = new PcProtocol("UDP"); /** Static value Any for PcProtocol. */ - public static final PcProtocol ANY = fromString("Any"); + public static final PcProtocol ANY = new PcProtocol("Any"); + + private String value; /** - * Creates or finds a PcProtocol from its string representation. - * @param name a name to look for - * @return the corresponding PcProtocol + * Creates a custom value for PcProtocol. + * @param value the custom value */ - @JsonCreator - public static PcProtocol fromString(String name) { - return fromString(name, PcProtocol.class); + public PcProtocol(String value) { + this.value = value; } - /** - * @return known PcProtocol values - */ - public static Collection values() { - return values(PcProtocol.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof PcProtocol)) { + return false; + } + if (obj == this) { + return true; + } + PcProtocol rhs = (PcProtocol) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcStatus.java index a4a98398d43..c6e172a7470 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcStatus.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PcStatus.java @@ -8,43 +8,61 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for PcStatus. */ -public final class PcStatus extends ExpandableStringEnum { +public final class PcStatus { /** Static value NotStarted for PcStatus. */ - public static final PcStatus NOT_STARTED = fromString("NotStarted"); + public static final PcStatus NOT_STARTED = new PcStatus("NotStarted"); /** Static value Running for PcStatus. */ - public static final PcStatus RUNNING = fromString("Running"); + public static final PcStatus RUNNING = new PcStatus("Running"); /** Static value Stopped for PcStatus. */ - public static final PcStatus STOPPED = fromString("Stopped"); + public static final PcStatus STOPPED = new PcStatus("Stopped"); /** Static value Error for PcStatus. */ - public static final PcStatus ERROR = fromString("Error"); + public static final PcStatus ERROR = new PcStatus("Error"); /** Static value Unknown for PcStatus. */ - public static final PcStatus UNKNOWN = fromString("Unknown"); + public static final PcStatus UNKNOWN = new PcStatus("Unknown"); + + private String value; /** - * Creates or finds a PcStatus from its string representation. - * @param name a name to look for - * @return the corresponding PcStatus + * Creates a custom value for PcStatus. + * @param value the custom value */ - @JsonCreator - public static PcStatus fromString(String name) { - return fromString(name, PcStatus.class); + public PcStatus(String value) { + this.value = value; } - /** - * @return known PcStatus values - */ - public static Collection values() { - return values(PcStatus.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof PcStatus)) { + return false; + } + if (obj == this) { + return true; + } + PcStatus rhs = (PcStatus) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PfsGroup.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PfsGroup.java index e2d1f2aeb76..227876b2dd6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PfsGroup.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PfsGroup.java @@ -8,55 +8,67 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for PfsGroup. */ -public final class PfsGroup extends ExpandableStringEnum { +public final class PfsGroup { /** Static value None for PfsGroup. */ - public static final PfsGroup NONE = fromString("None"); + public static final PfsGroup NONE = new PfsGroup("None"); /** Static value PFS1 for PfsGroup. */ - public static final PfsGroup PFS1 = fromString("PFS1"); + public static final PfsGroup PFS1 = new PfsGroup("PFS1"); /** Static value PFS2 for PfsGroup. */ - public static final PfsGroup PFS2 = fromString("PFS2"); + public static final PfsGroup PFS2 = new PfsGroup("PFS2"); /** Static value PFS2048 for PfsGroup. */ - public static final PfsGroup PFS2048 = fromString("PFS2048"); + public static final PfsGroup PFS2048 = new PfsGroup("PFS2048"); /** Static value ECP256 for PfsGroup. */ - public static final PfsGroup ECP256 = fromString("ECP256"); + public static final PfsGroup ECP256 = new PfsGroup("ECP256"); /** Static value ECP384 for PfsGroup. */ - public static final PfsGroup ECP384 = fromString("ECP384"); + public static final PfsGroup ECP384 = new PfsGroup("ECP384"); /** Static value PFS24 for PfsGroup. */ - public static final PfsGroup PFS24 = fromString("PFS24"); + public static final PfsGroup PFS24 = new PfsGroup("PFS24"); - /** Static value PFS14 for PfsGroup. */ - public static final PfsGroup PFS14 = fromString("PFS14"); - - /** Static value PFSMM for PfsGroup. */ - public static final PfsGroup PFSMM = fromString("PFSMM"); + private String value; /** - * Creates or finds a PfsGroup from its string representation. - * @param name a name to look for - * @return the corresponding PfsGroup + * Creates a custom value for PfsGroup. + * @param value the custom value */ - @JsonCreator - public static PfsGroup fromString(String name) { - return fromString(name, PfsGroup.class); + public PfsGroup(String value) { + this.value = value; } - /** - * @return known PfsGroup values - */ - public static Collection values() { - return values(PfsGroup.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof PfsGroup)) { + return false; + } + if (obj == this) { + return true; + } + PfsGroup rhs = (PfsGroup) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProbeProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProbeProtocol.java index 6c4352821fa..014f1724607 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProbeProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProbeProtocol.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ProbeProtocol. */ -public final class ProbeProtocol extends ExpandableStringEnum { +public final class ProbeProtocol { /** Static value Http for ProbeProtocol. */ - public static final ProbeProtocol HTTP = fromString("Http"); + public static final ProbeProtocol HTTP = new ProbeProtocol("Http"); /** Static value Tcp for ProbeProtocol. */ - public static final ProbeProtocol TCP = fromString("Tcp"); + public static final ProbeProtocol TCP = new ProbeProtocol("Tcp"); + + private String value; /** - * Creates or finds a ProbeProtocol from its string representation. - * @param name a name to look for - * @return the corresponding ProbeProtocol + * Creates a custom value for ProbeProtocol. + * @param value the custom value */ - @JsonCreator - public static ProbeProtocol fromString(String name) { - return fromString(name, ProbeProtocol.class); + public ProbeProtocol(String value) { + this.value = value; } - /** - * @return known ProbeProtocol values - */ - public static Collection values() { - return values(ProbeProtocol.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ProbeProtocol)) { + return false; + } + if (obj == this) { + return true; + } + ProbeProtocol rhs = (ProbeProtocol) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProcessorArchitecture.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProcessorArchitecture.java index f8f21ec67ca..b79db0cc738 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProcessorArchitecture.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProcessorArchitecture.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ProcessorArchitecture. */ -public final class ProcessorArchitecture extends ExpandableStringEnum { +public final class ProcessorArchitecture { /** Static value Amd64 for ProcessorArchitecture. */ - public static final ProcessorArchitecture AMD64 = fromString("Amd64"); + public static final ProcessorArchitecture AMD64 = new ProcessorArchitecture("Amd64"); /** Static value X86 for ProcessorArchitecture. */ - public static final ProcessorArchitecture X86 = fromString("X86"); + public static final ProcessorArchitecture X86 = new ProcessorArchitecture("X86"); + + private String value; /** - * Creates or finds a ProcessorArchitecture from its string representation. - * @param name a name to look for - * @return the corresponding ProcessorArchitecture + * Creates a custom value for ProcessorArchitecture. + * @param value the custom value */ - @JsonCreator - public static ProcessorArchitecture fromString(String name) { - return fromString(name, ProcessorArchitecture.class); + public ProcessorArchitecture(String value) { + this.value = value; } - /** - * @return known ProcessorArchitecture values - */ - public static Collection values() { - return values(ProcessorArchitecture.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ProcessorArchitecture)) { + return false; + } + if (obj == this) { + return true; + } + ProcessorArchitecture rhs = (ProcessorArchitecture) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Protocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Protocol.java index 6cd99bb8345..5239385043e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Protocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Protocol.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for Protocol. */ -public final class Protocol extends ExpandableStringEnum { +public final class Protocol { /** Static value TCP for Protocol. */ - public static final Protocol TCP = fromString("TCP"); + public static final Protocol TCP = new Protocol("TCP"); /** Static value UDP for Protocol. */ - public static final Protocol UDP = fromString("UDP"); + public static final Protocol UDP = new Protocol("UDP"); + + private String value; /** - * Creates or finds a Protocol from its string representation. - * @param name a name to look for - * @return the corresponding Protocol + * Creates a custom value for Protocol. + * @param value the custom value */ - @JsonCreator - public static Protocol fromString(String name) { - return fromString(name, Protocol.class); + public Protocol(String value) { + this.value = value; } - /** - * @return known Protocol values - */ - public static Collection values() { - return values(Protocol.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof Protocol)) { + return false; + } + if (obj == this) { + return true; + } + Protocol rhs = (Protocol) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProvisioningState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProvisioningState.java index 087a96a1b8f..f8c378d086a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProvisioningState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProvisioningState.java @@ -8,40 +8,58 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ProvisioningState. */ -public final class ProvisioningState extends ExpandableStringEnum { +public final class ProvisioningState { /** Static value Succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + public static final ProvisioningState SUCCEEDED = new ProvisioningState("Succeeded"); /** Static value Updating for ProvisioningState. */ - public static final ProvisioningState UPDATING = fromString("Updating"); + public static final ProvisioningState UPDATING = new ProvisioningState("Updating"); /** Static value Deleting for ProvisioningState. */ - public static final ProvisioningState DELETING = fromString("Deleting"); + public static final ProvisioningState DELETING = new ProvisioningState("Deleting"); /** Static value Failed for ProvisioningState. */ - public static final ProvisioningState FAILED = fromString("Failed"); + public static final ProvisioningState FAILED = new ProvisioningState("Failed"); + + private String value; /** - * Creates or finds a ProvisioningState from its string representation. - * @param name a name to look for - * @return the corresponding ProvisioningState + * Creates a custom value for ProvisioningState. + * @param value the custom value */ - @JsonCreator - public static ProvisioningState fromString(String name) { - return fromString(name, ProvisioningState.class); + public ProvisioningState(String value) { + this.value = value; } - /** - * @return known ProvisioningState values - */ - public static Collection values() { - return values(ProvisioningState.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ProvisioningState)) { + return false; + } + if (obj == this) { + return true; + } + ProvisioningState rhs = (ProvisioningState) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressSkuName.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressSkuName.java index 0e794a4e3db..4662e9c40db 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressSkuName.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIPAddressSkuName.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for PublicIPAddressSkuName. */ -public final class PublicIPAddressSkuName extends ExpandableStringEnum { +public final class PublicIPAddressSkuName { /** Static value Basic for PublicIPAddressSkuName. */ - public static final PublicIPAddressSkuName BASIC = fromString("Basic"); + public static final PublicIPAddressSkuName BASIC = new PublicIPAddressSkuName("Basic"); /** Static value Standard for PublicIPAddressSkuName. */ - public static final PublicIPAddressSkuName STANDARD = fromString("Standard"); + public static final PublicIPAddressSkuName STANDARD = new PublicIPAddressSkuName("Standard"); + + private String value; /** - * Creates or finds a PublicIPAddressSkuName from its string representation. - * @param name a name to look for - * @return the corresponding PublicIPAddressSkuName + * Creates a custom value for PublicIPAddressSkuName. + * @param value the custom value */ - @JsonCreator - public static PublicIPAddressSkuName fromString(String name) { - return fromString(name, PublicIPAddressSkuName.class); + public PublicIPAddressSkuName(String value) { + this.value = value; } - /** - * @return known PublicIPAddressSkuName values - */ - public static Collection values() { - return values(PublicIPAddressSkuName.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof PublicIPAddressSkuName)) { + return false; + } + if (obj == this) { + return true; + } + PublicIPAddressSkuName rhs = (PublicIPAddressSkuName) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/RouteNextHopType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/RouteNextHopType.java index 614cf4aa12a..9516bcebc2f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/RouteNextHopType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/RouteNextHopType.java @@ -8,43 +8,61 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for RouteNextHopType. */ -public final class RouteNextHopType extends ExpandableStringEnum { +public final class RouteNextHopType { /** Static value VirtualNetworkGateway for RouteNextHopType. */ - public static final RouteNextHopType VIRTUAL_NETWORK_GATEWAY = fromString("VirtualNetworkGateway"); + public static final RouteNextHopType VIRTUAL_NETWORK_GATEWAY = new RouteNextHopType("VirtualNetworkGateway"); /** Static value VnetLocal for RouteNextHopType. */ - public static final RouteNextHopType VNET_LOCAL = fromString("VnetLocal"); + public static final RouteNextHopType VNET_LOCAL = new RouteNextHopType("VnetLocal"); /** Static value Internet for RouteNextHopType. */ - public static final RouteNextHopType INTERNET = fromString("Internet"); + public static final RouteNextHopType INTERNET = new RouteNextHopType("Internet"); /** Static value VirtualAppliance for RouteNextHopType. */ - public static final RouteNextHopType VIRTUAL_APPLIANCE = fromString("VirtualAppliance"); + public static final RouteNextHopType VIRTUAL_APPLIANCE = new RouteNextHopType("VirtualAppliance"); /** Static value None for RouteNextHopType. */ - public static final RouteNextHopType NONE = fromString("None"); + public static final RouteNextHopType NONE = new RouteNextHopType("None"); + + private String value; /** - * Creates or finds a RouteNextHopType from its string representation. - * @param name a name to look for - * @return the corresponding RouteNextHopType + * Creates a custom value for RouteNextHopType. + * @param value the custom value */ - @JsonCreator - public static RouteNextHopType fromString(String name) { - return fromString(name, RouteNextHopType.class); + public RouteNextHopType(String value) { + this.value = value; } - /** - * @return known RouteNextHopType values - */ - public static Collection values() { - return values(RouteNextHopType.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof RouteNextHopType)) { + return false; + } + if (obj == this) { + return true; + } + RouteNextHopType rhs = (RouteNextHopType) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleAccess.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleAccess.java index d5e67a37081..bcf540e056b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleAccess.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleAccess.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for SecurityRuleAccess. */ -public final class SecurityRuleAccess extends ExpandableStringEnum { +public final class SecurityRuleAccess { /** Static value Allow for SecurityRuleAccess. */ - public static final SecurityRuleAccess ALLOW = fromString("Allow"); + public static final SecurityRuleAccess ALLOW = new SecurityRuleAccess("Allow"); /** Static value Deny for SecurityRuleAccess. */ - public static final SecurityRuleAccess DENY = fromString("Deny"); + public static final SecurityRuleAccess DENY = new SecurityRuleAccess("Deny"); + + private String value; /** - * Creates or finds a SecurityRuleAccess from its string representation. - * @param name a name to look for - * @return the corresponding SecurityRuleAccess + * Creates a custom value for SecurityRuleAccess. + * @param value the custom value */ - @JsonCreator - public static SecurityRuleAccess fromString(String name) { - return fromString(name, SecurityRuleAccess.class); + public SecurityRuleAccess(String value) { + this.value = value; } - /** - * @return known SecurityRuleAccess values - */ - public static Collection values() { - return values(SecurityRuleAccess.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof SecurityRuleAccess)) { + return false; + } + if (obj == this) { + return true; + } + SecurityRuleAccess rhs = (SecurityRuleAccess) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleDirection.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleDirection.java index 69100a07df9..ef85548cde5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleDirection.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleDirection.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for SecurityRuleDirection. */ -public final class SecurityRuleDirection extends ExpandableStringEnum { +public final class SecurityRuleDirection { /** Static value Inbound for SecurityRuleDirection. */ - public static final SecurityRuleDirection INBOUND = fromString("Inbound"); + public static final SecurityRuleDirection INBOUND = new SecurityRuleDirection("Inbound"); /** Static value Outbound for SecurityRuleDirection. */ - public static final SecurityRuleDirection OUTBOUND = fromString("Outbound"); + public static final SecurityRuleDirection OUTBOUND = new SecurityRuleDirection("Outbound"); + + private String value; /** - * Creates or finds a SecurityRuleDirection from its string representation. - * @param name a name to look for - * @return the corresponding SecurityRuleDirection + * Creates a custom value for SecurityRuleDirection. + * @param value the custom value */ - @JsonCreator - public static SecurityRuleDirection fromString(String name) { - return fromString(name, SecurityRuleDirection.class); + public SecurityRuleDirection(String value) { + this.value = value; } - /** - * @return known SecurityRuleDirection values - */ - public static Collection values() { - return values(SecurityRuleDirection.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof SecurityRuleDirection)) { + return false; + } + if (obj == this) { + return true; + } + SecurityRuleDirection rhs = (SecurityRuleDirection) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleProtocol.java index 6261d89f4bc..421d8fc478b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/SecurityRuleProtocol.java @@ -8,37 +8,55 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for SecurityRuleProtocol. */ -public final class SecurityRuleProtocol extends ExpandableStringEnum { +public final class SecurityRuleProtocol { /** Static value Tcp for SecurityRuleProtocol. */ - public static final SecurityRuleProtocol TCP = fromString("Tcp"); + public static final SecurityRuleProtocol TCP = new SecurityRuleProtocol("Tcp"); /** Static value Udp for SecurityRuleProtocol. */ - public static final SecurityRuleProtocol UDP = fromString("Udp"); + public static final SecurityRuleProtocol UDP = new SecurityRuleProtocol("Udp"); /** Static value * for SecurityRuleProtocol. */ - public static final SecurityRuleProtocol ASTERISK = fromString("*"); + public static final SecurityRuleProtocol ASTERISK = new SecurityRuleProtocol("*"); + + private String value; /** - * Creates or finds a SecurityRuleProtocol from its string representation. - * @param name a name to look for - * @return the corresponding SecurityRuleProtocol + * Creates a custom value for SecurityRuleProtocol. + * @param value the custom value */ - @JsonCreator - public static SecurityRuleProtocol fromString(String name) { - return fromString(name, SecurityRuleProtocol.class); + public SecurityRuleProtocol(String value) { + this.value = value; } - /** - * @return known SecurityRuleProtocol values - */ - public static Collection values() { - return values(SecurityRuleProtocol.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof SecurityRuleProtocol)) { + return false; + } + if (obj == this) { + return true; + } + SecurityRuleProtocol rhs = (SecurityRuleProtocol) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ServiceProviderProvisioningState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ServiceProviderProvisioningState.java index ad61376c79f..642d411c2b4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ServiceProviderProvisioningState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ServiceProviderProvisioningState.java @@ -8,40 +8,58 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for ServiceProviderProvisioningState. */ -public final class ServiceProviderProvisioningState extends ExpandableStringEnum { +public final class ServiceProviderProvisioningState { /** Static value NotProvisioned for ServiceProviderProvisioningState. */ - public static final ServiceProviderProvisioningState NOT_PROVISIONED = fromString("NotProvisioned"); + public static final ServiceProviderProvisioningState NOT_PROVISIONED = new ServiceProviderProvisioningState("NotProvisioned"); /** Static value Provisioning for ServiceProviderProvisioningState. */ - public static final ServiceProviderProvisioningState PROVISIONING = fromString("Provisioning"); + public static final ServiceProviderProvisioningState PROVISIONING = new ServiceProviderProvisioningState("Provisioning"); /** Static value Provisioned for ServiceProviderProvisioningState. */ - public static final ServiceProviderProvisioningState PROVISIONED = fromString("Provisioned"); + public static final ServiceProviderProvisioningState PROVISIONED = new ServiceProviderProvisioningState("Provisioned"); /** Static value Deprovisioning for ServiceProviderProvisioningState. */ - public static final ServiceProviderProvisioningState DEPROVISIONING = fromString("Deprovisioning"); + public static final ServiceProviderProvisioningState DEPROVISIONING = new ServiceProviderProvisioningState("Deprovisioning"); + + private String value; /** - * Creates or finds a ServiceProviderProvisioningState from its string representation. - * @param name a name to look for - * @return the corresponding ServiceProviderProvisioningState + * Creates a custom value for ServiceProviderProvisioningState. + * @param value the custom value */ - @JsonCreator - public static ServiceProviderProvisioningState fromString(String name) { - return fromString(name, ServiceProviderProvisioningState.class); + public ServiceProviderProvisioningState(String value) { + this.value = value; } - /** - * @return known ServiceProviderProvisioningState values - */ - public static Collection values() { - return values(ServiceProviderProvisioningState.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ServiceProviderProvisioningState)) { + return false; + } + if (obj == this) { + return true; + } + ServiceProviderProvisioningState rhs = (ServiceProviderProvisioningState) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Severity.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Severity.java index aef63c34bd6..6469d9cbc28 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Severity.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Severity.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for Severity. */ -public final class Severity extends ExpandableStringEnum { +public final class Severity { /** Static value Error for Severity. */ - public static final Severity ERROR = fromString("Error"); + public static final Severity ERROR = new Severity("Error"); /** Static value Warning for Severity. */ - public static final Severity WARNING = fromString("Warning"); + public static final Severity WARNING = new Severity("Warning"); + + private String value; /** - * Creates or finds a Severity from its string representation. - * @param name a name to look for - * @return the corresponding Severity + * Creates a custom value for Severity. + * @param value the custom value */ - @JsonCreator - public static Severity fromString(String name) { - return fromString(name, Severity.class); + public Severity(String value) { + this.value = value; } - /** - * @return known Severity values - */ - public static Collection values() { - return values(Severity.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof Severity)) { + return false; + } + if (obj == this) { + return true; + } + Severity rhs = (Severity) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TagsObject.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TagsObject.java deleted file mode 100644 index a22d58580db..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TagsObject.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network; - -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Tags object for patch operations. - */ -public class TagsObject { - /** - * Resource tags. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the TagsObject object itself. - */ - public TagsObject withTags(Map tags) { - this.tags = tags; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TransportProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TransportProtocol.java index aac8d9ab797..9b4141859a7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TransportProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TransportProtocol.java @@ -8,37 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for TransportProtocol. */ -public final class TransportProtocol extends ExpandableStringEnum { +public final class TransportProtocol { /** Static value Udp for TransportProtocol. */ - public static final TransportProtocol UDP = fromString("Udp"); + public static final TransportProtocol UDP = new TransportProtocol("Udp"); /** Static value Tcp for TransportProtocol. */ - public static final TransportProtocol TCP = fromString("Tcp"); + public static final TransportProtocol TCP = new TransportProtocol("Tcp"); - /** Static value All for TransportProtocol. */ - public static final TransportProtocol ALL = fromString("All"); + private String value; /** - * Creates or finds a TransportProtocol from its string representation. - * @param name a name to look for - * @return the corresponding TransportProtocol + * Creates a custom value for TransportProtocol. + * @param value the custom value */ - @JsonCreator - public static TransportProtocol fromString(String name) { - return fromString(name, TransportProtocol.class); + public TransportProtocol(String value) { + this.value = value; } - /** - * @return known TransportProtocol values - */ - public static Collection values() { - return values(TransportProtocol.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof TransportProtocol)) { + return false; + } + if (obj == this) { + return true; + } + TransportProtocol rhs = (TransportProtocol) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionStatus.java index ebbcb65f05f..349bf23dda2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionStatus.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionStatus.java @@ -8,40 +8,58 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for VirtualNetworkGatewayConnectionStatus. */ -public final class VirtualNetworkGatewayConnectionStatus extends ExpandableStringEnum { +public final class VirtualNetworkGatewayConnectionStatus { /** Static value Unknown for VirtualNetworkGatewayConnectionStatus. */ - public static final VirtualNetworkGatewayConnectionStatus UNKNOWN = fromString("Unknown"); + public static final VirtualNetworkGatewayConnectionStatus UNKNOWN = new VirtualNetworkGatewayConnectionStatus("Unknown"); /** Static value Connecting for VirtualNetworkGatewayConnectionStatus. */ - public static final VirtualNetworkGatewayConnectionStatus CONNECTING = fromString("Connecting"); + public static final VirtualNetworkGatewayConnectionStatus CONNECTING = new VirtualNetworkGatewayConnectionStatus("Connecting"); /** Static value Connected for VirtualNetworkGatewayConnectionStatus. */ - public static final VirtualNetworkGatewayConnectionStatus CONNECTED = fromString("Connected"); + public static final VirtualNetworkGatewayConnectionStatus CONNECTED = new VirtualNetworkGatewayConnectionStatus("Connected"); /** Static value NotConnected for VirtualNetworkGatewayConnectionStatus. */ - public static final VirtualNetworkGatewayConnectionStatus NOT_CONNECTED = fromString("NotConnected"); + public static final VirtualNetworkGatewayConnectionStatus NOT_CONNECTED = new VirtualNetworkGatewayConnectionStatus("NotConnected"); + + private String value; /** - * Creates or finds a VirtualNetworkGatewayConnectionStatus from its string representation. - * @param name a name to look for - * @return the corresponding VirtualNetworkGatewayConnectionStatus + * Creates a custom value for VirtualNetworkGatewayConnectionStatus. + * @param value the custom value */ - @JsonCreator - public static VirtualNetworkGatewayConnectionStatus fromString(String name) { - return fromString(name, VirtualNetworkGatewayConnectionStatus.class); + public VirtualNetworkGatewayConnectionStatus(String value) { + this.value = value; } - /** - * @return known VirtualNetworkGatewayConnectionStatus values - */ - public static Collection values() { - return values(VirtualNetworkGatewayConnectionStatus.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof VirtualNetworkGatewayConnectionStatus)) { + return false; + } + if (obj == this) { + return true; + } + VirtualNetworkGatewayConnectionStatus rhs = (VirtualNetworkGatewayConnectionStatus) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionType.java index 476cddd4096..8f87ef1613d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionType.java @@ -8,40 +8,58 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for VirtualNetworkGatewayConnectionType. */ -public final class VirtualNetworkGatewayConnectionType extends ExpandableStringEnum { +public final class VirtualNetworkGatewayConnectionType { /** Static value IPsec for VirtualNetworkGatewayConnectionType. */ - public static final VirtualNetworkGatewayConnectionType IPSEC = fromString("IPsec"); + public static final VirtualNetworkGatewayConnectionType IPSEC = new VirtualNetworkGatewayConnectionType("IPsec"); /** Static value Vnet2Vnet for VirtualNetworkGatewayConnectionType. */ - public static final VirtualNetworkGatewayConnectionType VNET2VNET = fromString("Vnet2Vnet"); + public static final VirtualNetworkGatewayConnectionType VNET2VNET = new VirtualNetworkGatewayConnectionType("Vnet2Vnet"); /** Static value ExpressRoute for VirtualNetworkGatewayConnectionType. */ - public static final VirtualNetworkGatewayConnectionType EXPRESS_ROUTE = fromString("ExpressRoute"); + public static final VirtualNetworkGatewayConnectionType EXPRESS_ROUTE = new VirtualNetworkGatewayConnectionType("ExpressRoute"); /** Static value VPNClient for VirtualNetworkGatewayConnectionType. */ - public static final VirtualNetworkGatewayConnectionType VPNCLIENT = fromString("VPNClient"); + public static final VirtualNetworkGatewayConnectionType VPNCLIENT = new VirtualNetworkGatewayConnectionType("VPNClient"); + + private String value; /** - * Creates or finds a VirtualNetworkGatewayConnectionType from its string representation. - * @param name a name to look for - * @return the corresponding VirtualNetworkGatewayConnectionType + * Creates a custom value for VirtualNetworkGatewayConnectionType. + * @param value the custom value */ - @JsonCreator - public static VirtualNetworkGatewayConnectionType fromString(String name) { - return fromString(name, VirtualNetworkGatewayConnectionType.class); + public VirtualNetworkGatewayConnectionType(String value) { + this.value = value; } - /** - * @return known VirtualNetworkGatewayConnectionType values - */ - public static Collection values() { - return values(VirtualNetworkGatewayConnectionType.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof VirtualNetworkGatewayConnectionType)) { + return false; + } + if (obj == this) { + return true; + } + VirtualNetworkGatewayConnectionType rhs = (VirtualNetworkGatewayConnectionType) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuName.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuName.java index 5063df10008..568790fde40 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuName.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuName.java @@ -8,49 +8,67 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for VirtualNetworkGatewaySkuName. */ -public final class VirtualNetworkGatewaySkuName extends ExpandableStringEnum { +public final class VirtualNetworkGatewaySkuName { /** Static value Basic for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName BASIC = fromString("Basic"); + public static final VirtualNetworkGatewaySkuName BASIC = new VirtualNetworkGatewaySkuName("Basic"); /** Static value HighPerformance for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName HIGH_PERFORMANCE = fromString("HighPerformance"); + public static final VirtualNetworkGatewaySkuName HIGH_PERFORMANCE = new VirtualNetworkGatewaySkuName("HighPerformance"); /** Static value Standard for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName STANDARD = fromString("Standard"); + public static final VirtualNetworkGatewaySkuName STANDARD = new VirtualNetworkGatewaySkuName("Standard"); /** Static value UltraPerformance for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName ULTRA_PERFORMANCE = fromString("UltraPerformance"); + public static final VirtualNetworkGatewaySkuName ULTRA_PERFORMANCE = new VirtualNetworkGatewaySkuName("UltraPerformance"); /** Static value VpnGw1 for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName VPN_GW1 = fromString("VpnGw1"); + public static final VirtualNetworkGatewaySkuName VPN_GW1 = new VirtualNetworkGatewaySkuName("VpnGw1"); /** Static value VpnGw2 for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName VPN_GW2 = fromString("VpnGw2"); + public static final VirtualNetworkGatewaySkuName VPN_GW2 = new VirtualNetworkGatewaySkuName("VpnGw2"); /** Static value VpnGw3 for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName VPN_GW3 = fromString("VpnGw3"); + public static final VirtualNetworkGatewaySkuName VPN_GW3 = new VirtualNetworkGatewaySkuName("VpnGw3"); + + private String value; /** - * Creates or finds a VirtualNetworkGatewaySkuName from its string representation. - * @param name a name to look for - * @return the corresponding VirtualNetworkGatewaySkuName + * Creates a custom value for VirtualNetworkGatewaySkuName. + * @param value the custom value */ - @JsonCreator - public static VirtualNetworkGatewaySkuName fromString(String name) { - return fromString(name, VirtualNetworkGatewaySkuName.class); + public VirtualNetworkGatewaySkuName(String value) { + this.value = value; } - /** - * @return known VirtualNetworkGatewaySkuName values - */ - public static Collection values() { - return values(VirtualNetworkGatewaySkuName.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof VirtualNetworkGatewaySkuName)) { + return false; + } + if (obj == this) { + return true; + } + VirtualNetworkGatewaySkuName rhs = (VirtualNetworkGatewaySkuName) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuTier.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuTier.java index 0672fff53ab..11917e628d6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuTier.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaySkuTier.java @@ -8,49 +8,67 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for VirtualNetworkGatewaySkuTier. */ -public final class VirtualNetworkGatewaySkuTier extends ExpandableStringEnum { +public final class VirtualNetworkGatewaySkuTier { /** Static value Basic for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier BASIC = fromString("Basic"); + public static final VirtualNetworkGatewaySkuTier BASIC = new VirtualNetworkGatewaySkuTier("Basic"); /** Static value HighPerformance for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier HIGH_PERFORMANCE = fromString("HighPerformance"); + public static final VirtualNetworkGatewaySkuTier HIGH_PERFORMANCE = new VirtualNetworkGatewaySkuTier("HighPerformance"); /** Static value Standard for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier STANDARD = fromString("Standard"); + public static final VirtualNetworkGatewaySkuTier STANDARD = new VirtualNetworkGatewaySkuTier("Standard"); /** Static value UltraPerformance for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier ULTRA_PERFORMANCE = fromString("UltraPerformance"); + public static final VirtualNetworkGatewaySkuTier ULTRA_PERFORMANCE = new VirtualNetworkGatewaySkuTier("UltraPerformance"); /** Static value VpnGw1 for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier VPN_GW1 = fromString("VpnGw1"); + public static final VirtualNetworkGatewaySkuTier VPN_GW1 = new VirtualNetworkGatewaySkuTier("VpnGw1"); /** Static value VpnGw2 for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier VPN_GW2 = fromString("VpnGw2"); + public static final VirtualNetworkGatewaySkuTier VPN_GW2 = new VirtualNetworkGatewaySkuTier("VpnGw2"); /** Static value VpnGw3 for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier VPN_GW3 = fromString("VpnGw3"); + public static final VirtualNetworkGatewaySkuTier VPN_GW3 = new VirtualNetworkGatewaySkuTier("VpnGw3"); + + private String value; /** - * Creates or finds a VirtualNetworkGatewaySkuTier from its string representation. - * @param name a name to look for - * @return the corresponding VirtualNetworkGatewaySkuTier + * Creates a custom value for VirtualNetworkGatewaySkuTier. + * @param value the custom value */ - @JsonCreator - public static VirtualNetworkGatewaySkuTier fromString(String name) { - return fromString(name, VirtualNetworkGatewaySkuTier.class); + public VirtualNetworkGatewaySkuTier(String value) { + this.value = value; } - /** - * @return known VirtualNetworkGatewaySkuTier values - */ - public static Collection values() { - return values(VirtualNetworkGatewaySkuTier.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof VirtualNetworkGatewaySkuTier)) { + return false; + } + if (obj == this) { + return true; + } + VirtualNetworkGatewaySkuTier rhs = (VirtualNetworkGatewaySkuTier) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayType.java index ffa7be90f28..8dfcac42d67 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayType.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for VirtualNetworkGatewayType. */ -public final class VirtualNetworkGatewayType extends ExpandableStringEnum { +public final class VirtualNetworkGatewayType { /** Static value Vpn for VirtualNetworkGatewayType. */ - public static final VirtualNetworkGatewayType VPN = fromString("Vpn"); + public static final VirtualNetworkGatewayType VPN = new VirtualNetworkGatewayType("Vpn"); /** Static value ExpressRoute for VirtualNetworkGatewayType. */ - public static final VirtualNetworkGatewayType EXPRESS_ROUTE = fromString("ExpressRoute"); + public static final VirtualNetworkGatewayType EXPRESS_ROUTE = new VirtualNetworkGatewayType("ExpressRoute"); + + private String value; /** - * Creates or finds a VirtualNetworkGatewayType from its string representation. - * @param name a name to look for - * @return the corresponding VirtualNetworkGatewayType + * Creates a custom value for VirtualNetworkGatewayType. + * @param value the custom value */ - @JsonCreator - public static VirtualNetworkGatewayType fromString(String name) { - return fromString(name, VirtualNetworkGatewayType.class); + public VirtualNetworkGatewayType(String value) { + this.value = value; } - /** - * @return known VirtualNetworkGatewayType values - */ - public static Collection values() { - return values(VirtualNetworkGatewayType.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof VirtualNetworkGatewayType)) { + return false; + } + if (obj == this) { + return true; + } + VirtualNetworkGatewayType rhs = (VirtualNetworkGatewayType) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkPeeringState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkPeeringState.java index bcb267dfa83..9dde89237c2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkPeeringState.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkPeeringState.java @@ -8,37 +8,55 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for VirtualNetworkPeeringState. */ -public final class VirtualNetworkPeeringState extends ExpandableStringEnum { +public final class VirtualNetworkPeeringState { /** Static value Initiated for VirtualNetworkPeeringState. */ - public static final VirtualNetworkPeeringState INITIATED = fromString("Initiated"); + public static final VirtualNetworkPeeringState INITIATED = new VirtualNetworkPeeringState("Initiated"); /** Static value Connected for VirtualNetworkPeeringState. */ - public static final VirtualNetworkPeeringState CONNECTED = fromString("Connected"); + public static final VirtualNetworkPeeringState CONNECTED = new VirtualNetworkPeeringState("Connected"); /** Static value Disconnected for VirtualNetworkPeeringState. */ - public static final VirtualNetworkPeeringState DISCONNECTED = fromString("Disconnected"); + public static final VirtualNetworkPeeringState DISCONNECTED = new VirtualNetworkPeeringState("Disconnected"); + + private String value; /** - * Creates or finds a VirtualNetworkPeeringState from its string representation. - * @param name a name to look for - * @return the corresponding VirtualNetworkPeeringState + * Creates a custom value for VirtualNetworkPeeringState. + * @param value the custom value */ - @JsonCreator - public static VirtualNetworkPeeringState fromString(String name) { - return fromString(name, VirtualNetworkPeeringState.class); + public VirtualNetworkPeeringState(String value) { + this.value = value; } - /** - * @return known VirtualNetworkPeeringState values - */ - public static Collection values() { - return values(VirtualNetworkPeeringState.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof VirtualNetworkPeeringState)) { + return false; + } + if (obj == this) { + return true; + } + VirtualNetworkPeeringState rhs = (VirtualNetworkPeeringState) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientConfiguration.java index 0c6f95e17a6..0a2d18612b8 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientConfiguration.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientConfiguration.java @@ -42,12 +42,6 @@ public class VpnClientConfiguration { @JsonProperty(value = "vpnClientProtocols") private List vpnClientProtocols; - /** - * VpnClientIpsecPolicies for virtual network gateway P2S client. - */ - @JsonProperty(value = "vpnClientIpsecPolicies") - private List vpnClientIpsecPolicies; - /** * The radius server address property of the VirtualNetworkGateway resource * for vpn client connection. @@ -142,26 +136,6 @@ public VpnClientConfiguration withVpnClientProtocols(List vpn return this; } - /** - * Get the vpnClientIpsecPolicies value. - * - * @return the vpnClientIpsecPolicies value - */ - public List vpnClientIpsecPolicies() { - return this.vpnClientIpsecPolicies; - } - - /** - * Set the vpnClientIpsecPolicies value. - * - * @param vpnClientIpsecPolicies the vpnClientIpsecPolicies value to set - * @return the VpnClientConfiguration object itself. - */ - public VpnClientConfiguration withVpnClientIpsecPolicies(List vpnClientIpsecPolicies) { - this.vpnClientIpsecPolicies = vpnClientIpsecPolicies; - return this; - } - /** * Get the radiusServerAddress value. * diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientProtocol.java index a7fe2adcbb7..ba668e8b825 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnClientProtocol.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for VpnClientProtocol. */ -public final class VpnClientProtocol extends ExpandableStringEnum { +public final class VpnClientProtocol { /** Static value IkeV2 for VpnClientProtocol. */ - public static final VpnClientProtocol IKE_V2 = fromString("IkeV2"); + public static final VpnClientProtocol IKE_V2 = new VpnClientProtocol("IkeV2"); /** Static value SSTP for VpnClientProtocol. */ - public static final VpnClientProtocol SSTP = fromString("SSTP"); + public static final VpnClientProtocol SSTP = new VpnClientProtocol("SSTP"); + + private String value; /** - * Creates or finds a VpnClientProtocol from its string representation. - * @param name a name to look for - * @return the corresponding VpnClientProtocol + * Creates a custom value for VpnClientProtocol. + * @param value the custom value */ - @JsonCreator - public static VpnClientProtocol fromString(String name) { - return fromString(name, VpnClientProtocol.class); + public VpnClientProtocol(String value) { + this.value = value; } - /** - * @return known VpnClientProtocol values - */ - public static Collection values() { - return values(VpnClientProtocol.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof VpnClientProtocol)) { + return false; + } + if (obj == this) { + return true; + } + VpnClientProtocol rhs = (VpnClientProtocol) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnType.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnType.java index f1d84d48518..2c2ceb07d4f 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnType.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VpnType.java @@ -8,34 +8,52 @@ package com.microsoft.azure.management.network; -import java.util.Collection; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.microsoft.rest.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonValue; /** * Defines values for VpnType. */ -public final class VpnType extends ExpandableStringEnum { +public final class VpnType { /** Static value PolicyBased for VpnType. */ - public static final VpnType POLICY_BASED = fromString("PolicyBased"); + public static final VpnType POLICY_BASED = new VpnType("PolicyBased"); /** Static value RouteBased for VpnType. */ - public static final VpnType ROUTE_BASED = fromString("RouteBased"); + public static final VpnType ROUTE_BASED = new VpnType("RouteBased"); + + private String value; /** - * Creates or finds a VpnType from its string representation. - * @param name a name to look for - * @return the corresponding VpnType + * Creates a custom value for VpnType. + * @param value the custom value */ - @JsonCreator - public static VpnType fromString(String name) { - return fromString(name, VpnType.class); + public VpnType(String value) { + this.value = value; } - /** - * @return known VpnType values - */ - public static Collection values() { - return values(VpnType.class); + @JsonValue + @Override + public String toString() { + return value; + } + + @Override + public int hashCode() { + return value.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof VpnType)) { + return false; + } + if (obj == this) { + return true; + } + VpnType rhs = (VpnType) obj; + if (value == null) { + return rhs.value == null; + } else { + return value.equals(rhs.value); + } } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayInner.java index 0919888ac9c..a0c8e765efe 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewayInner.java @@ -119,12 +119,6 @@ public class ApplicationGatewayInner extends Resource { @JsonProperty(value = "properties.webApplicationFirewallConfiguration") private ApplicationGatewayWebApplicationFirewallConfiguration webApplicationFirewallConfiguration; - /** - * Whether HTTP2 is enabled on the application gateway resource. - */ - @JsonProperty(value = "properties.enableHttp2") - private Boolean enableHttp2; - /** * Resource GUID property of the application gateway resource. */ @@ -144,6 +138,12 @@ public class ApplicationGatewayInner extends Resource { @JsonProperty(value = "etag") private String etag; + /** + * A list of availability zones denoting where the resource needs to come from.. + */ + @JsonProperty(value = "zones") + private List zones; + /** * Get the sku value. * @@ -453,26 +453,6 @@ public ApplicationGatewayInner withWebApplicationFirewallConfiguration(Applicati return this; } - /** - * Get the enableHttp2 value. - * - * @return the enableHttp2 value - */ - public Boolean enableHttp2() { - return this.enableHttp2; - } - - /** - * Set the enableHttp2 value. - * - * @param enableHttp2 the enableHttp2 value to set - * @return the ApplicationGatewayInner object itself. - */ - public ApplicationGatewayInner withEnableHttp2(Boolean enableHttp2) { - this.enableHttp2 = enableHttp2; - return this; - } - /** * Get the resourceGuid value. * @@ -533,4 +513,23 @@ public ApplicationGatewayInner withEtag(String etag) { return this; } + /** + * Get the zones value. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones value. + * + * @param zones the zones value to set + * @return the ApplicationGatewayInner object itself. + */ + public ApplicationGatewayInner withZones(List zones) { + this.zones = zones; + return this; + } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewaysInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewaysInner.java index b6b4b20956d..54f92882cdf 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewaysInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewaysInner.java @@ -10,12 +10,12 @@ import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; +import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -24,14 +24,12 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; @@ -45,7 +43,7 @@ * An instance of this class provides access to all the operations defined * in ApplicationGateways. */ -public class ApplicationGatewaysInner implements InnerSupportsGet, InnerSupportsDelete { +public class ApplicationGatewaysInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private ApplicationGatewaysService service; /** The service client containing this operation class. */ @@ -87,21 +85,13 @@ interface ApplicationGatewaysService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Body ApplicationGatewayInner 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.ApplicationGateways updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ApplicationGateways beginUpdateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}") - Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("applicationGatewayName") String applicationGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ApplicationGateways listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways") Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.ApplicationGateways listAll" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ApplicationGateways list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways") - Observable> listAll(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> list(@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.ApplicationGateways start" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start") @@ -147,9 +137,9 @@ interface ApplicationGatewaysService { @GET Observable> listByResourceGroupNext(@Url String nextUrl, @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.ApplicationGateways listAllNext" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ApplicationGateways listNext" }) @GET - Observable> listAllNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listNext(@Url String nextUrl, @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.ApplicationGateways listAvailableSslPredefinedPoliciesNext" }) @GET @@ -218,10 +208,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -286,10 +274,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -305,9 +291,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) .register(204, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -374,10 +360,8 @@ public Observable> getByResourceGroupWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -467,11 +451,9 @@ public Observable> createOrUpdateWithSe if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -544,11 +526,9 @@ public Observable> beginCreateOrUpdateW if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -564,329 +544,7 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application 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 - * @return the ApplicationGatewayInner object if successful. - */ - public ApplicationGatewayInner updateTags(String resourceGroupName, String applicationGatewayName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().last().body(); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application 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 updateTagsAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String applicationGatewayName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, ApplicationGatewayInner>() { - @Override - public ApplicationGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (applicationGatewayName == null) { - throw new IllegalArgumentException("Parameter applicationGatewayName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - Observable> observable = service.updateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param tags Resource tags. - * @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 - * @return the ApplicationGatewayInner object if successful. - */ - public ApplicationGatewayInner updateTags(String resourceGroupName, String applicationGatewayName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags).toBlocking().last().body(); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param tags Resource tags. - * @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 updateTagsAsync(String resourceGroupName, String applicationGatewayName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags), serviceCallback); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String applicationGatewayName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags).map(new Func1, ApplicationGatewayInner>() { - @Override - public ApplicationGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (applicationGatewayName == null) { - throw new IllegalArgumentException("Parameter applicationGatewayName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - Observable> observable = service.updateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application 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 - * @return the ApplicationGatewayInner object if successful. - */ - public ApplicationGatewayInner beginUpdateTags(String resourceGroupName, String applicationGatewayName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body(); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application 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 beginUpdateTagsAsync(String resourceGroupName, String applicationGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName), serviceCallback); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApplicationGatewayInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String applicationGatewayName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName).map(new Func1, ApplicationGatewayInner>() { - @Override - public ApplicationGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApplicationGatewayInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (applicationGatewayName == null) { - throw new IllegalArgumentException("Parameter applicationGatewayName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - return service.beginUpdateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param tags Resource tags. - * @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 - * @return the ApplicationGatewayInner object if successful. - */ - public ApplicationGatewayInner beginUpdateTags(String resourceGroupName, String applicationGatewayName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags).toBlocking().single().body(); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param tags Resource tags. - * @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 beginUpdateTagsAsync(String resourceGroupName, String applicationGatewayName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags), serviceCallback); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApplicationGatewayInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String applicationGatewayName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, applicationGatewayName, tags).map(new Func1, ApplicationGatewayInner>() { - @Override - public ApplicationGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates the specified application gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param applicationGatewayName The name of the application gateway. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApplicationGatewayInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String applicationGatewayName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (applicationGatewayName == null) { - throw new IllegalArgumentException("Parameter applicationGatewayName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - return service.beginUpdateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -983,10 +641,8 @@ public Observable>> listByResource if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1015,12 +671,12 @@ private ServiceResponse> listByResourceGroupDe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<ApplicationGatewayInner> object if successful. */ - public PagedList listAll() { - ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -1032,13 +688,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAllAsync(final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listAllSinglePageAsync(), + listSinglePageAsync(), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -1050,8 +706,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ApplicationGatewayInner> object */ - public Observable> listAllAsync() { - return listAllWithServiceResponseAsync() + public Observable> listAsync() { + return listWithServiceResponseAsync() .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1066,8 +722,8 @@ public Page call(ServiceResponse>> listAllWithServiceResponseAsync() { - return listAllSinglePageAsync() + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1075,7 +731,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -1086,19 +742,17 @@ public Observable>> call(ServiceRe * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ApplicationGatewayInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listAllSinglePageAsync() { + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listAll(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listAllDelegate(response); + ServiceResponse> result = listDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1107,7 +761,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -1175,10 +829,8 @@ public Observable> startWithServiceResponseAsync(String re if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.start(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.start(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1243,10 +895,8 @@ public Observable> beginStartWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginStart(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginStart(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1329,10 +979,8 @@ public Observable> stopWithServiceResponseAsync(String res if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.stop(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.stop(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1397,10 +1045,8 @@ public Observable> beginStopWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginStop(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginStop(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1484,11 +1130,9 @@ public Observable> backend if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; final String expand = null; - Observable> observable = service.backendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.backendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** @@ -1557,10 +1201,8 @@ public Observable> backend if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.backendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.backendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1626,11 +1268,9 @@ public Observable> beginBa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; final String expand = null; - return service.beginBackendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginBackendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1710,10 +1350,8 @@ public Observable> beginBa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginBackendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginBackendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1783,10 +1421,8 @@ public Observable, Observable>>() { @Override public Observable> call(Response response) { @@ -1855,10 +1491,8 @@ public Observable> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listAvailableSslOptions(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listAvailableSslOptions(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1962,10 +1596,8 @@ public Observable, Observable>>>() { @Override public Observable>> call(Response response) { @@ -2041,10 +1673,8 @@ public Observable> g if (predefinedPolicyName == null) { throw new IllegalArgumentException("Parameter predefinedPolicyName is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSslPredefinedPolicy(this.client.subscriptionId(), predefinedPolicyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getSslPredefinedPolicy(this.client.subscriptionId(), predefinedPolicyName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -2185,12 +1815,12 @@ private ServiceResponse> listByResourceGroupNe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<ApplicationGatewayInner> object if successful. */ - public PagedList listAllNext(final String nextPageLink) { - ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -2204,13 +1834,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAllNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listAllNextSinglePageAsync(nextPageLink), + listNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -2223,8 +1853,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ApplicationGatewayInner> object */ - public Observable> listAllNextAsync(final String nextPageLink) { - return listAllNextWithServiceResponseAsync(nextPageLink) + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -2240,8 +1870,8 @@ public Page call(ServiceResponse>> listAllNextWithServiceResponseAsync(final String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink) + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -2249,7 +1879,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -2261,17 +1891,17 @@ public Observable>> call(ServiceRe * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ApplicationGatewayInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listAllNextSinglePageAsync(final String nextPageLink) { + public Observable>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); - return service.listAllNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listAllNextDelegate(response); + ServiceResponse> result = listNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -2280,7 +1910,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupInner.java deleted file mode 100644 index 6bf08b666f0..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupInner.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * An application security group in a resource group. - */ -@JsonFlatten -public class ApplicationSecurityGroupInner extends Resource { - /** - * The resource GUID property of the application security group resource. - * It uniquely identifies a resource, even if the user changes its name or - * migrate the resource across subscriptions or resource groups. - */ - @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) - private String resourceGuid; - - /** - * The provisioning state of the application security group resource. - * Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * A unique read-only string that changes whenever the resource is updated. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /** - * Get the resourceGuid value. - * - * @return the resourceGuid value - */ - public String resourceGuid() { - return this.resourceGuid; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupsInner.java deleted file mode 100644 index d6a494a66ae..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupsInner.java +++ /dev/null @@ -1,962 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ApplicationSecurityGroups. - */ -public class ApplicationSecurityGroupsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { - /** The Retrofit service to perform REST calls. */ - private ApplicationSecurityGroupsService service; - /** The service client containing this operation class. */ - private NetworkManagementClientImpl client; - - /** - * Initializes an instance of ApplicationSecurityGroupsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApplicationSecurityGroupsInner(Retrofit retrofit, NetworkManagementClientImpl client) { - this.service = retrofit.create(ApplicationSecurityGroupsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationSecurityGroups to be - * used by Retrofit to perform actually REST calls. - */ - interface ApplicationSecurityGroupsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ApplicationSecurityGroups delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @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.ApplicationSecurityGroups beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @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.ApplicationSecurityGroups getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @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.ApplicationSecurityGroups createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Body ApplicationSecurityGroupInner 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.ApplicationSecurityGroups beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("applicationSecurityGroupName") String applicationSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Body ApplicationSecurityGroupInner 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.ApplicationSecurityGroups list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups") - Observable> list(@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.ApplicationSecurityGroups listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.ApplicationSecurityGroups listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @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.ApplicationSecurityGroups listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Deletes the specified application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @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 delete(String resourceGroupName, String applicationSecurityGroupName) { - deleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).toBlocking().last().body(); - } - - /** - * Deletes the specified application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @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 deleteAsync(String resourceGroupName, String applicationSecurityGroupName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName), serviceCallback); - } - - /** - * Deletes the specified application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String applicationSecurityGroupName) { - return deleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (applicationSecurityGroupName == null) { - throw new IllegalArgumentException("Parameter applicationSecurityGroupName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes the specified application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @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 beginDelete(String resourceGroupName, String applicationSecurityGroupName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).toBlocking().single().body(); - } - - /** - * Deletes the specified application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @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 beginDeleteAsync(String resourceGroupName, String applicationSecurityGroupName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName), serviceCallback); - } - - /** - * Deletes the specified application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String applicationSecurityGroupName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (applicationSecurityGroupName == null) { - throw new IllegalArgumentException("Parameter applicationSecurityGroupName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(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()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets information about the specified application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @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 - * @return the ApplicationSecurityGroupInner object if successful. - */ - public ApplicationSecurityGroupInner getByResourceGroup(String resourceGroupName, String applicationSecurityGroupName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).toBlocking().single().body(); - } - - /** - * Gets information about the specified application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @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 getByResourceGroupAsync(String resourceGroupName, String applicationSecurityGroupName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName), serviceCallback); - } - - /** - * Gets information about the specified application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApplicationSecurityGroupInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String applicationSecurityGroupName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName).map(new Func1, ApplicationSecurityGroupInner>() { - @Override - public ApplicationSecurityGroupInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets information about the specified application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApplicationSecurityGroupInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (applicationSecurityGroupName == null) { - throw new IllegalArgumentException("Parameter applicationSecurityGroupName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates an application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. - * @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 - * @return the ApplicationSecurityGroupInner object if successful. - */ - public ApplicationSecurityGroupInner createOrUpdate(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).toBlocking().last().body(); - } - - /** - * Creates or updates an application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. - * @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 createOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters), serviceCallback); - } - - /** - * Creates or updates an application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).map(new Func1, ApplicationSecurityGroupInner>() { - @Override - public ApplicationSecurityGroupInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (applicationSecurityGroupName == null) { - throw new IllegalArgumentException("Parameter applicationSecurityGroupName 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates or updates an application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. - * @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 - * @return the ApplicationSecurityGroupInner object if successful. - */ - public ApplicationSecurityGroupInner beginCreateOrUpdate(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates an application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. - * @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 beginCreateOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters), serviceCallback); - } - - /** - * Creates or updates an application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApplicationSecurityGroupInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationSecurityGroupName, parameters).map(new Func1, ApplicationSecurityGroupInner>() { - @Override - public ApplicationSecurityGroupInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates an application security group. - * - * @param resourceGroupName The name of the resource group. - * @param applicationSecurityGroupName The name of the application security group. - * @param parameters Parameters supplied to the create or update ApplicationSecurityGroup operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ApplicationSecurityGroupInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String applicationSecurityGroupName, ApplicationSecurityGroupInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (applicationSecurityGroupName == null) { - throw new IllegalArgumentException("Parameter applicationSecurityGroupName 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all application security groups in a subscription. - * - * @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 - * @return the PagedList<ApplicationSecurityGroupInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all application security groups in a subscription. - * - * @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> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all application security groups in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationSecurityGroupInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all application security groups in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationSecurityGroupInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all application security groups in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApplicationSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the application security groups in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @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 - * @return the PagedList<ApplicationSecurityGroupInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the application security groups in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the application security groups in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationSecurityGroupInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the application security groups in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationSecurityGroupInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the application security groups in a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApplicationSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all application security groups in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @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 - * @return the PagedList<ApplicationSecurityGroupInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all application security groups in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @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> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all application security groups in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationSecurityGroupInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all application security groups in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationSecurityGroupInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all application security groups in a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApplicationSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the application security groups in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @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 - * @return the PagedList<ApplicationSecurityGroupInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the application security groups in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the application security groups in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationSecurityGroupInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the application security groups in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationSecurityGroupInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the application security groups in a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApplicationSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableEndpointServicesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableEndpointServicesInner.java deleted file mode 100644 index 3194b642a76..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableEndpointServicesInner.java +++ /dev/null @@ -1,295 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in AvailableEndpointServices. - */ -public class AvailableEndpointServicesInner { - /** The Retrofit service to perform REST calls. */ - private AvailableEndpointServicesService service; - /** The service client containing this operation class. */ - private NetworkManagementClientImpl client; - - /** - * Initializes an instance of AvailableEndpointServicesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public AvailableEndpointServicesInner(Retrofit retrofit, NetworkManagementClientImpl client) { - this.service = retrofit.create(AvailableEndpointServicesService.class); - this.client = client; - } - - /** - * The interface defining all the services for AvailableEndpointServices to be - * used by Retrofit to perform actually REST calls. - */ - interface AvailableEndpointServicesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.AvailableEndpointServices list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices") - Observable> list(@Path("location") String location, @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.AvailableEndpointServices listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List what values of endpoint services are available for use. - * - * @param location The location to check available endpoint services. - * @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 - * @return the PagedList<EndpointServiceResultInner> object if successful. - */ - public PagedList list(final String location) { - ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List what values of endpoint services are available for use. - * - * @param location The location to check available endpoint services. - * @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> listAsync(final String location, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(location), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List what values of endpoint services are available for use. - * - * @param location The location to check available endpoint services. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EndpointServiceResultInner> object - */ - public Observable> listAsync(final String location) { - return listWithServiceResponseAsync(location) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List what values of endpoint services are available for use. - * - * @param location The location to check available endpoint services. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EndpointServiceResultInner> object - */ - public Observable>> listWithServiceResponseAsync(final String location) { - return listSinglePageAsync(location) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List what values of endpoint services are available for use. - * - ServiceResponse> * @param location The location to check available endpoint services. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EndpointServiceResultInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String location) { - if (location == null) { - throw new IllegalArgumentException("Parameter location 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(location, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * List what values of endpoint services are available for use. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @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 - * @return the PagedList<EndpointServiceResultInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List what values of endpoint services are available for use. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @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> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List what values of endpoint services are available for use. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EndpointServiceResultInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List what values of endpoint services are available for use. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EndpointServiceResultInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List what values of endpoint services are available for use. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EndpointServiceResultInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListInner.java deleted file mode 100644 index 214a415d5f7..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListInner.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import java.util.List; -import com.microsoft.azure.management.network.AvailableProvidersListCountry; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * List of available countries with details. - */ -public class AvailableProvidersListInner { - /** - * List of available countries. - */ - @JsonProperty(value = "countries", required = true) - private List countries; - - /** - * Get the countries value. - * - * @return the countries value - */ - public List countries() { - return this.countries; - } - - /** - * Set the countries value. - * - * @param countries the countries value to set - * @return the AvailableProvidersListInner object itself. - */ - public AvailableProvidersListInner withCountries(List countries) { - this.countries = countries; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListParametersInner.java deleted file mode 100644 index fd4bebfa759..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListParametersInner.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Constraints that determine the list of available Internet service providers. - */ -public class AvailableProvidersListParametersInner { - /** - * A list of Azure regions. - */ - @JsonProperty(value = "azureLocations") - private List azureLocations; - - /** - * The country for available providers list. - */ - @JsonProperty(value = "country") - private String country; - - /** - * The state for available providers list. - */ - @JsonProperty(value = "state") - private String state; - - /** - * The city or town for available providers list. - */ - @JsonProperty(value = "city") - private String city; - - /** - * Get the azureLocations value. - * - * @return the azureLocations value - */ - public List azureLocations() { - return this.azureLocations; - } - - /** - * Set the azureLocations value. - * - * @param azureLocations the azureLocations value to set - * @return the AvailableProvidersListParametersInner object itself. - */ - public AvailableProvidersListParametersInner withAzureLocations(List azureLocations) { - this.azureLocations = azureLocations; - return this; - } - - /** - * Get the country value. - * - * @return the country value - */ - public String country() { - return this.country; - } - - /** - * Set the country value. - * - * @param country the country value to set - * @return the AvailableProvidersListParametersInner object itself. - */ - public AvailableProvidersListParametersInner withCountry(String country) { - this.country = country; - return this; - } - - /** - * Get the state value. - * - * @return the state value - */ - public String state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the AvailableProvidersListParametersInner object itself. - */ - public AvailableProvidersListParametersInner withState(String state) { - this.state = state; - return this; - } - - /** - * Get the city value. - * - * @return the city value - */ - public String city() { - return this.city; - } - - /** - * Set the city value. - * - * @param city the city value to set - * @return the AvailableProvidersListParametersInner object itself. - */ - public AvailableProvidersListParametersInner withCity(String city) { - this.city = city; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportInner.java deleted file mode 100644 index 35d0d33ce38..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportInner.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.microsoft.azure.management.network.AzureReachabilityReportLocation; -import java.util.List; -import com.microsoft.azure.management.network.AzureReachabilityReportItem; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Azure reachability report details. - */ -public class AzureReachabilityReportInner { - /** - * The aggregation level of Azure reachability report. Can be Country, - * State or City. - */ - @JsonProperty(value = "aggregationLevel", required = true) - private String aggregationLevel; - - /** - * The providerLocation property. - */ - @JsonProperty(value = "providerLocation", required = true) - private AzureReachabilityReportLocation providerLocation; - - /** - * List of Azure reachability report items. - */ - @JsonProperty(value = "reachabilityReport", required = true) - private List reachabilityReport; - - /** - * Get the aggregationLevel value. - * - * @return the aggregationLevel value - */ - public String aggregationLevel() { - return this.aggregationLevel; - } - - /** - * Set the aggregationLevel value. - * - * @param aggregationLevel the aggregationLevel value to set - * @return the AzureReachabilityReportInner object itself. - */ - public AzureReachabilityReportInner withAggregationLevel(String aggregationLevel) { - this.aggregationLevel = aggregationLevel; - return this; - } - - /** - * Get the providerLocation value. - * - * @return the providerLocation value - */ - public AzureReachabilityReportLocation providerLocation() { - return this.providerLocation; - } - - /** - * Set the providerLocation value. - * - * @param providerLocation the providerLocation value to set - * @return the AzureReachabilityReportInner object itself. - */ - public AzureReachabilityReportInner withProviderLocation(AzureReachabilityReportLocation providerLocation) { - this.providerLocation = providerLocation; - return this; - } - - /** - * Get the reachabilityReport value. - * - * @return the reachabilityReport value - */ - public List reachabilityReport() { - return this.reachabilityReport; - } - - /** - * Set the reachabilityReport value. - * - * @param reachabilityReport the reachabilityReport value to set - * @return the AzureReachabilityReportInner object itself. - */ - public AzureReachabilityReportInner withReachabilityReport(List reachabilityReport) { - this.reachabilityReport = reachabilityReport; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportParametersInner.java deleted file mode 100644 index 95f5a03be4c..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportParametersInner.java +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.microsoft.azure.management.network.AzureReachabilityReportLocation; -import java.util.List; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Geographic and time constraints for Azure reachability report. - */ -public class AzureReachabilityReportParametersInner { - /** - * The providerLocation property. - */ - @JsonProperty(value = "providerLocation", required = true) - private AzureReachabilityReportLocation providerLocation; - - /** - * List of Internet service providers. - */ - @JsonProperty(value = "providers") - private List providers; - - /** - * Optional Azure regions to scope the query to. - */ - @JsonProperty(value = "azureLocations") - private List azureLocations; - - /** - * The start time for the Azure reachability report. - */ - @JsonProperty(value = "startTime", required = true) - private DateTime startTime; - - /** - * The end time for the Azure reachability report. - */ - @JsonProperty(value = "endTime", required = true) - private DateTime endTime; - - /** - * Get the providerLocation value. - * - * @return the providerLocation value - */ - public AzureReachabilityReportLocation providerLocation() { - return this.providerLocation; - } - - /** - * Set the providerLocation value. - * - * @param providerLocation the providerLocation value to set - * @return the AzureReachabilityReportParametersInner object itself. - */ - public AzureReachabilityReportParametersInner withProviderLocation(AzureReachabilityReportLocation providerLocation) { - this.providerLocation = providerLocation; - return this; - } - - /** - * Get the providers value. - * - * @return the providers value - */ - public List providers() { - return this.providers; - } - - /** - * Set the providers value. - * - * @param providers the providers value to set - * @return the AzureReachabilityReportParametersInner object itself. - */ - public AzureReachabilityReportParametersInner withProviders(List providers) { - this.providers = providers; - return this; - } - - /** - * Get the azureLocations value. - * - * @return the azureLocations value - */ - public List azureLocations() { - return this.azureLocations; - } - - /** - * Set the azureLocations value. - * - * @param azureLocations the azureLocations value to set - * @return the AzureReachabilityReportParametersInner object itself. - */ - public AzureReachabilityReportParametersInner withAzureLocations(List azureLocations) { - this.azureLocations = azureLocations; - return this; - } - - /** - * Get the startTime value. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime value. - * - * @param startTime the startTime value to set - * @return the AzureReachabilityReportParametersInner object itself. - */ - public AzureReachabilityReportParametersInner withStartTime(DateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime value. - * - * @return the endTime value - */ - public DateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime value. - * - * @param endTime the endTime value to set - * @return the AzureReachabilityReportParametersInner object itself. - */ - public AzureReachabilityReportParametersInner withEndTime(DateTime endTime) { - this.endTime = endTime; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunitiesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunitiesInner.java index b01ac30d48a..fe3a584896e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunitiesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunitiesInner.java @@ -149,10 +149,8 @@ public Observable>> listSinglePag if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorInner.java deleted file mode 100644 index a7e5a421440..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorInner.java +++ /dev/null @@ -1,179 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import java.util.Map; -import com.microsoft.azure.management.network.ConnectionMonitorSource; -import com.microsoft.azure.management.network.ConnectionMonitorDestination; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Parameters that define the operation to create a connection monitor. - */ -@JsonFlatten -public class ConnectionMonitorInner { - /** - * Connection monitor location. - */ - @JsonProperty(value = "location") - private String location; - - /** - * Connection monitor tags. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * The source property. - */ - @JsonProperty(value = "properties.source", required = true) - private ConnectionMonitorSource source; - - /** - * The destination property. - */ - @JsonProperty(value = "properties.destination", required = true) - private ConnectionMonitorDestination destination; - - /** - * Determines if the connection monitor will start automatically once - * created. - */ - @JsonProperty(value = "properties.autoStart") - private Boolean autoStart; - - /** - * Monitoring interval in seconds. - */ - @JsonProperty(value = "properties.monitoringIntervalInSeconds") - private Integer monitoringIntervalInSeconds; - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the ConnectionMonitorInner object itself. - */ - public ConnectionMonitorInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the ConnectionMonitorInner object itself. - */ - public ConnectionMonitorInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the source value. - * - * @return the source value - */ - public ConnectionMonitorSource source() { - return this.source; - } - - /** - * Set the source value. - * - * @param source the source value to set - * @return the ConnectionMonitorInner object itself. - */ - public ConnectionMonitorInner withSource(ConnectionMonitorSource source) { - this.source = source; - return this; - } - - /** - * Get the destination value. - * - * @return the destination value - */ - public ConnectionMonitorDestination destination() { - return this.destination; - } - - /** - * Set the destination value. - * - * @param destination the destination value to set - * @return the ConnectionMonitorInner object itself. - */ - public ConnectionMonitorInner withDestination(ConnectionMonitorDestination destination) { - this.destination = destination; - return this; - } - - /** - * Get the autoStart value. - * - * @return the autoStart value - */ - public Boolean autoStart() { - return this.autoStart; - } - - /** - * Set the autoStart value. - * - * @param autoStart the autoStart value to set - * @return the ConnectionMonitorInner object itself. - */ - public ConnectionMonitorInner withAutoStart(Boolean autoStart) { - this.autoStart = autoStart; - return this; - } - - /** - * Get the monitoringIntervalInSeconds value. - * - * @return the monitoringIntervalInSeconds value - */ - public Integer monitoringIntervalInSeconds() { - return this.monitoringIntervalInSeconds; - } - - /** - * Set the monitoringIntervalInSeconds value. - * - * @param monitoringIntervalInSeconds the monitoringIntervalInSeconds value to set - * @return the ConnectionMonitorInner object itself. - */ - public ConnectionMonitorInner withMonitoringIntervalInSeconds(Integer monitoringIntervalInSeconds) { - this.monitoringIntervalInSeconds = monitoringIntervalInSeconds; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorQueryResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorQueryResultInner.java deleted file mode 100644 index 623b3f09740..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorQueryResultInner.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import java.util.List; -import com.microsoft.azure.management.network.ConnectionStateSnapshot; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * List of connection states snaphots. - */ -public class ConnectionMonitorQueryResultInner { - /** - * Information about connection states. - */ - @JsonProperty(value = "states") - private List states; - - /** - * Get the states value. - * - * @return the states value - */ - public List states() { - return this.states; - } - - /** - * Set the states value. - * - * @param states the states value to set - * @return the ConnectionMonitorQueryResultInner object itself. - */ - public ConnectionMonitorQueryResultInner withStates(List states) { - this.states = states; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorResultInner.java deleted file mode 100644 index 42139055d41..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorResultInner.java +++ /dev/null @@ -1,331 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import java.util.Map; -import com.microsoft.azure.management.network.ConnectionMonitorSource; -import com.microsoft.azure.management.network.ConnectionMonitorDestination; -import com.microsoft.azure.management.network.ProvisioningState; -import org.joda.time.DateTime; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Information about the connection monitor. - */ -@JsonFlatten -public class ConnectionMonitorResultInner { - /** - * Name of the connection monitor. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * ID of the connection monitor. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * The etag property. - */ - @JsonProperty(value = "etag") - private String etag; - - /** - * Connection monitor type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Connection monitor location. - */ - @JsonProperty(value = "location") - private String location; - - /** - * Connection monitor tags. - */ - @JsonProperty(value = "tags") - private Map tags; - - /** - * The source property. - */ - @JsonProperty(value = "properties.source", required = true) - private ConnectionMonitorSource source; - - /** - * The destination property. - */ - @JsonProperty(value = "properties.destination", required = true) - private ConnectionMonitorDestination destination; - - /** - * Determines if the connection monitor will start automatically once - * created. - */ - @JsonProperty(value = "properties.autoStart") - private Boolean autoStart; - - /** - * Monitoring interval in seconds. - */ - @JsonProperty(value = "properties.monitoringIntervalInSeconds") - private Integer monitoringIntervalInSeconds; - - /** - * The provisioning state of the connection monitor. Possible values - * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState") - private ProvisioningState provisioningState; - - /** - * The date and time when the connection monitor was started. - */ - @JsonProperty(value = "properties.startTime") - private DateTime startTime; - - /** - * The monitoring status of the connection monitor. - */ - @JsonProperty(value = "properties.monitoringStatus") - private String monitoringStatus; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag value. - * - * @param etag the etag value to set - * @return the ConnectionMonitorResultInner object itself. - */ - public ConnectionMonitorResultInner withEtag(String etag) { - this.etag = etag; - return this; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - - /** - * Get the location value. - * - * @return the location value - */ - public String location() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - * @return the ConnectionMonitorResultInner object itself. - */ - public ConnectionMonitorResultInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - * @return the ConnectionMonitorResultInner object itself. - */ - public ConnectionMonitorResultInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the source value. - * - * @return the source value - */ - public ConnectionMonitorSource source() { - return this.source; - } - - /** - * Set the source value. - * - * @param source the source value to set - * @return the ConnectionMonitorResultInner object itself. - */ - public ConnectionMonitorResultInner withSource(ConnectionMonitorSource source) { - this.source = source; - return this; - } - - /** - * Get the destination value. - * - * @return the destination value - */ - public ConnectionMonitorDestination destination() { - return this.destination; - } - - /** - * Set the destination value. - * - * @param destination the destination value to set - * @return the ConnectionMonitorResultInner object itself. - */ - public ConnectionMonitorResultInner withDestination(ConnectionMonitorDestination destination) { - this.destination = destination; - return this; - } - - /** - * Get the autoStart value. - * - * @return the autoStart value - */ - public Boolean autoStart() { - return this.autoStart; - } - - /** - * Set the autoStart value. - * - * @param autoStart the autoStart value to set - * @return the ConnectionMonitorResultInner object itself. - */ - public ConnectionMonitorResultInner withAutoStart(Boolean autoStart) { - this.autoStart = autoStart; - return this; - } - - /** - * Get the monitoringIntervalInSeconds value. - * - * @return the monitoringIntervalInSeconds value - */ - public Integer monitoringIntervalInSeconds() { - return this.monitoringIntervalInSeconds; - } - - /** - * Set the monitoringIntervalInSeconds value. - * - * @param monitoringIntervalInSeconds the monitoringIntervalInSeconds value to set - * @return the ConnectionMonitorResultInner object itself. - */ - public ConnectionMonitorResultInner withMonitoringIntervalInSeconds(Integer monitoringIntervalInSeconds) { - this.monitoringIntervalInSeconds = monitoringIntervalInSeconds; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState value. - * - * @param provisioningState the provisioningState value to set - * @return the ConnectionMonitorResultInner object itself. - */ - public ConnectionMonitorResultInner withProvisioningState(ProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the startTime value. - * - * @return the startTime value - */ - public DateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime value. - * - * @param startTime the startTime value to set - * @return the ConnectionMonitorResultInner object itself. - */ - public ConnectionMonitorResultInner withStartTime(DateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the monitoringStatus value. - * - * @return the monitoringStatus value - */ - public String monitoringStatus() { - return this.monitoringStatus; - } - - /** - * Set the monitoringStatus value. - * - * @param monitoringStatus the monitoringStatus value to set - * @return the ConnectionMonitorResultInner object itself. - */ - public ConnectionMonitorResultInner withMonitoringStatus(String monitoringStatus) { - this.monitoringStatus = monitoringStatus; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorsInner.java deleted file mode 100644 index b1cdb9a0332..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorsInner.java +++ /dev/null @@ -1,1150 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ConnectionMonitors. - */ -public class ConnectionMonitorsInner { - /** The Retrofit service to perform REST calls. */ - private ConnectionMonitorsService service; - /** The service client containing this operation class. */ - private NetworkManagementClientImpl client; - - /** - * Initializes an instance of ConnectionMonitorsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ConnectionMonitorsInner(Retrofit retrofit, NetworkManagementClientImpl client) { - this.service = retrofit.create(ConnectionMonitorsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ConnectionMonitors to be - * used by Retrofit to perform actually REST calls. - */ - interface ConnectionMonitorsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ConnectionMonitors createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @Path("subscriptionId") String subscriptionId, @Body ConnectionMonitorInner 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.ConnectionMonitors beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @Path("subscriptionId") String subscriptionId, @Body ConnectionMonitorInner 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.ConnectionMonitors get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.ConnectionMonitors delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.ConnectionMonitors beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.ConnectionMonitors stop" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop") - Observable> stop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.ConnectionMonitors beginStop" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop") - Observable> beginStop(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.ConnectionMonitors start" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start") - Observable> start(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.ConnectionMonitors beginStart" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start") - Observable> beginStart(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.ConnectionMonitors query" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query") - Observable> query(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.ConnectionMonitors beginQuery" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query") - Observable> beginQuery(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("connectionMonitorName") String connectionMonitorName, @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.ConnectionMonitors list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Create or update a connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ConnectionMonitorResultInner object if successful. - */ - public ConnectionMonitorResultInner createOrUpdate(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).toBlocking().last().body(); - } - - /** - * Create or update a connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param parameters Parameters that define the operation to create a connection monitor. - * @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 createOrUpdateAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters), serviceCallback); - } - - /** - * Create or update a connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @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 - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).map(new Func1, ConnectionMonitorResultInner>() { - @Override - public ConnectionMonitorResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or update a connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @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 - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner 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 (connectionMonitorName == null) { - throw new IllegalArgumentException("Parameter connectionMonitorName 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Create or update a connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ConnectionMonitorResultInner object if successful. - */ - public ConnectionMonitorResultInner beginCreateOrUpdate(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).toBlocking().single().body(); - } - - /** - * Create or update a connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @param parameters Parameters that define the operation to create a connection monitor. - * @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 beginCreateOrUpdateAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters), serviceCallback); - } - - /** - * Create or update a connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @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 - * @return the observable to the ConnectionMonitorResultInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName, parameters).map(new Func1, ConnectionMonitorResultInner>() { - @Override - public ConnectionMonitorResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or update a connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @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 - * @return the observable to the ConnectionMonitorResultInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, ConnectionMonitorInner 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 (connectionMonitorName == null) { - throw new IllegalArgumentException("Parameter connectionMonitorName 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a connection monitor by name. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ConnectionMonitorResultInner object if successful. - */ - public ConnectionMonitorResultInner get(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - return getWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); - } - - /** - * Gets a connection monitor by name. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @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 getAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); - } - - /** - * Gets a connection monitor by name. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the observable to the ConnectionMonitorResultInner object - */ - public Observable getAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - return getWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, ConnectionMonitorResultInner>() { - @Override - public ConnectionMonitorResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a connection monitor by name. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the observable to the ConnectionMonitorResultInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - 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 (connectionMonitorName == null) { - throw new IllegalArgumentException("Parameter connectionMonitorName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void delete(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); - } - - /** - * Deletes the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @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 deleteAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); - } - - /** - * Deletes the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - return deleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - 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 (connectionMonitorName == null) { - throw new IllegalArgumentException("Parameter connectionMonitorName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginDelete(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); - } - - /** - * Deletes the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @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 beginDeleteAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); - } - - /** - * Deletes the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - 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 (connectionMonitorName == null) { - throw new IllegalArgumentException("Parameter connectionMonitorName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Stops the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void stop(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); - } - - /** - * Stops the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @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 stopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); - } - - /** - * Stops the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the observable for the request - */ - public Observable stopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - return stopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Stops the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the observable for the request - */ - public Observable> stopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - 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 (connectionMonitorName == null) { - throw new IllegalArgumentException("Parameter connectionMonitorName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.stop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Stops the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginStop(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); - } - - /** - * Stops the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @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 beginStopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); - } - - /** - * Stops the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginStopAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - return beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Stops the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginStopWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - 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 (connectionMonitorName == null) { - throw new IllegalArgumentException("Parameter connectionMonitorName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginStopDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginStopDelegate(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); - } - - /** - * Starts the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void start(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - startWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); - } - - /** - * Starts the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @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 startAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); - } - - /** - * Starts the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the observable for the request - */ - public Observable startAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - return startWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Starts the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the observable for the request - */ - public Observable> startWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - 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 (connectionMonitorName == null) { - throw new IllegalArgumentException("Parameter connectionMonitorName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.start(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Starts the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - */ - public void beginStart(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - beginStartWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); - } - - /** - * Starts the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name of the connection monitor. - * @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 beginStartAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); - } - - /** - * Starts the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginStartAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - return beginStartWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Starts the specified connection monitor. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - 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 (connectionMonitorName == null) { - throw new IllegalArgumentException("Parameter connectionMonitorName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginStartDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginStartDelegate(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); - } - - /** - * Query a snapshot of the most recent connection states. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ConnectionMonitorQueryResultInner object if successful. - */ - public ConnectionMonitorQueryResultInner query(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - return queryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().last().body(); - } - - /** - * Query a snapshot of the most recent connection states. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name given to the connection monitor. - * @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 queryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(queryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); - } - - /** - * Query a snapshot of the most recent connection states. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the observable for the request - */ - public Observable queryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - return queryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, ConnectionMonitorQueryResultInner>() { - @Override - public ConnectionMonitorQueryResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Query a snapshot of the most recent connection states. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the observable for the request - */ - public Observable> queryWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - 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 (connectionMonitorName == null) { - throw new IllegalArgumentException("Parameter connectionMonitorName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.query(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Query a snapshot of the most recent connection states. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the ConnectionMonitorQueryResultInner object if successful. - */ - public ConnectionMonitorQueryResultInner beginQuery(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - return beginQueryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).toBlocking().single().body(); - } - - /** - * Query a snapshot of the most recent connection states. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @param connectionMonitorName The name given to the connection monitor. - * @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 beginQueryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginQueryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName), serviceCallback); - } - - /** - * Query a snapshot of the most recent connection states. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the observable to the ConnectionMonitorQueryResultInner object - */ - public Observable beginQueryAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - return beginQueryWithServiceResponseAsync(resourceGroupName, networkWatcherName, connectionMonitorName).map(new Func1, ConnectionMonitorQueryResultInner>() { - @Override - public ConnectionMonitorQueryResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Query a snapshot of the most recent connection states. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @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 - * @return the observable to the ConnectionMonitorQueryResultInner object - */ - public Observable> beginQueryWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { - 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 (connectionMonitorName == null) { - throw new IllegalArgumentException("Parameter connectionMonitorName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginQueryDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginQueryDelegate(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); - } - - /** - * Lists all connection monitors for the specified Network Watcher. - * - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the List<ConnectionMonitorResultInner> object if successful. - */ - public List list(String resourceGroupName, String networkWatcherName) { - return listWithServiceResponseAsync(resourceGroupName, networkWatcherName).toBlocking().single().body(); - } - - /** - * Lists all connection monitors for the specified Network Watcher. - * - * @param resourceGroupName The name of the resource group containing Network Watcher. - * @param networkWatcherName The name of the Network Watcher resource. - * @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> listAsync(String resourceGroupName, String networkWatcherName, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, networkWatcherName), serviceCallback); - } - - /** - * Lists all connection monitors for the specified Network Watcher. - * - * @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 - * @return the observable to the List<ConnectionMonitorResultInner> object - */ - public Observable> listAsync(String resourceGroupName, String networkWatcherName) { - return listWithServiceResponseAsync(resourceGroupName, networkWatcherName).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all connection monitors for the specified Network Watcher. - * - * @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 - * @return the observable to the List<ConnectionMonitorResultInner> object - */ - public Observable>> listWithServiceResponseAsync(String resourceGroupName, String networkWatcherName) { - 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - ServiceResponse> clientResponse = new ServiceResponse>(result.body().items(), result.response()); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java deleted file mode 100644 index 4d97beee1ef..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import java.util.List; -import com.microsoft.azure.SubResource; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * A DDoS protection plan in a resource group. - */ -@JsonFlatten -public class DdosProtectionPlanInner extends Resource { - /** - * The resource GUID property of the DDoS protection plan resource. It - * uniquely identifies the resource, even if the user changes its name or - * migrate the resource across subscriptions or resource groups. - */ - @JsonProperty(value = "properties.resourceGuid", access = JsonProperty.Access.WRITE_ONLY) - private String resourceGuid; - - /** - * The provisioning state of the DDoS protection plan resource. Possible - * values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * The list of virtual networks associated with the DDoS protection plan - * resource. This list is read-only. - */ - @JsonProperty(value = "properties.virtualNetworks", access = JsonProperty.Access.WRITE_ONLY) - private List virtualNetworks; - - /** - * A unique read-only string that changes whenever the resource is updated. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /** - * Get the resourceGuid value. - * - * @return the resourceGuid value - */ - public String resourceGuid() { - return this.resourceGuid; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the virtualNetworks value. - * - * @return the virtualNetworks value - */ - public List virtualNetworks() { - return this.virtualNetworks; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java deleted file mode 100644 index 7f6c7d9ea17..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java +++ /dev/null @@ -1,962 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in DdosProtectionPlans. - */ -public class DdosProtectionPlansInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { - /** The Retrofit service to perform REST calls. */ - private DdosProtectionPlansService service; - /** The service client containing this operation class. */ - private NetworkManagementClientImpl client; - - /** - * Initializes an instance of DdosProtectionPlansInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public DdosProtectionPlansInner(Retrofit retrofit, NetworkManagementClientImpl client) { - this.service = retrofit.create(DdosProtectionPlansService.class); - this.client = client; - } - - /** - * The interface defining all the services for DdosProtectionPlans to be - * used by Retrofit to perform actually REST calls. - */ - interface DdosProtectionPlansService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.DdosProtectionPlans delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @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.DdosProtectionPlans beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @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.DdosProtectionPlans getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @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.DdosProtectionPlans createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @Path("subscriptionId") String subscriptionId, @Body DdosProtectionPlanInner 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.DdosProtectionPlans beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("ddosProtectionPlanName") String ddosProtectionPlanName, @Path("subscriptionId") String subscriptionId, @Body DdosProtectionPlanInner 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.DdosProtectionPlans list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans") - Observable> list(@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.DdosProtectionPlans listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.DdosProtectionPlans listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @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.DdosProtectionPlans listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Deletes the specified DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @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 delete(String resourceGroupName, String ddosProtectionPlanName) { - deleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().last().body(); - } - - /** - * Deletes the specified DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @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 deleteAsync(String resourceGroupName, String ddosProtectionPlanName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); - } - - /** - * Deletes the specified DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String ddosProtectionPlanName) { - return deleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (ddosProtectionPlanName == null) { - throw new IllegalArgumentException("Parameter ddosProtectionPlanName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes the specified DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @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 beginDelete(String resourceGroupName, String ddosProtectionPlanName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().single().body(); - } - - /** - * Deletes the specified DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @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 beginDeleteAsync(String resourceGroupName, String ddosProtectionPlanName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); - } - - /** - * Deletes the specified DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String ddosProtectionPlanName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (ddosProtectionPlanName == null) { - throw new IllegalArgumentException("Parameter ddosProtectionPlanName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(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()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets information about the specified DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @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 - * @return the DdosProtectionPlanInner object if successful. - */ - public DdosProtectionPlanInner getByResourceGroup(String resourceGroupName, String ddosProtectionPlanName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().single().body(); - } - - /** - * Gets information about the specified DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @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 getByResourceGroupAsync(String resourceGroupName, String ddosProtectionPlanName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName), serviceCallback); - } - - /** - * Gets information about the specified DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DdosProtectionPlanInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String ddosProtectionPlanName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).map(new Func1, DdosProtectionPlanInner>() { - @Override - public DdosProtectionPlanInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets information about the specified DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DdosProtectionPlanInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (ddosProtectionPlanName == null) { - throw new IllegalArgumentException("Parameter ddosProtectionPlanName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates a DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the create or update operation. - * @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 - * @return the DdosProtectionPlanInner object if successful. - */ - public DdosProtectionPlanInner createOrUpdate(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).toBlocking().last().body(); - } - - /** - * Creates or updates a DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the create or update operation. - * @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 createOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters), serviceCallback); - } - - /** - * Creates or updates a DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).map(new Func1, DdosProtectionPlanInner>() { - @Override - public DdosProtectionPlanInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (ddosProtectionPlanName == null) { - throw new IllegalArgumentException("Parameter ddosProtectionPlanName 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates or updates a DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the create or update operation. - * @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 - * @return the DdosProtectionPlanInner object if successful. - */ - public DdosProtectionPlanInner beginCreateOrUpdate(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).toBlocking().single().body(); - } - - /** - * Creates or updates a DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the create or update operation. - * @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 beginCreateOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters), serviceCallback); - } - - /** - * Creates or updates a DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DdosProtectionPlanInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).map(new Func1, DdosProtectionPlanInner>() { - @Override - public DdosProtectionPlanInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a DDoS protection plan. - * - * @param resourceGroupName The name of the resource group. - * @param ddosProtectionPlanName The name of the DDoS protection plan. - * @param parameters Parameters supplied to the create or update operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DdosProtectionPlanInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (ddosProtectionPlanName == null) { - throw new IllegalArgumentException("Parameter ddosProtectionPlanName 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all DDoS protection plans in a subscription. - * - * @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 - * @return the PagedList<DdosProtectionPlanInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all DDoS protection plans in a subscription. - * - * @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> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all DDoS protection plans in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DdosProtectionPlanInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all DDoS protection plans in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DdosProtectionPlanInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all DDoS protection plans in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DdosProtectionPlanInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the DDoS protection plans in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @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 - * @return the PagedList<DdosProtectionPlanInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the DDoS protection plans in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the DDoS protection plans in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DdosProtectionPlanInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the DDoS protection plans in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DdosProtectionPlanInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the DDoS protection plans in a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DdosProtectionPlanInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all DDoS protection plans in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @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 - * @return the PagedList<DdosProtectionPlanInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all DDoS protection plans in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @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> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all DDoS protection plans in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DdosProtectionPlanInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all DDoS protection plans in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DdosProtectionPlanInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all DDoS protection plans in a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DdosProtectionPlanInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the DDoS protection plans in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @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 - * @return the PagedList<DdosProtectionPlanInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the DDoS protection plans in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the DDoS protection plans in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DdosProtectionPlanInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the DDoS protection plans in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<DdosProtectionPlanInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the DDoS protection plans in a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<DdosProtectionPlanInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DefaultSecurityRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DefaultSecurityRulesInner.java index b7ceed08f88..dbd80a3c090 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DefaultSecurityRulesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DefaultSecurityRulesInner.java @@ -170,10 +170,8 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -263,10 +261,8 @@ public Observable> getWithServiceResponseAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveNetworkSecurityGroupListResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveNetworkSecurityGroupListResultInner.java deleted file mode 100644 index 58f04f21ba4..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveNetworkSecurityGroupListResultInner.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import java.util.List; -import com.microsoft.azure.management.network.EffectiveNetworkSecurityGroup; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Response for list effective network security groups API service call. - */ -public class EffectiveNetworkSecurityGroupListResultInner { - /** - * A list of effective network security groups. - */ - @JsonProperty(value = "value") - private List value; - - /** - * The URL to get the next set of results. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the EffectiveNetworkSecurityGroupListResultInner object itself. - */ - public EffectiveNetworkSecurityGroupListResultInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink value. - * - * @return the nextLink value - */ - public String nextLink() { - return this.nextLink; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveRouteListResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveRouteListResultInner.java deleted file mode 100644 index 25c973b549b..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveRouteListResultInner.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import java.util.List; -import com.microsoft.azure.management.network.EffectiveRoute; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Response for list effective route API service call. - */ -public class EffectiveRouteListResultInner { - /** - * A list of effective routes. - */ - @JsonProperty(value = "value") - private List value; - - /** - * The URL to get the next set of results. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the EffectiveRouteListResultInner object itself. - */ - public EffectiveRouteListResultInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink value. - * - * @return the nextLink value - */ - public String nextLink() { - return this.nextLink; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EndpointServiceResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EndpointServiceResultInner.java deleted file mode 100644 index c7b4153c32b..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EndpointServiceResultInner.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.azure.SubResource; - -/** - * Endpoint service. - */ -public class EndpointServiceResultInner extends SubResource { - /** - * Name of the endpoint service. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /** - * Type of the endpoint service. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Get the type value. - * - * @return the type value - */ - public String type() { - return this.type; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java index dddd8ef10ac..834fc180572 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java @@ -159,10 +159,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -234,10 +232,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -253,8 +249,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) + .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -329,10 +325,8 @@ public Observable> getWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -429,11 +423,9 @@ public Observable> create if (authorizationParameters == null) { throw new IllegalArgumentException("Parameter authorizationParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(authorizationParameters); - Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), authorizationParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), authorizationParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -513,11 +505,9 @@ public Observable> beginC if (authorizationParameters == null) { throw new IllegalArgumentException("Parameter authorizationParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(authorizationParameters); - return service.beginCreateOrUpdate(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), authorizationParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), authorizationParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -533,8 +523,8 @@ public Observable> call(R private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -638,10 +628,8 @@ public Observable>> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, circuitName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionInner.java deleted file mode 100644 index e7e790b0f3c..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionInner.java +++ /dev/null @@ -1,202 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.microsoft.azure.SubResource; -import com.microsoft.azure.management.network.CircuitConnectionStatus; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. - */ -@JsonFlatten -public class ExpressRouteCircuitConnectionInner extends SubResource { - /** - * Reference to Express Route Circuit Private Peering Resource of the - * circuit initiating connection. - */ - @JsonProperty(value = "properties.expressRouteCircuitPeering") - private SubResource expressRouteCircuitPeering; - - /** - * Reference to Express Route Circuit Private Peering Resource of the - * peered circuit. - */ - @JsonProperty(value = "properties.peerExpressRouteCircuitPeering") - private SubResource peerExpressRouteCircuitPeering; - - /** - * /29 IP address space to carve out Customer addresses for tunnels. - */ - @JsonProperty(value = "properties.addressPrefix") - private String addressPrefix; - - /** - * The authorization key. - */ - @JsonProperty(value = "properties.authorizationKey") - private String authorizationKey; - - /** - * Express Route Circuit Connection State. Possible values are: 'Connected' - * and 'Disconnected'. Possible values include: 'Connected', 'Connecting', - * 'Disconnected'. - */ - @JsonProperty(value = "properties.circuitConnectionStatus", access = JsonProperty.Access.WRITE_ONLY) - private CircuitConnectionStatus circuitConnectionStatus; - - /** - * Provisioning state of the circuit connection resource. Possible values - * are: 'Succeded', 'Updating', 'Deleting', and 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * Gets name of the resource that is unique within a resource group. This - * name can be used to access the resource. - */ - @JsonProperty(value = "name") - private String name; - - /** - * A unique read-only string that changes whenever the resource is updated. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /** - * Get the expressRouteCircuitPeering value. - * - * @return the expressRouteCircuitPeering value - */ - public SubResource expressRouteCircuitPeering() { - return this.expressRouteCircuitPeering; - } - - /** - * Set the expressRouteCircuitPeering value. - * - * @param expressRouteCircuitPeering the expressRouteCircuitPeering value to set - * @return the ExpressRouteCircuitConnectionInner object itself. - */ - public ExpressRouteCircuitConnectionInner withExpressRouteCircuitPeering(SubResource expressRouteCircuitPeering) { - this.expressRouteCircuitPeering = expressRouteCircuitPeering; - return this; - } - - /** - * Get the peerExpressRouteCircuitPeering value. - * - * @return the peerExpressRouteCircuitPeering value - */ - public SubResource peerExpressRouteCircuitPeering() { - return this.peerExpressRouteCircuitPeering; - } - - /** - * Set the peerExpressRouteCircuitPeering value. - * - * @param peerExpressRouteCircuitPeering the peerExpressRouteCircuitPeering value to set - * @return the ExpressRouteCircuitConnectionInner object itself. - */ - public ExpressRouteCircuitConnectionInner withPeerExpressRouteCircuitPeering(SubResource peerExpressRouteCircuitPeering) { - this.peerExpressRouteCircuitPeering = peerExpressRouteCircuitPeering; - return this; - } - - /** - * Get the addressPrefix value. - * - * @return the addressPrefix value - */ - public String addressPrefix() { - return this.addressPrefix; - } - - /** - * Set the addressPrefix value. - * - * @param addressPrefix the addressPrefix value to set - * @return the ExpressRouteCircuitConnectionInner object itself. - */ - public ExpressRouteCircuitConnectionInner withAddressPrefix(String addressPrefix) { - this.addressPrefix = addressPrefix; - return this; - } - - /** - * Get the authorizationKey value. - * - * @return the authorizationKey value - */ - public String authorizationKey() { - return this.authorizationKey; - } - - /** - * Set the authorizationKey value. - * - * @param authorizationKey the authorizationKey value to set - * @return the ExpressRouteCircuitConnectionInner object itself. - */ - public ExpressRouteCircuitConnectionInner withAuthorizationKey(String authorizationKey) { - this.authorizationKey = authorizationKey; - return this; - } - - /** - * Get the circuitConnectionStatus value. - * - * @return the circuitConnectionStatus value - */ - public CircuitConnectionStatus circuitConnectionStatus() { - return this.circuitConnectionStatus; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ExpressRouteCircuitConnectionInner object itself. - */ - public ExpressRouteCircuitConnectionInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionsInner.java deleted file mode 100644 index 3b22e22f1f1..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionsInner.java +++ /dev/null @@ -1,563 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ExpressRouteCircuitConnections. - */ -public class ExpressRouteCircuitConnectionsInner { - /** The Retrofit service to perform REST calls. */ - private ExpressRouteCircuitConnectionsService service; - /** The service client containing this operation class. */ - private NetworkManagementClientImpl client; - - /** - * Initializes an instance of ExpressRouteCircuitConnectionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ExpressRouteCircuitConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { - this.service = retrofit.create(ExpressRouteCircuitConnectionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ExpressRouteCircuitConnections to be - * used by Retrofit to perform actually REST calls. - */ - interface ExpressRouteCircuitConnectionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCircuitConnections delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @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.ExpressRouteCircuitConnections beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @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.ExpressRouteCircuitConnections get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @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.ExpressRouteCircuitConnections createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, @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.ExpressRouteCircuitConnections beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("connectionName") String connectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @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 delete(String resourceGroupName, String circuitName, String peeringName, String connectionName) { - deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).toBlocking().last().body(); - } - - /** - * Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @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 deleteAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName), serviceCallback); - } - - /** - * Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { - return deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (circuitName == null) { - throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (connectionName == null) { - throw new IllegalArgumentException("Parameter connectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @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 beginDelete(String resourceGroupName, String circuitName, String peeringName, String connectionName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).toBlocking().single().body(); - } - - /** - * Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @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 beginDeleteAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName), serviceCallback); - } - - /** - * Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified Express Route Circuit Connection from the specified express route circuit. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (circuitName == null) { - throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (connectionName == null) { - throw new IllegalArgumentException("Parameter connectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(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()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the specified Express Route Circuit Connection from the specified express route circuit. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @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 - * @return the ExpressRouteCircuitConnectionInner object if successful. - */ - public ExpressRouteCircuitConnectionInner get(String resourceGroupName, String circuitName, String peeringName, String connectionName) { - return getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).toBlocking().single().body(); - } - - /** - * Gets the specified Express Route Circuit Connection from the specified express route circuit. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @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 getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName), serviceCallback); - } - - /** - * Gets the specified Express Route Circuit Connection from the specified express route circuit. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitConnectionInner object - */ - public Observable getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { - return getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName).map(new Func1, ExpressRouteCircuitConnectionInner>() { - @Override - public ExpressRouteCircuitConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the specified Express Route Circuit Connection from the specified express route circuit. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitConnectionInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (circuitName == null) { - throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (connectionName == null) { - throw new IllegalArgumentException("Parameter connectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. - * @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 - * @return the ExpressRouteCircuitConnectionInner object if successful. - */ - public ExpressRouteCircuitConnectionInner createOrUpdate(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters).toBlocking().last().body(); - } - - /** - * Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. - * @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 createOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters), serviceCallback); - } - - /** - * Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters).map(new Func1, ExpressRouteCircuitConnectionInner>() { - @Override - public ExpressRouteCircuitConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (circuitName == null) { - throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (connectionName == null) { - throw new IllegalArgumentException("Parameter connectionName 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 (expressRouteCircuitConnectionParameters == null) { - throw new IllegalArgumentException("Parameter expressRouteCircuitConnectionParameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(expressRouteCircuitConnectionParameters); - Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), expressRouteCircuitConnectionParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. - * @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 - * @return the ExpressRouteCircuitConnectionInner object if successful. - */ - public ExpressRouteCircuitConnectionInner beginCreateOrUpdate(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters).toBlocking().single().body(); - } - - /** - * Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. - * @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 beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters), serviceCallback); - } - - /** - * Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitConnectionInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters).map(new Func1, ExpressRouteCircuitConnectionInner>() { - @Override - public ExpressRouteCircuitConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a Express Route Circuit Connection in the specified express route circuits. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the express route circuit. - * @param peeringName The name of the peering. - * @param connectionName The name of the express route circuit connection. - * @param expressRouteCircuitConnectionParameters Parameters supplied to the create or update express route circuit circuit connection operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitConnectionInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (circuitName == null) { - throw new IllegalArgumentException("Parameter circuitName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (connectionName == null) { - throw new IllegalArgumentException("Parameter connectionName 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 (expressRouteCircuitConnectionParameters == null) { - throw new IllegalArgumentException("Parameter expressRouteCircuitConnectionParameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(expressRouteCircuitConnectionParameters); - return service.beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), expressRouteCircuitConnectionParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringInner.java index d7d61f33669..fd34cb65d3c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringInner.java @@ -8,11 +8,10 @@ package com.microsoft.azure.management.network.implementation; -import com.microsoft.azure.management.network.ExpressRoutePeeringType; -import com.microsoft.azure.management.network.ExpressRoutePeeringState; +import com.microsoft.azure.management.network.ExpressRouteCircuitPeeringType; +import com.microsoft.azure.management.network.ExpressRouteCircuitPeeringState; import com.microsoft.azure.management.network.ExpressRouteCircuitPeeringConfig; import com.microsoft.azure.management.network.Ipv6ExpressRouteCircuitPeeringConfig; -import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.SubResource; @@ -23,17 +22,19 @@ @JsonFlatten public class ExpressRouteCircuitPeeringInner extends SubResource { /** - * The peering type. Possible values include: 'AzurePublicPeering', - * 'AzurePrivatePeering', 'MicrosoftPeering'. + * The PeeringType. Possible values are: 'AzurePublicPeering', + * 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: + * 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'. */ @JsonProperty(value = "properties.peeringType") - private ExpressRoutePeeringType peeringType; + private ExpressRouteCircuitPeeringType peeringType; /** - * The peering state. Possible values include: 'Disabled', 'Enabled'. + * The state of peering. Possible values are: 'Disabled' and 'Enabled'. + * Possible values include: 'Disabled', 'Enabled'. */ @JsonProperty(value = "properties.state") - private ExpressRoutePeeringState state; + private ExpressRouteCircuitPeeringState state; /** * The Azure ASN. @@ -45,7 +46,7 @@ public class ExpressRouteCircuitPeeringInner extends SubResource { * The peer ASN. */ @JsonProperty(value = "properties.peerASN") - private Long peerASN; + private Integer peerASN; /** * The primary address prefix. @@ -126,13 +127,6 @@ public class ExpressRouteCircuitPeeringInner extends SubResource { @JsonProperty(value = "properties.ipv6PeeringConfig") private Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig; - /** - * The list of circuit connections associated with Azure Private Peering - * for this circuit. - */ - @JsonProperty(value = "properties.connections") - private List connections; - /** * Gets name of the resource that is unique within a resource group. This * name can be used to access the resource. @@ -151,7 +145,7 @@ public class ExpressRouteCircuitPeeringInner extends SubResource { * * @return the peeringType value */ - public ExpressRoutePeeringType peeringType() { + public ExpressRouteCircuitPeeringType peeringType() { return this.peeringType; } @@ -161,7 +155,7 @@ public ExpressRoutePeeringType peeringType() { * @param peeringType the peeringType value to set * @return the ExpressRouteCircuitPeeringInner object itself. */ - public ExpressRouteCircuitPeeringInner withPeeringType(ExpressRoutePeeringType peeringType) { + public ExpressRouteCircuitPeeringInner withPeeringType(ExpressRouteCircuitPeeringType peeringType) { this.peeringType = peeringType; return this; } @@ -171,7 +165,7 @@ public ExpressRouteCircuitPeeringInner withPeeringType(ExpressRoutePeeringType p * * @return the state value */ - public ExpressRoutePeeringState state() { + public ExpressRouteCircuitPeeringState state() { return this.state; } @@ -181,7 +175,7 @@ public ExpressRoutePeeringState state() { * @param state the state value to set * @return the ExpressRouteCircuitPeeringInner object itself. */ - public ExpressRouteCircuitPeeringInner withState(ExpressRoutePeeringState state) { + public ExpressRouteCircuitPeeringInner withState(ExpressRouteCircuitPeeringState state) { this.state = state; return this; } @@ -211,7 +205,7 @@ public ExpressRouteCircuitPeeringInner withAzureASN(Integer azureASN) { * * @return the peerASN value */ - public Long peerASN() { + public Integer peerASN() { return this.peerASN; } @@ -221,7 +215,7 @@ public Long peerASN() { * @param peerASN the peerASN value to set * @return the ExpressRouteCircuitPeeringInner object itself. */ - public ExpressRouteCircuitPeeringInner withPeerASN(Long peerASN) { + public ExpressRouteCircuitPeeringInner withPeerASN(Integer peerASN) { this.peerASN = peerASN; return this; } @@ -486,26 +480,6 @@ public ExpressRouteCircuitPeeringInner withIpv6PeeringConfig(Ipv6ExpressRouteCir return this; } - /** - * Get the connections value. - * - * @return the connections value - */ - public List connections() { - return this.connections; - } - - /** - * Set the connections value. - * - * @param connections the connections value to set - * @return the ExpressRouteCircuitPeeringInner object itself. - */ - public ExpressRouteCircuitPeeringInner withConnections(List connections) { - this.connections = connections; - return this; - } - /** * Get the name value. * diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java index a5752e388e6..61438136da2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java @@ -159,10 +159,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -234,10 +232,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -329,10 +325,8 @@ public Observable> getWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -429,11 +423,9 @@ public Observable> createOrUpda if (peeringParameters == null) { throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(peeringParameters); - Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), peeringParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -513,11 +505,9 @@ public Observable> beginCreateO if (peeringParameters == null) { throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(peeringParameters); - return service.beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), peeringParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -638,10 +628,8 @@ public Observable>> listSi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, circuitName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsArpTablesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsArpTablesInner.java deleted file mode 100644 index 80fa2a41e96..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsArpTablesInner.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ExpressRouteCircuitsArpTables. - */ -public class ExpressRouteCircuitsArpTablesInner { - /** The Retrofit service to perform REST calls. */ - private ExpressRouteCircuitsArpTablesService service; - /** The service client containing this operation class. */ - private NetworkManagementClientImpl client; - - /** - * Initializes an instance of ExpressRouteCircuitsArpTablesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ExpressRouteCircuitsArpTablesInner(Retrofit retrofit, NetworkManagementClientImpl client) { - this.service = retrofit.create(ExpressRouteCircuitsArpTablesService.class); - this.client = client; - } - - /** - * The interface defining all the services for ExpressRouteCircuitsArpTables to be - * used by Retrofit to perform actually REST calls. - */ - interface ExpressRouteCircuitsArpTablesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCircuitsArpTables list" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.ExpressRouteCircuitsArpTables beginList" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}") - Observable> beginList(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @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 - * @return the ExpressRouteCircuitsArpTableListResultInner object if successful. - */ - public ExpressRouteCircuitsArpTableListResultInner list(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return listWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().last().body(); - } - - /** - * Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @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 listAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); - } - - /** - * Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable listAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return listWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsArpTableListResultInner>() { - @Override - public ExpressRouteCircuitsArpTableListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> listWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (devicePath == null) { - throw new IllegalArgumentException("Parameter devicePath 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.list(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @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 - * @return the ExpressRouteCircuitsArpTableListResultInner object if successful. - */ - public ExpressRouteCircuitsArpTableListResultInner beginList(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return beginListWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); - } - - /** - * Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @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 beginListAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginListWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); - } - - /** - * Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitsArpTableListResultInner object - */ - public Observable beginListAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return beginListWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsArpTableListResultInner>() { - @Override - public ExpressRouteCircuitsArpTableListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the currently advertised ARP table associated with the express route circuit in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitsArpTableListResultInner object - */ - public Observable> beginListWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (devicePath == null) { - throw new IllegalArgumentException("Parameter devicePath 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginList(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginListDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginListDelegate(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); - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsInner.java index 0d17764b6f4..097da17a6a9 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -25,14 +24,12 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; @@ -88,14 +85,6 @@ interface ExpressRouteCircuitsService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCircuitInner 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.ExpressRouteCircuits updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCircuits beginUpdateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}") - Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCircuits listArpTable" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}") Observable> listArpTable(@Path("resourceGroupName") String resourceGroupName, @Path("circuitName") String circuitName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -207,10 +196,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, circuitName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -275,10 +262,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, circuitName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -294,9 +279,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) .register(204, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -363,10 +348,8 @@ public Observable> getByResourceGroupW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, circuitName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -456,11 +439,9 @@ public Observable> createOrUpdateWithS if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -533,11 +514,9 @@ public Observable> beginCreateOrUpdate if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, circuitName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, circuitName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -553,329 +532,7 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @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 - * @return the ExpressRouteCircuitInner object if successful. - */ - public ExpressRouteCircuitInner updateTags(String resourceGroupName, String circuitName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().last().body(); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @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 updateTagsAsync(String resourceGroupName, String circuitName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, circuitName), serviceCallback); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String circuitName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName).map(new Func1, ExpressRouteCircuitInner>() { - @Override - public ExpressRouteCircuitInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String circuitName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (circuitName == null) { - throw new IllegalArgumentException("Parameter circuitName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - Observable> observable = service.updateTags(resourceGroupName, circuitName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param tags Resource tags. - * @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 - * @return the ExpressRouteCircuitInner object if successful. - */ - public ExpressRouteCircuitInner updateTags(String resourceGroupName, String circuitName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).toBlocking().last().body(); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param tags Resource tags. - * @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 updateTagsAsync(String resourceGroupName, String circuitName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags), serviceCallback); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String circuitName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).map(new Func1, ExpressRouteCircuitInner>() { - @Override - public ExpressRouteCircuitInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String circuitName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (circuitName == null) { - throw new IllegalArgumentException("Parameter circuitName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - Observable> observable = service.updateTags(resourceGroupName, circuitName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @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 - * @return the ExpressRouteCircuitInner object if successful. - */ - public ExpressRouteCircuitInner beginUpdateTags(String resourceGroupName, String circuitName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().single().body(); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @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 beginUpdateTagsAsync(String resourceGroupName, String circuitName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName), serviceCallback); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String circuitName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName).map(new Func1, ExpressRouteCircuitInner>() { - @Override - public ExpressRouteCircuitInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String circuitName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (circuitName == null) { - throw new IllegalArgumentException("Parameter circuitName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - return service.beginUpdateTags(resourceGroupName, circuitName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param tags Resource tags. - * @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 - * @return the ExpressRouteCircuitInner object if successful. - */ - public ExpressRouteCircuitInner beginUpdateTags(String resourceGroupName, String circuitName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).toBlocking().single().body(); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param tags Resource tags. - * @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 beginUpdateTagsAsync(String resourceGroupName, String circuitName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags), serviceCallback); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String circuitName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, circuitName, tags).map(new Func1, ExpressRouteCircuitInner>() { - @Override - public ExpressRouteCircuitInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an express route circuit tags. - * - * @param resourceGroupName The name of the resource group. - * @param circuitName The name of the circuit. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String circuitName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (circuitName == null) { - throw new IllegalArgumentException("Parameter circuitName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - return service.beginUpdateTags(resourceGroupName, circuitName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -957,10 +614,8 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.listArpTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.listArpTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1040,10 +695,8 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginListArpTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginListArpTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1141,10 +794,8 @@ public Observable> observable = service.listRoutesTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.listRoutesTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1224,10 +875,8 @@ public Observable, Observable>>() { @Override public Observable> call(Response response) { @@ -1325,10 +974,8 @@ public Observable> observable = service.listRoutesTableSummary(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.listRoutesTableSummary(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1408,10 +1055,8 @@ public Observable, Observable>>() { @Override public Observable> call(Response response) { @@ -1495,10 +1140,8 @@ public Observable> getStatsWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getStats(resourceGroupName, circuitName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getStats(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1588,10 +1231,8 @@ public Observable> getPeeringStat if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getPeeringStats(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getPeeringStats(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1703,10 +1344,8 @@ public Observable>> listByResourc if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1810,10 +1449,8 @@ public Observable>> listSinglePag if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsRouteTableSummarysInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsRouteTableSummarysInner.java deleted file mode 100644 index 9c66b7e1c37..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsRouteTableSummarysInner.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ExpressRouteCircuitsRouteTableSummarys. - */ -public class ExpressRouteCircuitsRouteTableSummarysInner { - /** The Retrofit service to perform REST calls. */ - private ExpressRouteCircuitsRouteTableSummarysService service; - /** The service client containing this operation class. */ - private NetworkManagementClientImpl client; - - /** - * Initializes an instance of ExpressRouteCircuitsRouteTableSummarysInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ExpressRouteCircuitsRouteTableSummarysInner(Retrofit retrofit, NetworkManagementClientImpl client) { - this.service = retrofit.create(ExpressRouteCircuitsRouteTableSummarysService.class); - this.client = client; - } - - /** - * The interface defining all the services for ExpressRouteCircuitsRouteTableSummarys to be - * used by Retrofit to perform actually REST calls. - */ - interface ExpressRouteCircuitsRouteTableSummarysService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCircuitsRouteTableSummarys list" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.ExpressRouteCircuitsRouteTableSummarys beginList" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}") - Observable> beginList(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the route table summary associated with the expressrouteCrossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 - * @return the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object if successful. - */ - public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner list(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return listWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().last().body(); - } - - /** - * Gets the route table summary associated with the expressrouteCrossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 listAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); - } - - /** - * Gets the route table summary associated with the expressrouteCrossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable listAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return listWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner>() { - @Override - public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the route table summary associated with the expressrouteCrossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> listWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (devicePath == null) { - throw new IllegalArgumentException("Parameter devicePath 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.list(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Gets the route table summary associated with the expressrouteCrossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 - * @return the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object if successful. - */ - public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner beginList(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return beginListWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); - } - - /** - * Gets the route table summary associated with the expressrouteCrossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 beginListAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginListWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); - } - - /** - * Gets the route table summary associated with the expressrouteCrossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object - */ - public Observable beginListAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return beginListWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner>() { - @Override - public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the route table summary associated with the expressrouteCrossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object - */ - public Observable> beginListWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (devicePath == null) { - throw new IllegalArgumentException("Parameter devicePath 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginList(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginListDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginListDelegate(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); - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsRoutesTablesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsRoutesTablesInner.java deleted file mode 100644 index 341963c88c9..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsRoutesTablesInner.java +++ /dev/null @@ -1,248 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import okhttp3.ResponseBody; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ExpressRouteCircuitsRoutesTables. - */ -public class ExpressRouteCircuitsRoutesTablesInner { - /** The Retrofit service to perform REST calls. */ - private ExpressRouteCircuitsRoutesTablesService service; - /** The service client containing this operation class. */ - private NetworkManagementClientImpl client; - - /** - * Initializes an instance of ExpressRouteCircuitsRoutesTablesInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ExpressRouteCircuitsRoutesTablesInner(Retrofit retrofit, NetworkManagementClientImpl client) { - this.service = retrofit.create(ExpressRouteCircuitsRoutesTablesService.class); - this.client = client; - } - - /** - * The interface defining all the services for ExpressRouteCircuitsRoutesTables to be - * used by Retrofit to perform actually REST calls. - */ - interface ExpressRouteCircuitsRoutesTablesService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCircuitsRoutesTables list" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.ExpressRouteCircuitsRoutesTables beginList" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}") - Observable> beginList(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets the currently advertised routes table associated with the express route crossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 - * @return the ExpressRouteCircuitsRoutesTableListResultInner object if successful. - */ - public ExpressRouteCircuitsRoutesTableListResultInner list(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return listWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().last().body(); - } - - /** - * Gets the currently advertised routes table associated with the express route crossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 listAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); - } - - /** - * Gets the currently advertised routes table associated with the express route crossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable listAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return listWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsRoutesTableListResultInner>() { - @Override - public ExpressRouteCircuitsRoutesTableListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the currently advertised routes table associated with the express route crossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> listWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (devicePath == null) { - throw new IllegalArgumentException("Parameter devicePath 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.list(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Gets the currently advertised routes table associated with the express route crossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 - * @return the ExpressRouteCircuitsRoutesTableListResultInner object if successful. - */ - public ExpressRouteCircuitsRoutesTableListResultInner beginList(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return beginListWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); - } - - /** - * Gets the currently advertised routes table associated with the express route crossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 beginListAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginListWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); - } - - /** - * Gets the currently advertised routes table associated with the express route crossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitsRoutesTableListResultInner object - */ - public Observable beginListAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return beginListWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsRoutesTableListResultInner>() { - @Override - public ExpressRouteCircuitsRoutesTableListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the currently advertised routes table associated with the express route crossConnection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitsRoutesTableListResultInner object - */ - public Observable> beginListWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (devicePath == null) { - throw new IllegalArgumentException("Parameter devicePath 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginList(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginListDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginListDelegate(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); - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionInner.java deleted file mode 100644 index b6498ec9527..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionInner.java +++ /dev/null @@ -1,226 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.microsoft.azure.management.network.ExpressRouteCircuitReference; -import com.microsoft.azure.management.network.ServiceProviderProvisioningState; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; - -/** - * ExpressRouteCrossConnection resource. - */ -@JsonFlatten -public class ExpressRouteCrossConnectionInner extends Resource { - /** - * The name of the primary port. - */ - @JsonProperty(value = "properties.primaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) - private String primaryAzurePort; - - /** - * The name of the secondary port. - */ - @JsonProperty(value = "properties.secondaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) - private String secondaryAzurePort; - - /** - * The identifier of the circuit traffic. - */ - @JsonProperty(value = "properties.sTag", access = JsonProperty.Access.WRITE_ONLY) - private Integer sTag; - - /** - * The peering location of the ExpressRoute circuit. - */ - @JsonProperty(value = "properties.peeringLocation", access = JsonProperty.Access.WRITE_ONLY) - private String peeringLocation; - - /** - * The circuit bandwidth In Mbps. - */ - @JsonProperty(value = "properties.bandwidthInMbps", access = JsonProperty.Access.WRITE_ONLY) - private Integer bandwidthInMbps; - - /** - * The ExpressRouteCircuit. - */ - @JsonProperty(value = "properties.expressRouteCircuit", access = JsonProperty.Access.WRITE_ONLY) - private ExpressRouteCircuitReference expressRouteCircuit; - - /** - * The provisioning state of the circuit in the connectivity provider - * system. Possible values are 'NotProvisioned', 'Provisioning', - * 'Provisioned'. Possible values include: 'NotProvisioned', - * 'Provisioning', 'Provisioned', 'Deprovisioning'. - */ - @JsonProperty(value = "properties.serviceProviderProvisioningState") - private ServiceProviderProvisioningState serviceProviderProvisioningState; - - /** - * Additional read only notes set by the connectivity provider. - */ - @JsonProperty(value = "properties.serviceProviderNotes") - private String serviceProviderNotes; - - /** - * Gets the provisioning state of the public IP resource. Possible values - * are: 'Updating', 'Deleting', and 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * The list of peerings. - */ - @JsonProperty(value = "properties.peerings") - private List peerings; - - /** - * Gets a unique read-only string that changes whenever the resource is - * updated. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /** - * Get the primaryAzurePort value. - * - * @return the primaryAzurePort value - */ - public String primaryAzurePort() { - return this.primaryAzurePort; - } - - /** - * Get the secondaryAzurePort value. - * - * @return the secondaryAzurePort value - */ - public String secondaryAzurePort() { - return this.secondaryAzurePort; - } - - /** - * Get the sTag value. - * - * @return the sTag value - */ - public Integer sTag() { - return this.sTag; - } - - /** - * Get the peeringLocation value. - * - * @return the peeringLocation value - */ - public String peeringLocation() { - return this.peeringLocation; - } - - /** - * Get the bandwidthInMbps value. - * - * @return the bandwidthInMbps value - */ - public Integer bandwidthInMbps() { - return this.bandwidthInMbps; - } - - /** - * Get the expressRouteCircuit value. - * - * @return the expressRouteCircuit value - */ - public ExpressRouteCircuitReference expressRouteCircuit() { - return this.expressRouteCircuit; - } - - /** - * Get the serviceProviderProvisioningState value. - * - * @return the serviceProviderProvisioningState value - */ - public ServiceProviderProvisioningState serviceProviderProvisioningState() { - return this.serviceProviderProvisioningState; - } - - /** - * Set the serviceProviderProvisioningState value. - * - * @param serviceProviderProvisioningState the serviceProviderProvisioningState value to set - * @return the ExpressRouteCrossConnectionInner object itself. - */ - public ExpressRouteCrossConnectionInner withServiceProviderProvisioningState(ServiceProviderProvisioningState serviceProviderProvisioningState) { - this.serviceProviderProvisioningState = serviceProviderProvisioningState; - return this; - } - - /** - * Get the serviceProviderNotes value. - * - * @return the serviceProviderNotes value - */ - public String serviceProviderNotes() { - return this.serviceProviderNotes; - } - - /** - * Set the serviceProviderNotes value. - * - * @param serviceProviderNotes the serviceProviderNotes value to set - * @return the ExpressRouteCrossConnectionInner object itself. - */ - public ExpressRouteCrossConnectionInner withServiceProviderNotes(String serviceProviderNotes) { - this.serviceProviderNotes = serviceProviderNotes; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the peerings value. - * - * @return the peerings value - */ - public List peerings() { - return this.peerings; - } - - /** - * Set the peerings value. - * - * @param peerings the peerings value to set - * @return the ExpressRouteCrossConnectionInner object itself. - */ - public ExpressRouteCrossConnectionInner withPeerings(List peerings) { - this.peerings = peerings; - return this; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java deleted file mode 100644 index af150dbc97c..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java +++ /dev/null @@ -1,403 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.microsoft.azure.management.network.ExpressRoutePeeringType; -import com.microsoft.azure.management.network.ExpressRoutePeeringState; -import com.microsoft.azure.management.network.ExpressRouteCircuitPeeringConfig; -import com.microsoft.azure.management.network.Ipv6ExpressRouteCircuitPeeringConfig; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.SubResource; - -/** - * Peering in an ExpressRoute Cross Connection resource. - */ -@JsonFlatten -public class ExpressRouteCrossConnectionPeeringInner extends SubResource { - /** - * The peering type. Possible values include: 'AzurePublicPeering', - * 'AzurePrivatePeering', 'MicrosoftPeering'. - */ - @JsonProperty(value = "properties.peeringType") - private ExpressRoutePeeringType peeringType; - - /** - * The peering state. Possible values include: 'Disabled', 'Enabled'. - */ - @JsonProperty(value = "properties.state") - private ExpressRoutePeeringState state; - - /** - * The Azure ASN. - */ - @JsonProperty(value = "properties.azureASN", access = JsonProperty.Access.WRITE_ONLY) - private Integer azureASN; - - /** - * The peer ASN. - */ - @JsonProperty(value = "properties.peerASN") - private Long peerASN; - - /** - * The primary address prefix. - */ - @JsonProperty(value = "properties.primaryPeerAddressPrefix") - private String primaryPeerAddressPrefix; - - /** - * The secondary address prefix. - */ - @JsonProperty(value = "properties.secondaryPeerAddressPrefix") - private String secondaryPeerAddressPrefix; - - /** - * The primary port. - */ - @JsonProperty(value = "properties.primaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) - private String primaryAzurePort; - - /** - * The secondary port. - */ - @JsonProperty(value = "properties.secondaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) - private String secondaryAzurePort; - - /** - * The shared key. - */ - @JsonProperty(value = "properties.sharedKey") - private String sharedKey; - - /** - * The VLAN ID. - */ - @JsonProperty(value = "properties.vlanId") - private Integer vlanId; - - /** - * The Microsoft peering configuration. - */ - @JsonProperty(value = "properties.microsoftPeeringConfig") - private ExpressRouteCircuitPeeringConfig microsoftPeeringConfig; - - /** - * Gets the provisioning state of the public IP resource. Possible values - * are: 'Updating', 'Deleting', and 'Failed'. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /** - * The GatewayManager Etag. - */ - @JsonProperty(value = "properties.gatewayManagerEtag", access = JsonProperty.Access.WRITE_ONLY) - private String gatewayManagerEtag; - - /** - * Gets whether the provider or the customer last modified the peering. - */ - @JsonProperty(value = "properties.lastModifiedBy") - private String lastModifiedBy; - - /** - * The IPv6 peering configuration. - */ - @JsonProperty(value = "properties.ipv6PeeringConfig") - private Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig; - - /** - * Gets name of the resource that is unique within a resource group. This - * name can be used to access the resource. - */ - @JsonProperty(value = "name") - private String name; - - /** - * A unique read-only string that changes whenever the resource is updated. - */ - @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) - private String etag; - - /** - * Get the peeringType value. - * - * @return the peeringType value - */ - public ExpressRoutePeeringType peeringType() { - return this.peeringType; - } - - /** - * Set the peeringType value. - * - * @param peeringType the peeringType value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withPeeringType(ExpressRoutePeeringType peeringType) { - this.peeringType = peeringType; - return this; - } - - /** - * Get the state value. - * - * @return the state value - */ - public ExpressRoutePeeringState state() { - return this.state; - } - - /** - * Set the state value. - * - * @param state the state value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withState(ExpressRoutePeeringState state) { - this.state = state; - return this; - } - - /** - * Get the azureASN value. - * - * @return the azureASN value - */ - public Integer azureASN() { - return this.azureASN; - } - - /** - * Get the peerASN value. - * - * @return the peerASN value - */ - public Long peerASN() { - return this.peerASN; - } - - /** - * Set the peerASN value. - * - * @param peerASN the peerASN value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withPeerASN(Long peerASN) { - this.peerASN = peerASN; - return this; - } - - /** - * Get the primaryPeerAddressPrefix value. - * - * @return the primaryPeerAddressPrefix value - */ - public String primaryPeerAddressPrefix() { - return this.primaryPeerAddressPrefix; - } - - /** - * Set the primaryPeerAddressPrefix value. - * - * @param primaryPeerAddressPrefix the primaryPeerAddressPrefix value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix) { - this.primaryPeerAddressPrefix = primaryPeerAddressPrefix; - return this; - } - - /** - * Get the secondaryPeerAddressPrefix value. - * - * @return the secondaryPeerAddressPrefix value - */ - public String secondaryPeerAddressPrefix() { - return this.secondaryPeerAddressPrefix; - } - - /** - * Set the secondaryPeerAddressPrefix value. - * - * @param secondaryPeerAddressPrefix the secondaryPeerAddressPrefix value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix) { - this.secondaryPeerAddressPrefix = secondaryPeerAddressPrefix; - return this; - } - - /** - * Get the primaryAzurePort value. - * - * @return the primaryAzurePort value - */ - public String primaryAzurePort() { - return this.primaryAzurePort; - } - - /** - * Get the secondaryAzurePort value. - * - * @return the secondaryAzurePort value - */ - public String secondaryAzurePort() { - return this.secondaryAzurePort; - } - - /** - * Get the sharedKey value. - * - * @return the sharedKey value - */ - public String sharedKey() { - return this.sharedKey; - } - - /** - * Set the sharedKey value. - * - * @param sharedKey the sharedKey value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withSharedKey(String sharedKey) { - this.sharedKey = sharedKey; - return this; - } - - /** - * Get the vlanId value. - * - * @return the vlanId value - */ - public Integer vlanId() { - return this.vlanId; - } - - /** - * Set the vlanId value. - * - * @param vlanId the vlanId value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withVlanId(Integer vlanId) { - this.vlanId = vlanId; - return this; - } - - /** - * Get the microsoftPeeringConfig value. - * - * @return the microsoftPeeringConfig value - */ - public ExpressRouteCircuitPeeringConfig microsoftPeeringConfig() { - return this.microsoftPeeringConfig; - } - - /** - * Set the microsoftPeeringConfig value. - * - * @param microsoftPeeringConfig the microsoftPeeringConfig value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withMicrosoftPeeringConfig(ExpressRouteCircuitPeeringConfig microsoftPeeringConfig) { - this.microsoftPeeringConfig = microsoftPeeringConfig; - return this; - } - - /** - * Get the provisioningState value. - * - * @return the provisioningState value - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the gatewayManagerEtag value. - * - * @return the gatewayManagerEtag value - */ - public String gatewayManagerEtag() { - return this.gatewayManagerEtag; - } - - /** - * Get the lastModifiedBy value. - * - * @return the lastModifiedBy value - */ - public String lastModifiedBy() { - return this.lastModifiedBy; - } - - /** - * Set the lastModifiedBy value. - * - * @param lastModifiedBy the lastModifiedBy value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withLastModifiedBy(String lastModifiedBy) { - this.lastModifiedBy = lastModifiedBy; - return this; - } - - /** - * Get the ipv6PeeringConfig value. - * - * @return the ipv6PeeringConfig value - */ - public Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig() { - return this.ipv6PeeringConfig; - } - - /** - * Set the ipv6PeeringConfig value. - * - * @param ipv6PeeringConfig the ipv6PeeringConfig value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withIpv6PeeringConfig(Ipv6ExpressRouteCircuitPeeringConfig ipv6PeeringConfig) { - this.ipv6PeeringConfig = ipv6PeeringConfig; - return this; - } - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the ExpressRouteCrossConnectionPeeringInner object itself. - */ - public ExpressRouteCrossConnectionPeeringInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the etag value. - * - * @return the etag value - */ - public String etag() { - return this.etag; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java deleted file mode 100644 index e79d9d5385b..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java +++ /dev/null @@ -1,776 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ExpressRouteCrossConnectionPeerings. - */ -public class ExpressRouteCrossConnectionPeeringsInner { - /** The Retrofit service to perform REST calls. */ - private ExpressRouteCrossConnectionPeeringsService service; - /** The service client containing this operation class. */ - private NetworkManagementClientImpl client; - - /** - * Initializes an instance of ExpressRouteCrossConnectionPeeringsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ExpressRouteCrossConnectionPeeringsInner(Retrofit retrofit, NetworkManagementClientImpl client) { - this.service = retrofit.create(ExpressRouteCrossConnectionPeeringsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ExpressRouteCrossConnectionPeerings to be - * used by Retrofit to perform actually REST calls. - */ - interface ExpressRouteCrossConnectionPeeringsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCrossConnectionPeerings list" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings") - Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @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.ExpressRouteCrossConnectionPeerings delete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", method = "DELETE", hasBody = true) - Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @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.ExpressRouteCrossConnectionPeerings beginDelete" }) - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}", method = "DELETE", hasBody = true) - Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @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.ExpressRouteCrossConnectionPeerings get" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") - Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @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.ExpressRouteCrossConnectionPeerings createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionPeeringInner peeringParameters, @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.ExpressRouteCrossConnectionPeerings beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionPeeringInner peeringParameters, @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.ExpressRouteCrossConnectionPeerings listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @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 - * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object if successful. - */ - public PagedList list(final String resourceGroupName, final String crossConnectionName) { - ServiceResponse> response = listSinglePageAsync(resourceGroupName, crossConnectionName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @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> listAsync(final String resourceGroupName, final String crossConnectionName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(resourceGroupName, crossConnectionName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCrossConnectionPeeringInner> object - */ - public Observable> listAsync(final String resourceGroupName, final String crossConnectionName) { - return listWithServiceResponseAsync(resourceGroupName, crossConnectionName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCrossConnectionPeeringInner> object - */ - public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String crossConnectionName) { - return listSinglePageAsync(resourceGroupName, crossConnectionName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync(final String resourceGroupName, final String crossConnectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, crossConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Deletes the specified peering from the ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @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 delete(String resourceGroupName, String crossConnectionName, String peeringName) { - deleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).toBlocking().last().body(); - } - - /** - * Deletes the specified peering from the ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @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 deleteAsync(String resourceGroupName, String crossConnectionName, String peeringName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName), serviceCallback); - } - - /** - * Deletes the specified peering from the ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable deleteAsync(String resourceGroupName, String crossConnectionName, String peeringName) { - return deleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified peering from the ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Deletes the specified peering from the ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @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 beginDelete(String resourceGroupName, String crossConnectionName, String peeringName) { - beginDeleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).toBlocking().single().body(); - } - - /** - * Deletes the specified peering from the ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @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 beginDeleteAsync(String resourceGroupName, String crossConnectionName, String peeringName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName), serviceCallback); - } - - /** - * Deletes the specified peering from the ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable beginDeleteAsync(String resourceGroupName, String crossConnectionName, String peeringName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Deletes the specified peering from the ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. - */ - public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginDeleteDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginDeleteDelegate(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()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the specified peering for the ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @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 - * @return the ExpressRouteCrossConnectionPeeringInner object if successful. - */ - public ExpressRouteCrossConnectionPeeringInner get(String resourceGroupName, String crossConnectionName, String peeringName) { - return getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).toBlocking().single().body(); - } - - /** - * Gets the specified peering for the ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @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 getAsync(String resourceGroupName, String crossConnectionName, String peeringName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName), serviceCallback); - } - - /** - * Gets the specified peering for the ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionPeeringInner object - */ - public Observable getAsync(String resourceGroupName, String crossConnectionName, String peeringName) { - return getWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName).map(new Func1, ExpressRouteCrossConnectionPeeringInner>() { - @Override - public ExpressRouteCrossConnectionPeeringInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the specified peering for the ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionPeeringInner object - */ - public Observable> getWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Creates or updates a peering in the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. - * @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 - * @return the ExpressRouteCrossConnectionPeeringInner object if successful. - */ - public ExpressRouteCrossConnectionPeeringInner createOrUpdate(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).toBlocking().last().body(); - } - - /** - * Creates or updates a peering in the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. - * @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 createOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters), serviceCallback); - } - - /** - * Creates or updates a peering in the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).map(new Func1, ExpressRouteCrossConnectionPeeringInner>() { - @Override - public ExpressRouteCrossConnectionPeeringInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a peering in the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName 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 (peeringParameters == null) { - throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(peeringParameters); - Observable> observable = service.createOrUpdate(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), peeringParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Creates or updates a peering in the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. - * @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 - * @return the ExpressRouteCrossConnectionPeeringInner object if successful. - */ - public ExpressRouteCrossConnectionPeeringInner beginCreateOrUpdate(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).toBlocking().single().body(); - } - - /** - * Creates or updates a peering in the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. - * @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 beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters), serviceCallback); - } - - /** - * Creates or updates a peering in the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionPeeringInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameters).map(new Func1, ExpressRouteCrossConnectionPeeringInner>() { - @Override - public ExpressRouteCrossConnectionPeeringInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Creates or updates a peering in the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param peeringParameters Parameters supplied to the create or update ExpressRouteCrossConnection peering operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionPeeringInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName 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 (peeringParameters == null) { - throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(peeringParameters); - return service.beginCreateOrUpdate(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), peeringParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @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 - * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @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> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCrossConnectionPeeringInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCrossConnectionPeeringInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all peerings in a specified ExpressRouteCrossConnection. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ExpressRouteCrossConnectionPeeringInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java deleted file mode 100644 index 8e267195d1b..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java +++ /dev/null @@ -1,1706 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.network.TagsObject; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; -import java.util.Map; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.POST; -import retrofit2.http.PUT; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ExpressRouteCrossConnections. - */ -public class ExpressRouteCrossConnectionsInner implements InnerSupportsGet, InnerSupportsListing { - /** The Retrofit service to perform REST calls. */ - private ExpressRouteCrossConnectionsService service; - /** The service client containing this operation class. */ - private NetworkManagementClientImpl client; - - /** - * Initializes an instance of ExpressRouteCrossConnectionsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ExpressRouteCrossConnectionsInner(Retrofit retrofit, NetworkManagementClientImpl client) { - this.service = retrofit.create(ExpressRouteCrossConnectionsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ExpressRouteCrossConnections to be - * used by Retrofit to perform actually REST calls. - */ - interface ExpressRouteCrossConnectionsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCrossConnections list" }) - @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections") - Observable> list(@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.ExpressRouteCrossConnections listByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections") - Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @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.ExpressRouteCrossConnections getByResourceGroup" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") - Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @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.ExpressRouteCrossConnections createOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") - Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionInner 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.ExpressRouteCrossConnections beginCreateOrUpdate" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") - Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Body ExpressRouteCrossConnectionInner 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.ExpressRouteCrossConnections updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject crossConnectionParameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCrossConnections beginUpdateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") - Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject crossConnectionParameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCrossConnections listArpTable" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}") - Observable> listArpTable(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.ExpressRouteCrossConnections beginListArpTable" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}") - Observable> beginListArpTable(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.ExpressRouteCrossConnections listRoutesTableSummary" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}") - Observable> listRoutesTableSummary(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.ExpressRouteCrossConnections beginListRoutesTableSummary" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}") - Observable> beginListRoutesTableSummary(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.ExpressRouteCrossConnections listRoutesTable" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}") - Observable> listRoutesTable(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.ExpressRouteCrossConnections beginListRoutesTable" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}") - Observable> beginListRoutesTable(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("peeringName") String peeringName, @Path("devicePath") String devicePath, @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.ExpressRouteCrossConnections listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @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.ExpressRouteCrossConnections listByResourceGroupNext" }) - @GET - Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @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 - * @return the PagedList<ExpressRouteCrossConnectionInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @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> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ExpressRouteCrossConnectionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @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 - * @return the PagedList<ExpressRouteCrossConnectionInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ExpressRouteCrossConnectionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets details about the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group (peering location of the circuit). - * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). - * @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 - * @return the ExpressRouteCrossConnectionInner object if successful. - */ - public ExpressRouteCrossConnectionInner getByResourceGroup(String resourceGroupName, String crossConnectionName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, crossConnectionName).toBlocking().single().body(); - } - - /** - * Gets details about the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group (peering location of the circuit). - * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). - * @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 getByResourceGroupAsync(String resourceGroupName, String crossConnectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, crossConnectionName), serviceCallback); - } - - /** - * Gets details about the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group (peering location of the circuit). - * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionInner object - */ - public Observable getByResourceGroupAsync(String resourceGroupName, String crossConnectionName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, crossConnectionName).map(new Func1, ExpressRouteCrossConnectionInner>() { - @Override - public ExpressRouteCrossConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets details about the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group (peering location of the circuit). - * @param crossConnectionName The name of the ExpressRouteCrossConnection (service key of the circuit). - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionInner object - */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String crossConnectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, crossConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getByResourceGroupDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Update the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param parameters Parameters supplied to the update express route crossConnection operation. - * @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 - * @return the ExpressRouteCrossConnectionInner object if successful. - */ - public ExpressRouteCrossConnectionInner createOrUpdate(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).toBlocking().last().body(); - } - - /** - * Update the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param parameters Parameters supplied to the update express route crossConnection operation. - * @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 createOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters), serviceCallback); - } - - /** - * Update the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param parameters Parameters supplied to the update express route crossConnection operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable createOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).map(new Func1, ExpressRouteCrossConnectionInner>() { - @Override - public ExpressRouteCrossConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param parameters Parameters supplied to the update express route crossConnection operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, crossConnectionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Update the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param parameters Parameters supplied to the update express route crossConnection operation. - * @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 - * @return the ExpressRouteCrossConnectionInner object if successful. - */ - public ExpressRouteCrossConnectionInner beginCreateOrUpdate(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).toBlocking().single().body(); - } - - /** - * Update the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param parameters Parameters supplied to the update express route crossConnection operation. - * @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 beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters), serviceCallback); - } - - /** - * Update the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param parameters Parameters supplied to the update express route crossConnection operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionInner object - */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, parameters).map(new Func1, ExpressRouteCrossConnectionInner>() { - @Override - public ExpressRouteCrossConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Update the specified ExpressRouteCrossConnection. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param parameters Parameters supplied to the update express route crossConnection operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionInner object - */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, ExpressRouteCrossConnectionInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, crossConnectionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @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 - * @return the ExpressRouteCrossConnectionInner object if successful. - */ - public ExpressRouteCrossConnectionInner updateTags(String resourceGroupName, String crossConnectionName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName).toBlocking().last().body(); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @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 updateTagsAsync(String resourceGroupName, String crossConnectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName), serviceCallback); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String crossConnectionName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName).map(new Func1, ExpressRouteCrossConnectionInner>() { - @Override - public ExpressRouteCrossConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String crossConnectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject crossConnectionParameters = new TagsObject(); - crossConnectionParameters.withTags(null); - Observable> observable = service.updateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @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 - * @return the ExpressRouteCrossConnectionInner object if successful. - */ - public ExpressRouteCrossConnectionInner updateTags(String resourceGroupName, String crossConnectionName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).toBlocking().last().body(); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @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 updateTagsAsync(String resourceGroupName, String crossConnectionName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags), serviceCallback); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String crossConnectionName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).map(new Func1, ExpressRouteCrossConnectionInner>() { - @Override - public ExpressRouteCrossConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject crossConnectionParameters = new TagsObject(); - crossConnectionParameters.withTags(tags); - Observable> observable = service.updateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @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 - * @return the ExpressRouteCrossConnectionInner object if successful. - */ - public ExpressRouteCrossConnectionInner beginUpdateTags(String resourceGroupName, String crossConnectionName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName).toBlocking().single().body(); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @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 beginUpdateTagsAsync(String resourceGroupName, String crossConnectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName), serviceCallback); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String crossConnectionName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName).map(new Func1, ExpressRouteCrossConnectionInner>() { - @Override - public ExpressRouteCrossConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String crossConnectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject crossConnectionParameters = new TagsObject(); - crossConnectionParameters.withTags(null); - return service.beginUpdateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @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 - * @return the ExpressRouteCrossConnectionInner object if successful. - */ - public ExpressRouteCrossConnectionInner beginUpdateTags(String resourceGroupName, String crossConnectionName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).toBlocking().single().body(); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @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 beginUpdateTagsAsync(String resourceGroupName, String crossConnectionName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags), serviceCallback); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String crossConnectionName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).map(new Func1, ExpressRouteCrossConnectionInner>() { - @Override - public ExpressRouteCrossConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject crossConnectionParameters = new TagsObject(); - crossConnectionParameters.withTags(tags); - return service.beginUpdateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @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 - * @return the ExpressRouteCircuitsArpTableListResultInner object if successful. - */ - public ExpressRouteCircuitsArpTableListResultInner listArpTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return listArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().last().body(); - } - - /** - * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @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 listArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); - } - - /** - * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable listArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return listArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsArpTableListResultInner>() { - @Override - public ExpressRouteCircuitsArpTableListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> listArpTableWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (devicePath == null) { - throw new IllegalArgumentException("Parameter devicePath 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.listArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @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 - * @return the ExpressRouteCircuitsArpTableListResultInner object if successful. - */ - public ExpressRouteCircuitsArpTableListResultInner beginListArpTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return beginListArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); - } - - /** - * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @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 beginListArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginListArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); - } - - /** - * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitsArpTableListResultInner object - */ - public Observable beginListArpTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return beginListArpTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsArpTableListResultInner>() { - @Override - public ExpressRouteCircuitsArpTableListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the currently advertised ARP table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitsArpTableListResultInner object - */ - public Observable> beginListArpTableWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (devicePath == null) { - throw new IllegalArgumentException("Parameter devicePath 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginListArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginListArpTableDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginListArpTableDelegate(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); - } - - /** - * Gets the route table summary associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 - * @return the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object if successful. - */ - public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner listRoutesTableSummary(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().last().body(); - } - - /** - * Gets the route table summary associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 listRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); - } - - /** - * Gets the route table summary associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable listRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner>() { - @Override - public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the route table summary associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> listRoutesTableSummaryWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (devicePath == null) { - throw new IllegalArgumentException("Parameter devicePath 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.listRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Gets the route table summary associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 - * @return the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object if successful. - */ - public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner beginListRoutesTableSummary(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); - } - - /** - * Gets the route table summary associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 beginListRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); - } - - /** - * Gets the route table summary associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object - */ - public Observable beginListRoutesTableSummaryAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner>() { - @Override - public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the route table summary associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object - */ - public Observable> beginListRoutesTableSummaryWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (devicePath == null) { - throw new IllegalArgumentException("Parameter devicePath 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginListRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginListRoutesTableSummaryDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginListRoutesTableSummaryDelegate(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); - } - - /** - * Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 - * @return the ExpressRouteCircuitsRoutesTableListResultInner object if successful. - */ - public ExpressRouteCircuitsRoutesTableListResultInner listRoutesTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return listRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().last().body(); - } - - /** - * Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 listRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); - } - - /** - * Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable listRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return listRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsRoutesTableListResultInner>() { - @Override - public ExpressRouteCircuitsRoutesTableListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> listRoutesTableWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (devicePath == null) { - throw new IllegalArgumentException("Parameter devicePath 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.listRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 - * @return the ExpressRouteCircuitsRoutesTableListResultInner object if successful. - */ - public ExpressRouteCircuitsRoutesTableListResultInner beginListRoutesTable(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return beginListRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).toBlocking().single().body(); - } - - /** - * Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @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 beginListRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginListRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath), serviceCallback); - } - - /** - * Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitsRoutesTableListResultInner object - */ - public Observable beginListRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - return beginListRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1, ExpressRouteCircuitsRoutesTableListResultInner>() { - @Override - public ExpressRouteCircuitsRoutesTableListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the currently advertised routes table associated with the express route cross connection in a resource group. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the ExpressRouteCrossConnection. - * @param peeringName The name of the peering. - * @param devicePath The path of the device. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCircuitsRoutesTableListResultInner object - */ - public Observable> beginListRoutesTableWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName is required and cannot be null."); - } - if (peeringName == null) { - throw new IllegalArgumentException("Parameter peeringName is required and cannot be null."); - } - if (devicePath == null) { - throw new IllegalArgumentException("Parameter devicePath 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginListRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginListRoutesTableDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginListRoutesTableDelegate(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); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @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 - * @return the PagedList<ExpressRouteCrossConnectionInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @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> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a subscription. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ExpressRouteCrossConnectionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @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 - * @return the PagedList<ExpressRouteCrossConnectionInner> object if successful. - */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @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> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object - */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ExpressRouteCrossConnectionInner> object - */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Retrieves all the ExpressRouteCrossConnections in a resource group. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ExpressRouteCrossConnectionInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java deleted file mode 100644 index 19ecefe1632..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import java.util.List; -import com.microsoft.azure.management.network.ExpressRouteCrossConnectionRoutesTableSummary; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Response for ListRoutesTable associated with the Express Route Cross - * Connections. - */ -public class ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner { - /** - * A list of the routes table. - */ - @JsonProperty(value = "value") - private List value; - - /** - * The URL to get the next set of results. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value value. - * - * @return the value value - */ - public List value() { - return this.value; - } - - /** - * Set the value value. - * - * @param value the value value to set - * @return the ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner object itself. - */ - public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink value. - * - * @return the nextLink value - */ - public String nextLink() { - return this.nextLink; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsTagsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsTagsInner.java deleted file mode 100644 index e391bcaa1e2..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsTagsInner.java +++ /dev/null @@ -1,390 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.network.TagsObject; -import com.microsoft.rest.ServiceCallback; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.Map; -import okhttp3.ResponseBody; -import retrofit2.http.Body; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.PATCH; -import retrofit2.http.Path; -import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in ExpressRouteCrossConnectionsTags. - */ -public class ExpressRouteCrossConnectionsTagsInner { - /** The Retrofit service to perform REST calls. */ - private ExpressRouteCrossConnectionsTagsService service; - /** The service client containing this operation class. */ - private NetworkManagementClientImpl client; - - /** - * Initializes an instance of ExpressRouteCrossConnectionsTagsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ExpressRouteCrossConnectionsTagsInner(Retrofit retrofit, NetworkManagementClientImpl client) { - this.service = retrofit.create(ExpressRouteCrossConnectionsTagsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ExpressRouteCrossConnectionsTags to be - * used by Retrofit to perform actually REST calls. - */ - interface ExpressRouteCrossConnectionsTagsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCrossConnectionsTags update" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") - Observable> update(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject crossConnectionParameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ExpressRouteCrossConnectionsTags beginUpdate" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}") - Observable> beginUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("crossConnectionName") String crossConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject crossConnectionParameters, @Header("User-Agent") String userAgent); - - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @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 - * @return the ExpressRouteCrossConnectionInner object if successful. - */ - public ExpressRouteCrossConnectionInner update(String resourceGroupName, String crossConnectionName) { - return updateWithServiceResponseAsync(resourceGroupName, crossConnectionName).toBlocking().last().body(); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @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 updateAsync(String resourceGroupName, String crossConnectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, crossConnectionName), serviceCallback); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateAsync(String resourceGroupName, String crossConnectionName) { - return updateWithServiceResponseAsync(resourceGroupName, crossConnectionName).map(new Func1, ExpressRouteCrossConnectionInner>() { - @Override - public ExpressRouteCrossConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject crossConnectionParameters = new TagsObject(); - crossConnectionParameters.withTags(null); - Observable> observable = service.update(resourceGroupName, crossConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @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 - * @return the ExpressRouteCrossConnectionInner object if successful. - */ - public ExpressRouteCrossConnectionInner update(String resourceGroupName, String crossConnectionName, Map tags) { - return updateWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).toBlocking().last().body(); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @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 updateAsync(String resourceGroupName, String crossConnectionName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags), serviceCallback); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateAsync(String resourceGroupName, String crossConnectionName, Map tags) { - return updateWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).map(new Func1, ExpressRouteCrossConnectionInner>() { - @Override - public ExpressRouteCrossConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject crossConnectionParameters = new TagsObject(); - crossConnectionParameters.withTags(tags); - Observable> observable = service.update(resourceGroupName, crossConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @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 - * @return the ExpressRouteCrossConnectionInner object if successful. - */ - public ExpressRouteCrossConnectionInner beginUpdate(String resourceGroupName, String crossConnectionName) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName).toBlocking().single().body(); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @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 beginUpdateAsync(String resourceGroupName, String crossConnectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName), serviceCallback); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionInner object - */ - public Observable beginUpdateAsync(String resourceGroupName, String crossConnectionName) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName).map(new Func1, ExpressRouteCrossConnectionInner>() { - @Override - public ExpressRouteCrossConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionInner object - */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject crossConnectionParameters = new TagsObject(); - crossConnectionParameters.withTags(null); - return service.beginUpdate(resourceGroupName, crossConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @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 - * @return the ExpressRouteCrossConnectionInner object if successful. - */ - public ExpressRouteCrossConnectionInner beginUpdate(String resourceGroupName, String crossConnectionName, Map tags) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).toBlocking().single().body(); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @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 beginUpdateAsync(String resourceGroupName, String crossConnectionName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags), serviceCallback); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionInner object - */ - public Observable beginUpdateAsync(String resourceGroupName, String crossConnectionName, Map tags) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, tags).map(new Func1, ExpressRouteCrossConnectionInner>() { - @Override - public ExpressRouteCrossConnectionInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates an express route cross connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param crossConnectionName The name of the cross connection. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ExpressRouteCrossConnectionInner object - */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String crossConnectionName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (crossConnectionName == null) { - throw new IllegalArgumentException("Parameter crossConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject crossConnectionParameters = new TagsObject(); - crossConnectionParameters.withTags(tags); - return service.beginUpdate(resourceGroupName, crossConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProvidersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProvidersInner.java index 11d1782a837..f3125b16d4a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProvidersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProvidersInner.java @@ -149,10 +149,8 @@ public Observable>> listS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java index 418aa258671..7542115f9dc 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java @@ -60,13 +60,13 @@ public class FrontendIPConfigurationInner extends SubResource { * The reference of the subnet resource. */ @JsonProperty(value = "properties.subnet") - private SubnetInner subnet; + private SubResource subnet; /** * The reference of the Public IP resource. */ @JsonProperty(value = "properties.publicIPAddress") - private PublicIPAddressInner publicIPAddress; + private SubResource publicIPAddress; /** * Gets the provisioning state of the public IP resource. Possible values @@ -75,6 +75,13 @@ public class FrontendIPConfigurationInner extends SubResource { @JsonProperty(value = "properties.provisioningState") private String provisioningState; + /** + * A list of availability zones denoting the IP allocated for the resource + * needs to come from. + */ + @JsonProperty(value = "zones") + private List zones; + /** * The name of the resource that is unique within a resource group. This * name can be used to access the resource. @@ -88,13 +95,6 @@ public class FrontendIPConfigurationInner extends SubResource { @JsonProperty(value = "etag") private String etag; - /** - * A list of availability zones denoting the IP allocated for the resource - * needs to come from. - */ - @JsonProperty(value = "zones") - private List zones; - /** * Get the inboundNatRules value. * @@ -176,7 +176,7 @@ public FrontendIPConfigurationInner withPrivateIPAllocationMethod(IPAllocationMe * * @return the subnet value */ - public SubnetInner subnet() { + public SubResource subnet() { return this.subnet; } @@ -186,7 +186,7 @@ public SubnetInner subnet() { * @param subnet the subnet value to set * @return the FrontendIPConfigurationInner object itself. */ - public FrontendIPConfigurationInner withSubnet(SubnetInner subnet) { + public FrontendIPConfigurationInner withSubnet(SubResource subnet) { this.subnet = subnet; return this; } @@ -196,7 +196,7 @@ public FrontendIPConfigurationInner withSubnet(SubnetInner subnet) { * * @return the publicIPAddress value */ - public PublicIPAddressInner publicIPAddress() { + public SubResource publicIPAddress() { return this.publicIPAddress; } @@ -206,7 +206,7 @@ public PublicIPAddressInner publicIPAddress() { * @param publicIPAddress the publicIPAddress value to set * @return the FrontendIPConfigurationInner object itself. */ - public FrontendIPConfigurationInner withPublicIPAddress(PublicIPAddressInner publicIPAddress) { + public FrontendIPConfigurationInner withPublicIPAddress(SubResource publicIPAddress) { this.publicIPAddress = publicIPAddress; return this; } @@ -231,6 +231,26 @@ public FrontendIPConfigurationInner withProvisioningState(String provisioningSta return this; } + /** + * Get the zones value. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones value. + * + * @param zones the zones value to set + * @return the FrontendIPConfigurationInner object itself. + */ + public FrontendIPConfigurationInner withZones(List zones) { + this.zones = zones; + return this; + } + /** * Get the name value. * @@ -271,24 +291,4 @@ public FrontendIPConfigurationInner withEtag(String etag) { return this; } - /** - * Get the zones value. - * - * @return the zones value - */ - public List zones() { - return this.zones; - } - - /** - * Set the zones value. - * - * @param zones the zones value to set - * @return the FrontendIPConfigurationInner object itself. - */ - public FrontendIPConfigurationInner withZones(List zones) { - this.zones = zones; - return this; - } - } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatPoolInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatPoolInner.java index 47411a67475..a9ee803c898 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatPoolInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatPoolInner.java @@ -25,7 +25,8 @@ public class InboundNatPoolInner extends SubResource { private SubResource frontendIPConfiguration; /** - * Possible values include: 'Udp', 'Tcp', 'All'. + * The transport protocol for the endpoint. Possible values are: 'Udp' or + * 'Tcp'. Possible values include: 'Udp', 'Tcp'. */ @JsonProperty(value = "properties.protocol", required = true) private TransportProtocol protocol; @@ -53,23 +54,6 @@ public class InboundNatPoolInner extends SubResource { @JsonProperty(value = "properties.backendPort", required = true) private int backendPort; - /** - * The timeout for the TCP idle connection. The value can be set between 4 - * and 30 minutes. The default value is 4 minutes. This element is only - * used when the protocol is set to TCP. - */ - @JsonProperty(value = "properties.idleTimeoutInMinutes") - private Integer idleTimeoutInMinutes; - - /** - * Configures a virtual machine's endpoint for the floating IP capability - * required to configure a SQL AlwaysOn Availability Group. This setting is - * required when using the SQL AlwaysOn Availability Groups in SQL server. - * This setting can't be changed after you create the endpoint. - */ - @JsonProperty(value = "properties.enableFloatingIP") - private Boolean enableFloatingIP; - /** * Gets the provisioning state of the PublicIP resource. Possible values * are: 'Updating', 'Deleting', and 'Failed'. @@ -190,46 +174,6 @@ public InboundNatPoolInner withBackendPort(int backendPort) { return this; } - /** - * Get the idleTimeoutInMinutes value. - * - * @return the idleTimeoutInMinutes value - */ - public Integer idleTimeoutInMinutes() { - return this.idleTimeoutInMinutes; - } - - /** - * Set the idleTimeoutInMinutes value. - * - * @param idleTimeoutInMinutes the idleTimeoutInMinutes value to set - * @return the InboundNatPoolInner object itself. - */ - public InboundNatPoolInner withIdleTimeoutInMinutes(Integer idleTimeoutInMinutes) { - this.idleTimeoutInMinutes = idleTimeoutInMinutes; - return this; - } - - /** - * Get the enableFloatingIP value. - * - * @return the enableFloatingIP value - */ - public Boolean enableFloatingIP() { - return this.enableFloatingIP; - } - - /** - * Set the enableFloatingIP value. - * - * @param enableFloatingIP the enableFloatingIP value to set - * @return the InboundNatPoolInner object itself. - */ - public InboundNatPoolInner withEnableFloatingIP(Boolean enableFloatingIP) { - this.enableFloatingIP = enableFloatingIP; - return this; - } - /** * Get the provisioningState value. * diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRuleInner.java index 07fba4b35af..20fcfc9766a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRuleInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRuleInner.java @@ -33,13 +33,14 @@ public class InboundNatRuleInner extends SubResource { private NetworkInterfaceIPConfigurationInner backendIPConfiguration; /** - * Possible values include: 'Udp', 'Tcp', 'All'. + * The transport protocol for the endpoint. Possible values are: 'Udp' or + * 'Tcp'. Possible values include: 'Udp', 'Tcp'. */ @JsonProperty(value = "properties.protocol") private TransportProtocol protocol; /** - * The port for the external endpoint. Port numbers for each rule must be + * The port for the external endpoint. Port numbers for each Rule must be * unique within the Load Balancer. Acceptable values range from 1 to * 65534. */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRulesInner.java index 68638debf61..3eb83f8253e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRulesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRulesInner.java @@ -190,10 +190,8 @@ public Observable>> listSinglePageAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -282,10 +280,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -357,10 +353,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -376,9 +370,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) .register(204, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -452,11 +446,9 @@ public Observable> getWithServiceResponseAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; final String expand = null; - return service.get(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + return service.get(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -543,10 +535,8 @@ public Observable> getWithServiceResponseAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -643,11 +633,9 @@ public Observable> createOrUpdateWithServic if (inboundNatRuleParameters == null) { throw new IllegalArgumentException("Parameter inboundNatRuleParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(inboundNatRuleParameters); - Observable> observable = service.createOrUpdate(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), inboundNatRuleParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), inboundNatRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -727,11 +715,9 @@ public Observable> beginCreateOrUpdateWithS if (inboundNatRuleParameters == null) { throw new IllegalArgumentException("Parameter inboundNatRuleParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(inboundNatRuleParameters); - return service.beginCreateOrUpdate(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), inboundNatRuleParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), inboundNatRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -747,8 +733,8 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerBackendAddressPoolsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerBackendAddressPoolsInner.java index 16e5b6e84f2..947e559171b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerBackendAddressPoolsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerBackendAddressPoolsInner.java @@ -170,10 +170,8 @@ public Observable>> listSinglePage if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -263,10 +261,8 @@ public Observable> getWithServiceRespon if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, loadBalancerName, backendAddressPoolName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, loadBalancerName, backendAddressPoolName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerFrontendIPConfigurationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerFrontendIPConfigurationsInner.java index cf00eea51f9..e59db9a3f1e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerFrontendIPConfigurationsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerFrontendIPConfigurationsInner.java @@ -170,10 +170,8 @@ public Observable>> listSingl if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -263,10 +261,8 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, loadBalancerName, frontendIPConfigurationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, loadBalancerName, frontendIPConfigurationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerInner.java index a0c114263a2..e691a8e12ce 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerInner.java @@ -99,6 +99,13 @@ public class LoadBalancerInner extends Resource { @JsonProperty(value = "etag") private String etag; + /** + * A list of availability zones denoting the IP allocated for the resource + * needs to come from. + */ + @JsonProperty(value = "zones") + private List zones; + /** * Get the sku value. * @@ -319,4 +326,24 @@ public LoadBalancerInner withEtag(String etag) { return this; } + /** + * Get the zones value. + * + * @return the zones value + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones value. + * + * @param zones the zones value to set + * @return the LoadBalancerInner object itself. + */ + public LoadBalancerInner withZones(List zones) { + this.zones = zones; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerLoadBalancingRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerLoadBalancingRulesInner.java index 484937fca86..7cf2a722173 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerLoadBalancingRulesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerLoadBalancingRulesInner.java @@ -170,10 +170,8 @@ public Observable>> listSinglePageA if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -263,10 +261,8 @@ public Observable> getWithServiceRespons if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, loadBalancerName, loadBalancingRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, loadBalancerName, loadBalancingRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerNetworkInterfacesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerNetworkInterfacesInner.java index 31f3293fe46..1224a54b02c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerNetworkInterfacesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerNetworkInterfacesInner.java @@ -165,10 +165,8 @@ public Observable>> listSinglePageAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerProbesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerProbesInner.java index 413993ac163..b1890507fa8 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerProbesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerProbesInner.java @@ -170,10 +170,8 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -263,10 +261,8 @@ public Observable> getWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, loadBalancerName, probeName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, loadBalancerName, probeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java index 07317f4599a..e0afbcadfb0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -25,14 +24,12 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -87,14 +84,6 @@ interface LoadBalancersService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("subscriptionId") String subscriptionId, @Body LoadBalancerInner 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.LoadBalancers updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.LoadBalancers beginUpdateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}") - Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("loadBalancerName") String loadBalancerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.LoadBalancers list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -174,10 +163,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -242,10 +229,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -261,9 +246,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) .register(204, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -330,11 +315,9 @@ public Observable> getByResourceGroupWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; final String expand = null; - return service.getByResourceGroup(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + return service.getByResourceGroup(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -414,10 +397,8 @@ public Observable> getByResourceGroupWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -507,11 +488,9 @@ public Observable> createOrUpdateWithServiceR if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, loadBalancerName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, loadBalancerName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -584,11 +563,9 @@ public Observable> beginCreateOrUpdateWithSer if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, loadBalancerName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, loadBalancerName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -604,329 +581,7 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @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 - * @return the LoadBalancerInner object if successful. - */ - public LoadBalancerInner updateTags(String resourceGroupName, String loadBalancerName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName).toBlocking().last().body(); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @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 updateTagsAsync(String resourceGroupName, String loadBalancerName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName), serviceCallback); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String loadBalancerName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName).map(new Func1, LoadBalancerInner>() { - @Override - public LoadBalancerInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String loadBalancerName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (loadBalancerName == null) { - throw new IllegalArgumentException("Parameter loadBalancerName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - Observable> observable = service.updateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param tags Resource tags. - * @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 - * @return the LoadBalancerInner object if successful. - */ - public LoadBalancerInner updateTags(String resourceGroupName, String loadBalancerName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags).toBlocking().last().body(); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param tags Resource tags. - * @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 updateTagsAsync(String resourceGroupName, String loadBalancerName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags), serviceCallback); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String loadBalancerName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags).map(new Func1, LoadBalancerInner>() { - @Override - public LoadBalancerInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (loadBalancerName == null) { - throw new IllegalArgumentException("Parameter loadBalancerName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - Observable> observable = service.updateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @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 - * @return the LoadBalancerInner object if successful. - */ - public LoadBalancerInner beginUpdateTags(String resourceGroupName, String loadBalancerName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName).toBlocking().single().body(); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @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 beginUpdateTagsAsync(String resourceGroupName, String loadBalancerName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName), serviceCallback); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoadBalancerInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String loadBalancerName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName).map(new Func1, LoadBalancerInner>() { - @Override - public LoadBalancerInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoadBalancerInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String loadBalancerName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (loadBalancerName == null) { - throw new IllegalArgumentException("Parameter loadBalancerName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - return service.beginUpdateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param tags Resource tags. - * @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 - * @return the LoadBalancerInner object if successful. - */ - public LoadBalancerInner beginUpdateTags(String resourceGroupName, String loadBalancerName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags).toBlocking().single().body(); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param tags Resource tags. - * @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 beginUpdateTagsAsync(String resourceGroupName, String loadBalancerName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags), serviceCallback); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoadBalancerInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String loadBalancerName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, loadBalancerName, tags).map(new Func1, LoadBalancerInner>() { - @Override - public LoadBalancerInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a load balancer tags. - * - * @param resourceGroupName The name of the resource group. - * @param loadBalancerName The name of the load balancer. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LoadBalancerInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (loadBalancerName == null) { - throw new IllegalArgumentException("Parameter loadBalancerName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - return service.beginUpdateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1015,10 +670,8 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1130,10 +783,8 @@ public Observable>> listByResourceGroupS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleInner.java index 323e48c4e1c..068382ae7ea 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleInner.java @@ -40,7 +40,8 @@ public class LoadBalancingRuleInner extends SubResource { private SubResource probe; /** - * Possible values include: 'Udp', 'Tcp', 'All'. + * The transport protocol for the external endpoint. Possible values are + * 'Udp' or 'Tcp'. Possible values include: 'Udp', 'Tcp'. */ @JsonProperty(value = "properties.protocol", required = true) private TransportProtocol protocol; @@ -54,16 +55,16 @@ public class LoadBalancingRuleInner extends SubResource { private LoadDistribution loadDistribution; /** - * The port for the external endpoint. Port numbers for each rule must be - * unique within the Load Balancer. Acceptable values are between 0 and - * 65534. Note that value 0 enables "Any Port". + * The port for the external endpoint. Port numbers for each Rule must be + * unique within the Load Balancer. Acceptable values are between 1 and + * 65534. */ @JsonProperty(value = "properties.frontendPort", required = true) private int frontendPort; /** * The port used for internal connections on the endpoint. Acceptable - * values are between 0 and 65535. Note that value 0 enables "Any Port". + * values are between 1 and 65535. */ @JsonProperty(value = "properties.backendPort") private Integer backendPort; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java index ba54d6a9835..04b8b7dc3f2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java @@ -15,7 +15,6 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -24,14 +23,12 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -86,14 +83,6 @@ interface LocalNetworkGatewaysService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}", method = "DELETE", hasBody = true) Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("localNetworkGatewayName") String localNetworkGatewayName, @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.LocalNetworkGateways updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("localNetworkGatewayName") String localNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.LocalNetworkGateways beginUpdateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}") - Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("localNetworkGatewayName") String localNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.LocalNetworkGateways listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways") Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -173,11 +162,9 @@ public Observable> createOrUpdateWithS if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -250,11 +237,9 @@ public Observable> beginCreateOrUpdate if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -270,8 +255,8 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -338,10 +323,8 @@ public Observable> getByResourceGroupW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -423,10 +406,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -491,10 +472,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -510,331 +489,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local 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 - * @return the LocalNetworkGatewayInner object if successful. - */ - public LocalNetworkGatewayInner updateTags(String resourceGroupName, String localNetworkGatewayName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).toBlocking().last().body(); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local 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 updateTagsAsync(String resourceGroupName, String localNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName), serviceCallback); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String localNetworkGatewayName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).map(new Func1, LocalNetworkGatewayInner>() { - @Override - public LocalNetworkGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (localNetworkGatewayName == null) { - throw new IllegalArgumentException("Parameter localNetworkGatewayName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - Observable> observable = service.updateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param tags Resource tags. - * @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 - * @return the LocalNetworkGatewayInner object if successful. - */ - public LocalNetworkGatewayInner updateTags(String resourceGroupName, String localNetworkGatewayName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).toBlocking().last().body(); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param tags Resource tags. - * @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 updateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags), serviceCallback); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).map(new Func1, LocalNetworkGatewayInner>() { - @Override - public LocalNetworkGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (localNetworkGatewayName == null) { - throw new IllegalArgumentException("Parameter localNetworkGatewayName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - Observable> observable = service.updateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local 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 - * @return the LocalNetworkGatewayInner object if successful. - */ - public LocalNetworkGatewayInner beginUpdateTags(String resourceGroupName, String localNetworkGatewayName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).toBlocking().single().body(); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local 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 beginUpdateTagsAsync(String resourceGroupName, String localNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName), serviceCallback); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LocalNetworkGatewayInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String localNetworkGatewayName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).map(new Func1, LocalNetworkGatewayInner>() { - @Override - public LocalNetworkGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LocalNetworkGatewayInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (localNetworkGatewayName == null) { - throw new IllegalArgumentException("Parameter localNetworkGatewayName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - return service.beginUpdateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param tags Resource tags. - * @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 - * @return the LocalNetworkGatewayInner object if successful. - */ - public LocalNetworkGatewayInner beginUpdateTags(String resourceGroupName, String localNetworkGatewayName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).toBlocking().single().body(); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param tags Resource tags. - * @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 beginUpdateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags), serviceCallback); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LocalNetworkGatewayInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String localNetworkGatewayName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, tags).map(new Func1, LocalNetworkGatewayInner>() { - @Override - public LocalNetworkGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a local network gateway tags. - * - * @param resourceGroupName The name of the resource group. - * @param localNetworkGatewayName The name of the local network gateway. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the LocalNetworkGatewayInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String localNetworkGatewayName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (localNetworkGatewayName == null) { - throw new IllegalArgumentException("Parameter localNetworkGatewayName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - return service.beginUpdateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -930,10 +587,8 @@ public Observable>> listByResourc if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java index 2036b712338..bed19881641 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java @@ -77,13 +77,7 @@ public class NetworkInterfaceIPConfigurationInner extends SubResource { * Public IP address bound to the IP configuration. */ @JsonProperty(value = "properties.publicIPAddress") - private PublicIPAddressInner publicIPAddress; - - /** - * Application security groups in which the IP configuration is included. - */ - @JsonProperty(value = "properties.applicationSecurityGroups") - private List applicationSecurityGroups; + private SubResource publicIPAddress; /** * The provisioning state of the network interface IP configuration. @@ -270,7 +264,7 @@ public NetworkInterfaceIPConfigurationInner withPrimary(Boolean primary) { * * @return the publicIPAddress value */ - public PublicIPAddressInner publicIPAddress() { + public SubResource publicIPAddress() { return this.publicIPAddress; } @@ -280,31 +274,11 @@ public PublicIPAddressInner publicIPAddress() { * @param publicIPAddress the publicIPAddress value to set * @return the NetworkInterfaceIPConfigurationInner object itself. */ - public NetworkInterfaceIPConfigurationInner withPublicIPAddress(PublicIPAddressInner publicIPAddress) { + public NetworkInterfaceIPConfigurationInner withPublicIPAddress(SubResource publicIPAddress) { this.publicIPAddress = publicIPAddress; return this; } - /** - * Get the applicationSecurityGroups value. - * - * @return the applicationSecurityGroups value - */ - public List applicationSecurityGroups() { - return this.applicationSecurityGroups; - } - - /** - * Set the applicationSecurityGroups value. - * - * @param applicationSecurityGroups the applicationSecurityGroups value to set - * @return the NetworkInterfaceIPConfigurationInner object itself. - */ - public NetworkInterfaceIPConfigurationInner withApplicationSecurityGroups(List applicationSecurityGroups) { - this.applicationSecurityGroups = applicationSecurityGroups; - return this; - } - /** * Get the provisioningState value. * diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationsInner.java index 5353fe02e72..7b2885e8974 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationsInner.java @@ -170,10 +170,8 @@ public Observable>> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -263,10 +261,8 @@ public Observable> getWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java index 1ccf033da22..52602144686 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java @@ -30,7 +30,7 @@ public class NetworkInterfaceInner extends Resource { * The reference of the NetworkSecurityGroup resource. */ @JsonProperty(value = "properties.networkSecurityGroup") - private NetworkSecurityGroupInner networkSecurityGroup; + private SubResource networkSecurityGroup; /** * A list of IPConfigurations of the network interface. @@ -112,7 +112,7 @@ public NetworkInterfaceInner withVirtualMachine(SubResource virtualMachine) { * * @return the networkSecurityGroup value */ - public NetworkSecurityGroupInner networkSecurityGroup() { + public SubResource networkSecurityGroup() { return this.networkSecurityGroup; } @@ -122,7 +122,7 @@ public NetworkSecurityGroupInner networkSecurityGroup() { * @param networkSecurityGroup the networkSecurityGroup value to set * @return the NetworkInterfaceInner object itself. */ - public NetworkInterfaceInner withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup) { + public NetworkInterfaceInner withNetworkSecurityGroup(SubResource networkSecurityGroup) { this.networkSecurityGroup = networkSecurityGroup; return this; } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceLoadBalancersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceLoadBalancersInner.java index 5ca746112ee..edc87040448 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceLoadBalancersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceLoadBalancersInner.java @@ -67,7 +67,7 @@ interface NetworkInterfaceLoadBalancersService { } /** - * List all load balancers in a network interface. + * Get all load balancers in a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. @@ -87,7 +87,7 @@ public Page nextPage(String nextPageLink) { } /** - * List all load balancers in a network interface. + * Get all load balancers in a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. @@ -108,7 +108,7 @@ public Observable>> call(String nextPage } /** - * List all load balancers in a network interface. + * Get all load balancers in a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. @@ -126,7 +126,7 @@ public Page call(ServiceResponse> res } /** - * List all load balancers in a network interface. + * Get all load balancers in a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. @@ -148,7 +148,7 @@ public Observable>> call(ServiceResponse } /** - * List all load balancers in a network interface. + * Get all load balancers in a network interface. * ServiceResponse> * @param resourceGroupName The name of the resource group. ServiceResponse> * @param networkInterfaceName The name of the network interface. @@ -165,10 +165,8 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -190,7 +188,7 @@ private ServiceResponse> listDelegate(Response nextPage(String nextPageLink) { } /** - * List all load balancers in a network interface. + * Get all load balancers in a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -230,7 +228,7 @@ public Observable>> call(String nextPage } /** - * List all load balancers in a network interface. + * Get all load balancers in a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -247,7 +245,7 @@ public Page call(ServiceResponse> res } /** - * List all load balancers in a network interface. + * Get all load balancers in a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -268,7 +266,7 @@ public Observable>> call(ServiceResponse } /** - * List all load balancers in a network interface. + * Get all load balancers in a network interface. * ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java index 5b2eaa6bab1..fe2aae7bb84 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -25,14 +24,12 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; @@ -88,14 +85,6 @@ interface NetworkInterfacesService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Body NetworkInterfaceInner 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.NetworkInterfaces updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkInterfaces beginUpdateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}") - Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkInterfaces list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -132,14 +121,6 @@ interface NetworkInterfacesService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}") Observable> getVirtualMachineScaleSetNetworkInterface(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.NetworkInterfaces listVirtualMachineScaleSetIpConfigurations" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations") - Observable> listVirtualMachineScaleSetIpConfigurations(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.NetworkInterfaces getVirtualMachineScaleSetIpConfiguration" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}") - Observable> getVirtualMachineScaleSetIpConfiguration(@Path("resourceGroupName") String resourceGroupName, @Path("virtualMachineScaleSetName") String virtualMachineScaleSetName, @Path("virtualmachineIndex") String virtualmachineIndex, @Path("networkInterfaceName") String networkInterfaceName, @Path("ipConfigurationName") String ipConfigurationName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @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.NetworkInterfaces listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -148,6 +129,22 @@ interface NetworkInterfacesService { @GET Observable> listByResourceGroupNext(@Url String nextUrl, @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.NetworkInterfaces getEffectiveRouteTableNext" }) + @GET + Observable> getEffectiveRouteTableNext(@Url String nextUrl, @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.NetworkInterfaces beginGetEffectiveRouteTableNext" }) + @GET + Observable> beginGetEffectiveRouteTableNext(@Url String nextUrl, @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.NetworkInterfaces listEffectiveNetworkSecurityGroupsNext" }) + @GET + Observable> listEffectiveNetworkSecurityGroupsNext(@Url String nextUrl, @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.NetworkInterfaces beginListEffectiveNetworkSecurityGroupsNext" }) + @GET + Observable> beginListEffectiveNetworkSecurityGroupsNext(@Url String nextUrl, @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.NetworkInterfaces listVirtualMachineScaleSetVMNetworkInterfacesNext" }) @GET Observable> listVirtualMachineScaleSetVMNetworkInterfacesNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -156,10 +153,6 @@ interface NetworkInterfacesService { @GET Observable> listVirtualMachineScaleSetNetworkInterfacesNext(@Url String nextUrl, @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.NetworkInterfaces listVirtualMachineScaleSetIpConfigurationsNext" }) - @GET - Observable> listVirtualMachineScaleSetIpConfigurationsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - } /** @@ -223,10 +216,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -291,10 +282,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -310,9 +299,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) .register(204, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -379,11 +368,9 @@ public Observable> getByResourceGroupWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; final String expand = null; - return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -463,10 +450,8 @@ public Observable> getByResourceGroupWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -556,11 +541,9 @@ public Observable> createOrUpdateWithServ if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -633,11 +616,9 @@ public Observable> beginCreateOrUpdateWit if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -653,175 +634,252 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates a network interface tags. + * Gets all network interfaces in a subscription. * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. * @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 - * @return the NetworkInterfaceInner object if successful. + * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public NetworkInterfaceInner updateTags(String resourceGroupName, String networkInterfaceName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body(); + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Updates a network interface tags. + * Gets all network interfaces in a subscription. * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. * @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 updateTagsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Updates a network interface tags. + * Gets all network interfaces in a subscription. * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable updateTagsAsync(String resourceGroupName, String networkInterfaceName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, NetworkInterfaceInner>() { - @Override - public NetworkInterfaceInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Updates a network interface tags. + * Gets all network interfaces in a subscription. * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (networkInterfaceName == null) { - throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); - } + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all network interfaces in a subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - Observable> observable = service.updateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2017-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); } + /** - * Updates a network interface tags. + * Gets all network interfaces in a resource group. * * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tags Resource tags. * @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 - * @return the NetworkInterfaceInner object if successful. + * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public NetworkInterfaceInner updateTags(String resourceGroupName, String networkInterfaceName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).toBlocking().last().body(); + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Updates a network interface tags. + * Gets all network interfaces in a resource group. * * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tags Resource tags. * @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 updateTagsAsync(String resourceGroupName, String networkInterfaceName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags), serviceCallback); + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Updates a network interface tags. + * Gets all network interfaces in a resource group. * * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tags Resource tags. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable updateTagsAsync(String resourceGroupName, String networkInterfaceName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).map(new Func1, NetworkInterfaceInner>() { - @Override - public NetworkInterfaceInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Updates a network interface tags. + * Gets all network interfaces in a resource group. * * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tags Resource tags. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the PagedList<NetworkInterfaceInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all network interfaces in a resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, Map tags) { + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - if (networkInterfaceName == null) { - throw new IllegalArgumentException("Parameter networkInterfaceName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - Observable> observable = service.updateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Updates a network interface tags. + * Gets all route tables applied to a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @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 - * @return the NetworkInterfaceInner object if successful. + * @return the PagedList<EffectiveRouteInner> object if successful. */ - public NetworkInterfaceInner beginUpdateTags(String resourceGroupName, String networkInterfaceName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); + public PagedList getEffectiveRouteTable(final String resourceGroupName, final String networkInterfaceName) { + ServiceResponse> response = getEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Updates a network interface tags. + * Gets all route tables applied to a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. @@ -829,36 +887,67 @@ public NetworkInterfaceInner beginUpdateTags(String resourceGroupName, String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + public ServiceFuture> getEffectiveRouteTableAsync(final String resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getEffectiveRouteTableNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Updates a network interface tags. + * Gets all route tables applied to a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkInterfaceInner object + * @return the observable to the PagedList<EffectiveRouteInner> object */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String networkInterfaceName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, NetworkInterfaceInner>() { - @Override - public NetworkInterfaceInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> getEffectiveRouteTableAsync(final String resourceGroupName, final String networkInterfaceName) { + return getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Updates a network interface tags. + * Gets all route tables applied to a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkInterfaceInner object + * @return the observable to the PagedList<EffectiveRouteInner> object + */ + public Observable>> getEffectiveRouteTableWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { + return getEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all route tables applied to a network interface. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param networkInterfaceName The name of the network interface. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EffectiveRouteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + public Observable>> getEffectiveRouteTableSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -868,19 +957,14 @@ public Observable> beginUpdateTagsWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - return service.beginUpdateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2017-08-01"; + return service.getEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = getEffectiveRouteTableDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -888,192 +972,121 @@ public Observable> call(Response tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).toBlocking().single().body(); - } - - /** - * Updates a network interface tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tags Resource tags. - * @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 beginUpdateTagsAsync(String resourceGroupName, String networkInterfaceName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags), serviceCallback); - } - - /** - * Updates a network interface tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkInterfaceInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String networkInterfaceName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).map(new Func1, NetworkInterfaceInner>() { - @Override - public NetworkInterfaceInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a network interface tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkInterfaceInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (networkInterfaceName == null) { - throw new IllegalArgumentException("Parameter networkInterfaceName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - return service.beginUpdateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> getEffectiveRouteTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all network interfaces in a subscription. + * Gets all route tables applied to a network interface. * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @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 - * @return the PagedList<NetworkInterfaceInner> object if successful. + * @return the PagedList<EffectiveRouteInner> object if successful. */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { + public PagedList beginGetEffectiveRouteTable(final String resourceGroupName, final String networkInterfaceName) { + ServiceResponse> response = beginGetEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network interfaces in a subscription. + * Gets all route tables applied to a network interface. * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @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> listAsync(final ListOperationCallback serviceCallback) { + public ServiceFuture> beginGetEffectiveRouteTableAsync(final String resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { + beginGetEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network interfaces in a subscription. + * Gets all route tables applied to a network interface. * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<EffectiveRouteInner> object */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { + public Observable> beginGetEffectiveRouteTableAsync(final String resourceGroupName, final String networkInterfaceName) { + return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all network interfaces in a subscription. + * Gets all route tables applied to a network interface. * + * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<EffectiveRouteInner> object */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { + public Observable>> beginGetEffectiveRouteTableWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { + return beginGetEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(beginGetEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network interfaces in a subscription. + * Gets all route tables applied to a network interface. * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<EffectiveRouteInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listSinglePageAsync() { + public Observable>> beginGetEffectiveRouteTableSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkInterfaceName == null) { + throw new IllegalArgumentException("Parameter networkInterfaceName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + final String apiVersion = "2017-08-01"; + return service.beginGetEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = beginGetEffectiveRouteTableDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1081,250 +1094,104 @@ public Observable>> call(Response> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> beginGetEffectiveRouteTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all network interfaces in a resource group. + * Gets all network security groups applied to a network interface. * * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @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 - * @return the PagedList<NetworkInterfaceInner> object if successful. + * @return the PagedList<EffectiveNetworkSecurityGroupInner> object if successful. */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listEffectiveNetworkSecurityGroups(final String resourceGroupName, final String networkInterfaceName) { + ServiceResponse> response = listEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network interfaces in a resource group. + * Gets all network security groups applied to a network interface. * * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listEffectiveNetworkSecurityGroupsAsync(final String resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { + listEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network interfaces in a resource group. + * Gets all network security groups applied to a network interface. * * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { + public Observable> listEffectiveNetworkSecurityGroupsAsync(final String resourceGroupName, final String networkInterfaceName) { + return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all network interfaces in a resource group. + * Gets all network security groups applied to a network interface. * * @param resourceGroupName The name of the resource group. + * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { + return listEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all network interfaces in a resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } + return Observable.just(page).concatWith(listEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink)); } }); } - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all route tables applied to a network interface. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @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 - * @return the EffectiveRouteListResultInner object if successful. - */ - public EffectiveRouteListResultInner getEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) { - return getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body(); - } - - /** - * Gets all route tables applied to a network interface. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @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 getEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); - } - - /** - * Gets all route tables applied to a network interface. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable getEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName) { - return getEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveRouteListResultInner>() { - @Override - public EffectiveRouteListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets all route tables applied to a network interface. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> getEffectiveRouteTableWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (networkInterfaceName == null) { - throw new IllegalArgumentException("Parameter networkInterfaceName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.getEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Gets all route tables applied to a network interface. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @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 - * @return the EffectiveRouteListResultInner object if successful. - */ - public EffectiveRouteListResultInner beginGetEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) { - return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); - } - - /** - * Gets all route tables applied to a network interface. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @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 beginGetEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); - } - - /** - * Gets all route tables applied to a network interface. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EffectiveRouteListResultInner object - */ - public Observable beginGetEffectiveRouteTableAsync(String resourceGroupName, String networkInterfaceName) { - return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveRouteListResultInner>() { - @Override - public EffectiveRouteListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - /** - * Gets all route tables applied to a network interface. + * Gets all network security groups applied to a network interface. * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EffectiveRouteListResultInner object + * @return the PagedList<EffectiveNetworkSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> beginGetEffectiveRouteTableWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + public Observable>> listEffectiveNetworkSecurityGroupsSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1334,16 +1201,14 @@ public Observable> beginGetEffect if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginGetEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2017-08-01"; + return service.listEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = beginGetEffectiveRouteTableDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = listEffectiveNetworkSecurityGroupsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1351,9 +1216,9 @@ public Observable> call(Response< }); } - private ServiceResponse beginGetEffectiveRouteTableDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> listEffectiveNetworkSecurityGroupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1367,65 +1232,16 @@ private ServiceResponse beginGetEffectiveRouteTab * @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 - * @return the EffectiveNetworkSecurityGroupListResultInner object if successful. - */ - public EffectiveNetworkSecurityGroupListResultInner listEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) { - return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body(); - } - - /** - * Gets all network security groups applied to a network interface. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object + * @return the PagedList<EffectiveNetworkSecurityGroupInner> object if successful. */ - public ServiceFuture listEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); - } - - /** - * Gets all network security groups applied to a network interface. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable listEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName) { - return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveNetworkSecurityGroupListResultInner>() { + public PagedList beginListEffectiveNetworkSecurityGroups(final String resourceGroupName, final String networkInterfaceName) { + ServiceResponse> response = beginListEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); + return new PagedList(response.body()) { @Override - public EffectiveNetworkSecurityGroupListResultInner call(ServiceResponse response) { - return response.body(); + public Page nextPage(String nextPageLink) { + return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } - }); - } - - /** - * Gets all network security groups applied to a network interface. - * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (networkInterfaceName == null) { - throw new IllegalArgumentException("Parameter networkInterfaceName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.listEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + }; } /** @@ -1433,13 +1249,20 @@ public Observable> * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @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 - * @return the EffectiveNetworkSecurityGroupListResultInner object if successful. + * @return the {@link ServiceFuture} object */ - public EffectiveNetworkSecurityGroupListResultInner beginListEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) { - return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); + public ServiceFuture> beginListEffectiveNetworkSecurityGroupsAsync(final String resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginListEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** @@ -1447,12 +1270,17 @@ public EffectiveNetworkSecurityGroupListResultInner beginListEffectiveNetworkSec * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object + * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object */ - public ServiceFuture beginListEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); + public Observable> beginListEffectiveNetworkSecurityGroupsAsync(final String resourceGroupName, final String networkInterfaceName) { + return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -1461,26 +1289,31 @@ public ServiceFuture beginListEffe * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EffectiveNetworkSecurityGroupListResultInner object + * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object */ - public Observable beginListEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName) { - return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveNetworkSecurityGroupListResultInner>() { - @Override - public EffectiveNetworkSecurityGroupListResultInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable>> beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { + return beginListEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(beginListEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink)); + } + }); } /** * Gets all network security groups applied to a network interface. * - * @param resourceGroupName The name of the resource group. - * @param networkInterfaceName The name of the network interface. + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param networkInterfaceName The name of the network interface. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the EffectiveNetworkSecurityGroupListResultInner object + * @return the PagedList<EffectiveNetworkSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { + public Observable>> beginListEffectiveNetworkSecurityGroupsSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1490,16 +1323,14 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginListEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2017-08-01"; + return service.beginListEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = beginListEffectiveNetworkSecurityGroupsDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = beginListEffectiveNetworkSecurityGroupsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1507,9 +1338,9 @@ public Observable> }); } - private ServiceResponse beginListEffectiveNetworkSecurityGroupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> beginListEffectiveNetworkSecurityGroupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1622,7 +1453,7 @@ public Observable>> listVirtualMachi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-02-01"; + final String apiVersion = "2017-03-30"; return service.listVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1743,7 +1574,7 @@ public Observable>> listVirtualMachi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-02-01"; + final String apiVersion = "2017-03-30"; return service.listVirtualMachineScaleSetNetworkInterfaces(resourceGroupName, virtualMachineScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1841,7 +1672,7 @@ public Observable> getVirtualMachineScale if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-02-01"; + final String apiVersion = "2017-03-30"; final String expand = null; return service.getVirtualMachineScaleSetNetworkInterface(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1937,7 +1768,7 @@ public Observable> getVirtualMachineScale if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-02-01"; + final String apiVersion = "2017-03-30"; return service.getVirtualMachineScaleSetNetworkInterface(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1960,129 +1791,102 @@ private ServiceResponse getVirtualMachineScaleSetNetworkI } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all network interfaces in a subscription. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @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 - * @return the PagedList<NetworkInterfaceIPConfigurationInner> object if successful. + * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listVirtualMachineScaleSetIpConfigurations(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { - ServiceResponse> response = listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all network interfaces in a subscription. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @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> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName), - new Func1>>>() { + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all network interfaces in a subscription. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { - return listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName) - .map(new Func1>, Page>() { + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all network interfaces in a subscription. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable>> listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { - return listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all network interfaces in a subscription. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualMachineScaleSetName == null) { - throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); - } - if (virtualmachineIndex == null) { - throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); - } - if (networkInterfaceName == null) { - throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - final String apiVersion = "2018-02-01"; - final String expand = null; - return service.listVirtualMachineScaleSetIpConfigurations(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listVirtualMachineScaleSetIpConfigurationsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2090,134 +1894,110 @@ public Observable>> c }); } + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all network interfaces in a resource group. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param expand Expands referenced resources. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @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 - * @return the PagedList<NetworkInterfaceIPConfigurationInner> object if successful. + * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listVirtualMachineScaleSetIpConfigurations(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) { - ServiceResponse> response = listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all network interfaces in a resource group. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param expand Expands referenced resources. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @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> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand, final ListOperationCallback serviceCallback) { + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand), - new Func1>>>() { + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all network interfaces in a resource group. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param expand Expands referenced resources. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) { - return listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) - .map(new Func1>, Page>() { + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all network interfaces in a resource group. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param expand Expands referenced resources. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable>> listVirtualMachineScaleSetIpConfigurationsWithServiceResponseAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) { - return listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all network interfaces in a resource group. * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param virtualMachineScaleSetName The name of the virtual machine scale set. - ServiceResponse> * @param virtualmachineIndex The virtual machine index. - ServiceResponse> * @param networkInterfaceName The name of the network interface. - ServiceResponse> * @param expand Expands referenced resources. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualMachineScaleSetName == null) { - throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); - } - if (virtualmachineIndex == null) { - throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); - } - if (networkInterfaceName == null) { - throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - final String apiVersion = "2018-02-01"; - return service.listVirtualMachineScaleSetIpConfigurations(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listVirtualMachineScaleSetIpConfigurationsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2225,105 +2005,110 @@ public Observable>> c }); } - private ServiceResponse> listVirtualMachineScaleSetIpConfigurationsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all route tables applied to a network interface. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the ip configuration. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @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 - * @return the NetworkInterfaceIPConfigurationInner object if successful. + * @return the PagedList<EffectiveRouteInner> object if successful. */ - public NetworkInterfaceIPConfigurationInner getVirtualMachineScaleSetIpConfiguration(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) { - return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName).toBlocking().single().body(); + public PagedList getEffectiveRouteTableNext(final String nextPageLink) { + ServiceResponse> response = getEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all route tables applied to a network interface. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the ip configuration. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @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 getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName), serviceCallback); + public ServiceFuture> getEffectiveRouteTableNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getEffectiveRouteTableNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getEffectiveRouteTableNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all route tables applied to a network interface. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the ip configuration. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkInterfaceIPConfigurationInner object + * @return the observable to the PagedList<EffectiveRouteInner> object */ - public Observable getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) { - return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName).map(new Func1, NetworkInterfaceIPConfigurationInner>() { - @Override - public NetworkInterfaceIPConfigurationInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> getEffectiveRouteTableNextAsync(final String nextPageLink) { + return getEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all route tables applied to a network interface. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the ip configuration. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkInterfaceIPConfigurationInner object + * @return the observable to the PagedList<EffectiveRouteInner> object */ - public Observable> getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualMachineScaleSetName == null) { - throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); - } - if (virtualmachineIndex == null) { - throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); - } - if (networkInterfaceName == null) { - throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); - } - if (ipConfigurationName == null) { - throw new IllegalArgumentException("Parameter ipConfigurationName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + public Observable>> getEffectiveRouteTableNextWithServiceResponseAsync(final String nextPageLink) { + return getEffectiveRouteTableNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all route tables applied to a network interface. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EffectiveRouteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getEffectiveRouteTableNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - final String apiVersion = "2018-02-01"; - final String expand = null; - return service.getVirtualMachineScaleSetIpConfiguration(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + String nextUrl = String.format("%s", nextPageLink); + return service.getEffectiveRouteTableNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getVirtualMachineScaleSetIpConfigurationDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = getEffectiveRouteTableNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2331,101 +2116,111 @@ public Observable> call(Re }); } + private ServiceResponse> getEffectiveRouteTableNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all route tables applied to a network interface. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the ip configuration. - * @param expand Expands referenced resources. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @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 - * @return the NetworkInterfaceIPConfigurationInner object if successful. + * @return the PagedList<EffectiveRouteInner> object if successful. */ - public NetworkInterfaceIPConfigurationInner getVirtualMachineScaleSetIpConfiguration(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand) { - return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, expand).toBlocking().single().body(); + public PagedList beginGetEffectiveRouteTableNext(final String nextPageLink) { + ServiceResponse> response = beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all route tables applied to a network interface. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the ip configuration. - * @param expand Expands referenced resources. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls * @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 getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, expand), serviceCallback); + public ServiceFuture> beginGetEffectiveRouteTableNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all route tables applied to a network interface. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the ip configuration. - * @param expand Expands referenced resources. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkInterfaceIPConfigurationInner object + * @return the observable to the PagedList<EffectiveRouteInner> object */ - public Observable getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand) { - return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, expand).map(new Func1, NetworkInterfaceIPConfigurationInner>() { - @Override - public NetworkInterfaceIPConfigurationInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> beginGetEffectiveRouteTableNextAsync(final String nextPageLink) { + return beginGetEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Get the specified network interface ip configuration in a virtual machine scale set. + * Gets all route tables applied to a network interface. * - * @param resourceGroupName The name of the resource group. - * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @param virtualmachineIndex The virtual machine index. - * @param networkInterfaceName The name of the network interface. - * @param ipConfigurationName The name of the ip configuration. - * @param expand Expands referenced resources. + * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkInterfaceIPConfigurationInner object + * @return the observable to the PagedList<EffectiveRouteInner> object */ - public Observable> getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName, String expand) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualMachineScaleSetName == null) { - throw new IllegalArgumentException("Parameter virtualMachineScaleSetName is required and cannot be null."); - } - if (virtualmachineIndex == null) { - throw new IllegalArgumentException("Parameter virtualmachineIndex is required and cannot be null."); - } - if (networkInterfaceName == null) { - throw new IllegalArgumentException("Parameter networkInterfaceName is required and cannot be null."); - } - if (ipConfigurationName == null) { - throw new IllegalArgumentException("Parameter ipConfigurationName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + public Observable>> beginGetEffectiveRouteTableNextWithServiceResponseAsync(final String nextPageLink) { + return beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(beginGetEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all route tables applied to a network interface. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<EffectiveRouteInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> beginGetEffectiveRouteTableNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } - final String apiVersion = "2018-02-01"; - return service.getVirtualMachineScaleSetIpConfiguration(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + String nextUrl = String.format("%s", nextPageLink); + return service.beginGetEffectiveRouteTableNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = getVirtualMachineScaleSetIpConfigurationDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = beginGetEffectiveRouteTableNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2433,34 +2228,35 @@ public Observable> call(Re }); } - private ServiceResponse getVirtualMachineScaleSetIpConfigurationDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> beginGetEffectiveRouteTableNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all network interfaces in a subscription. + * Gets all network security groups applied to a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @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 - * @return the PagedList<NetworkInterfaceInner> object if successful. + * @return the PagedList<EffectiveNetworkSecurityGroupInner> object if successful. */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList listEffectiveNetworkSecurityGroupsNext(final String nextPageLink) { + ServiceResponse> response = listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network interfaces in a subscription. + * Gets all network security groups applied to a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -2468,75 +2264,75 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listEffectiveNetworkSecurityGroupsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network interfaces in a subscription. + * Gets all network security groups applied to a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> listEffectiveNetworkSecurityGroupsNextAsync(final String nextPageLink) { + return listEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all network interfaces in a subscription. + * Gets all network security groups applied to a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(final String nextPageLink) { + return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network interfaces in a subscription. + * Gets all network security groups applied to a network interface. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<EffectiveNetworkSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { + public Observable>> listEffectiveNetworkSecurityGroupsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.listEffectiveNetworkSecurityGroupsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listEffectiveNetworkSecurityGroupsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2544,34 +2340,35 @@ public Observable>> call(Response> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listEffectiveNetworkSecurityGroupsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all network interfaces in a resource group. + * Gets all network security groups applied to a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @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 - * @return the PagedList<NetworkInterfaceInner> object if successful. + * @return the PagedList<EffectiveNetworkSecurityGroupInner> object if successful. */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + public PagedList beginListEffectiveNetworkSecurityGroupsNext(final String nextPageLink) { + ServiceResponse> response = beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network interfaces in a resource group. + * Gets all network security groups applied to a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -2579,75 +2376,75 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> beginListEffectiveNetworkSecurityGroupsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { + beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network interfaces in a resource group. + * Gets all network security groups applied to a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + public Observable> beginListEffectiveNetworkSecurityGroupsNextAsync(final String nextPageLink) { + return beginListEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all network interfaces in a resource group. + * Gets all network security groups applied to a network interface. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<EffectiveNetworkSecurityGroupInner> object */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + public Observable>> beginListEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(final String nextPageLink) { + return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { @Override - public Observable>> call(ServiceResponse> page) { + public Observable>> call(ServiceResponse> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(beginListEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network interfaces in a resource group. + * Gets all network security groups applied to a network interface. * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<EffectiveNetworkSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + public Observable>> beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + return service.beginListEffectiveNetworkSecurityGroupsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable>> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse> result = listByResourceGroupNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = beginListEffectiveNetworkSecurityGroupsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2655,9 +2452,10 @@ public Observable>> call(Response> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> beginListEffectiveNetworkSecurityGroupsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -2884,115 +2682,4 @@ private ServiceResponse> listVirtualMachineScale .build(response); } - /** - * Get the specified network interface ip configuration in a virtual machine scale set. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @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 - * @return the PagedList<NetworkInterfaceIPConfigurationInner> object if successful. - */ - public PagedList listVirtualMachineScaleSetIpConfigurationsNext(final String nextPageLink) { - ServiceResponse> response = listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Get the specified network interface ip configuration in a virtual machine scale set. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @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> listVirtualMachineScaleSetIpConfigurationsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Get the specified network interface ip configuration in a virtual machine scale set. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object - */ - public Observable> listVirtualMachineScaleSetIpConfigurationsNextAsync(final String nextPageLink) { - return listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Get the specified network interface ip configuration in a virtual machine scale set. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object - */ - public Observable>> listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(final String nextPageLink) { - return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Get the specified network interface ip configuration in a virtual machine scale set. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceIPConfigurationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listVirtualMachineScaleSetIpConfigurationsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listVirtualMachineScaleSetIpConfigurationsNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listVirtualMachineScaleSetIpConfigurationsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java index 18a47a182ea..4cdbda443cd 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java @@ -68,18 +68,6 @@ public NetworkManagementClientImpl withSubscriptionId(String subscriptionId) { return this; } - /** Client API version. */ - private String apiVersion; - - /** - * Gets Client API version. - * - * @return the apiVersion value. - */ - public String apiVersion() { - return this.apiVersion; - } - /** Gets or sets the preferred language for the response. */ private String acceptLanguage; @@ -162,45 +150,6 @@ public ApplicationGatewaysInner applicationGateways() { return this.applicationGateways; } - /** - * The ApplicationSecurityGroupsInner object to access its operations. - */ - private ApplicationSecurityGroupsInner applicationSecurityGroups; - - /** - * Gets the ApplicationSecurityGroupsInner object to access its operations. - * @return the ApplicationSecurityGroupsInner object. - */ - public ApplicationSecurityGroupsInner applicationSecurityGroups() { - return this.applicationSecurityGroups; - } - - /** - * The DdosProtectionPlansInner object to access its operations. - */ - private DdosProtectionPlansInner ddosProtectionPlans; - - /** - * Gets the DdosProtectionPlansInner object to access its operations. - * @return the DdosProtectionPlansInner object. - */ - public DdosProtectionPlansInner ddosProtectionPlans() { - return this.ddosProtectionPlans; - } - - /** - * The AvailableEndpointServicesInner object to access its operations. - */ - private AvailableEndpointServicesInner availableEndpointServices; - - /** - * Gets the AvailableEndpointServicesInner object to access its operations. - * @return the AvailableEndpointServicesInner object. - */ - public AvailableEndpointServicesInner availableEndpointServices() { - return this.availableEndpointServices; - } - /** * The ExpressRouteCircuitAuthorizationsInner object to access its operations. */ @@ -227,19 +176,6 @@ public ExpressRouteCircuitPeeringsInner expressRouteCircuitPeerings() { return this.expressRouteCircuitPeerings; } - /** - * The ExpressRouteCircuitConnectionsInner object to access its operations. - */ - private ExpressRouteCircuitConnectionsInner expressRouteCircuitConnections; - - /** - * Gets the ExpressRouteCircuitConnectionsInner object to access its operations. - * @return the ExpressRouteCircuitConnectionsInner object. - */ - public ExpressRouteCircuitConnectionsInner expressRouteCircuitConnections() { - return this.expressRouteCircuitConnections; - } - /** * The ExpressRouteCircuitsInner object to access its operations. */ @@ -266,32 +202,6 @@ public ExpressRouteServiceProvidersInner expressRouteServiceProviders() { return this.expressRouteServiceProviders; } - /** - * The ExpressRouteCrossConnectionsInner object to access its operations. - */ - private ExpressRouteCrossConnectionsInner expressRouteCrossConnections; - - /** - * Gets the ExpressRouteCrossConnectionsInner object to access its operations. - * @return the ExpressRouteCrossConnectionsInner object. - */ - public ExpressRouteCrossConnectionsInner expressRouteCrossConnections() { - return this.expressRouteCrossConnections; - } - - /** - * The ExpressRouteCrossConnectionPeeringsInner object to access its operations. - */ - private ExpressRouteCrossConnectionPeeringsInner expressRouteCrossConnectionPeerings; - - /** - * Gets the ExpressRouteCrossConnectionPeeringsInner object to access its operations. - * @return the ExpressRouteCrossConnectionPeeringsInner object. - */ - public ExpressRouteCrossConnectionPeeringsInner expressRouteCrossConnectionPeerings() { - return this.expressRouteCrossConnectionPeerings; - } - /** * The LoadBalancersInner object to access its operations. */ @@ -487,32 +397,6 @@ public PacketCapturesInner packetCaptures() { return this.packetCaptures; } - /** - * The ConnectionMonitorsInner object to access its operations. - */ - private ConnectionMonitorsInner connectionMonitors; - - /** - * Gets the ConnectionMonitorsInner object to access its operations. - * @return the ConnectionMonitorsInner object. - */ - public ConnectionMonitorsInner connectionMonitors() { - return this.connectionMonitors; - } - - /** - * The OperationsInner object to access its operations. - */ - private OperationsInner operations; - - /** - * Gets the OperationsInner object to access its operations. - * @return the OperationsInner object. - */ - public OperationsInner operations() { - return this.operations; - } - /** * The PublicIPAddressesInner object to access its operations. */ @@ -713,21 +597,14 @@ public NetworkManagementClientImpl(RestClient restClient) { } protected void initialize() { - this.apiVersion = "2018-02-01"; this.acceptLanguage = "en-US"; this.longRunningOperationRetryTimeout = 30; this.generateClientRequestId = true; this.applicationGateways = new ApplicationGatewaysInner(restClient().retrofit(), this); - this.applicationSecurityGroups = new ApplicationSecurityGroupsInner(restClient().retrofit(), this); - this.ddosProtectionPlans = new DdosProtectionPlansInner(restClient().retrofit(), this); - this.availableEndpointServices = new AvailableEndpointServicesInner(restClient().retrofit(), this); this.expressRouteCircuitAuthorizations = new ExpressRouteCircuitAuthorizationsInner(restClient().retrofit(), this); this.expressRouteCircuitPeerings = new ExpressRouteCircuitPeeringsInner(restClient().retrofit(), this); - this.expressRouteCircuitConnections = new ExpressRouteCircuitConnectionsInner(restClient().retrofit(), this); this.expressRouteCircuits = new ExpressRouteCircuitsInner(restClient().retrofit(), this); this.expressRouteServiceProviders = new ExpressRouteServiceProvidersInner(restClient().retrofit(), this); - this.expressRouteCrossConnections = new ExpressRouteCrossConnectionsInner(restClient().retrofit(), this); - this.expressRouteCrossConnectionPeerings = new ExpressRouteCrossConnectionPeeringsInner(restClient().retrofit(), this); this.loadBalancers = new LoadBalancersInner(restClient().retrofit(), this); this.loadBalancerBackendAddressPools = new LoadBalancerBackendAddressPoolsInner(restClient().retrofit(), this); this.loadBalancerFrontendIPConfigurations = new LoadBalancerFrontendIPConfigurationsInner(restClient().retrofit(), this); @@ -743,8 +620,6 @@ protected void initialize() { this.defaultSecurityRules = new DefaultSecurityRulesInner(restClient().retrofit(), this); this.networkWatchers = new NetworkWatchersInner(restClient().retrofit(), this); this.packetCaptures = new PacketCapturesInner(restClient().retrofit(), this); - this.connectionMonitors = new ConnectionMonitorsInner(restClient().retrofit(), this); - this.operations = new OperationsInner(restClient().retrofit(), this); this.publicIPAddresses = new PublicIPAddressesInner(restClient().retrofit(), this); this.routeFilters = new RouteFiltersInner(restClient().retrofit(), this); this.routeFilterRules = new RouteFilterRulesInner(restClient().retrofit(), this); @@ -769,7 +644,7 @@ protected void initialize() { */ @Override public String userAgent() { - return String.format("%s (%s, %s)", super.userAgent(), "NetworkManagementClient", "2018-02-01"); + return String.format("%s (%s)", super.userAgent(), "NetworkManagementClient"); } private void initializeService() { @@ -788,7 +663,78 @@ interface NetworkManagementClientService { } /** - * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * Checks whether a domain name in the cloudapp.net zone is available for use. + * + * @param location The location of the domain name. + * @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 + * @return the DnsNameAvailabilityResultInner object if successful. + */ + public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location) { + return checkDnsNameAvailabilityWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Checks whether a domain name in the cloudapp.net zone is available for use. + * + * @param location The location of the domain name. + * @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 checkDnsNameAvailabilityAsync(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkDnsNameAvailabilityWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Checks whether a domain name in the cloudapp.net zone is available for use. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DnsNameAvailabilityResultInner object + */ + public Observable checkDnsNameAvailabilityAsync(String location) { + return checkDnsNameAvailabilityWithServiceResponseAsync(location).map(new Func1, DnsNameAvailabilityResultInner>() { + @Override + public DnsNameAvailabilityResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether a domain name in the cloudapp.net zone is available for use. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DnsNameAvailabilityResultInner object + */ + public Observable> checkDnsNameAvailabilityWithServiceResponseAsync(String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-08-01"; + final String domainNameLabel = null; + return service.checkDnsNameAvailability(location, this.subscriptionId(), domainNameLabel, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkDnsNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Checks whether a domain name in the cloudapp.net zone is available for use. * * @param location The location of the domain name. * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. @@ -802,7 +748,7 @@ public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location, } /** - * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * Checks whether a domain name in the cloudapp.net zone is available for use. * * @param location The location of the domain name. * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. @@ -815,7 +761,7 @@ public ServiceFuture checkDnsNameAvailabilityAsy } /** - * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * Checks whether a domain name in the cloudapp.net zone is available for use. * * @param location The location of the domain name. * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. @@ -832,7 +778,7 @@ public DnsNameAvailabilityResultInner call(ServiceResponse> checkDnsNameA if (this.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); } - if (domainNameLabel == null) { - throw new IllegalArgumentException("Parameter domainNameLabel is required and cannot be null."); - } - if (this.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); - } - return service.checkDnsNameAvailability(location, this.subscriptionId(), domainNameLabel, this.apiVersion(), this.acceptLanguage(), this.userAgent()) + final String apiVersion = "2017-08-01"; + return service.checkDnsNameAvailability(location, this.subscriptionId(), domainNameLabel, apiVersion, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsInner.java index dd2c64e0cee..b73f2500d94 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -25,14 +24,12 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -87,14 +84,6 @@ interface NetworkSecurityGroupsService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Body NetworkSecurityGroupInner 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.NetworkSecurityGroups updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkSecurityGroups beginUpdateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}") - Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkSecurityGroupName") String networkSecurityGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkSecurityGroups list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -174,10 +163,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -242,10 +229,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -261,8 +246,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) + .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -330,11 +315,9 @@ public Observable> getByResourceGroup if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; final String expand = null; - return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -414,10 +397,8 @@ public Observable> getByResourceGroup if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -507,11 +488,9 @@ public Observable> createOrUpdateWith if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -584,11 +563,9 @@ public Observable> beginCreateOrUpdat if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -604,329 +581,7 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @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 - * @return the NetworkSecurityGroupInner object if successful. - */ - public NetworkSecurityGroupInner updateTags(String resourceGroupName, String networkSecurityGroupName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).toBlocking().last().body(); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @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 updateTagsAsync(String resourceGroupName, String networkSecurityGroupName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName), serviceCallback); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String networkSecurityGroupName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).map(new Func1, NetworkSecurityGroupInner>() { - @Override - public NetworkSecurityGroupInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (networkSecurityGroupName == null) { - throw new IllegalArgumentException("Parameter networkSecurityGroupName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - Observable> observable = service.updateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param tags Resource tags. - * @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 - * @return the NetworkSecurityGroupInner object if successful. - */ - public NetworkSecurityGroupInner updateTags(String resourceGroupName, String networkSecurityGroupName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags).toBlocking().last().body(); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param tags Resource tags. - * @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 updateTagsAsync(String resourceGroupName, String networkSecurityGroupName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags), serviceCallback); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String networkSecurityGroupName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags).map(new Func1, NetworkSecurityGroupInner>() { - @Override - public NetworkSecurityGroupInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (networkSecurityGroupName == null) { - throw new IllegalArgumentException("Parameter networkSecurityGroupName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - Observable> observable = service.updateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @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 - * @return the NetworkSecurityGroupInner object if successful. - */ - public NetworkSecurityGroupInner beginUpdateTags(String resourceGroupName, String networkSecurityGroupName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).toBlocking().single().body(); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @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 beginUpdateTagsAsync(String resourceGroupName, String networkSecurityGroupName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName), serviceCallback); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkSecurityGroupInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String networkSecurityGroupName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).map(new Func1, NetworkSecurityGroupInner>() { - @Override - public NetworkSecurityGroupInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkSecurityGroupInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (networkSecurityGroupName == null) { - throw new IllegalArgumentException("Parameter networkSecurityGroupName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - return service.beginUpdateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param tags Resource tags. - * @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 - * @return the NetworkSecurityGroupInner object if successful. - */ - public NetworkSecurityGroupInner beginUpdateTags(String resourceGroupName, String networkSecurityGroupName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags).toBlocking().single().body(); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param tags Resource tags. - * @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 beginUpdateTagsAsync(String resourceGroupName, String networkSecurityGroupName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags), serviceCallback); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkSecurityGroupInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String networkSecurityGroupName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, tags).map(new Func1, NetworkSecurityGroupInner>() { - @Override - public NetworkSecurityGroupInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a network security group tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkSecurityGroupName The name of the network security group. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkSecurityGroupInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String networkSecurityGroupName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (networkSecurityGroupName == null) { - throw new IllegalArgumentException("Parameter networkSecurityGroupName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - return service.beginUpdateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1015,10 +670,8 @@ public Observable>> listSinglePa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1130,10 +783,8 @@ public Observable>> listByResour if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatchersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatchersInner.java index a9df053bdaf..d6ee5e1b5e0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatchersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatchersInner.java @@ -17,7 +17,7 @@ import com.microsoft.azure.management.network.FlowLogStatusParameters; import com.microsoft.azure.management.network.QueryTroubleshootingParameters; import com.microsoft.azure.management.network.SecurityGroupViewParameters; -import com.microsoft.azure.management.network.TagsObject; +import com.microsoft.azure.management.network.TopologyParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -26,14 +26,12 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; @@ -84,10 +82,6 @@ interface NetworkWatchersService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}", method = "DELETE", hasBody = true) Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @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.NetworkWatchers updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkWatchers listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers") Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -98,7 +92,7 @@ interface NetworkWatchersService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkWatchers getTopology" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology") - Observable> getTopology(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body TopologyParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getTopology(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TopologyParameters parameters, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.NetworkWatchers verifyIPFlow" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify") @@ -164,22 +158,6 @@ interface NetworkWatchersService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck") Observable> beginCheckConnectivity(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body ConnectivityParametersInner 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.NetworkWatchers getAzureReachabilityReport" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport") - Observable> getAzureReachabilityReport(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body AzureReachabilityReportParametersInner 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.NetworkWatchers beginGetAzureReachabilityReport" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport") - Observable> beginGetAzureReachabilityReport(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body AzureReachabilityReportParametersInner 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.NetworkWatchers listAvailableProviders" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList") - Observable> listAvailableProviders(@Path("resourceGroupName") String resourceGroupName, @Path("networkWatcherName") String networkWatcherName, @Path("subscriptionId") String subscriptionId, @Body AvailableProvidersListParametersInner 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.NetworkWatchers beginListAvailableProviders" }) - @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 AvailableProvidersListParametersInner parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - } /** @@ -251,11 +229,9 @@ public Observable> createOrUpdateWithServic if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.createOrUpdate(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.createOrUpdate(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -339,10 +315,8 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -424,10 +398,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -492,10 +464,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -517,181 +487,6 @@ private ServiceResponse beginDeleteDelegate(Response respons .build(response); } - /** - * Updates a network watcher tags. - * - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NetworkWatcherInner object if successful. - */ - public NetworkWatcherInner updateTags(String resourceGroupName, String networkWatcherName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName).toBlocking().single().body(); - } - - /** - * Updates a network watcher tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @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 updateTagsAsync(String resourceGroupName, String networkWatcherName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName), serviceCallback); - } - - /** - * Updates a network watcher tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkWatcherInner object - */ - public Observable updateTagsAsync(String resourceGroupName, String networkWatcherName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName).map(new Func1, NetworkWatcherInner>() { - @Override - public NetworkWatcherInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a network watcher tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkWatcherInner object - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkWatcherName) { - 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - return service.updateTags(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates a network watcher tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param tags Resource tags. - * @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 - * @return the NetworkWatcherInner object if successful. - */ - public NetworkWatcherInner updateTags(String resourceGroupName, String networkWatcherName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, tags).toBlocking().single().body(); - } - - /** - * Updates a network watcher tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param tags Resource tags. - * @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 updateTagsAsync(String resourceGroupName, String networkWatcherName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, tags), serviceCallback); - } - - /** - * Updates a network watcher tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkWatcherInner object - */ - public Observable updateTagsAsync(String resourceGroupName, String networkWatcherName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, networkWatcherName, tags).map(new Func1, NetworkWatcherInner>() { - @Override - public NetworkWatcherInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a network watcher tags. - * - * @param resourceGroupName The name of the resource group. - * @param networkWatcherName The name of the network watcher. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkWatcherInner object - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, Map tags) { - 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - return service.updateTags(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = updateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse updateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * Gets all network watchers by resource group. * @@ -751,10 +546,8 @@ public Observable>> listByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -828,10 +621,8 @@ public Observable>> listWithServiceRes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -858,14 +649,14 @@ private ServiceResponse> listDelegate(Response getTopologyAsync(String resourceGroupName, String networkWatcherName, TopologyParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); + public ServiceFuture getTopologyAsync(String resourceGroupName, String networkWatcherName, String targetResourceGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceGroupName), serviceCallback); } /** @@ -887,12 +678,12 @@ public ServiceFuture getTopologyAsync(String resourceGroupName, S * * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the representation of topology. + * @param targetResourceGroupName The name of the target resource group to perform topology on. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the TopologyInner object */ - public Observable getTopologyAsync(String resourceGroupName, String networkWatcherName, TopologyParametersInner parameters) { - return getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, TopologyInner>() { + public Observable getTopologyAsync(String resourceGroupName, String networkWatcherName, String targetResourceGroupName) { + return getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceGroupName).map(new Func1, TopologyInner>() { @Override public TopologyInner call(ServiceResponse response) { return response.body(); @@ -905,11 +696,11 @@ public TopologyInner call(ServiceResponse response) { * * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. - * @param parameters Parameters that define the representation of topology. + * @param targetResourceGroupName The name of the target resource group to perform topology on. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the TopologyInner object */ - public Observable> getTopologyWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, TopologyParametersInner parameters) { + public Observable> getTopologyWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceGroupName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -919,14 +710,13 @@ public Observable> getTopologyWithServiceResponse 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (targetResourceGroupName == null) { + throw new IllegalArgumentException("Parameter targetResourceGroupName is required and cannot be null."); } - Validator.validate(parameters); - return service.getTopology(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + TopologyParameters parameters = new TopologyParameters(); + parameters.withTargetResourceGroupName(targetResourceGroupName); + return service.getTopology(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1016,11 +806,9 @@ public Observable> verifyIPFlowWi if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.verifyIPFlow(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.verifyIPFlow(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1093,11 +881,9 @@ public Observable> beginVerifyIPF if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginVerifyIPFlow(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginVerifyIPFlow(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1188,11 +974,9 @@ public Observable> getNextHopWithServiceResp if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.getNextHop(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.getNextHop(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1265,11 +1049,9 @@ public Observable> beginGetNextHopWithServic if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginGetNextHop(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginGetNextHop(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1357,15 +1139,13 @@ public Observable> getVMSecurityRu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } + final String apiVersion = "2017-08-01"; SecurityGroupViewParameters parameters = new SecurityGroupViewParameters(); parameters.withTargetResourceId(targetResourceId); - Observable> observable = service.getVMSecurityRules(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + Observable> observable = service.getVMSecurityRules(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1435,15 +1215,13 @@ public Observable> beginGetVMSecur if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } + final String apiVersion = "2017-08-01"; SecurityGroupViewParameters parameters = new SecurityGroupViewParameters(); parameters.withTargetResourceId(targetResourceId); - return service.beginGetVMSecurityRules(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.beginGetVMSecurityRules(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1534,11 +1312,9 @@ public Observable> getTroubleshootin if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.getTroubleshooting(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.getTroubleshooting(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1611,11 +1387,9 @@ public Observable> beginGetTroublesh if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginGetTroubleshooting(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginGetTroubleshooting(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1703,15 +1477,13 @@ public Observable> getTroubleshootin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } + final String apiVersion = "2017-08-01"; QueryTroubleshootingParameters parameters = new QueryTroubleshootingParameters(); parameters.withTargetResourceId(targetResourceId); - Observable> observable = service.getTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + Observable> observable = service.getTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1781,15 +1553,13 @@ public Observable> beginGetTroublesh if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } + final String apiVersion = "2017-08-01"; QueryTroubleshootingParameters parameters = new QueryTroubleshootingParameters(); parameters.withTargetResourceId(targetResourceId); - return service.beginGetTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.beginGetTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1880,11 +1650,9 @@ public Observable> setFlowLogConfigurat if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.setFlowLogConfiguration(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.setFlowLogConfiguration(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1957,11 +1725,9 @@ public Observable> beginSetFlowLogConfi if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginSetFlowLogConfiguration(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginSetFlowLogConfiguration(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -2049,15 +1815,13 @@ public Observable> getFlowLogStatusWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } + final String apiVersion = "2017-08-01"; FlowLogStatusParameters parameters = new FlowLogStatusParameters(); parameters.withTargetResourceId(targetResourceId); - Observable> observable = service.getFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + Observable> observable = service.getFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2127,15 +1891,13 @@ public Observable> beginGetFlowLogStatu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } + final String apiVersion = "2017-08-01"; FlowLogStatusParameters parameters = new FlowLogStatusParameters(); parameters.withTargetResourceId(targetResourceId); - return service.beginGetFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.beginGetFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -2226,11 +1988,9 @@ public Observable> checkConnectivi if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.checkConnectivity(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.checkConnectivity(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2303,11 +2063,9 @@ public Observable> beginCheckConne if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCheckConnectivity(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCheckConnectivity(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -2329,348 +2087,4 @@ private ServiceResponse beginCheckConnectivityDele .build(response); } - /** - * Gets the relative latency score for internet service providers from a specified location to Azure regions. - * - * @param resourceGroupName The name of the network watcher resource group. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AzureReachabilityReportInner object if successful. - */ - public AzureReachabilityReportInner getAzureReachabilityReport(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParametersInner parameters) { - return getAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); - } - - /** - * Gets the relative latency score for internet service providers from a specified location to Azure regions. - * - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that determine Azure reachability report configuration. - * @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 getAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); - } - - /** - * Gets the relative latency score for internet service providers from a specified location to Azure regions. - * - * @param resourceGroupName The name of the network watcher resource group. - * @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 - * @return the observable for the request - */ - public Observable getAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParametersInner parameters) { - return getAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, AzureReachabilityReportInner>() { - @Override - public AzureReachabilityReportInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the relative latency score for internet service providers from a specified location to Azure regions. - * - * @param resourceGroupName The name of the network watcher resource group. - * @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 - * @return the observable for the request - */ - public Observable> getAzureReachabilityReportWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParametersInner 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.getAzureReachabilityReport(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Gets the relative latency score for internet service providers from a specified location to Azure regions. - * - * @param resourceGroupName The name of the network watcher resource group. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AzureReachabilityReportInner object if successful. - */ - public AzureReachabilityReportInner beginGetAzureReachabilityReport(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParametersInner parameters) { - return beginGetAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); - } - - /** - * Gets the relative latency score for internet service providers from a specified location to Azure regions. - * - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that determine Azure reachability report configuration. - * @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 beginGetAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGetAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); - } - - /** - * Gets the relative latency score for internet service providers from a specified location to Azure regions. - * - * @param resourceGroupName The name of the network watcher resource group. - * @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 - * @return the observable to the AzureReachabilityReportInner object - */ - public Observable beginGetAzureReachabilityReportAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParametersInner parameters) { - return beginGetAzureReachabilityReportWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, AzureReachabilityReportInner>() { - @Override - public AzureReachabilityReportInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets the relative latency score for internet service providers from a specified location to Azure regions. - * - * @param resourceGroupName The name of the network watcher resource group. - * @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 - * @return the observable to the AzureReachabilityReportInner object - */ - public Observable> beginGetAzureReachabilityReportWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, AzureReachabilityReportParametersInner 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginGetAzureReachabilityReport(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginGetAzureReachabilityReportDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginGetAzureReachabilityReportDelegate(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); - } - - /** - * Lists all available internet service providers for a specified Azure region. - * - * @param resourceGroupName The name of the network watcher resource group. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AvailableProvidersListInner object if successful. - */ - public AvailableProvidersListInner listAvailableProviders(String resourceGroupName, String networkWatcherName, AvailableProvidersListParametersInner parameters) { - return listAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().last().body(); - } - - /** - * Lists all available internet service providers for a specified Azure region. - * - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that scope the list of available providers. - * @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 listAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(listAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); - } - - /** - * Lists all available internet service providers for a specified Azure region. - * - * @param resourceGroupName The name of the network watcher resource group. - * @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 - * @return the observable for the request - */ - public Observable listAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParametersInner parameters) { - return listAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, AvailableProvidersListInner>() { - @Override - public AvailableProvidersListInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists all available internet service providers for a specified Azure region. - * - * @param resourceGroupName The name of the network watcher resource group. - * @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 - * @return the observable for the request - */ - public Observable> listAvailableProvidersWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParametersInner 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.listAvailableProviders(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Lists all available internet service providers for a specified Azure region. - * - * @param resourceGroupName The name of the network watcher resource group. - * @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 RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the AvailableProvidersListInner object if successful. - */ - public AvailableProvidersListInner beginListAvailableProviders(String resourceGroupName, String networkWatcherName, AvailableProvidersListParametersInner parameters) { - return beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); - } - - /** - * Lists all available internet service providers for a specified Azure region. - * - * @param resourceGroupName The name of the network watcher resource group. - * @param networkWatcherName The name of the network watcher resource. - * @param parameters Parameters that scope the list of available providers. - * @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 beginListAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); - } - - /** - * Lists all available internet service providers for a specified Azure region. - * - * @param resourceGroupName The name of the network watcher resource group. - * @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 - * @return the observable to the AvailableProvidersListInner object - */ - public Observable beginListAvailableProvidersAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParametersInner parameters) { - return beginListAvailableProvidersWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, AvailableProvidersListInner>() { - @Override - public AvailableProvidersListInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Lists all available internet service providers for a specified Azure region. - * - * @param resourceGroupName The name of the network watcher resource group. - * @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 - * @return the observable to the AvailableProvidersListInner object - */ - public Observable> beginListAvailableProvidersWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, AvailableProvidersListParametersInner 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginListAvailableProviders(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginListAvailableProvidersDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginListAvailableProvidersDelegate(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); - } - } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationInner.java deleted file mode 100644 index 8d4e7462098..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationInner.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.microsoft.azure.management.network.OperationDisplay; -import com.microsoft.azure.management.network.OperationPropertiesFormatServiceSpecification; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; - -/** - * Network REST API operation definition. - */ -@JsonFlatten -public class OperationInner { - /** - * Operation name: {provider}/{resource}/{operation}. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Display metadata associated with the operation. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /** - * Origin of the operation. - */ - @JsonProperty(value = "origin") - private String origin; - - /** - * Specification of the service. - */ - @JsonProperty(value = "properties.serviceSpecification") - private OperationPropertiesFormatServiceSpecification serviceSpecification; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the OperationInner object itself. - */ - public OperationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display value. - * - * @return the display value - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display value. - * - * @param display the display value to set - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the origin value. - * - * @return the origin value - */ - public String origin() { - return this.origin; - } - - /** - * Set the origin value. - * - * @param origin the origin value to set - * @return the OperationInner object itself. - */ - public OperationInner withOrigin(String origin) { - this.origin = origin; - return this; - } - - /** - * Get the serviceSpecification value. - * - * @return the serviceSpecification value - */ - public OperationPropertiesFormatServiceSpecification serviceSpecification() { - return this.serviceSpecification; - } - - /** - * Set the serviceSpecification value. - * - * @param serviceSpecification the serviceSpecification value to set - * @return the OperationInner object itself. - */ - public OperationInner withServiceSpecification(OperationPropertiesFormatServiceSpecification serviceSpecification) { - this.serviceSpecification = serviceSpecification; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationsInner.java deleted file mode 100644 index 65e573dda83..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationsInner.java +++ /dev/null @@ -1,283 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import retrofit2.Retrofit; -import com.google.common.reflect.TypeToken; -import com.microsoft.azure.AzureServiceFuture; -import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; -import com.microsoft.rest.ServiceFuture; -import com.microsoft.rest.ServiceResponse; -import java.io.IOException; -import java.util.List; -import okhttp3.ResponseBody; -import retrofit2.http.GET; -import retrofit2.http.Header; -import retrofit2.http.Headers; -import retrofit2.http.Query; -import retrofit2.http.Url; -import retrofit2.Response; -import rx.functions.Func1; -import rx.Observable; - -/** - * An instance of this class provides access to all the operations defined - * in Operations. - */ -public class OperationsInner { - /** The Retrofit service to perform REST calls. */ - private OperationsService service; - /** The service client containing this operation class. */ - private NetworkManagementClientImpl client; - - /** - * Initializes an instance of OperationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public OperationsInner(Retrofit retrofit, NetworkManagementClientImpl client) { - this.service = retrofit.create(OperationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for Operations to be - * used by Retrofit to perform actually REST calls. - */ - interface OperationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.Operations list" }) - @GET("providers/Microsoft.Network/operations") - Observable> list(@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.Operations listNext" }) - @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * Lists all of the available Network Rest API operations. - * - * @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 - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available Network Rest API operations. - * - * @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> listAsync(final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available Network Rest API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available Network Rest API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listWithServiceResponseAsync() { - return listSinglePageAsync() - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available Network Rest API operations. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listSinglePageAsync() { - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists all of the available Network Rest API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @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 - * @return the PagedList<OperationInner> object if successful. - */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Lists all of the available Network Rest API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceFuture the ServiceFuture object tracking the Retrofit calls - * @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> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Lists all of the available Network Rest API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Lists all of the available Network Rest API operations. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<OperationInner> object - */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Lists all of the available Network Rest API operations. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<OperationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCapturesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCapturesInner.java index aba2973cff1..7d1a097ffa6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCapturesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCapturesInner.java @@ -175,11 +175,9 @@ public Observable> createWithServiceRe if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.create(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.create(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -259,11 +257,9 @@ public Observable> beginCreateWithServ if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCreate(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreate(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -353,10 +349,8 @@ public Observable> getWithServiceRespo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -445,10 +439,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -520,10 +512,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -539,8 +529,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -613,10 +603,8 @@ public Observable> stopWithServiceResponseAsync(String res if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.stop(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.stop(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -688,10 +676,8 @@ public Observable> beginStopWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginStop(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginStop(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -782,10 +768,8 @@ public Observable> getStatu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.getStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-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()); } @@ -858,10 +842,8 @@ public Observable> beginGet if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginGetStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginGetStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -945,10 +927,8 @@ public Observable>> listWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, networkWatcherName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterRuleInner.java index 4dfe707da95..9aa47f75cb4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterRuleInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterRuleInner.java @@ -10,6 +10,7 @@ import com.microsoft.azure.management.network.Access; import java.util.List; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.SubResource; @@ -59,6 +60,12 @@ public class PatchRouteFilterRuleInner extends SubResource { @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + /** * Creates an instance of PatchRouteFilterRuleInner class. */ @@ -153,4 +160,24 @@ public String etag() { return this.etag; } + /** + * Get the tags value. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the PatchRouteFilterRuleInner object itself. + */ + public PatchRouteFilterRuleInner withTags(Map tags) { + this.tags = tags; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressInner.java index 63203b29699..63998471b13 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressInner.java @@ -13,7 +13,6 @@ import com.microsoft.azure.management.network.IPVersion; import com.microsoft.azure.management.network.PublicIPAddressDnsSettings; import java.util.List; -import com.microsoft.azure.management.network.IpTag; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -55,12 +54,6 @@ public class PublicIPAddressInner extends Resource { @JsonProperty(value = "properties.dnsSettings") private PublicIPAddressDnsSettings dnsSettings; - /** - * The list of tags associated with the public IP address. - */ - @JsonProperty(value = "properties.ipTags") - private List ipTags; - /** * The IP address associated with the public IP address resource. */ @@ -188,26 +181,6 @@ public PublicIPAddressInner withDnsSettings(PublicIPAddressDnsSettings dnsSettin return this; } - /** - * Get the ipTags value. - * - * @return the ipTags value - */ - public List ipTags() { - return this.ipTags; - } - - /** - * Set the ipTags value. - * - * @param ipTags the ipTags value to set - * @return the PublicIPAddressInner object itself. - */ - public PublicIPAddressInner withIpTags(List ipTags) { - this.ipTags = ipTags; - return this; - } - /** * Get the ipAddress value. * diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java index 2833be13f22..70d106b576e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -25,14 +24,12 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -87,14 +84,6 @@ interface PublicIPAddressesService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpAddressName") String publicIpAddressName, @Path("subscriptionId") String subscriptionId, @Body PublicIPAddressInner 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.PublicIPAddresses updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpAddressName") String publicIpAddressName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.PublicIPAddresses beginUpdateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}") - Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("publicIpAddressName") String publicIpAddressName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.PublicIPAddresses list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -194,10 +183,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -262,10 +249,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -281,9 +266,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) .register(204, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -350,11 +335,9 @@ public Observable> getByResourceGroupWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; final String expand = null; - return service.getByResourceGroup(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + return service.getByResourceGroup(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -434,10 +417,8 @@ public Observable> getByResourceGroupWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -527,11 +508,9 @@ public Observable> createOrUpdateWithServi if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -604,11 +583,9 @@ public Observable> beginCreateOrUpdateWith if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -624,329 +601,7 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @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 - * @return the PublicIPAddressInner object if successful. - */ - public PublicIPAddressInner updateTags(String resourceGroupName, String publicIpAddressName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().last().body(); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @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 updateTagsAsync(String resourceGroupName, String publicIpAddressName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName), serviceCallback); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String publicIpAddressName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName).map(new Func1, PublicIPAddressInner>() { - @Override - public PublicIPAddressInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (publicIpAddressName == null) { - throw new IllegalArgumentException("Parameter publicIpAddressName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - Observable> observable = service.updateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param tags Resource tags. - * @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 - * @return the PublicIPAddressInner object if successful. - */ - public PublicIPAddressInner updateTags(String resourceGroupName, String publicIpAddressName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags).toBlocking().last().body(); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param tags Resource tags. - * @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 updateTagsAsync(String resourceGroupName, String publicIpAddressName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags), serviceCallback); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String publicIpAddressName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags).map(new Func1, PublicIPAddressInner>() { - @Override - public PublicIPAddressInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (publicIpAddressName == null) { - throw new IllegalArgumentException("Parameter publicIpAddressName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - Observable> observable = service.updateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @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 - * @return the PublicIPAddressInner object if successful. - */ - public PublicIPAddressInner beginUpdateTags(String resourceGroupName, String publicIpAddressName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().single().body(); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @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 beginUpdateTagsAsync(String resourceGroupName, String publicIpAddressName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName), serviceCallback); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PublicIPAddressInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String publicIpAddressName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName).map(new Func1, PublicIPAddressInner>() { - @Override - public PublicIPAddressInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PublicIPAddressInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (publicIpAddressName == null) { - throw new IllegalArgumentException("Parameter publicIpAddressName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - return service.beginUpdateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param tags Resource tags. - * @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 - * @return the PublicIPAddressInner object if successful. - */ - public PublicIPAddressInner beginUpdateTags(String resourceGroupName, String publicIpAddressName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags).toBlocking().single().body(); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param tags Resource tags. - * @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 beginUpdateTagsAsync(String resourceGroupName, String publicIpAddressName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags), serviceCallback); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PublicIPAddressInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String publicIpAddressName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddressName, tags).map(new Func1, PublicIPAddressInner>() { - @Override - public PublicIPAddressInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates public IP address tags. - * - * @param resourceGroupName The name of the resource group. - * @param publicIpAddressName The name of the public IP address. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PublicIPAddressInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String publicIpAddressName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (publicIpAddressName == null) { - throw new IllegalArgumentException("Parameter publicIpAddressName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - return service.beginUpdateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -1035,10 +690,8 @@ public Observable>> listSinglePageAsy if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1150,10 +803,8 @@ public Observable>> listByResourceGro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1273,7 +924,7 @@ public Observable>> listVirtualMachin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-02-01"; + final String apiVersion = "2017-03-30"; return service.listVirtualMachineScaleSetPublicIPAddresses(resourceGroupName, virtualMachineScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1418,7 +1069,7 @@ public Observable>> listVirtualMachin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-02-01"; + final String apiVersion = "2017-03-30"; return service.listVirtualMachineScaleSetVMPublicIPAddresses(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1530,7 +1181,7 @@ public Observable> getVirtualMachineScaleS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-02-01"; + final String apiVersion = "2017-03-30"; final String expand = null; return service.getVirtualMachineScaleSetPublicIPAddress(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1640,7 +1291,7 @@ public Observable> getVirtualMachineScaleS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-02-01"; + final String apiVersion = "2017-03-30"; return service.getVirtualMachineScaleSetPublicIPAddress(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRuleInner.java index 3b81a354e46..11462b43196 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRuleInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRuleInner.java @@ -10,6 +10,7 @@ import com.microsoft.azure.management.network.Access; import java.util.List; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.SubResource; @@ -65,6 +66,12 @@ public class RouteFilterRuleInner extends SubResource { @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + /** * Creates an instance of RouteFilterRuleInner class. */ @@ -190,4 +197,24 @@ public String etag() { return this.etag; } + /** + * Get the tags value. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags value. + * + * @param tags the tags value to set + * @return the RouteFilterRuleInner object itself. + */ + public RouteFilterRuleInner withTags(Map tags) { + this.tags = tags; + return this; + } + } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRulesInner.java index e89a4ff815c..9d0b9cca7eb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRulesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRulesInner.java @@ -168,10 +168,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -243,10 +241,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -262,8 +258,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) + .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -338,10 +334,8 @@ public Observable> getWithServiceResponseA if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -438,11 +432,9 @@ public Observable> createOrUpdateWithServi if (routeFilterRuleParameters == null) { throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(routeFilterRuleParameters); - Observable> observable = service.createOrUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -522,11 +514,9 @@ public Observable> beginCreateOrUpdateWith if (routeFilterRuleParameters == null) { throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(routeFilterRuleParameters); - return service.beginCreateOrUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -624,11 +614,9 @@ public Observable> updateWithServiceRespon if (routeFilterRuleParameters == null) { throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(routeFilterRuleParameters); - Observable> observable = service.update(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.update(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -708,11 +696,9 @@ public Observable> beginUpdateWithServiceR if (routeFilterRuleParameters == null) { throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(routeFilterRuleParameters); - return service.beginUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -832,10 +818,8 @@ public Observable>> listByRouteFilter if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByRouteFilter(resourceGroupName, routeFilterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listByRouteFilter(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java index bb130c7756e..a7126188547 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java @@ -172,10 +172,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, routeFilterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -240,10 +238,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, routeFilterName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -259,8 +255,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) + .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -328,11 +324,9 @@ public Observable> getByResourceGroupWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; final String expand = null; - return service.getByResourceGroup(resourceGroupName, routeFilterName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + return service.getByResourceGroup(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -412,10 +406,8 @@ public Observable> getByResourceGroupWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, routeFilterName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -505,11 +497,9 @@ public Observable> createOrUpdateWithServiceRe if (routeFilterParameters == null) { throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(routeFilterParameters); - Observable> observable = service.createOrUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -582,11 +572,9 @@ public Observable> beginCreateOrUpdateWithServ if (routeFilterParameters == null) { throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(routeFilterParameters); - return service.beginCreateOrUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -677,11 +665,9 @@ public Observable> updateWithServiceResponseAs if (routeFilterParameters == null) { throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(routeFilterParameters); - Observable> observable = service.update(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.update(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -754,11 +740,9 @@ public Observable> beginUpdateWithServiceRespo if (routeFilterParameters == null) { throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(routeFilterParameters); - return service.beginUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -870,10 +854,8 @@ public Observable>> listByResourceGroupSi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -977,10 +959,8 @@ public Observable>> listSinglePageAsync() if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTableInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTableInner.java index c361ff6074b..edcf27934d4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTableInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTableInner.java @@ -30,13 +30,6 @@ public class RouteTableInner extends Resource { @JsonProperty(value = "properties.subnets", access = JsonProperty.Access.WRITE_ONLY) private List subnets; - /** - * Gets or sets whether to disable the routes learned by BGP on that route - * table. True means disable. - */ - @JsonProperty(value = "properties.disableBgpRoutePropagation") - private Boolean disableBgpRoutePropagation; - /** * The provisioning state of the resource. Possible values are: 'Updating', * 'Deleting', and 'Failed'. @@ -80,26 +73,6 @@ public List subnets() { return this.subnets; } - /** - * Get the disableBgpRoutePropagation value. - * - * @return the disableBgpRoutePropagation value - */ - public Boolean disableBgpRoutePropagation() { - return this.disableBgpRoutePropagation; - } - - /** - * Set the disableBgpRoutePropagation value. - * - * @param disableBgpRoutePropagation the disableBgpRoutePropagation value to set - * @return the RouteTableInner object itself. - */ - public RouteTableInner withDisableBgpRoutePropagation(Boolean disableBgpRoutePropagation) { - this.disableBgpRoutePropagation = disableBgpRoutePropagation; - return this; - } - /** * Get the provisioningState value. * diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java index ade5d6f4ab1..284f9342bba 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -25,14 +24,12 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -87,14 +84,6 @@ interface RouteTablesService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("subscriptionId") String subscriptionId, @Body RouteTableInner 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.RouteTables updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.RouteTables beginUpdateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}") - Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("routeTableName") String routeTableName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.RouteTables listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables") Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -174,10 +163,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, routeTableName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -242,10 +229,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, routeTableName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -261,9 +246,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) - .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -330,11 +315,9 @@ public Observable> getByResourceGroupWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; final String expand = null; - return service.getByResourceGroup(resourceGroupName, routeTableName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + return service.getByResourceGroup(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -414,10 +397,8 @@ public Observable> getByResourceGroupWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, routeTableName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -507,11 +488,9 @@ public Observable> createOrUpdateWithServiceRes if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, routeTableName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, routeTableName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -584,11 +563,9 @@ public Observable> beginCreateOrUpdateWithServi if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, routeTableName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, routeTableName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -610,328 +587,6 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response updateTagsAsync(String resourceGroupName, String routeTableName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName), serviceCallback); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String routeTableName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName).map(new Func1, RouteTableInner>() { - @Override - public RouteTableInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String routeTableName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (routeTableName == null) { - throw new IllegalArgumentException("Parameter routeTableName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - Observable> observable = service.updateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param tags Resource tags. - * @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 - * @return the RouteTableInner object if successful. - */ - public RouteTableInner updateTags(String resourceGroupName, String routeTableName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).toBlocking().last().body(); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param tags Resource tags. - * @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 updateTagsAsync(String resourceGroupName, String routeTableName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags), serviceCallback); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String routeTableName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).map(new Func1, RouteTableInner>() { - @Override - public RouteTableInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String routeTableName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (routeTableName == null) { - throw new IllegalArgumentException("Parameter routeTableName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - Observable> observable = service.updateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @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 - * @return the RouteTableInner object if successful. - */ - public RouteTableInner beginUpdateTags(String resourceGroupName, String routeTableName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName).toBlocking().single().body(); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @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 beginUpdateTagsAsync(String resourceGroupName, String routeTableName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName), serviceCallback); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RouteTableInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String routeTableName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName).map(new Func1, RouteTableInner>() { - @Override - public RouteTableInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RouteTableInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String routeTableName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (routeTableName == null) { - throw new IllegalArgumentException("Parameter routeTableName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - return service.beginUpdateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param tags Resource tags. - * @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 - * @return the RouteTableInner object if successful. - */ - public RouteTableInner beginUpdateTags(String resourceGroupName, String routeTableName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).toBlocking().single().body(); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param tags Resource tags. - * @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 beginUpdateTagsAsync(String resourceGroupName, String routeTableName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags), serviceCallback); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RouteTableInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String routeTableName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).map(new Func1, RouteTableInner>() { - @Override - public RouteTableInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a route table tags. - * - * @param resourceGroupName The name of the resource group. - * @param routeTableName The name of the route table. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the RouteTableInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String routeTableName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (routeTableName == null) { - throw new IllegalArgumentException("Parameter routeTableName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - return service.beginUpdateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * Gets all route tables in a resource group. * @@ -1023,10 +678,8 @@ public Observable>> listByResourceGroupSin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1130,10 +783,8 @@ public Observable>> listSinglePageAsync() if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java index d1e7a40a173..be1e3925887 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java @@ -159,10 +159,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -234,10 +232,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -253,8 +249,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) + .register(200, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -329,10 +325,8 @@ public Observable> getWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -429,11 +423,9 @@ public Observable> createOrUpdateWithServiceResponse if (routeParameters == null) { throw new IllegalArgumentException("Parameter routeParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(routeParameters); - Observable> observable = service.createOrUpdate(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), routeParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), routeParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -513,11 +505,9 @@ public Observable> beginCreateOrUpdateWithServiceRes if (routeParameters == null) { throw new IllegalArgumentException("Parameter routeParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(routeParameters); - return service.beginCreateOrUpdate(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), routeParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), routeParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -638,10 +628,8 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, routeTableName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRuleInner.java index 419cabb6efe..a155a249c76 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRuleInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRuleInner.java @@ -54,7 +54,7 @@ public class SecurityRuleInner extends SubResource { * and 'Internet' can also be used. If this is an ingress rule, specifies * where network traffic originates from. */ - @JsonProperty(value = "properties.sourceAddressPrefix") + @JsonProperty(value = "properties.sourceAddressPrefix", required = true) private String sourceAddressPrefix; /** @@ -63,18 +63,12 @@ public class SecurityRuleInner extends SubResource { @JsonProperty(value = "properties.sourceAddressPrefixes") private List sourceAddressPrefixes; - /** - * The application security group specified as source. - */ - @JsonProperty(value = "properties.sourceApplicationSecurityGroups") - private List sourceApplicationSecurityGroups; - /** * The destination address prefix. CIDR or destination IP range. Asterix * '*' can also be used to match all source IPs. Default tags such as * 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. */ - @JsonProperty(value = "properties.destinationAddressPrefix") + @JsonProperty(value = "properties.destinationAddressPrefix", required = true) private String destinationAddressPrefix; /** @@ -83,12 +77,6 @@ public class SecurityRuleInner extends SubResource { @JsonProperty(value = "properties.destinationAddressPrefixes") private List destinationAddressPrefixes; - /** - * The application security group specified as destination. - */ - @JsonProperty(value = "properties.destinationApplicationSecurityGroups") - private List destinationApplicationSecurityGroups; - /** * The source port ranges. */ @@ -265,26 +253,6 @@ public SecurityRuleInner withSourceAddressPrefixes(List sourceAddressPre return this; } - /** - * Get the sourceApplicationSecurityGroups value. - * - * @return the sourceApplicationSecurityGroups value - */ - public List sourceApplicationSecurityGroups() { - return this.sourceApplicationSecurityGroups; - } - - /** - * Set the sourceApplicationSecurityGroups value. - * - * @param sourceApplicationSecurityGroups the sourceApplicationSecurityGroups value to set - * @return the SecurityRuleInner object itself. - */ - public SecurityRuleInner withSourceApplicationSecurityGroups(List sourceApplicationSecurityGroups) { - this.sourceApplicationSecurityGroups = sourceApplicationSecurityGroups; - return this; - } - /** * Get the destinationAddressPrefix value. * @@ -325,26 +293,6 @@ public SecurityRuleInner withDestinationAddressPrefixes(List destination return this; } - /** - * Get the destinationApplicationSecurityGroups value. - * - * @return the destinationApplicationSecurityGroups value - */ - public List destinationApplicationSecurityGroups() { - return this.destinationApplicationSecurityGroups; - } - - /** - * Set the destinationApplicationSecurityGroups value. - * - * @param destinationApplicationSecurityGroups the destinationApplicationSecurityGroups value to set - * @return the SecurityRuleInner object itself. - */ - public SecurityRuleInner withDestinationApplicationSecurityGroups(List destinationApplicationSecurityGroups) { - this.destinationApplicationSecurityGroups = destinationApplicationSecurityGroups; - return this; - } - /** * Get the sourcePortRanges value. * diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java index ae27e13119b..331b11e47a6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java @@ -159,10 +159,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -234,10 +232,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -253,9 +249,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) .register(204, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -329,10 +325,8 @@ public Observable> getWithServiceResponseAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -429,11 +423,9 @@ public Observable> createOrUpdateWithServiceR if (securityRuleParameters == null) { throw new IllegalArgumentException("Parameter securityRuleParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(securityRuleParameters); - Observable> observable = service.createOrUpdate(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), securityRuleParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), securityRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -513,11 +505,9 @@ public Observable> beginCreateOrUpdateWithSer if (securityRuleParameters == null) { throw new IllegalArgumentException("Parameter securityRuleParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(securityRuleParameters); - return service.beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), securityRuleParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), securityRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -638,10 +628,8 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java index 4fd9a0b0b22..9aa6c3f052d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java @@ -9,8 +9,8 @@ package com.microsoft.azure.management.network.implementation; import java.util.List; -import com.microsoft.azure.management.network.ServiceEndpointPropertiesFormat; import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.management.network.ServiceEndpointPropertiesFormat; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.SubResource; @@ -29,13 +29,13 @@ public class SubnetInner extends SubResource { * The reference of the NetworkSecurityGroup resource. */ @JsonProperty(value = "properties.networkSecurityGroup") - private NetworkSecurityGroupInner networkSecurityGroup; + private SubResource networkSecurityGroup; /** * The reference of the RouteTable resource. */ @JsonProperty(value = "properties.routeTable") - private RouteTableInner routeTable; + private SubResource routeTable; /** * An array of service endpoints. @@ -43,6 +43,7 @@ public class SubnetInner extends SubResource { @JsonProperty(value = "properties.serviceEndpoints") private List serviceEndpoints; + /** * Gets an array of references to the network interface IP configurations * using subnet. @@ -100,7 +101,7 @@ public SubnetInner withAddressPrefix(String addressPrefix) { * * @return the networkSecurityGroup value */ - public NetworkSecurityGroupInner networkSecurityGroup() { + public SubResource networkSecurityGroup() { return this.networkSecurityGroup; } @@ -110,7 +111,7 @@ public NetworkSecurityGroupInner networkSecurityGroup() { * @param networkSecurityGroup the networkSecurityGroup value to set * @return the SubnetInner object itself. */ - public SubnetInner withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup) { + public SubnetInner withNetworkSecurityGroup(SubResource networkSecurityGroup) { this.networkSecurityGroup = networkSecurityGroup; return this; } @@ -120,7 +121,7 @@ public SubnetInner withNetworkSecurityGroup(NetworkSecurityGroupInner networkSec * * @return the routeTable value */ - public RouteTableInner routeTable() { + public SubResource routeTable() { return this.routeTable; } @@ -130,7 +131,7 @@ public RouteTableInner routeTable() { * @param routeTable the routeTable value to set * @return the SubnetInner object itself. */ - public SubnetInner withRouteTable(RouteTableInner routeTable) { + public SubResource withRouteTable(SubResource routeTable) { this.routeTable = routeTable; return this; } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java index c9294e4223a..7ca792e8461 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java @@ -159,10 +159,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -234,10 +232,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -254,8 +250,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) .register(204, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -329,11 +325,9 @@ public Observable> getWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; final String expand = null; - return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -420,10 +414,8 @@ public Observable> getWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -520,11 +512,9 @@ public Observable> createOrUpdateWithServiceRespons if (subnetParameters == null) { throw new IllegalArgumentException("Parameter subnetParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(subnetParameters); - Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), subnetParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), subnetParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -604,11 +594,9 @@ public Observable> beginCreateOrUpdateWithServiceRe if (subnetParameters == null) { throw new IllegalArgumentException("Parameter subnetParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(subnetParameters); - return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), subnetParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), subnetParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -729,10 +717,8 @@ public Observable>> listSinglePageAsync(final if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyParametersInner.java deleted file mode 100644 index 5572c37a4b9..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyParametersInner.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.microsoft.azure.SubResource; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Parameters that define the representation of topology. - */ -public class TopologyParametersInner { - /** - * The name of the target resource group to perform topology on. - */ - @JsonProperty(value = "targetResourceGroupName") - private String targetResourceGroupName; - - /** - * The reference of the Virtual Network resource. - */ - @JsonProperty(value = "targetVirtualNetwork") - private SubResource targetVirtualNetwork; - - /** - * The reference of the Subnet resource. - */ - @JsonProperty(value = "targetSubnet") - private SubResource targetSubnet; - - /** - * Get the targetResourceGroupName value. - * - * @return the targetResourceGroupName value - */ - public String targetResourceGroupName() { - return this.targetResourceGroupName; - } - - /** - * Set the targetResourceGroupName value. - * - * @param targetResourceGroupName the targetResourceGroupName value to set - * @return the TopologyParametersInner object itself. - */ - public TopologyParametersInner withTargetResourceGroupName(String targetResourceGroupName) { - this.targetResourceGroupName = targetResourceGroupName; - return this; - } - - /** - * Get the targetVirtualNetwork value. - * - * @return the targetVirtualNetwork value - */ - public SubResource targetVirtualNetwork() { - return this.targetVirtualNetwork; - } - - /** - * Set the targetVirtualNetwork value. - * - * @param targetVirtualNetwork the targetVirtualNetwork value to set - * @return the TopologyParametersInner object itself. - */ - public TopologyParametersInner withTargetVirtualNetwork(SubResource targetVirtualNetwork) { - this.targetVirtualNetwork = targetVirtualNetwork; - return this; - } - - /** - * Get the targetSubnet value. - * - * @return the targetSubnet value - */ - public SubResource targetSubnet() { - return this.targetSubnet; - } - - /** - * Set the targetSubnet value. - * - * @param targetSubnet the targetSubnet value to set - * @return the TopologyParametersInner object itself. - */ - public TopologyParametersInner withTargetSubnet(SubResource targetSubnet) { - this.targetSubnet = targetSubnet; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsageInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsageInner.java index 614db48a371..481b80207b6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsageInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsageInner.java @@ -15,12 +15,6 @@ * Describes network resource usage. */ public class UsageInner { - /** - * Resource identifier. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - /** * An enum describing the unit of measurement. */ @@ -52,15 +46,6 @@ public UsageInner() { unit = "Count"; } - /** - * Get the id value. - * - * @return the id value - */ - public String id() { - return this.id; - } - /** * Get the unit value. * diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java index 9367fbc4ec2..047a6c7fea4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java @@ -67,7 +67,7 @@ interface UsagesService { } /** - * List network usages for a subscription. + * Lists compute usages for a subscription. * * @param location The location where resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -86,7 +86,7 @@ public Page nextPage(String nextPageLink) { } /** - * List network usages for a subscription. + * Lists compute usages for a subscription. * * @param location The location where resource usage is queried. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. @@ -106,7 +106,7 @@ public Observable>> call(String nextPageLink) { } /** - * List network usages for a subscription. + * Lists compute usages for a subscription. * * @param location The location where resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -123,7 +123,7 @@ public Page call(ServiceResponse> response) { } /** - * List network usages for a subscription. + * Lists compute usages for a subscription. * * @param location The location where resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -144,7 +144,7 @@ public Observable>> call(ServiceResponse> * @param location The location where resource usage is queried. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -157,10 +157,8 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(location, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -182,7 +180,7 @@ private ServiceResponse> listDelegate(Response nextPage(String nextPageLink) { } /** - * List network usages for a subscription. + * Lists compute usages for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -222,7 +220,7 @@ public Observable>> call(String nextPageLink) { } /** - * List network usages for a subscription. + * Lists compute usages for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -239,7 +237,7 @@ public Page call(ServiceResponse> response) { } /** - * List network usages for a subscription. + * Lists compute usages for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -260,7 +258,7 @@ public Observable>> call(ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionInner.java index 2aeb0692760..b52e097be1a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionInner.java @@ -33,19 +33,19 @@ public class VirtualNetworkGatewayConnectionInner extends Resource { * The reference to virtual network gateway resource. */ @JsonProperty(value = "properties.virtualNetworkGateway1", required = true) - private VirtualNetworkGatewayInner virtualNetworkGateway1; + private SubResource virtualNetworkGateway1; /** * The reference to virtual network gateway resource. */ @JsonProperty(value = "properties.virtualNetworkGateway2") - private VirtualNetworkGatewayInner virtualNetworkGateway2; + private SubResource virtualNetworkGateway2; /** * The reference to local network gateway resource. */ @JsonProperty(value = "properties.localNetworkGateway2") - private LocalNetworkGatewayInner localNetworkGateway2; + private SubResource localNetworkGateway2; /** * Gateway connection type. Possible values are: @@ -163,7 +163,7 @@ public VirtualNetworkGatewayConnectionInner withAuthorizationKey(String authoriz * * @return the virtualNetworkGateway1 value */ - public VirtualNetworkGatewayInner virtualNetworkGateway1() { + public SubResource virtualNetworkGateway1() { return this.virtualNetworkGateway1; } @@ -173,7 +173,7 @@ public VirtualNetworkGatewayInner virtualNetworkGateway1() { * @param virtualNetworkGateway1 the virtualNetworkGateway1 value to set * @return the VirtualNetworkGatewayConnectionInner object itself. */ - public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway1(VirtualNetworkGatewayInner virtualNetworkGateway1) { + public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway1(SubResource virtualNetworkGateway1) { this.virtualNetworkGateway1 = virtualNetworkGateway1; return this; } @@ -183,7 +183,7 @@ public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway1(VirtualNe * * @return the virtualNetworkGateway2 value */ - public VirtualNetworkGatewayInner virtualNetworkGateway2() { + public SubResource virtualNetworkGateway2() { return this.virtualNetworkGateway2; } @@ -193,7 +193,7 @@ public VirtualNetworkGatewayInner virtualNetworkGateway2() { * @param virtualNetworkGateway2 the virtualNetworkGateway2 value to set * @return the VirtualNetworkGatewayConnectionInner object itself. */ - public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway2(VirtualNetworkGatewayInner virtualNetworkGateway2) { + public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway2(SubResource virtualNetworkGateway2) { this.virtualNetworkGateway2 = virtualNetworkGateway2; return this; } @@ -203,7 +203,7 @@ public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway2(VirtualNe * * @return the localNetworkGateway2 value */ - public LocalNetworkGatewayInner localNetworkGateway2() { + public SubResource localNetworkGateway2() { return this.localNetworkGateway2; } @@ -213,7 +213,7 @@ public LocalNetworkGatewayInner localNetworkGateway2() { * @param localNetworkGateway2 the localNetworkGateway2 value to set * @return the VirtualNetworkGatewayConnectionInner object itself. */ - public VirtualNetworkGatewayConnectionInner withLocalNetworkGateway2(LocalNetworkGatewayInner localNetworkGateway2) { + public VirtualNetworkGatewayConnectionInner withLocalNetworkGateway2(SubResource localNetworkGateway2) { this.localNetworkGateway2 = localNetworkGateway2; return this; } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java index 7ef3552ffba..c8af23e8c31 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java @@ -15,7 +15,6 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -24,14 +23,12 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; @@ -87,14 +84,6 @@ interface VirtualNetworkGatewayConnectionsService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}", method = "DELETE", hasBody = true) Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @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.VirtualNetworkGatewayConnections updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections beginUpdateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}") - Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGatewayConnections setSharedKey" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey") Observable> setSharedKey(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body ConnectionSharedKeyInner parameters, @Header("User-Agent") String userAgent); @@ -194,11 +183,9 @@ public Observable> createO if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -271,11 +258,9 @@ public Observable> beginCr if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -359,10 +344,8 @@ public Observable> getByRe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -444,10 +427,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -512,10 +493,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -538,328 +517,6 @@ private ServiceResponse beginDeleteDelegate(Response respons .build(response); } - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @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 - * @return the VirtualNetworkGatewayConnectionListEntityInner object if successful. - */ - public VirtualNetworkGatewayConnectionListEntityInner updateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().body(); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @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 updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, VirtualNetworkGatewayConnectionListEntityInner>() { - @Override - public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualNetworkGatewayConnectionName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param tags Resource tags. - * @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 - * @return the VirtualNetworkGatewayConnectionListEntityInner object if successful. - */ - public VirtualNetworkGatewayConnectionListEntityInner updateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).toBlocking().last().body(); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param tags Resource tags. - * @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 updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags), serviceCallback); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).map(new Func1, VirtualNetworkGatewayConnectionListEntityInner>() { - @Override - public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualNetworkGatewayConnectionName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @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 - * @return the VirtualNetworkGatewayConnectionListEntityInner object if successful. - */ - public VirtualNetworkGatewayConnectionListEntityInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().body(); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @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 beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName), serviceCallback); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkGatewayConnectionListEntityInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).map(new Func1, VirtualNetworkGatewayConnectionListEntityInner>() { - @Override - public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkGatewayConnectionListEntityInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualNetworkGatewayConnectionName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param tags Resource tags. - * @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 - * @return the VirtualNetworkGatewayConnectionListEntityInner object if successful. - */ - public VirtualNetworkGatewayConnectionListEntityInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).toBlocking().single().body(); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param tags Resource tags. - * @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 beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags), serviceCallback); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkGatewayConnectionListEntityInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, tags).map(new Func1, VirtualNetworkGatewayConnectionListEntityInner>() { - @Override - public VirtualNetworkGatewayConnectionListEntityInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a virtual network gateway connection tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkGatewayConnectionListEntityInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualNetworkGatewayConnectionName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection shared key for passed virtual network gateway connection in the specified resource group through Network resource provider. * @@ -926,15 +583,13 @@ public Observable> setSharedKeyWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } if (value == null) { throw new IllegalArgumentException("Parameter value is required and cannot be null."); } + final String apiVersion = "2017-08-01"; ConnectionSharedKeyInner parameters = new ConnectionSharedKeyInner(); parameters.withValue(value); - Observable> observable = service.setSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + Observable> observable = service.setSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -1004,15 +659,13 @@ public Observable> beginSetSharedKeyWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } if (value == null) { throw new IllegalArgumentException("Parameter value is required and cannot be null."); } + final String apiVersion = "2017-08-01"; ConnectionSharedKeyInner parameters = new ConnectionSharedKeyInner(); parameters.withValue(value); - return service.beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1028,8 +681,8 @@ public Observable> call(Response beginSetSharedKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) .register(201, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1096,10 +749,8 @@ public Observable> getSharedKeyWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1211,10 +862,8 @@ public Observable>> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1301,12 +950,10 @@ public Observable> resetSharedKey if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; ConnectionResetSharedKeyInner parameters = new ConnectionResetSharedKeyInner(); parameters.withKeyLength(keyLength); - Observable> observable = service.resetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); + Observable> observable = service.resetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1376,12 +1023,10 @@ public Observable> beginResetShar if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; ConnectionResetSharedKeyInner parameters = new ConnectionResetSharedKeyInner(); parameters.withKeyLength(keyLength); - return service.beginResetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.beginResetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewaysInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewaysInner.java index 43c20669134..0e5538d39cd 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewaysInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewaysInner.java @@ -15,7 +15,6 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -24,14 +23,12 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; @@ -87,14 +84,6 @@ interface VirtualNetworkGatewaysService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}", method = "DELETE", hasBody = true) Observable> beginDelete(@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.VirtualNetworkGateways updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGateways beginUpdateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}") - Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworkGateways listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways") Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -127,14 +116,6 @@ interface VirtualNetworkGatewaysService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile") Observable> beginGenerateVpnProfile(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParametersInner 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.VirtualNetworkGateways getVpnProfilePackageUrl" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl") - Observable> getVpnProfilePackageUrl(@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.VirtualNetworkGateways beginGetVpnProfilePackageUrl" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl") - Observable> beginGetVpnProfilePackageUrl(@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.VirtualNetworkGateways getBgpPeerStatus" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus") Observable> getBgpPeerStatus(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("peer") String peer, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -143,10 +124,6 @@ interface VirtualNetworkGatewaysService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus") Observable> beginGetBgpPeerStatus(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("peer") String peer, @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.VirtualNetworkGateways supportedVpnDevices" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices") - Observable> supportedVpnDevices(@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.VirtualNetworkGateways getLearnedRoutes" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes") Observable> getLearnedRoutes(@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); @@ -163,26 +140,6 @@ interface VirtualNetworkGatewaysService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes") Observable> beginGetAdvertisedRoutes(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Query("peer") String peer, @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.VirtualNetworkGateways setVpnclientIpsecParameters" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters") - Observable> setVpnclientIpsecParameters(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientIPsecParametersInner vpnclientIpsecParams, @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.VirtualNetworkGateways beginSetVpnclientIpsecParameters" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters") - Observable> beginSetVpnclientIpsecParameters(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientIPsecParametersInner vpnclientIpsecParams, @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.VirtualNetworkGateways getVpnclientIpsecParameters" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters") - Observable> getVpnclientIpsecParameters(@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.VirtualNetworkGateways beginGetVpnclientIpsecParameters" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters") - Observable> beginGetVpnclientIpsecParameters(@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.VirtualNetworkGateways vpnDeviceConfigurationScript" }) - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript") - Observable> vpnDeviceConfigurationScript(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayConnectionName") String virtualNetworkGatewayConnectionName, @Path("subscriptionId") String subscriptionId, @Body VpnDeviceScriptParametersInner 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.VirtualNetworkGateways listByResourceGroupNext" }) @GET Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -262,11 +219,9 @@ public Observable> createOrUpdateWit if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -339,11 +294,9 @@ public Observable> beginCreateOrUpda if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -427,10 +380,8 @@ public Observable> getByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -512,10 +463,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -580,10 +529,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -599,141 +546,216 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) .register(204, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates a virtual network gateway tags. + * Gets all virtual network gateways by 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 - * @return the VirtualNetworkGatewayInner object if successful. + * @return the PagedList<VirtualNetworkGatewayInner> object if successful. */ - public VirtualNetworkGatewayInner updateTags(String resourceGroupName, String virtualNetworkGatewayName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Updates a virtual network gateway tags. + * Gets all virtual network gateways by 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 updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Updates a virtual network gateway tags. + * Gets all virtual network gateways by 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 + * @return the observable to the PagedList<VirtualNetworkGatewayInner> object */ - public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { - @Override - public VirtualNetworkGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Updates a virtual network gateway tags. + * Gets all virtual network gateways by 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 + * @return the observable to the PagedList<VirtualNetworkGatewayInner> object */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all virtual network gateways by resource group. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkGatewayInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { 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."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); } + /** - * Updates a virtual network gateway tags. + * Gets all the connections in a virtual network gateway. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param tags Resource tags. * @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 - * @return the VirtualNetworkGatewayInner object if successful. + * @return the PagedList<VirtualNetworkGatewayConnectionListEntityInner> object if successful. */ - public VirtualNetworkGatewayInner updateTags(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).toBlocking().last().body(); + public PagedList listConnections(final String resourceGroupName, final String virtualNetworkGatewayName) { + ServiceResponse> response = listConnectionsSinglePageAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listConnectionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Updates a virtual network gateway tags. + * Gets all the connections in a virtual network gateway. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param tags Resource tags. * @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 updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags), serviceCallback); + public ServiceFuture> listConnectionsAsync(final String resourceGroupName, final String virtualNetworkGatewayName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listConnectionsSinglePageAsync(resourceGroupName, virtualNetworkGatewayName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listConnectionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Updates a virtual network gateway tags. + * Gets all the connections in a virtual network gateway. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param tags Resource tags. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the PagedList<VirtualNetworkGatewayConnectionListEntityInner> object */ - public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).map(new Func1, VirtualNetworkGatewayInner>() { - @Override - public VirtualNetworkGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> listConnectionsAsync(final String resourceGroupName, final String virtualNetworkGatewayName) { + return listConnectionsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Updates a virtual network gateway tags. + * Gets all the connections in a virtual network gateway. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param tags Resource tags. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the PagedList<VirtualNetworkGatewayConnectionListEntityInner> object + */ + public Observable>> listConnectionsWithServiceResponseAsync(final String resourceGroupName, final String virtualNetworkGatewayName) { + return listConnectionsSinglePageAsync(resourceGroupName, virtualNetworkGatewayName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listConnectionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets all the connections in a virtual network gateway. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<VirtualNetworkGatewayConnectionListEntityInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + public Observable>> listConnectionsSinglePageAsync(final String resourceGroupName, final String virtualNetworkGatewayName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -743,18 +765,30 @@ public Observable> updateTagsWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2017-08-01"; + return service.listConnections(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listConnectionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); } /** - * Updates a virtual network gateway tags. + * Resets the primary 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. @@ -763,12 +797,12 @@ public Observable> updateTagsWithSer * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the VirtualNetworkGatewayInner object if successful. */ - public VirtualNetworkGatewayInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + public VirtualNetworkGatewayInner reset(String resourceGroupName, String virtualNetworkGatewayName) { + return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); } /** - * Updates a virtual network gateway tags. + * Resets the primary 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. @@ -776,20 +810,20 @@ public VirtualNetworkGatewayInner beginUpdateTags(String resourceGroupName, Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + public ServiceFuture resetAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); } /** - * Updates a virtual network gateway tags. + * Resets the primary 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 to the VirtualNetworkGatewayInner object + * @return the observable for the request */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { + public Observable resetAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { @Override public VirtualNetworkGatewayInner call(ServiceResponse response) { return response.body(); @@ -798,14 +832,14 @@ public VirtualNetworkGatewayInner call(ServiceResponse> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable> resetWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -815,66 +849,51 @@ public Observable> beginUpdateTagsWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); + final String apiVersion = "2017-08-01"; + final String gatewayVip = null; + Observable> observable = service.reset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } - /** - * Updates a virtual network gateway tags. + * Resets the primary 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 tags Resource tags. + * @param gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled 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 * @return the VirtualNetworkGatewayInner object if successful. */ - public VirtualNetworkGatewayInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).toBlocking().single().body(); + public VirtualNetworkGatewayInner reset(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { + return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip).toBlocking().last().body(); } /** - * Updates a virtual network gateway tags. + * Resets the primary 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 tags Resource tags. + * @param gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled 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 beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags), serviceCallback); + public ServiceFuture resetAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip), serviceCallback); } /** - * Updates a virtual network gateway tags. + * Resets the primary 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 tags Resource tags. + * @param gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkGatewayInner object + * @return the observable for the request */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).map(new Func1, VirtualNetworkGatewayInner>() { + public Observable resetAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { + return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip).map(new Func1, VirtualNetworkGatewayInner>() { @Override public VirtualNetworkGatewayInner call(ServiceResponse response) { return response.body(); @@ -883,15 +902,15 @@ public VirtualNetworkGatewayInner call(ServiceResponse> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + public Observable> resetWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -901,889 +920,64 @@ public Observable> beginUpdateTagsWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all virtual network gateways by resource group. - * - * @param resourceGroupName The name of the resource group. - * @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 - * @return the PagedList<VirtualNetworkGatewayInner> object if successful. - */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all virtual network gateways by resource group. - * - * @param resourceGroupName The name of the resource group. - * @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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all virtual network gateways by resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<VirtualNetworkGatewayInner> object - */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all virtual network gateways by resource group. - * - * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<VirtualNetworkGatewayInner> object - */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all virtual network gateways by resource group. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<VirtualNetworkGatewayInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listByResourceGroupDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets all the connections in a virtual network gateway. - * - * @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 - * @return the PagedList<VirtualNetworkGatewayConnectionListEntityInner> object if successful. - */ - public PagedList listConnections(final String resourceGroupName, final String virtualNetworkGatewayName) { - ServiceResponse> response = listConnectionsSinglePageAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listConnectionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * Gets all the connections in a virtual network gateway. - * - * @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> listConnectionsAsync(final String resourceGroupName, final String virtualNetworkGatewayName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listConnectionsSinglePageAsync(resourceGroupName, virtualNetworkGatewayName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listConnectionsNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all the connections in a virtual network gateway. - * - * @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 to the PagedList<VirtualNetworkGatewayConnectionListEntityInner> object - */ - public Observable> listConnectionsAsync(final String resourceGroupName, final String virtualNetworkGatewayName) { - return listConnectionsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * Gets all the connections in a virtual network gateway. - * - * @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 to the PagedList<VirtualNetworkGatewayConnectionListEntityInner> object - */ - public Observable>> listConnectionsWithServiceResponseAsync(final String resourceGroupName, final String virtualNetworkGatewayName) { - return listConnectionsSinglePageAsync(resourceGroupName, virtualNetworkGatewayName) - .concatMap(new Func1>, Observable>>>() { - @Override - public Observable>> call(ServiceResponse> page) { - String nextPageLink = page.body().nextPageLink(); - if (nextPageLink == null) { - return Observable.just(page); - } - return Observable.just(page).concatWith(listConnectionsNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * Gets all the connections in a virtual network gateway. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<VirtualNetworkGatewayConnectionListEntityInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listConnectionsSinglePageAsync(final String resourceGroupName, final 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listConnections(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listConnectionsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Resets the primary 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 - * @return the VirtualNetworkGatewayInner object if successful. - */ - public VirtualNetworkGatewayInner reset(String resourceGroupName, String virtualNetworkGatewayName) { - return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); - } - - /** - * Resets the primary 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 resetAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); - } - - /** - * Resets the primary 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 resetAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { - @Override - public VirtualNetworkGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Resets the primary 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> resetWithServiceResponseAsync(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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String gatewayVip = null; - Observable> observable = service.reset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Resets the primary 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 gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled 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 - * @return the VirtualNetworkGatewayInner object if successful. - */ - public VirtualNetworkGatewayInner reset(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { - return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip).toBlocking().last().body(); - } - - /** - * Resets the primary 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 gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled 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 resetAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip), serviceCallback); - } - - /** - * Resets the primary 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 gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable resetAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { - return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip).map(new Func1, VirtualNetworkGatewayInner>() { - @Override - public VirtualNetworkGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Resets the primary 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 gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> resetWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { - 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.reset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Resets the primary 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 - * @return the VirtualNetworkGatewayInner object if successful. - */ - public VirtualNetworkGatewayInner beginReset(String resourceGroupName, String virtualNetworkGatewayName) { - return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); - } - - /** - * Resets the primary 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 beginResetAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); - } - - /** - * Resets the primary 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 to the VirtualNetworkGatewayInner object - */ - public Observable beginResetAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { - @Override - public VirtualNetworkGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Resets the primary 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 to the VirtualNetworkGatewayInner object - */ - public Observable> beginResetWithServiceResponseAsync(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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String gatewayVip = null; - return service.beginReset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginResetDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Resets the primary 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 gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled 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 - * @return the VirtualNetworkGatewayInner object if successful. - */ - public VirtualNetworkGatewayInner beginReset(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { - return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip).toBlocking().single().body(); - } - - /** - * Resets the primary 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 gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled 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 beginResetAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip), serviceCallback); - } - - /** - * Resets the primary 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 gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkGatewayInner object - */ - public Observable beginResetAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { - return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip).map(new Func1, VirtualNetworkGatewayInner>() { - @Override - public VirtualNetworkGatewayInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Resets the primary 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 gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkGatewayInner object - */ - public Observable> beginResetWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { - 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginReset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginResetDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginResetDelegate(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. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. - * @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 - * @return the String object if successful. - */ - public String generatevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { - return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().last().body(); - } - - /** - * Generates VPN client package for P2S client 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. - * @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 generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); - } - - /** - * Generates VPN client package for P2S client 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { - return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { - @Override - public String call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Generates VPN client package for P2S client 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> generatevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { - 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."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.generatevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Generates VPN client package for P2S client 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. - * @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 - * @return the String object if successful. - */ - public String beginGeneratevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { - return beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body(); - } - - /** - * Generates VPN client package for P2S client 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. - * @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 beginGeneratevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); - } - - /** - * Generates VPN client package for P2S client 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the String object - */ - public Observable beginGeneratevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { - return beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { - @Override - public String call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Generates VPN client package for P2S client 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the String object - */ - public Observable> beginGeneratevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { - 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."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginGeneratevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginGeneratevpnclientpackageDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginGeneratevpnclientpackageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. - * @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 - * @return the String object if successful. - */ - public String generateVpnProfile(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { - return generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().last().body(); - } - - /** - * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. - * @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 generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); - } - - /** - * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { - return generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { - @Override - public String call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> generateVpnProfileWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { - 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."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - Observable> observable = service.generateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.reset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * Resets the primary 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @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 - * @return the String object if successful. + * @return the VirtualNetworkGatewayInner object if successful. */ - public String beginGenerateVpnProfile(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { - return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body(); + public VirtualNetworkGatewayInner beginReset(String resourceGroupName, String virtualNetworkGatewayName) { + return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); } /** - * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * Resets the primary 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @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 beginGenerateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); + public ServiceFuture beginResetAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); } /** - * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * Resets the primary 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the String object + * @return the observable to the VirtualNetworkGatewayInner object */ - public Observable beginGenerateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { - return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { + public Observable beginResetAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { @Override - public String call(ServiceResponse response) { + public VirtualNetworkGatewayInner call(ServiceResponse response) { return response.body(); } }); } /** - * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * Resets the primary 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the String object + * @return the observable to the VirtualNetworkGatewayInner object */ - public Observable> beginGenerateVpnProfileWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + public Observable> beginResetWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1793,19 +987,14 @@ public Observable> beginGenerateVpnProfileWithServiceRes 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(parameters); - return service.beginGenerateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2017-08-01"; + final String gatewayVip = null; + return service.beginReset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginGenerateVpnProfileDelegate(response); + ServiceResponse clientResponse = beginResetDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1814,136 +1003,63 @@ public Observable> call(Response response) }); } - private ServiceResponse beginGenerateVpnProfileDelegate(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); - } - - /** - * 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. - * - * @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 - * @return the String object if successful. - */ - public String getVpnProfilePackageUrl(String resourceGroupName, String virtualNetworkGatewayName) { - return getVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); - } - - /** - * 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. - * - * @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 getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); - } - - /** - * 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. - * - * @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 getVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return getVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { - @Override - public String call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * 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. - * - * @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> getVpnProfilePackageUrlWithServiceResponseAsync(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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.getVpnProfilePackageUrl(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * 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. + * Resets the primary 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 gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled 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 - * @return the String object if successful. + * @return the VirtualNetworkGatewayInner object if successful. */ - public String beginGetVpnProfilePackageUrl(String resourceGroupName, String virtualNetworkGatewayName) { - return beginGetVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + public VirtualNetworkGatewayInner beginReset(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { + return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip).toBlocking().single().body(); } /** - * 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. + * Resets the primary 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 gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled 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 beginGetVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGetVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + public ServiceFuture beginResetAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip), serviceCallback); } /** - * 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. + * Resets the primary 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 gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the String object + * @return the observable to the VirtualNetworkGatewayInner object */ - public Observable beginGetVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return beginGetVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + public Observable beginResetAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { + return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, gatewayVip).map(new Func1, VirtualNetworkGatewayInner>() { @Override - public String call(ServiceResponse response) { + public VirtualNetworkGatewayInner call(ServiceResponse response) { return response.body(); } }); } /** - * 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. + * Resets the primary 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 gatewayVip Virtual network gateway vip address supplied to the begin reset of the active-active feature enabled gateway. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the String object + * @return the observable to the VirtualNetworkGatewayInner object */ - public Observable> beginGetVpnProfilePackageUrlWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable> beginResetWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String gatewayVip) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1953,15 +1069,13 @@ public Observable> beginGetVpnProfilePackageUrlWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginGetVpnProfilePackageUrl(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2017-08-01"; + return service.beginReset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginGetVpnProfilePackageUrlDelegate(response); + ServiceResponse clientResponse = beginResetDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1970,140 +1084,71 @@ public Observable> call(Response response) }); } - private ServiceResponse beginGetVpnProfilePackageUrlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginResetDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(202, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * - * @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 - * @return the BgpPeerStatusListResultInner object if successful. - */ - public BgpPeerStatusListResultInner getBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName) { - return getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); - } - - /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * - * @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 getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); - } - - /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * - * @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 getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, BgpPeerStatusListResultInner>() { - @Override - public BgpPeerStatusListResultInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. - * - * @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> getBgpPeerStatusWithServiceResponseAsync(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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String peer = null; - Observable> observable = service.getBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * Generates VPN client package for P2S client 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 peer The IP address of the peer to retrieve the status of. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @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 - * @return the BgpPeerStatusListResultInner object if successful. + * @return the String object if successful. */ - public BgpPeerStatusListResultInner getBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName, String peer) { - return getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).toBlocking().last().body(); + public String generatevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().last().body(); } /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * Generates VPN client package for P2S client 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 peer The IP address of the peer to retrieve the status of. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @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 getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer), serviceCallback); + public ServiceFuture generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); } /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * Generates VPN client package for P2S client 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 peer The IP address of the peer to retrieve the status of. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { - return getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).map(new Func1, BgpPeerStatusListResultInner>() { + public Observable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { @Override - public BgpPeerStatusListResultInner call(ServiceResponse response) { + public String call(ServiceResponse response) { return response.body(); } }); } /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * Generates VPN client package for P2S client 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 peer The IP address of the peer to retrieve the status of. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> getBgpPeerStatusWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + public Observable> generatevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2113,66 +1158,72 @@ public Observable> getBgpPeerStatu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - Observable> observable = service.getBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + Validator.validate(parameters); + final String apiVersion = "2017-08-01"; + Observable> observable = service.generatevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * Generates VPN client package for P2S client 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @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 - * @return the BgpPeerStatusListResultInner object if successful. + * @return the String object if successful. */ - public BgpPeerStatusListResultInner beginGetBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName) { - return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + public String beginGeneratevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + return beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body(); } /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * Generates VPN client package for P2S client 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @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 beginGetBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + public ServiceFuture beginGeneratevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); } /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * Generates VPN client package for P2S client 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BgpPeerStatusListResultInner object + * @return the observable to the String object */ - public Observable beginGetBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, BgpPeerStatusListResultInner>() { + public Observable beginGeneratevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + return beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { @Override - public BgpPeerStatusListResultInner call(ServiceResponse response) { + public String call(ServiceResponse response) { return response.body(); } }); } /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * Generates VPN client package for P2S client 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 parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BgpPeerStatusListResultInner object + * @return the observable to the String object */ - public Observable> beginGetBgpPeerStatusWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable> beginGeneratevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2182,16 +1233,17 @@ public Observable> beginGetBgpPeer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - final String peer = null; - return service.beginGetBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + Validator.validate(parameters); + final String apiVersion = "2017-08-01"; + return service.beginGeneratevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginGetBgpPeerStatusDelegate(response); + ServiceResponse clientResponse = beginGeneratevpnclientpackageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2200,63 +1252,70 @@ public Observable> call(Response beginGeneratevpnclientpackageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer to retrieve the status of. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @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 - * @return the BgpPeerStatusListResultInner object if successful. + * @return the String object if successful. */ - public BgpPeerStatusListResultInner beginGetBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName, String peer) { - return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).toBlocking().single().body(); + public String generateVpnProfile(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + return generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().last().body(); } /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer to retrieve the status of. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @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 beginGetBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer), serviceCallback); + public ServiceFuture generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); } /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer to retrieve the status of. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BgpPeerStatusListResultInner object + * @return the observable for the request */ - public Observable beginGetBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { - return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).map(new Func1, BgpPeerStatusListResultInner>() { + public Observable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + return generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { @Override - public BgpPeerStatusListResultInner call(ServiceResponse response) { + public String call(ServiceResponse response) { return response.body(); } }); } /** - * The GetBgpPeerStatus operation retrieves the status of all BGP peers. + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer to retrieve the status of. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the BgpPeerStatusListResultInner object + * @return the observable for the request */ - public Observable> beginGetBgpPeerStatusWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + public Observable> generateVpnProfileWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2266,68 +1325,55 @@ public Observable> beginGetBgpPeer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - return service.beginGetBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginGetBgpPeerStatusDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginGetBgpPeerStatusDelegate(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); + Validator.validate(parameters); + final String apiVersion = "2017-08-01"; + Observable> observable = service.generateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * Gets a xml format representation for supported vpn devices. + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @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 * @return the String object if successful. */ - public String supportedVpnDevices(String resourceGroupName, String virtualNetworkGatewayName) { - return supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + public String beginGenerateVpnProfile(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body(); } /** - * Gets a xml format representation for supported vpn devices. + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @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 supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + public ServiceFuture beginGenerateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); } /** - * Gets a xml format representation for supported vpn devices. + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the String object */ - public Observable supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + public Observable beginGenerateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { + return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { @Override public String call(ServiceResponse response) { return response.body(); @@ -2336,14 +1382,15 @@ public String call(ServiceResponse response) { } /** - * Gets a xml format representation for supported vpn devices. + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the String object */ - public Observable> supportedVpnDevicesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable> beginGenerateVpnProfileWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParametersInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2353,15 +1400,17 @@ public Observable> supportedVpnDevicesWithServiceRespons if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - return service.supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + Validator.validate(parameters); + final String apiVersion = "2017-08-01"; + return service.beginGenerateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = supportedVpnDevicesDelegate(response); + ServiceResponse clientResponse = beginGenerateVpnProfileDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2370,7 +1419,7 @@ public Observable> call(Response response) }); } - private ServiceResponse supportedVpnDevicesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginGenerateVpnProfileDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -2378,21 +1427,21 @@ private ServiceResponse supportedVpnDevicesDelegate(Response getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + public ServiceFuture getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); } /** - * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @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 getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return getLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, GatewayRouteListResultInner>() { + public Observable getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, BgpPeerStatusListResultInner>() { @Override - public GatewayRouteListResultInner call(ServiceResponse response) { + public BgpPeerStatusListResultInner call(ServiceResponse response) { return response.body(); } }); } /** - * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @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> getLearnedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable> getBgpPeerStatusWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2439,66 +1488,68 @@ public Observable> getLearnedRoutes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.getLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2017-08-01"; + final String peer = null; + Observable> observable = service.getBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } - /** - * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer to retrieve the status of. * @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 - * @return the GatewayRouteListResultInner object if successful. + * @return the BgpPeerStatusListResultInner object if successful. */ - public GatewayRouteListResultInner beginGetLearnedRoutes(String resourceGroupName, String virtualNetworkGatewayName) { - return beginGetLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + public BgpPeerStatusListResultInner getBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).toBlocking().last().body(); } /** - * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer to retrieve the status of. * @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 beginGetLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGetLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + public ServiceFuture getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer), serviceCallback); } /** - * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer to retrieve the status of. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GatewayRouteListResultInner object + * @return the observable for the request */ - public Observable beginGetLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return beginGetLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, GatewayRouteListResultInner>() { + public Observable getBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).map(new Func1, BgpPeerStatusListResultInner>() { @Override - public GatewayRouteListResultInner call(ServiceResponse response) { + public BgpPeerStatusListResultInner call(ServiceResponse response) { return response.body(); } }); } /** - * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer to retrieve the status of. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GatewayRouteListResultInner object + * @return the observable for the request */ - public Observable> beginGetLearnedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable> getBgpPeerStatusWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2508,88 +1559,64 @@ public Observable> beginGetLearnedR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginGetLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginGetLearnedRoutesDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginGetLearnedRoutesDelegate(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); + final String apiVersion = "2017-08-01"; + Observable> observable = service.getBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer * @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 - * @return the GatewayRouteListResultInner object if successful. + * @return the BgpPeerStatusListResultInner object if successful. */ - public GatewayRouteListResultInner getAdvertisedRoutes(String resourceGroupName, String virtualNetworkGatewayName, String peer) { - return getAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).toBlocking().last().body(); + public BgpPeerStatusListResultInner beginGetBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); } /** - * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer * @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 getAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer), serviceCallback); + public ServiceFuture beginGetBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); } /** - * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the BgpPeerStatusListResultInner object */ - public Observable getAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { - return getAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).map(new Func1, GatewayRouteListResultInner>() { + public Observable beginGetBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, BgpPeerStatusListResultInner>() { @Override - public GatewayRouteListResultInner call(ServiceResponse response) { + public BgpPeerStatusListResultInner call(ServiceResponse response) { return response.body(); } }); } /** - * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the BgpPeerStatusListResultInner object */ - public Observable> getAdvertisedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + public Observable> beginGetBgpPeerStatusWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2599,73 +1626,79 @@ public Observable> getAdvertisedRou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (peer == null) { - throw new IllegalArgumentException("Parameter peer is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2017-08-01"; + final String peer = null; + return service.beginGetBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetBgpPeerStatusDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); } /** - * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer + * @param peer The IP address of the peer to retrieve the status of. * @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 - * @return the GatewayRouteListResultInner object if successful. + * @return the BgpPeerStatusListResultInner object if successful. */ - public GatewayRouteListResultInner beginGetAdvertisedRoutes(String resourceGroupName, String virtualNetworkGatewayName, String peer) { - return beginGetAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).toBlocking().single().body(); + public BgpPeerStatusListResultInner beginGetBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).toBlocking().single().body(); } /** - * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer + * @param peer The IP address of the peer to retrieve the status of. * @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 beginGetAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGetAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer), serviceCallback); + public ServiceFuture beginGetBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer), serviceCallback); } /** - * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer + * @param peer The IP address of the peer to retrieve the status of. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GatewayRouteListResultInner object + * @return the observable to the BgpPeerStatusListResultInner object */ - public Observable beginGetAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { - return beginGetAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).map(new Func1, GatewayRouteListResultInner>() { + public Observable beginGetBgpPeerStatusAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return beginGetBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).map(new Func1, BgpPeerStatusListResultInner>() { @Override - public GatewayRouteListResultInner call(ServiceResponse response) { + public BgpPeerStatusListResultInner call(ServiceResponse response) { return response.body(); } }); } /** - * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. + * The GetBgpPeerStatus operation retrieves the status of all BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param peer The IP address of the peer + * @param peer The IP address of the peer to retrieve the status of. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the GatewayRouteListResultInner object + * @return the observable to the BgpPeerStatusListResultInner object */ - public Observable> beginGetAdvertisedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + public Observable> beginGetBgpPeerStatusWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2675,18 +1708,13 @@ public Observable> beginGetAdvertis if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (peer == null) { - throw new IllegalArgumentException("Parameter peer is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginGetAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2017-08-01"; + return service.beginGetBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginGetAdvertisedRoutesDelegate(response); + ServiceResponse clientResponse = beginGetBgpPeerStatusDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2695,71 +1723,67 @@ public Observable> call(Response beginGetAdvertisedRoutesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginGetBgpPeerStatusDelegate(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); } /** - * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. * @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 - * @return the VpnClientIPsecParametersInner object if successful. + * @return the GatewayRouteListResultInner object if successful. */ - public VpnClientIPsecParametersInner setVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { - return setVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).toBlocking().last().body(); + public GatewayRouteListResultInner getLearnedRoutes(String resourceGroupName, String virtualNetworkGatewayName) { + return getLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); } /** - * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. * @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 setVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(setVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams), serviceCallback); + public ServiceFuture getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); } /** - * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable setVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { - return setVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).map(new Func1, VpnClientIPsecParametersInner>() { + public Observable getLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return getLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, GatewayRouteListResultInner>() { @Override - public VpnClientIPsecParametersInner call(ServiceResponse response) { + public GatewayRouteListResultInner call(ServiceResponse response) { return response.body(); } }); } /** - * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> setVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + public Observable> getLearnedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2769,74 +1793,64 @@ public Observable> setVpnclientIp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (vpnclientIpsecParams == null) { - throw new IllegalArgumentException("Parameter vpnclientIpsecParams is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(vpnclientIpsecParams); - Observable> observable = service.setVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), vpnclientIpsecParams, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.getLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. * @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 - * @return the VpnClientIPsecParametersInner object if successful. + * @return the GatewayRouteListResultInner object if successful. */ - public VpnClientIPsecParametersInner beginSetVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { - return beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).toBlocking().single().body(); + public GatewayRouteListResultInner beginGetLearnedRoutes(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); } /** - * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. * @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 beginSetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams), serviceCallback); + public ServiceFuture beginGetLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); } /** - * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VpnClientIPsecParametersInner object + * @return the observable to the GatewayRouteListResultInner object */ - public Observable beginSetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { - return beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).map(new Func1, VpnClientIPsecParametersInner>() { + public Observable beginGetLearnedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetLearnedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, GatewayRouteListResultInner>() { @Override - public VpnClientIPsecParametersInner call(ServiceResponse response) { + public GatewayRouteListResultInner call(ServiceResponse response) { return response.body(); } }); } /** - * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VpnClientIPsecParametersInner object + * @return the observable to the GatewayRouteListResultInner object */ - public Observable> beginSetVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + public Observable> beginGetLearnedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2846,19 +1860,13 @@ public Observable> beginSetVpncli if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (vpnclientIpsecParams == null) { - throw new IllegalArgumentException("Parameter vpnclientIpsecParams is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(vpnclientIpsecParams); - return service.beginSetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), vpnclientIpsecParams, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2017-08-01"; + return service.beginGetLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = beginSetVpnclientIpsecParametersDelegate(response); + ServiceResponse clientResponse = beginGetLearnedRoutesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -2867,67 +1875,71 @@ public Observable> call(Response< }); } - private ServiceResponse beginSetVpnclientIpsecParametersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginGetLearnedRoutesDelegate(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); } /** - * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. * * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The virtual network gateway name. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer * @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 - * @return the VpnClientIPsecParametersInner object if successful. + * @return the GatewayRouteListResultInner object if successful. */ - public VpnClientIPsecParametersInner getVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName) { - return getVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + public GatewayRouteListResultInner getAdvertisedRoutes(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return getAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).toBlocking().last().body(); } /** - * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. * * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The virtual network gateway name. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer * @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 getVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + public ServiceFuture getAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer), serviceCallback); } /** - * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. * * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The virtual network gateway name. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable getVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return getVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VpnClientIPsecParametersInner>() { + public Observable getAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return getAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).map(new Func1, GatewayRouteListResultInner>() { @Override - public VpnClientIPsecParametersInner call(ServiceResponse response) { + public GatewayRouteListResultInner call(ServiceResponse response) { return response.body(); } }); } /** - * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. * * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The virtual network gateway name. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> getVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable> getAdvertisedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2937,66 +1949,71 @@ public Observable> getVpnclientIp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (peer == null) { + throw new IllegalArgumentException("Parameter peer is required and cannot be null."); } - Observable> observable = service.getVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); - return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** - * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. * * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The virtual network gateway name. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer * @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 - * @return the VpnClientIPsecParametersInner object if successful. + * @return the GatewayRouteListResultInner object if successful. */ - public VpnClientIPsecParametersInner beginGetVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName) { - return beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + public GatewayRouteListResultInner beginGetAdvertisedRoutes(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return beginGetAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).toBlocking().single().body(); } /** - * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. * * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The virtual network gateway name. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer * @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 beginGetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + public ServiceFuture beginGetAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer), serviceCallback); } /** - * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. * * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The virtual network gateway name. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VpnClientIPsecParametersInner object + * @return the observable to the GatewayRouteListResultInner object */ - public Observable beginGetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName) { - return beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VpnClientIPsecParametersInner>() { + public Observable beginGetAdvertisedRoutesAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { + return beginGetAdvertisedRoutesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, peer).map(new Func1, GatewayRouteListResultInner>() { @Override - public VpnClientIPsecParametersInner call(ServiceResponse response) { + public GatewayRouteListResultInner call(ServiceResponse response) { return response.body(); } }); } /** - * The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider. + * This operation retrieves a list of routes the virtual network gateway is advertising to the specified peer. * * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayName The virtual network gateway name. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param peer The IP address of the peer * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VpnClientIPsecParametersInner object + * @return the observable to the GatewayRouteListResultInner object */ - public Observable> beginGetVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + public Observable> beginGetAdvertisedRoutesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, String peer) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -3006,109 +2023,16 @@ public Observable> beginGetVpncli if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginGetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginGetVpnclientIpsecParametersDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginGetVpnclientIpsecParametersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Gets a xml format representation for vpn device configuration script. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. - * @param parameters Parameters supplied to the generate vpn device script operation. - * @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 - * @return the String object if successful. - */ - public String vpnDeviceConfigurationScript(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParametersInner parameters) { - return vpnDeviceConfigurationScriptWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().single().body(); - } - - /** - * Gets a xml format representation for vpn device configuration script. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. - * @param parameters Parameters supplied to the generate vpn device script operation. - * @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 vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParametersInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(vpnDeviceConfigurationScriptWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters), serviceCallback); - } - - /** - * Gets a xml format representation for vpn device configuration script. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. - * @param parameters Parameters supplied to the generate vpn device script operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the String object - */ - public Observable vpnDeviceConfigurationScriptAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParametersInner parameters) { - return vpnDeviceConfigurationScriptWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).map(new Func1, String>() { - @Override - public String call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets a xml format representation for vpn device configuration script. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection for which the configuration script is generated. - * @param parameters Parameters supplied to the generate vpn device script operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the String object - */ - public Observable> vpnDeviceConfigurationScriptWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayConnectionName, VpnDeviceScriptParametersInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualNetworkGatewayConnectionName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkGatewayConnectionName 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."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + if (peer == null) { + throw new IllegalArgumentException("Parameter peer is required and cannot be null."); } - Validator.validate(parameters); - return service.vpnDeviceConfigurationScript(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + final String apiVersion = "2017-08-01"; + return service.beginGetAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = vpnDeviceConfigurationScriptDelegate(response); + ServiceResponse clientResponse = beginGetAdvertisedRoutesDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -3117,9 +2041,10 @@ public Observable> call(Response response) }); } - private ServiceResponse vpnDeviceConfigurationScriptDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginGetAdvertisedRoutesDelegate(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); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkInner.java index 9953fe351fd..d49512c79b0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkInner.java @@ -11,7 +11,6 @@ import com.microsoft.azure.management.network.AddressSpace; import com.microsoft.azure.management.network.DhcpOptions; import java.util.List; -import com.microsoft.azure.SubResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -60,27 +59,6 @@ public class VirtualNetworkInner extends Resource { @JsonProperty(value = "properties.provisioningState") private String provisioningState; - /** - * Indicates if DDoS protection is enabled for all the protected resources - * in the virtual network. It requires a DDoS protection plan associated - * with the resource. - */ - @JsonProperty(value = "properties.enableDdosProtection") - private Boolean enableDdosProtection; - - /** - * Indicates if VM protection is enabled for all the subnets in the virtual - * network. - */ - @JsonProperty(value = "properties.enableVmProtection") - private Boolean enableVmProtection; - - /** - * The DDoS protection plan associated with the virtual network. - */ - @JsonProperty(value = "properties.ddosProtectionPlan") - private SubResource ddosProtectionPlan; - /** * Gets a unique read-only string that changes whenever the resource is * updated. @@ -208,66 +186,6 @@ public VirtualNetworkInner withProvisioningState(String provisioningState) { return this; } - /** - * Get the enableDdosProtection value. - * - * @return the enableDdosProtection value - */ - public Boolean enableDdosProtection() { - return this.enableDdosProtection; - } - - /** - * Set the enableDdosProtection value. - * - * @param enableDdosProtection the enableDdosProtection value to set - * @return the VirtualNetworkInner object itself. - */ - public VirtualNetworkInner withEnableDdosProtection(Boolean enableDdosProtection) { - this.enableDdosProtection = enableDdosProtection; - return this; - } - - /** - * Get the enableVmProtection value. - * - * @return the enableVmProtection value - */ - public Boolean enableVmProtection() { - return this.enableVmProtection; - } - - /** - * Set the enableVmProtection value. - * - * @param enableVmProtection the enableVmProtection value to set - * @return the VirtualNetworkInner object itself. - */ - public VirtualNetworkInner withEnableVmProtection(Boolean enableVmProtection) { - this.enableVmProtection = enableVmProtection; - return this; - } - - /** - * Get the ddosProtectionPlan value. - * - * @return the ddosProtectionPlan value - */ - public SubResource ddosProtectionPlan() { - return this.ddosProtectionPlan; - } - - /** - * Set the ddosProtectionPlan value. - * - * @param ddosProtectionPlan the ddosProtectionPlan value to set - * @return the VirtualNetworkInner object itself. - */ - public VirtualNetworkInner withDdosProtectionPlan(SubResource ddosProtectionPlan) { - this.ddosProtectionPlan = ddosProtectionPlan; - return this; - } - /** * Get the etag value. * diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringInner.java index 195433e6399..926097eb5aa 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringInner.java @@ -9,7 +9,6 @@ package com.microsoft.azure.management.network.implementation; import com.microsoft.azure.SubResource; -import com.microsoft.azure.management.network.AddressSpace; import com.microsoft.azure.management.network.VirtualNetworkPeeringState; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -51,20 +50,11 @@ public class VirtualNetworkPeeringInner extends SubResource { private Boolean useRemoteGateways; /** - * The reference of the remote virtual network. The remote virtual network - * can be in the same or different region (preview). See here to register - * for the preview and learn more - * (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). + * The reference of the remote virtual network. */ @JsonProperty(value = "properties.remoteVirtualNetwork") private SubResource remoteVirtualNetwork; - /** - * The reference of the remote virtual network address space. - */ - @JsonProperty(value = "properties.remoteAddressSpace") - private AddressSpace remoteAddressSpace; - /** * The status of the virtual network peering. Possible values are * 'Initiated', 'Connected', and 'Disconnected'. Possible values include: @@ -192,26 +182,6 @@ public VirtualNetworkPeeringInner withRemoteVirtualNetwork(SubResource remoteVir return this; } - /** - * Get the remoteAddressSpace value. - * - * @return the remoteAddressSpace value - */ - public AddressSpace remoteAddressSpace() { - return this.remoteAddressSpace; - } - - /** - * Set the remoteAddressSpace value. - * - * @param remoteAddressSpace the remoteAddressSpace value to set - * @return the VirtualNetworkPeeringInner object itself. - */ - public VirtualNetworkPeeringInner withRemoteAddressSpace(AddressSpace remoteAddressSpace) { - this.remoteAddressSpace = remoteAddressSpace; - return this; - } - /** * Get the peeringState value. * diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringsInner.java index 25b31dde545..200b8b188a6 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringsInner.java @@ -159,10 +159,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -234,10 +232,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -254,8 +250,8 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) .register(204, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -329,10 +325,8 @@ public Observable> getWithServiceRes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.get(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.get(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -429,11 +423,9 @@ public Observable> createOrUpdateWit if (virtualNetworkPeeringParameters == null) { throw new IllegalArgumentException("Parameter virtualNetworkPeeringParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(virtualNetworkPeeringParameters); - Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), virtualNetworkPeeringParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), virtualNetworkPeeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -513,11 +505,9 @@ public Observable> beginCreateOrUpda if (virtualNetworkPeeringParameters == null) { throw new IllegalArgumentException("Parameter virtualNetworkPeeringParameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(virtualNetworkPeeringParameters); - return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), virtualNetworkPeeringParameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), virtualNetworkPeeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -638,10 +628,8 @@ public Observable>> listSingleP if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java index e048783bb5c..9238bd8bce4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -25,14 +24,12 @@ import com.microsoft.rest.Validator; import java.io.IOException; import java.util.List; -import java.util.Map; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; -import retrofit2.http.PATCH; import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; @@ -87,14 +84,6 @@ interface VirtualNetworksService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subscriptionId") String subscriptionId, @Body VirtualNetworkInner 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.VirtualNetworks updateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") - Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworks beginUpdateTags" }) - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}") - Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.VirtualNetworks list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks") Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -186,10 +175,8 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Observable> observable = service.delete(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.delete(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -254,10 +241,8 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.beginDelete(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginDelete(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -273,9 +258,9 @@ public Observable> call(Response response) { private ServiceResponse beginDeleteDelegate(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()) .register(204, new TypeToken() { }.getType()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -342,11 +327,9 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; final String expand = null; - return service.getByResourceGroup(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + return service.getByResourceGroup(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -426,10 +409,8 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getByResourceGroup(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), this.client.apiVersion(), expand, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.getByResourceGroup(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -519,11 +500,9 @@ public Observable> createOrUpdateWithServic if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + final String apiVersion = "2017-08-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -596,11 +575,9 @@ public Observable> beginCreateOrUpdateWithS if (parameters == null) { throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } Validator.validate(parameters); - return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -622,328 +599,6 @@ private ServiceResponse beginCreateOrUpdateDelegate(Respons .build(response); } - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @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 - * @return the VirtualNetworkInner object if successful. - */ - public VirtualNetworkInner updateTags(String resourceGroupName, String virtualNetworkName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().last().body(); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @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 updateTagsAsync(String resourceGroupName, String virtualNetworkName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName), serviceCallback); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName).map(new Func1, VirtualNetworkInner>() { - @Override - public VirtualNetworkInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualNetworkName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - Observable> observable = service.updateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param tags Resource tags. - * @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 - * @return the VirtualNetworkInner object if successful. - */ - public VirtualNetworkInner updateTags(String resourceGroupName, String virtualNetworkName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).toBlocking().last().body(); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param tags Resource tags. - * @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 updateTagsAsync(String resourceGroupName, String virtualNetworkName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags), serviceCallback); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable updateTagsAsync(String resourceGroupName, String virtualNetworkName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).map(new Func1, VirtualNetworkInner>() { - @Override - public VirtualNetworkInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualNetworkName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - Observable> observable = service.updateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()); - return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @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 - * @return the VirtualNetworkInner object if successful. - */ - public VirtualNetworkInner beginUpdateTags(String resourceGroupName, String virtualNetworkName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().single().body(); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @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 beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName), serviceCallback); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName).map(new Func1, VirtualNetworkInner>() { - @Override - public VirtualNetworkInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualNetworkName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final Map tags = null; - TagsObject parameters = new TagsObject(); - parameters.withTags(null); - return service.beginUpdateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param tags Resource tags. - * @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 - * @return the VirtualNetworkInner object if successful. - */ - public VirtualNetworkInner beginUpdateTags(String resourceGroupName, String virtualNetworkName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).toBlocking().single().body(); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param tags Resource tags. - * @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 beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags), serviceCallback); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkInner object - */ - public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkName, Map tags) { - return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).map(new Func1, VirtualNetworkInner>() { - @Override - public VirtualNetworkInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Updates a virtual network tags. - * - * @param resourceGroupName The name of the resource group. - * @param virtualNetworkName The name of the virtual network. - * @param tags Resource tags. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualNetworkInner object - */ - public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, Map tags) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualNetworkName == null) { - throw new IllegalArgumentException("Parameter virtualNetworkName 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 (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - Validator.validate(tags); - TagsObject parameters = new TagsObject(); - parameters.withTags(tags); - return service.beginUpdateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = beginUpdateTagsDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * Gets all virtual networks in a subscription. * @@ -1027,10 +682,8 @@ public Observable>> listSinglePageAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.list(this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1142,10 +795,8 @@ public Observable>> listByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1228,11 +879,9 @@ public Observable> checkIPAddr if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } + final String apiVersion = "2017-08-01"; final String ipAddress = null; - return service.checkIPAddressAvailability(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), ipAddress, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + return service.checkIPAddressAvailability(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), ipAddress, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1312,10 +961,8 @@ public Observable> checkIPAddr if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.checkIPAddressAvailability(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), ipAddress, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.checkIPAddressAvailability(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), ipAddress, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1435,10 +1082,8 @@ public Observable>> listUsageSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.listUsage(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2017-08-01"; + return service.listUsage(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientIPsecParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientIPsecParametersInner.java deleted file mode 100644 index 5af6e8841a7..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientIPsecParametersInner.java +++ /dev/null @@ -1,242 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.microsoft.azure.management.network.IpsecEncryption; -import com.microsoft.azure.management.network.IpsecIntegrity; -import com.microsoft.azure.management.network.IkeEncryption; -import com.microsoft.azure.management.network.IkeIntegrity; -import com.microsoft.azure.management.network.DhGroup; -import com.microsoft.azure.management.network.PfsGroup; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * An IPSec parameters for a virtual network gateway P2S connection. - */ -public class VpnClientIPsecParametersInner { - /** - * The IPSec Security Association (also called Quick Mode or Phase 2 SA) - * lifetime in seconds for P2S client. - */ - @JsonProperty(value = "saLifeTimeSeconds", required = true) - private int saLifeTimeSeconds; - - /** - * The IPSec Security Association (also called Quick Mode or Phase 2 SA) - * payload size in KB for P2S client.. - */ - @JsonProperty(value = "saDataSizeKilobytes", required = true) - private int saDataSizeKilobytes; - - /** - * The IPSec encryption algorithm (IKE phase 1). Possible values include: - * 'None', 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES128', - * 'GCMAES192', 'GCMAES256'. - */ - @JsonProperty(value = "ipsecEncryption", required = true) - private IpsecEncryption ipsecEncryption; - - /** - * The IPSec integrity algorithm (IKE phase 1). Possible values include: - * 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', 'GCMAES256'. - */ - @JsonProperty(value = "ipsecIntegrity", required = true) - private IpsecIntegrity ipsecIntegrity; - - /** - * The IKE encryption algorithm (IKE phase 2). Possible values include: - * 'DES', 'DES3', 'AES128', 'AES192', 'AES256', 'GCMAES256', 'GCMAES128'. - */ - @JsonProperty(value = "ikeEncryption", required = true) - private IkeEncryption ikeEncryption; - - /** - * The IKE integrity algorithm (IKE phase 2). Possible values include: - * 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. - */ - @JsonProperty(value = "ikeIntegrity", required = true) - private IkeIntegrity ikeIntegrity; - - /** - * The DH Groups used in IKE Phase 1 for initial SA. Possible values - * include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', 'DHGroup2048', - * 'ECP256', 'ECP384', 'DHGroup24'. - */ - @JsonProperty(value = "dhGroup", required = true) - private DhGroup dhGroup; - - /** - * The Pfs Groups used in IKE Phase 2 for new child SA. Possible values - * include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24', - * 'PFS14', 'PFSMM'. - */ - @JsonProperty(value = "pfsGroup", required = true) - private PfsGroup pfsGroup; - - /** - * Get the saLifeTimeSeconds value. - * - * @return the saLifeTimeSeconds value - */ - public int saLifeTimeSeconds() { - return this.saLifeTimeSeconds; - } - - /** - * Set the saLifeTimeSeconds value. - * - * @param saLifeTimeSeconds the saLifeTimeSeconds value to set - * @return the VpnClientIPsecParametersInner object itself. - */ - public VpnClientIPsecParametersInner withSaLifeTimeSeconds(int saLifeTimeSeconds) { - this.saLifeTimeSeconds = saLifeTimeSeconds; - return this; - } - - /** - * Get the saDataSizeKilobytes value. - * - * @return the saDataSizeKilobytes value - */ - public int saDataSizeKilobytes() { - return this.saDataSizeKilobytes; - } - - /** - * Set the saDataSizeKilobytes value. - * - * @param saDataSizeKilobytes the saDataSizeKilobytes value to set - * @return the VpnClientIPsecParametersInner object itself. - */ - public VpnClientIPsecParametersInner withSaDataSizeKilobytes(int saDataSizeKilobytes) { - this.saDataSizeKilobytes = saDataSizeKilobytes; - return this; - } - - /** - * Get the ipsecEncryption value. - * - * @return the ipsecEncryption value - */ - public IpsecEncryption ipsecEncryption() { - return this.ipsecEncryption; - } - - /** - * Set the ipsecEncryption value. - * - * @param ipsecEncryption the ipsecEncryption value to set - * @return the VpnClientIPsecParametersInner object itself. - */ - public VpnClientIPsecParametersInner withIpsecEncryption(IpsecEncryption ipsecEncryption) { - this.ipsecEncryption = ipsecEncryption; - return this; - } - - /** - * Get the ipsecIntegrity value. - * - * @return the ipsecIntegrity value - */ - public IpsecIntegrity ipsecIntegrity() { - return this.ipsecIntegrity; - } - - /** - * Set the ipsecIntegrity value. - * - * @param ipsecIntegrity the ipsecIntegrity value to set - * @return the VpnClientIPsecParametersInner object itself. - */ - public VpnClientIPsecParametersInner withIpsecIntegrity(IpsecIntegrity ipsecIntegrity) { - this.ipsecIntegrity = ipsecIntegrity; - return this; - } - - /** - * Get the ikeEncryption value. - * - * @return the ikeEncryption value - */ - public IkeEncryption ikeEncryption() { - return this.ikeEncryption; - } - - /** - * Set the ikeEncryption value. - * - * @param ikeEncryption the ikeEncryption value to set - * @return the VpnClientIPsecParametersInner object itself. - */ - public VpnClientIPsecParametersInner withIkeEncryption(IkeEncryption ikeEncryption) { - this.ikeEncryption = ikeEncryption; - return this; - } - - /** - * Get the ikeIntegrity value. - * - * @return the ikeIntegrity value - */ - public IkeIntegrity ikeIntegrity() { - return this.ikeIntegrity; - } - - /** - * Set the ikeIntegrity value. - * - * @param ikeIntegrity the ikeIntegrity value to set - * @return the VpnClientIPsecParametersInner object itself. - */ - public VpnClientIPsecParametersInner withIkeIntegrity(IkeIntegrity ikeIntegrity) { - this.ikeIntegrity = ikeIntegrity; - return this; - } - - /** - * Get the dhGroup value. - * - * @return the dhGroup value - */ - public DhGroup dhGroup() { - return this.dhGroup; - } - - /** - * Set the dhGroup value. - * - * @param dhGroup the dhGroup value to set - * @return the VpnClientIPsecParametersInner object itself. - */ - public VpnClientIPsecParametersInner withDhGroup(DhGroup dhGroup) { - this.dhGroup = dhGroup; - return this; - } - - /** - * Get the pfsGroup value. - * - * @return the pfsGroup value - */ - public PfsGroup pfsGroup() { - return this.pfsGroup; - } - - /** - * Set the pfsGroup value. - * - * @param pfsGroup the pfsGroup value to set - * @return the VpnClientIPsecParametersInner object itself. - */ - public VpnClientIPsecParametersInner withPfsGroup(PfsGroup pfsGroup) { - this.pfsGroup = pfsGroup; - return this; - } - -} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnDeviceScriptParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnDeviceScriptParametersInner.java deleted file mode 100644 index 84f9d8f2cc1..00000000000 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnDeviceScriptParametersInner.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - */ - -package com.microsoft.azure.management.network.implementation; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Vpn device configuration script generation parameters. - */ -public class VpnDeviceScriptParametersInner { - /** - * The vendor for the vpn device. - */ - @JsonProperty(value = "vendor") - private String vendor; - - /** - * The device family for the vpn device. - */ - @JsonProperty(value = "deviceFamily") - private String deviceFamily; - - /** - * The firmware version for the vpn device. - */ - @JsonProperty(value = "firmwareVersion") - private String firmwareVersion; - - /** - * Get the vendor value. - * - * @return the vendor value - */ - public String vendor() { - return this.vendor; - } - - /** - * Set the vendor value. - * - * @param vendor the vendor value to set - * @return the VpnDeviceScriptParametersInner object itself. - */ - public VpnDeviceScriptParametersInner withVendor(String vendor) { - this.vendor = vendor; - return this; - } - - /** - * Get the deviceFamily value. - * - * @return the deviceFamily value - */ - public String deviceFamily() { - return this.deviceFamily; - } - - /** - * Set the deviceFamily value. - * - * @param deviceFamily the deviceFamily value to set - * @return the VpnDeviceScriptParametersInner object itself. - */ - public VpnDeviceScriptParametersInner withDeviceFamily(String deviceFamily) { - this.deviceFamily = deviceFamily; - return this; - } - - /** - * Get the firmwareVersion value. - * - * @return the firmwareVersion value - */ - public String firmwareVersion() { - return this.firmwareVersion; - } - - /** - * Set the firmwareVersion value. - * - * @param firmwareVersion the firmwareVersion value to set - * @return the VpnDeviceScriptParametersInner object itself. - */ - public VpnDeviceScriptParametersInner withFirmwareVersion(String firmwareVersion) { - this.firmwareVersion = firmwareVersion; - return this; - } - -}