From 9bb6f412291356d8ab023a25fffc0101e9bba87b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 26 Apr 2018 23:00:34 +0000 Subject: [PATCH 1/2] Generated from e0470b77b0ea0d159448ed62f79e40de0ccfad2c Created May folder. Updated version for exampls, commands --- .../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 + .../ConnectionMonitorSourceStatus.java | 44 + .../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 +- .../network/ExpressRouteCircuitReference.java | 43 + .../network/ExpressRouteCircuitSkuFamily.java | 52 +- .../network/ExpressRouteCircuitSkuTier.java | 52 +- ...outeCrossConnectionRoutesTableSummary.java | 123 ++ .../network/ExpressRoutePeeringState.java | 41 + .../network/ExpressRoutePeeringType.java | 44 + .../management/network/HTTPConfiguration.java | 96 + .../azure/management/network/HTTPHeader.java | 69 + .../azure/management/network/HTTPMethod.java | 38 + .../network/IPAllocationMethod.java | 52 +- .../azure/management/network/IPVersion.java | 52 +- .../management/network/IkeEncryption.java | 62 +- .../management/network/IkeIntegrity.java | 60 +- .../management/network/IpFlowProtocol.java | 41 + .../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 | 60 +- .../network/ProtocolConfiguration.java | 43 + .../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 | 436 ++++- .../ApplicationSecurityGroupInner.java | 68 + .../ApplicationSecurityGroupsInner.java | 948 +++++++++ .../AvailableEndpointServicesInner.java | 293 +++ .../AvailableProvidersListInner.java | 45 + ...AvailableProvidersListParametersInner.java | 122 ++ .../AzureReachabilityReportInner.java | 99 + ...zureReachabilityReportParametersInner.java | 150 ++ .../BgpServiceCommunitiesInner.java | 2 +- .../ConnectionMonitorInner.java | 179 ++ .../ConnectionMonitorQueryResultInner.java | 73 + .../ConnectionMonitorResultInner.java | 331 ++++ .../ConnectionMonitorsInner.java | 1126 +++++++++++ .../ConnectivityParametersInner.java | 55 + .../DdosProtectionPlanInner.java | 183 ++ .../DdosProtectionPlansInner.java | 948 +++++++++ .../DefaultSecurityRulesInner.java | 4 +- ...veNetworkSecurityGroupListResultInner.java | 60 + .../EffectiveRouteListResultInner.java | 60 + .../EndpointServiceResultInner.java | 48 + ...xpressRouteCircuitAuthorizationsInner.java | 16 +- .../ExpressRouteCircuitConnectionInner.java | 202 ++ .../ExpressRouteCircuitConnectionsInner.java | 553 ++++++ .../ExpressRouteCircuitPeeringInner.java | 58 +- .../ExpressRouteCircuitPeeringsInner.java | 12 +- .../ExpressRouteCircuitsInner.java | 359 +++- .../ExpressRouteCrossConnectionInner.java | 259 +++ ...pressRouteCrossConnectionPeeringInner.java | 414 ++++ ...ressRouteCrossConnectionPeeringsInner.java | 764 ++++++++ .../ExpressRouteCrossConnectionsInner.java | 1676 ++++++++++++++++ ...ionsRoutesTableSummaryListResultInner.java | 61 + .../ExpressRouteServiceProvidersInner.java | 2 +- .../FrontendIPConfigurationInner.java | 66 +- .../implementation/InboundNatPoolInner.java | 60 +- .../implementation/InboundNatRuleInner.java | 5 +- .../implementation/InboundNatRulesInner.java | 20 +- .../LoadBalancerBackendAddressPoolsInner.java | 4 +- ...BalancerFrontendIPConfigurationsInner.java | 4 +- .../implementation/LoadBalancerInner.java | 27 - .../LoadBalancerLoadBalancingRulesInner.java | 4 +- .../LoadBalancerNetworkInterfacesInner.java | 2 +- .../LoadBalancerProbesInner.java | 4 +- .../implementation/LoadBalancersInner.java | 345 +++- .../LoadBalancingRuleInner.java | 11 +- .../LocalNetworkGatewaysInner.java | 341 +++- .../NetworkInterfaceIPConfigurationInner.java | 32 +- ...NetworkInterfaceIPConfigurationsInner.java | 4 +- .../implementation/NetworkInterfaceInner.java | 6 +- .../NetworkInterfaceLoadBalancersInner.java | 22 +- .../NetworkInterfacesInner.java | 1715 ++++++++++------- .../NetworkManagementClientImpl.java | 196 +- .../NetworkSecurityGroupsInner.java | 343 +++- .../implementation/NetworkWatchersInner.java | 610 +++++- .../implementation/OperationInner.java | 125 ++ .../implementation/OperationsInner.java | 281 +++ .../implementation/PacketCapturesInner.java | 22 +- .../PatchRouteFilterRuleInner.java | 27 - .../implementation/PublicIPAddressInner.java | 27 + .../PublicIPAddressesInner.java | 345 +++- .../implementation/RouteFilterRuleInner.java | 27 - .../implementation/RouteFilterRulesInner.java | 18 +- .../implementation/RouteFiltersInner.java | 22 +- .../implementation/RouteTableInner.java | 27 + .../implementation/RouteTablesInner.java | 343 +++- .../network/implementation/RoutesInner.java | 14 +- .../implementation/SecurityRuleInner.java | 56 +- .../implementation/SecurityRulesInner.java | 16 +- .../network/implementation/SubnetInner.java | 15 +- .../network/implementation/SubnetsInner.java | 16 +- .../TopologyParametersInner.java | 96 + .../network/implementation/UsageInner.java | 15 + .../network/implementation/UsagesInner.java | 22 +- .../VerificationIPFlowParametersInner.java | 8 +- .../VirtualNetworkGatewayConnectionInner.java | 18 +- ...VirtualNetworkGatewayConnectionsInner.java | 349 +++- .../VirtualNetworkGatewaysInner.java | 1057 +++++++++- .../implementation/VirtualNetworkInner.java | 82 + .../VirtualNetworkPeeringInner.java | 32 +- .../VirtualNetworkPeeringsInner.java | 14 +- .../implementation/VirtualNetworksInner.java | 349 +++- .../VpnClientIPsecParametersInner.java | 242 +++ .../VpnDeviceScriptParametersInner.java | 95 + 184 files changed, 20169 insertions(+), 3679 deletions(-) create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Availability.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCity.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCountry.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListState.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportItem.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLatencyInfo.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLocation.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/CircuitConnectionStatus.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorDestination.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorParameters.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSource.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSourceStatus.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionState.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStateSnapshot.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Dimension.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroup.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRoute.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EvaluationState.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitReference.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionRoutesTableSummary.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPConfiguration.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPHeader.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPMethod.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpFlowProtocol.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpTag.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LogSpecification.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/MetricSpecification.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationDisplay.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationPropertiesFormatServiceSpecification.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProtocolConfiguration.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TagsObject.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupsInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableEndpointServicesInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListParametersInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportParametersInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorQueryResultInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorResultInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorsInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveNetworkSecurityGroupListResultInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveRouteListResultInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EndpointServiceResultInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionsInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationsInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyParametersInner.java create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientIPsecParametersInner.java create 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 ce4201744d0..f2153801716 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for Access. */ -public final class Access { +public final class Access extends ExpandableStringEnum { /** Static value Allow for Access. */ - public static final Access ALLOW = new Access("Allow"); + public static final Access ALLOW = fromString("Allow"); /** Static value Deny for Access. */ - public static final Access DENY = new Access("Deny"); - - private String value; + public static final Access DENY = fromString("Deny"); /** - * Creates a custom value for Access. - * @param value the custom value + * Creates or finds a Access from its string representation. + * @param name a name to look for + * @return the corresponding Access */ - public Access(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static Access fromString(String name) { + return fromString(name, Access.class); } - @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); - } + /** + * @return known Access values + */ + public static Collection values() { + return values(Access.class); } } 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 c82875be86c..5c78996a255 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 7a4002b35c2..bd3103cb74a 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,61 +8,43 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayBackendHealthServerHealth. */ -public final class ApplicationGatewayBackendHealthServerHealth { +public final class ApplicationGatewayBackendHealthServerHealth extends ExpandableStringEnum { /** Static value Unknown for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth UNKNOWN = new ApplicationGatewayBackendHealthServerHealth("Unknown"); + public static final ApplicationGatewayBackendHealthServerHealth UNKNOWN = fromString("Unknown"); /** Static value Up for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth UP = new ApplicationGatewayBackendHealthServerHealth("Up"); + public static final ApplicationGatewayBackendHealthServerHealth UP = fromString("Up"); /** Static value Down for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth DOWN = new ApplicationGatewayBackendHealthServerHealth("Down"); + public static final ApplicationGatewayBackendHealthServerHealth DOWN = fromString("Down"); /** Static value Partial for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth PARTIAL = new ApplicationGatewayBackendHealthServerHealth("Partial"); + public static final ApplicationGatewayBackendHealthServerHealth PARTIAL = fromString("Partial"); /** Static value Draining for ApplicationGatewayBackendHealthServerHealth. */ - public static final ApplicationGatewayBackendHealthServerHealth DRAINING = new ApplicationGatewayBackendHealthServerHealth("Draining"); - - private String value; + public static final ApplicationGatewayBackendHealthServerHealth DRAINING = fromString("Draining"); /** - * Creates a custom value for ApplicationGatewayBackendHealthServerHealth. - * @param value the custom value + * Creates or finds a ApplicationGatewayBackendHealthServerHealth from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayBackendHealthServerHealth */ - public ApplicationGatewayBackendHealthServerHealth(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayBackendHealthServerHealth fromString(String name) { + return fromString(name, ApplicationGatewayBackendHealthServerHealth.class); } - @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); - } + /** + * @return known ApplicationGatewayBackendHealthServerHealth values + */ + public static Collection values() { + return values(ApplicationGatewayBackendHealthServerHealth.class); } } 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 23ff1003902..bb652e26e9a 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayCookieBasedAffinity. */ -public final class ApplicationGatewayCookieBasedAffinity { +public final class ApplicationGatewayCookieBasedAffinity extends ExpandableStringEnum { /** Static value Enabled for ApplicationGatewayCookieBasedAffinity. */ - public static final ApplicationGatewayCookieBasedAffinity ENABLED = new ApplicationGatewayCookieBasedAffinity("Enabled"); + public static final ApplicationGatewayCookieBasedAffinity ENABLED = fromString("Enabled"); /** Static value Disabled for ApplicationGatewayCookieBasedAffinity. */ - public static final ApplicationGatewayCookieBasedAffinity DISABLED = new ApplicationGatewayCookieBasedAffinity("Disabled"); - - private String value; + public static final ApplicationGatewayCookieBasedAffinity DISABLED = fromString("Disabled"); /** - * Creates a custom value for ApplicationGatewayCookieBasedAffinity. - * @param value the custom value + * Creates or finds a ApplicationGatewayCookieBasedAffinity from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayCookieBasedAffinity */ - public ApplicationGatewayCookieBasedAffinity(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayCookieBasedAffinity fromString(String name) { + return fromString(name, ApplicationGatewayCookieBasedAffinity.class); } - @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); - } + /** + * @return known ApplicationGatewayCookieBasedAffinity values + */ + public static Collection values() { + return values(ApplicationGatewayCookieBasedAffinity.class); } } 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 f81e77acd11..be16780e247 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayFirewallMode. */ -public final class ApplicationGatewayFirewallMode { +public final class ApplicationGatewayFirewallMode extends ExpandableStringEnum { /** Static value Detection for ApplicationGatewayFirewallMode. */ - public static final ApplicationGatewayFirewallMode DETECTION = new ApplicationGatewayFirewallMode("Detection"); + public static final ApplicationGatewayFirewallMode DETECTION = fromString("Detection"); /** Static value Prevention for ApplicationGatewayFirewallMode. */ - public static final ApplicationGatewayFirewallMode PREVENTION = new ApplicationGatewayFirewallMode("Prevention"); - - private String value; + public static final ApplicationGatewayFirewallMode PREVENTION = fromString("Prevention"); /** - * Creates a custom value for ApplicationGatewayFirewallMode. - * @param value the custom value + * Creates or finds a ApplicationGatewayFirewallMode from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayFirewallMode */ - public ApplicationGatewayFirewallMode(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayFirewallMode fromString(String name) { + return fromString(name, ApplicationGatewayFirewallMode.class); } - @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); - } + /** + * @return known ApplicationGatewayFirewallMode values + */ + public static Collection values() { + return values(ApplicationGatewayFirewallMode.class); } } 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 3150d26f005..7d5189ff262 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,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayOperationalState. */ -public final class ApplicationGatewayOperationalState { +public final class ApplicationGatewayOperationalState extends ExpandableStringEnum { /** Static value Stopped for ApplicationGatewayOperationalState. */ - public static final ApplicationGatewayOperationalState STOPPED = new ApplicationGatewayOperationalState("Stopped"); + public static final ApplicationGatewayOperationalState STOPPED = fromString("Stopped"); /** Static value Starting for ApplicationGatewayOperationalState. */ - public static final ApplicationGatewayOperationalState STARTING = new ApplicationGatewayOperationalState("Starting"); + public static final ApplicationGatewayOperationalState STARTING = fromString("Starting"); /** Static value Running for ApplicationGatewayOperationalState. */ - public static final ApplicationGatewayOperationalState RUNNING = new ApplicationGatewayOperationalState("Running"); + public static final ApplicationGatewayOperationalState RUNNING = fromString("Running"); /** Static value Stopping for ApplicationGatewayOperationalState. */ - public static final ApplicationGatewayOperationalState STOPPING = new ApplicationGatewayOperationalState("Stopping"); - - private String value; + public static final ApplicationGatewayOperationalState STOPPING = fromString("Stopping"); /** - * Creates a custom value for ApplicationGatewayOperationalState. - * @param value the custom value + * Creates or finds a ApplicationGatewayOperationalState from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayOperationalState */ - public ApplicationGatewayOperationalState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayOperationalState fromString(String name) { + return fromString(name, ApplicationGatewayOperationalState.class); } - @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); - } + /** + * @return known ApplicationGatewayOperationalState values + */ + public static Collection values() { + return values(ApplicationGatewayOperationalState.class); } } 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 a06b960129e..ceed6ab34c6 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayProtocol. */ -public final class ApplicationGatewayProtocol { +public final class ApplicationGatewayProtocol extends ExpandableStringEnum { /** Static value Http for ApplicationGatewayProtocol. */ - public static final ApplicationGatewayProtocol HTTP = new ApplicationGatewayProtocol("Http"); + public static final ApplicationGatewayProtocol HTTP = fromString("Http"); /** Static value Https for ApplicationGatewayProtocol. */ - public static final ApplicationGatewayProtocol HTTPS = new ApplicationGatewayProtocol("Https"); - - private String value; + public static final ApplicationGatewayProtocol HTTPS = fromString("Https"); /** - * Creates a custom value for ApplicationGatewayProtocol. - * @param value the custom value + * Creates or finds a ApplicationGatewayProtocol from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayProtocol */ - public ApplicationGatewayProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayProtocol fromString(String name) { + return fromString(name, ApplicationGatewayProtocol.class); } - @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); - } + /** + * @return known ApplicationGatewayProtocol values + */ + public static Collection values() { + return values(ApplicationGatewayProtocol.class); } } 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 24d82f76d55..22de2a2c7cb 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,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayRedirectType. */ -public final class ApplicationGatewayRedirectType { +public final class ApplicationGatewayRedirectType extends ExpandableStringEnum { /** Static value Permanent for ApplicationGatewayRedirectType. */ - public static final ApplicationGatewayRedirectType PERMANENT = new ApplicationGatewayRedirectType("Permanent"); + public static final ApplicationGatewayRedirectType PERMANENT = fromString("Permanent"); /** Static value Found for ApplicationGatewayRedirectType. */ - public static final ApplicationGatewayRedirectType FOUND = new ApplicationGatewayRedirectType("Found"); + public static final ApplicationGatewayRedirectType FOUND = fromString("Found"); /** Static value SeeOther for ApplicationGatewayRedirectType. */ - public static final ApplicationGatewayRedirectType SEE_OTHER = new ApplicationGatewayRedirectType("SeeOther"); + public static final ApplicationGatewayRedirectType SEE_OTHER = fromString("SeeOther"); /** Static value Temporary for ApplicationGatewayRedirectType. */ - public static final ApplicationGatewayRedirectType TEMPORARY = new ApplicationGatewayRedirectType("Temporary"); - - private String value; + public static final ApplicationGatewayRedirectType TEMPORARY = fromString("Temporary"); /** - * Creates a custom value for ApplicationGatewayRedirectType. - * @param value the custom value + * Creates or finds a ApplicationGatewayRedirectType from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayRedirectType */ - public ApplicationGatewayRedirectType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayRedirectType fromString(String name) { + return fromString(name, ApplicationGatewayRedirectType.class); } - @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); - } + /** + * @return known ApplicationGatewayRedirectType values + */ + public static Collection values() { + return values(ApplicationGatewayRedirectType.class); } } 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 304f48e1737..7950ab166b6 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayRequestRoutingRuleType. */ -public final class ApplicationGatewayRequestRoutingRuleType { +public final class ApplicationGatewayRequestRoutingRuleType extends ExpandableStringEnum { /** Static value Basic for ApplicationGatewayRequestRoutingRuleType. */ - public static final ApplicationGatewayRequestRoutingRuleType BASIC = new ApplicationGatewayRequestRoutingRuleType("Basic"); + public static final ApplicationGatewayRequestRoutingRuleType BASIC = fromString("Basic"); /** Static value PathBasedRouting for ApplicationGatewayRequestRoutingRuleType. */ - public static final ApplicationGatewayRequestRoutingRuleType PATH_BASED_ROUTING = new ApplicationGatewayRequestRoutingRuleType("PathBasedRouting"); - - private String value; + public static final ApplicationGatewayRequestRoutingRuleType PATH_BASED_ROUTING = fromString("PathBasedRouting"); /** - * Creates a custom value for ApplicationGatewayRequestRoutingRuleType. - * @param value the custom value + * Creates or finds a ApplicationGatewayRequestRoutingRuleType from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayRequestRoutingRuleType */ - public ApplicationGatewayRequestRoutingRuleType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayRequestRoutingRuleType fromString(String name) { + return fromString(name, ApplicationGatewayRequestRoutingRuleType.class); } - @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); - } + /** + * @return known ApplicationGatewayRequestRoutingRuleType values + */ + public static Collection values() { + return values(ApplicationGatewayRequestRoutingRuleType.class); } } 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 56776cf97c9..54575f5185d 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,61 +8,43 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewaySkuName. */ -public final class ApplicationGatewaySkuName { +public final class ApplicationGatewaySkuName extends ExpandableStringEnum { /** Static value Standard_Small for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName STANDARD_SMALL = new ApplicationGatewaySkuName("Standard_Small"); + public static final ApplicationGatewaySkuName STANDARD_SMALL = fromString("Standard_Small"); /** Static value Standard_Medium for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName STANDARD_MEDIUM = new ApplicationGatewaySkuName("Standard_Medium"); + public static final ApplicationGatewaySkuName STANDARD_MEDIUM = fromString("Standard_Medium"); /** Static value Standard_Large for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName STANDARD_LARGE = new ApplicationGatewaySkuName("Standard_Large"); + public static final ApplicationGatewaySkuName STANDARD_LARGE = fromString("Standard_Large"); /** Static value WAF_Medium for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName WAF_MEDIUM = new ApplicationGatewaySkuName("WAF_Medium"); + public static final ApplicationGatewaySkuName WAF_MEDIUM = fromString("WAF_Medium"); /** Static value WAF_Large for ApplicationGatewaySkuName. */ - public static final ApplicationGatewaySkuName WAF_LARGE = new ApplicationGatewaySkuName("WAF_Large"); - - private String value; + public static final ApplicationGatewaySkuName WAF_LARGE = fromString("WAF_Large"); /** - * Creates a custom value for ApplicationGatewaySkuName. - * @param value the custom value + * Creates or finds a ApplicationGatewaySkuName from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySkuName */ - public ApplicationGatewaySkuName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewaySkuName fromString(String name) { + return fromString(name, ApplicationGatewaySkuName.class); } - @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); - } + /** + * @return known ApplicationGatewaySkuName values + */ + public static Collection values() { + return values(ApplicationGatewaySkuName.class); } } 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 76a6c4d6510..33161d9e345 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,121 +8,103 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewaySslCipherSuite. */ -public final class ApplicationGatewaySslCipherSuite { +public final class ApplicationGatewaySslCipherSuite extends ExpandableStringEnum { /** Static value TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 for ApplicationGatewaySslCipherSuite. */ - public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_DHE_RSA_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_256_CBC_SHA = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_DHE_RSA_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_RSA_WITH_AES_128_CBC_SHA = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_256_GCM_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_GCM_SHA384 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_128_GCM_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_GCM_SHA256 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_256_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_128_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_256_CBC_SHA = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_AES_128_CBC_SHA = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_DHE_DSS_WITH_AES_256_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_256_CBC_SHA = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_DHE_DSS_WITH_AES_128_CBC_SHA"); + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_AES_128_CBC_SHA = fromString("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 = new ApplicationGatewaySslCipherSuite("TLS_RSA_WITH_3DES_EDE_CBC_SHA"); - - private String value; + public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_3DES_EDE_CBC_SHA = fromString("TLS_RSA_WITH_3DES_EDE_CBC_SHA"); /** - * Creates a custom value for ApplicationGatewaySslCipherSuite. - * @param value the custom value + * Creates or finds a ApplicationGatewaySslCipherSuite from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySslCipherSuite */ - public ApplicationGatewaySslCipherSuite(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewaySslCipherSuite fromString(String name) { + return fromString(name, ApplicationGatewaySslCipherSuite.class); } - @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); - } + /** + * @return known ApplicationGatewaySslCipherSuite values + */ + public static Collection values() { + return values(ApplicationGatewaySslCipherSuite.class); } } 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 6715f14c1c5..51e837ebd9a 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,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewaySslPolicyName. */ -public final class ApplicationGatewaySslPolicyName { +public final class ApplicationGatewaySslPolicyName extends ExpandableStringEnum { /** Static value AppGwSslPolicy20150501 for ApplicationGatewaySslPolicyName. */ - public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20150501 = new ApplicationGatewaySslPolicyName("AppGwSslPolicy20150501"); + public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20150501 = fromString("AppGwSslPolicy20150501"); /** Static value AppGwSslPolicy20170401 for ApplicationGatewaySslPolicyName. */ - public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401 = new ApplicationGatewaySslPolicyName("AppGwSslPolicy20170401"); + public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401 = fromString("AppGwSslPolicy20170401"); /** Static value AppGwSslPolicy20170401S for ApplicationGatewaySslPolicyName. */ - public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401S = new ApplicationGatewaySslPolicyName("AppGwSslPolicy20170401S"); - - private String value; + public static final ApplicationGatewaySslPolicyName APP_GW_SSL_POLICY20170401S = fromString("AppGwSslPolicy20170401S"); /** - * Creates a custom value for ApplicationGatewaySslPolicyName. - * @param value the custom value + * Creates or finds a ApplicationGatewaySslPolicyName from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySslPolicyName */ - public ApplicationGatewaySslPolicyName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewaySslPolicyName fromString(String name) { + return fromString(name, ApplicationGatewaySslPolicyName.class); } - @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); - } + /** + * @return known ApplicationGatewaySslPolicyName values + */ + public static Collection values() { + return values(ApplicationGatewaySslPolicyName.class); } } 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 64fea67486c..83c892ab1da 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewaySslPolicyType. */ -public final class ApplicationGatewaySslPolicyType { +public final class ApplicationGatewaySslPolicyType extends ExpandableStringEnum { /** Static value Predefined for ApplicationGatewaySslPolicyType. */ - public static final ApplicationGatewaySslPolicyType PREDEFINED = new ApplicationGatewaySslPolicyType("Predefined"); + public static final ApplicationGatewaySslPolicyType PREDEFINED = fromString("Predefined"); /** Static value Custom for ApplicationGatewaySslPolicyType. */ - public static final ApplicationGatewaySslPolicyType CUSTOM = new ApplicationGatewaySslPolicyType("Custom"); - - private String value; + public static final ApplicationGatewaySslPolicyType CUSTOM = fromString("Custom"); /** - * Creates a custom value for ApplicationGatewaySslPolicyType. - * @param value the custom value + * Creates or finds a ApplicationGatewaySslPolicyType from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySslPolicyType */ - public ApplicationGatewaySslPolicyType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewaySslPolicyType fromString(String name) { + return fromString(name, ApplicationGatewaySslPolicyType.class); } - @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); - } + /** + * @return known ApplicationGatewaySslPolicyType values + */ + public static Collection values() { + return values(ApplicationGatewaySslPolicyType.class); } } 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 f086b73f5c8..299136422b5 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,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewaySslProtocol. */ -public final class ApplicationGatewaySslProtocol { +public final class ApplicationGatewaySslProtocol extends ExpandableStringEnum { /** Static value TLSv1_0 for ApplicationGatewaySslProtocol. */ - public static final ApplicationGatewaySslProtocol TLSV1_0 = new ApplicationGatewaySslProtocol("TLSv1_0"); + public static final ApplicationGatewaySslProtocol TLSV1_0 = fromString("TLSv1_0"); /** Static value TLSv1_1 for ApplicationGatewaySslProtocol. */ - public static final ApplicationGatewaySslProtocol TLSV1_1 = new ApplicationGatewaySslProtocol("TLSv1_1"); + public static final ApplicationGatewaySslProtocol TLSV1_1 = fromString("TLSv1_1"); /** Static value TLSv1_2 for ApplicationGatewaySslProtocol. */ - public static final ApplicationGatewaySslProtocol TLSV1_2 = new ApplicationGatewaySslProtocol("TLSv1_2"); - - private String value; + public static final ApplicationGatewaySslProtocol TLSV1_2 = fromString("TLSv1_2"); /** - * Creates a custom value for ApplicationGatewaySslProtocol. - * @param value the custom value + * Creates or finds a ApplicationGatewaySslProtocol from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewaySslProtocol */ - public ApplicationGatewaySslProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewaySslProtocol fromString(String name) { + return fromString(name, ApplicationGatewaySslProtocol.class); } - @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); - } + /** + * @return known ApplicationGatewaySslProtocol values + */ + public static Collection values() { + return values(ApplicationGatewaySslProtocol.class); } } 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 f11e689d3bc..ddff0cc232d 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ApplicationGatewayTier. */ -public final class ApplicationGatewayTier { +public final class ApplicationGatewayTier extends ExpandableStringEnum { /** Static value Standard for ApplicationGatewayTier. */ - public static final ApplicationGatewayTier STANDARD = new ApplicationGatewayTier("Standard"); + public static final ApplicationGatewayTier STANDARD = fromString("Standard"); /** Static value WAF for ApplicationGatewayTier. */ - public static final ApplicationGatewayTier WAF = new ApplicationGatewayTier("WAF"); - - private String value; + public static final ApplicationGatewayTier WAF = fromString("WAF"); /** - * Creates a custom value for ApplicationGatewayTier. - * @param value the custom value + * Creates or finds a ApplicationGatewayTier from its string representation. + * @param name a name to look for + * @return the corresponding ApplicationGatewayTier */ - public ApplicationGatewayTier(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ApplicationGatewayTier fromString(String name) { + return fromString(name, ApplicationGatewayTier.class); } - @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); - } + /** + * @return known ApplicationGatewayTier values + */ + public static Collection values() { + return values(ApplicationGatewayTier.class); } } 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 9507819bcff..100e59fabbf 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,6 +47,18 @@ 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. * @@ -147,4 +159,44 @@ 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 cea87a35c95..3cd3c4845bf 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for AssociationType. */ -public final class AssociationType { +public final class AssociationType extends ExpandableStringEnum { /** Static value Associated for AssociationType. */ - public static final AssociationType ASSOCIATED = new AssociationType("Associated"); + public static final AssociationType ASSOCIATED = fromString("Associated"); /** Static value Contains for AssociationType. */ - public static final AssociationType CONTAINS = new AssociationType("Contains"); - - private String value; + public static final AssociationType CONTAINS = fromString("Contains"); /** - * Creates a custom value for AssociationType. - * @param value the custom value + * Creates or finds a AssociationType from its string representation. + * @param name a name to look for + * @return the corresponding AssociationType */ - public AssociationType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static AssociationType fromString(String name) { + return fromString(name, AssociationType.class); } - @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); - } + /** + * @return known AssociationType values + */ + public static Collection values() { + return values(AssociationType.class); } } 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 187b50de1bd..2a162792b72 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for AuthenticationMethod. */ -public final class AuthenticationMethod { +public final class AuthenticationMethod extends ExpandableStringEnum { /** Static value EAPTLS for AuthenticationMethod. */ - public static final AuthenticationMethod EAPTLS = new AuthenticationMethod("EAPTLS"); + public static final AuthenticationMethod EAPTLS = fromString("EAPTLS"); /** Static value EAPMSCHAPv2 for AuthenticationMethod. */ - public static final AuthenticationMethod EAPMSCHAPV2 = new AuthenticationMethod("EAPMSCHAPv2"); - - private String value; + public static final AuthenticationMethod EAPMSCHAPV2 = fromString("EAPMSCHAPv2"); /** - * Creates a custom value for AuthenticationMethod. - * @param value the custom value + * Creates or finds a AuthenticationMethod from its string representation. + * @param name a name to look for + * @return the corresponding AuthenticationMethod */ - public AuthenticationMethod(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static AuthenticationMethod fromString(String name) { + return fromString(name, AuthenticationMethod.class); } - @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); - } + /** + * @return known AuthenticationMethod values + */ + public static Collection values() { + return values(AuthenticationMethod.class); } } 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 8b9ace9e7ab..48b19016c22 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for AuthorizationUseStatus. */ -public final class AuthorizationUseStatus { +public final class AuthorizationUseStatus extends ExpandableStringEnum { /** Static value Available for AuthorizationUseStatus. */ - public static final AuthorizationUseStatus AVAILABLE = new AuthorizationUseStatus("Available"); + public static final AuthorizationUseStatus AVAILABLE = fromString("Available"); /** Static value InUse for AuthorizationUseStatus. */ - public static final AuthorizationUseStatus IN_USE = new AuthorizationUseStatus("InUse"); - - private String value; + public static final AuthorizationUseStatus IN_USE = fromString("InUse"); /** - * Creates a custom value for AuthorizationUseStatus. - * @param value the custom value + * Creates or finds a AuthorizationUseStatus from its string representation. + * @param name a name to look for + * @return the corresponding AuthorizationUseStatus */ - public AuthorizationUseStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static AuthorizationUseStatus fromString(String name) { + return fromString(name, AuthorizationUseStatus.class); } - @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); - } + /** + * @return known AuthorizationUseStatus values + */ + public static Collection values() { + return values(AuthorizationUseStatus.class); } } 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 new file mode 100644 index 00000000000..f668bf0aa8b --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Availability.java @@ -0,0 +1,95 @@ +/** + * 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 new file mode 100644 index 00000000000..31d51196111 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCity.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network; + +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 new file mode 100644 index 00000000000..3d91fbfcd46 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListCountry.java @@ -0,0 +1,96 @@ +/** + * 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 new file mode 100644 index 00000000000..6815fc824eb --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AvailableProvidersListState.java @@ -0,0 +1,96 @@ +/** + * 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 new file mode 100644 index 00000000000..a79899fa397 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportItem.java @@ -0,0 +1,96 @@ +/** + * 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 new file mode 100644 index 00000000000..b30967befb6 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLatencyInfo.java @@ -0,0 +1,71 @@ +/** + * 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 new file mode 100644 index 00000000000..30907387de8 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/AzureReachabilityReportLocation.java @@ -0,0 +1,95 @@ +/** + * 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 2df82519ae0..c11111cfb08 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,61 +8,43 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for BgpPeerState. */ -public final class BgpPeerState { +public final class BgpPeerState extends ExpandableStringEnum { /** Static value Unknown for BgpPeerState. */ - public static final BgpPeerState UNKNOWN = new BgpPeerState("Unknown"); + public static final BgpPeerState UNKNOWN = fromString("Unknown"); /** Static value Stopped for BgpPeerState. */ - public static final BgpPeerState STOPPED = new BgpPeerState("Stopped"); + public static final BgpPeerState STOPPED = fromString("Stopped"); /** Static value Idle for BgpPeerState. */ - public static final BgpPeerState IDLE = new BgpPeerState("Idle"); + public static final BgpPeerState IDLE = fromString("Idle"); /** Static value Connecting for BgpPeerState. */ - public static final BgpPeerState CONNECTING = new BgpPeerState("Connecting"); + public static final BgpPeerState CONNECTING = fromString("Connecting"); /** Static value Connected for BgpPeerState. */ - public static final BgpPeerState CONNECTED = new BgpPeerState("Connected"); - - private String value; + public static final BgpPeerState CONNECTED = fromString("Connected"); /** - * Creates a custom value for BgpPeerState. - * @param value the custom value + * Creates or finds a BgpPeerState from its string representation. + * @param name a name to look for + * @return the corresponding BgpPeerState */ - public BgpPeerState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static BgpPeerState fromString(String name) { + return fromString(name, BgpPeerState.class); } - @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); - } + /** + * @return known BgpPeerState values + */ + public static Collection values() { + return values(BgpPeerState.class); } } 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 new file mode 100644 index 00000000000..8a9945553d6 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/CircuitConnectionStatus.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network; + +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 new file mode 100644 index 00000000000..ccc96f6d7f2 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorDestination.java @@ -0,0 +1,95 @@ +/** + * 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 new file mode 100644 index 00000000000..21eb6852101 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorParameters.java @@ -0,0 +1,122 @@ +/** + * 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 new file mode 100644 index 00000000000..894858c8444 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSource.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +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/ConnectionMonitorSourceStatus.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSourceStatus.java new file mode 100644 index 00000000000..4dffb239721 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionMonitorSourceStatus.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ConnectionMonitorSourceStatus. + */ +public final class ConnectionMonitorSourceStatus extends ExpandableStringEnum { + /** Static value Uknown for ConnectionMonitorSourceStatus. */ + public static final ConnectionMonitorSourceStatus UKNOWN = fromString("Uknown"); + + /** Static value Active for ConnectionMonitorSourceStatus. */ + public static final ConnectionMonitorSourceStatus ACTIVE = fromString("Active"); + + /** Static value Inactive for ConnectionMonitorSourceStatus. */ + public static final ConnectionMonitorSourceStatus INACTIVE = fromString("Inactive"); + + /** + * Creates or finds a ConnectionMonitorSourceStatus from its string representation. + * @param name a name to look for + * @return the corresponding ConnectionMonitorSourceStatus + */ + @JsonCreator + public static ConnectionMonitorSourceStatus fromString(String name) { + return fromString(name, ConnectionMonitorSourceStatus.class); + } + + /** + * @return known ConnectionMonitorSourceStatus values + */ + public static Collection values() { + return values(ConnectionMonitorSourceStatus.class); + } +} 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 new file mode 100644 index 00000000000..b6f2352dda5 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionState.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network; + +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 new file mode 100644 index 00000000000..11ab5864d0a --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ConnectionStateSnapshot.java @@ -0,0 +1,140 @@ +/** + * 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 753ffeaf59e..c9b018887be 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,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ConnectionStatus. */ -public final class ConnectionStatus { +public final class ConnectionStatus extends ExpandableStringEnum { /** Static value Unknown for ConnectionStatus. */ - public static final ConnectionStatus UNKNOWN = new ConnectionStatus("Unknown"); + public static final ConnectionStatus UNKNOWN = fromString("Unknown"); /** Static value Connected for ConnectionStatus. */ - public static final ConnectionStatus CONNECTED = new ConnectionStatus("Connected"); + public static final ConnectionStatus CONNECTED = fromString("Connected"); /** Static value Disconnected for ConnectionStatus. */ - public static final ConnectionStatus DISCONNECTED = new ConnectionStatus("Disconnected"); + public static final ConnectionStatus DISCONNECTED = fromString("Disconnected"); /** Static value Degraded for ConnectionStatus. */ - public static final ConnectionStatus DEGRADED = new ConnectionStatus("Degraded"); - - private String value; + public static final ConnectionStatus DEGRADED = fromString("Degraded"); /** - * Creates a custom value for ConnectionStatus. - * @param value the custom value + * Creates or finds a ConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding ConnectionStatus */ - public ConnectionStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ConnectionStatus fromString(String name) { + return fromString(name, ConnectionStatus.class); } - @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); - } + /** + * @return known ConnectionStatus values + */ + public static Collection values() { + return values(ConnectionStatus.class); } } 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 03348404d0d..1f65e1fca5c 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,70 +8,52 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for DhGroup. */ -public final class DhGroup { +public final class DhGroup extends ExpandableStringEnum { /** Static value None for DhGroup. */ - public static final DhGroup NONE = new DhGroup("None"); + public static final DhGroup NONE = fromString("None"); /** Static value DHGroup1 for DhGroup. */ - public static final DhGroup DHGROUP1 = new DhGroup("DHGroup1"); + public static final DhGroup DHGROUP1 = fromString("DHGroup1"); /** Static value DHGroup2 for DhGroup. */ - public static final DhGroup DHGROUP2 = new DhGroup("DHGroup2"); + public static final DhGroup DHGROUP2 = fromString("DHGroup2"); /** Static value DHGroup14 for DhGroup. */ - public static final DhGroup DHGROUP14 = new DhGroup("DHGroup14"); + public static final DhGroup DHGROUP14 = fromString("DHGroup14"); /** Static value DHGroup2048 for DhGroup. */ - public static final DhGroup DHGROUP2048 = new DhGroup("DHGroup2048"); + public static final DhGroup DHGROUP2048 = fromString("DHGroup2048"); /** Static value ECP256 for DhGroup. */ - public static final DhGroup ECP256 = new DhGroup("ECP256"); + public static final DhGroup ECP256 = fromString("ECP256"); /** Static value ECP384 for DhGroup. */ - public static final DhGroup ECP384 = new DhGroup("ECP384"); + public static final DhGroup ECP384 = fromString("ECP384"); /** Static value DHGroup24 for DhGroup. */ - public static final DhGroup DHGROUP24 = new DhGroup("DHGroup24"); - - private String value; + public static final DhGroup DHGROUP24 = fromString("DHGroup24"); /** - * Creates a custom value for DhGroup. - * @param value the custom value + * Creates or finds a DhGroup from its string representation. + * @param name a name to look for + * @return the corresponding DhGroup */ - public DhGroup(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static DhGroup fromString(String name) { + return fromString(name, DhGroup.class); } - @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); - } + /** + * @return known DhGroup values + */ + public static Collection values() { + return values(DhGroup.class); } } 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 new file mode 100644 index 00000000000..dc600f491d8 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Dimension.java @@ -0,0 +1,95 @@ +/** + * 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 9ec4ab55ada..325a1acb18d 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for Direction. */ -public final class Direction { +public final class Direction extends ExpandableStringEnum { /** Static value Inbound for Direction. */ - public static final Direction INBOUND = new Direction("Inbound"); + public static final Direction INBOUND = fromString("Inbound"); /** Static value Outbound for Direction. */ - public static final Direction OUTBOUND = new Direction("Outbound"); - - private String value; + public static final Direction OUTBOUND = fromString("Outbound"); /** - * Creates a custom value for Direction. - * @param value the custom value + * Creates or finds a Direction from its string representation. + * @param name a name to look for + * @return the corresponding Direction */ - public Direction(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static Direction fromString(String name) { + return fromString(name, Direction.class); } - @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); - } + /** + * @return known Direction values + */ + public static Collection values() { + return values(Direction.class); } } 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 new file mode 100644 index 00000000000..403dda8d3bd --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveNetworkSecurityGroup.java @@ -0,0 +1,124 @@ +/** + * 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 new file mode 100644 index 00000000000..a3e34349491 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EffectiveRoute.java @@ -0,0 +1,180 @@ +/** + * 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 ff8a569c247..a0da77b3daf 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,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for EffectiveRouteSource. */ -public final class EffectiveRouteSource { +public final class EffectiveRouteSource extends ExpandableStringEnum { /** Static value Unknown for EffectiveRouteSource. */ - public static final EffectiveRouteSource UNKNOWN = new EffectiveRouteSource("Unknown"); + public static final EffectiveRouteSource UNKNOWN = fromString("Unknown"); /** Static value User for EffectiveRouteSource. */ - public static final EffectiveRouteSource USER = new EffectiveRouteSource("User"); + public static final EffectiveRouteSource USER = fromString("User"); /** Static value VirtualNetworkGateway for EffectiveRouteSource. */ - public static final EffectiveRouteSource VIRTUAL_NETWORK_GATEWAY = new EffectiveRouteSource("VirtualNetworkGateway"); + public static final EffectiveRouteSource VIRTUAL_NETWORK_GATEWAY = fromString("VirtualNetworkGateway"); /** Static value Default for EffectiveRouteSource. */ - public static final EffectiveRouteSource DEFAULT = new EffectiveRouteSource("Default"); - - private String value; + public static final EffectiveRouteSource DEFAULT = fromString("Default"); /** - * Creates a custom value for EffectiveRouteSource. - * @param value the custom value + * Creates or finds a EffectiveRouteSource from its string representation. + * @param name a name to look for + * @return the corresponding EffectiveRouteSource */ - public EffectiveRouteSource(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static EffectiveRouteSource fromString(String name) { + return fromString(name, EffectiveRouteSource.class); } - @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); - } + /** + * @return known EffectiveRouteSource values + */ + public static Collection values() { + return values(EffectiveRouteSource.class); } } 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 d5b9bd21f9f..b3a78f4385b 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for EffectiveRouteState. */ -public final class EffectiveRouteState { +public final class EffectiveRouteState extends ExpandableStringEnum { /** Static value Active for EffectiveRouteState. */ - public static final EffectiveRouteState ACTIVE = new EffectiveRouteState("Active"); + public static final EffectiveRouteState ACTIVE = fromString("Active"); /** Static value Invalid for EffectiveRouteState. */ - public static final EffectiveRouteState INVALID = new EffectiveRouteState("Invalid"); - - private String value; + public static final EffectiveRouteState INVALID = fromString("Invalid"); /** - * Creates a custom value for EffectiveRouteState. - * @param value the custom value + * Creates or finds a EffectiveRouteState from its string representation. + * @param name a name to look for + * @return the corresponding EffectiveRouteState */ - public EffectiveRouteState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static EffectiveRouteState fromString(String name) { + return fromString(name, EffectiveRouteState.class); } - @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); - } + /** + * @return known EffectiveRouteState values + */ + public static Collection values() { + return values(EffectiveRouteState.class); } } 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 3d76690e139..3fec7790007 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,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for EffectiveSecurityRuleProtocol. */ -public final class EffectiveSecurityRuleProtocol { +public final class EffectiveSecurityRuleProtocol extends ExpandableStringEnum { /** Static value Tcp for EffectiveSecurityRuleProtocol. */ - public static final EffectiveSecurityRuleProtocol TCP = new EffectiveSecurityRuleProtocol("Tcp"); + public static final EffectiveSecurityRuleProtocol TCP = fromString("Tcp"); /** Static value Udp for EffectiveSecurityRuleProtocol. */ - public static final EffectiveSecurityRuleProtocol UDP = new EffectiveSecurityRuleProtocol("Udp"); + public static final EffectiveSecurityRuleProtocol UDP = fromString("Udp"); /** Static value All for EffectiveSecurityRuleProtocol. */ - public static final EffectiveSecurityRuleProtocol ALL = new EffectiveSecurityRuleProtocol("All"); - - private String value; + public static final EffectiveSecurityRuleProtocol ALL = fromString("All"); /** - * Creates a custom value for EffectiveSecurityRuleProtocol. - * @param value the custom value + * Creates or finds a EffectiveSecurityRuleProtocol from its string representation. + * @param name a name to look for + * @return the corresponding EffectiveSecurityRuleProtocol */ - public EffectiveSecurityRuleProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static EffectiveSecurityRuleProtocol fromString(String name) { + return fromString(name, EffectiveSecurityRuleProtocol.class); } - @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); - } + /** + * @return known EffectiveSecurityRuleProtocol values + */ + public static Collection values() { + return values(EffectiveSecurityRuleProtocol.class); } } 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 new file mode 100644 index 00000000000..feebdb22127 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/EvaluationState.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network; + +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 25039341f87..12a070c9471 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,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ -public final class ExpressRouteCircuitPeeringAdvertisedPublicPrefixState { +public final class ExpressRouteCircuitPeeringAdvertisedPublicPrefixState extends ExpandableStringEnum { /** Static value NotConfigured for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ - public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState NOT_CONFIGURED = new ExpressRouteCircuitPeeringAdvertisedPublicPrefixState("NotConfigured"); + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState NOT_CONFIGURED = fromString("NotConfigured"); /** Static value Configuring for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ - public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURING = new ExpressRouteCircuitPeeringAdvertisedPublicPrefixState("Configuring"); + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURING = fromString("Configuring"); /** Static value Configured for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ - public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURED = new ExpressRouteCircuitPeeringAdvertisedPublicPrefixState("Configured"); + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState CONFIGURED = fromString("Configured"); /** Static value ValidationNeeded for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. */ - public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState VALIDATION_NEEDED = new ExpressRouteCircuitPeeringAdvertisedPublicPrefixState("ValidationNeeded"); - - private String value; + public static final ExpressRouteCircuitPeeringAdvertisedPublicPrefixState VALIDATION_NEEDED = fromString("ValidationNeeded"); /** - * Creates a custom value for ExpressRouteCircuitPeeringAdvertisedPublicPrefixState. - * @param value the custom value + * Creates or finds a ExpressRouteCircuitPeeringAdvertisedPublicPrefixState from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitPeeringAdvertisedPublicPrefixState */ - public ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ExpressRouteCircuitPeeringAdvertisedPublicPrefixState fromString(String name) { + return fromString(name, ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.class); } - @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); - } + /** + * @return known ExpressRouteCircuitPeeringAdvertisedPublicPrefixState values + */ + public static Collection values() { + return values(ExpressRouteCircuitPeeringAdvertisedPublicPrefixState.class); } } 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 ea180c1330d..49ac407f0ec 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ExpressRouteCircuitPeeringState. */ -public final class ExpressRouteCircuitPeeringState { +public final class ExpressRouteCircuitPeeringState extends ExpandableStringEnum { /** Static value Disabled for ExpressRouteCircuitPeeringState. */ - public static final ExpressRouteCircuitPeeringState DISABLED = new ExpressRouteCircuitPeeringState("Disabled"); + public static final ExpressRouteCircuitPeeringState DISABLED = fromString("Disabled"); /** Static value Enabled for ExpressRouteCircuitPeeringState. */ - public static final ExpressRouteCircuitPeeringState ENABLED = new ExpressRouteCircuitPeeringState("Enabled"); - - private String value; + public static final ExpressRouteCircuitPeeringState ENABLED = fromString("Enabled"); /** - * Creates a custom value for ExpressRouteCircuitPeeringState. - * @param value the custom value + * Creates or finds a ExpressRouteCircuitPeeringState from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitPeeringState */ - public ExpressRouteCircuitPeeringState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ExpressRouteCircuitPeeringState fromString(String name) { + return fromString(name, ExpressRouteCircuitPeeringState.class); } - @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); - } + /** + * @return known ExpressRouteCircuitPeeringState values + */ + public static Collection values() { + return values(ExpressRouteCircuitPeeringState.class); } } 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 new file mode 100644 index 00000000000..522751abe45 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCircuitReference.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network; + +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 87c97ea5466..84059904697 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ExpressRouteCircuitSkuFamily. */ -public final class ExpressRouteCircuitSkuFamily { +public final class ExpressRouteCircuitSkuFamily extends ExpandableStringEnum { /** Static value UnlimitedData for ExpressRouteCircuitSkuFamily. */ - public static final ExpressRouteCircuitSkuFamily UNLIMITED_DATA = new ExpressRouteCircuitSkuFamily("UnlimitedData"); + public static final ExpressRouteCircuitSkuFamily UNLIMITED_DATA = fromString("UnlimitedData"); /** Static value MeteredData for ExpressRouteCircuitSkuFamily. */ - public static final ExpressRouteCircuitSkuFamily METERED_DATA = new ExpressRouteCircuitSkuFamily("MeteredData"); - - private String value; + public static final ExpressRouteCircuitSkuFamily METERED_DATA = fromString("MeteredData"); /** - * Creates a custom value for ExpressRouteCircuitSkuFamily. - * @param value the custom value + * Creates or finds a ExpressRouteCircuitSkuFamily from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitSkuFamily */ - public ExpressRouteCircuitSkuFamily(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ExpressRouteCircuitSkuFamily fromString(String name) { + return fromString(name, ExpressRouteCircuitSkuFamily.class); } - @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); - } + /** + * @return known ExpressRouteCircuitSkuFamily values + */ + public static Collection values() { + return values(ExpressRouteCircuitSkuFamily.class); } } 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 d2c90542132..32389fc8dfe 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ExpressRouteCircuitSkuTier. */ -public final class ExpressRouteCircuitSkuTier { +public final class ExpressRouteCircuitSkuTier extends ExpandableStringEnum { /** Static value Standard for ExpressRouteCircuitSkuTier. */ - public static final ExpressRouteCircuitSkuTier STANDARD = new ExpressRouteCircuitSkuTier("Standard"); + public static final ExpressRouteCircuitSkuTier STANDARD = fromString("Standard"); /** Static value Premium for ExpressRouteCircuitSkuTier. */ - public static final ExpressRouteCircuitSkuTier PREMIUM = new ExpressRouteCircuitSkuTier("Premium"); - - private String value; + public static final ExpressRouteCircuitSkuTier PREMIUM = fromString("Premium"); /** - * Creates a custom value for ExpressRouteCircuitSkuTier. - * @param value the custom value + * Creates or finds a ExpressRouteCircuitSkuTier from its string representation. + * @param name a name to look for + * @return the corresponding ExpressRouteCircuitSkuTier */ - public ExpressRouteCircuitSkuTier(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ExpressRouteCircuitSkuTier fromString(String name) { + return fromString(name, ExpressRouteCircuitSkuTier.class); } - @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); - } + /** + * @return known ExpressRouteCircuitSkuTier values + */ + public static Collection values() { + return values(ExpressRouteCircuitSkuTier.class); } } 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 new file mode 100644 index 00000000000..c2969b7a376 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRouteCrossConnectionRoutesTableSummary.java @@ -0,0 +1,123 @@ +/** + * 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/ExpressRoutePeeringState.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java new file mode 100644 index 00000000000..756bdadac6e --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringState.java @@ -0,0 +1,41 @@ +/** + * 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 new file mode 100644 index 00000000000..5fad5585fa3 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ExpressRoutePeeringType.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network; + +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/HTTPConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPConfiguration.java new file mode 100644 index 00000000000..1375da6b3cc --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPConfiguration.java @@ -0,0 +1,96 @@ +/** + * 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; + +/** + * HTTP configuration of the connectivity check. + */ +public class HTTPConfiguration { + /** + * HTTP method. Possible values include: 'Get'. + */ + @JsonProperty(value = "method") + private HTTPMethod method; + + /** + * List of HTTP headers. + */ + @JsonProperty(value = "headers") + private List headers; + + /** + * Valid status codes. + */ + @JsonProperty(value = "validStatusCodes") + private List validStatusCodes; + + /** + * Get the method value. + * + * @return the method value + */ + public HTTPMethod method() { + return this.method; + } + + /** + * Set the method value. + * + * @param method the method value to set + * @return the HTTPConfiguration object itself. + */ + public HTTPConfiguration withMethod(HTTPMethod method) { + this.method = method; + return this; + } + + /** + * Get the headers value. + * + * @return the headers value + */ + public List headers() { + return this.headers; + } + + /** + * Set the headers value. + * + * @param headers the headers value to set + * @return the HTTPConfiguration object itself. + */ + public HTTPConfiguration withHeaders(List headers) { + this.headers = headers; + return this; + } + + /** + * Get the validStatusCodes value. + * + * @return the validStatusCodes value + */ + public List validStatusCodes() { + return this.validStatusCodes; + } + + /** + * Set the validStatusCodes value. + * + * @param validStatusCodes the validStatusCodes value to set + * @return the HTTPConfiguration object itself. + */ + public HTTPConfiguration withValidStatusCodes(List validStatusCodes) { + this.validStatusCodes = validStatusCodes; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPHeader.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPHeader.java new file mode 100644 index 00000000000..f9a835552eb --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPHeader.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes the HTTP header. + */ +public class HTTPHeader { + /** + * The name in HTTP header. + */ + @JsonProperty(value = "name") + private String name; + + /** + * The value in HTTP header. + */ + @JsonProperty(value = "value") + private String value; + + /** + * 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 HTTPHeader object itself. + */ + public HTTPHeader withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value value. + * + * @return the value value + */ + public String value() { + return this.value; + } + + /** + * Set the value value. + * + * @param value the value value to set + * @return the HTTPHeader object itself. + */ + public HTTPHeader withValue(String value) { + this.value = value; + return this; + } + +} diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPMethod.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPMethod.java new file mode 100644 index 00000000000..9abed6928c4 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HTTPMethod.java @@ -0,0 +1,38 @@ +/** + * 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 HTTPMethod. + */ +public final class HTTPMethod extends ExpandableStringEnum { + /** Static value Get for HTTPMethod. */ + public static final HTTPMethod GET = fromString("Get"); + + /** + * Creates or finds a HTTPMethod from its string representation. + * @param name a name to look for + * @return the corresponding HTTPMethod + */ + @JsonCreator + public static HTTPMethod fromString(String name) { + return fromString(name, HTTPMethod.class); + } + + /** + * @return known HTTPMethod values + */ + public static Collection values() { + return values(HTTPMethod.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 eae50093aac..139bb73cd1d 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IPAllocationMethod. */ -public final class IPAllocationMethod { +public final class IPAllocationMethod extends ExpandableStringEnum { /** Static value Static for IPAllocationMethod. */ - public static final IPAllocationMethod STATIC = new IPAllocationMethod("Static"); + public static final IPAllocationMethod STATIC = fromString("Static"); /** Static value Dynamic for IPAllocationMethod. */ - public static final IPAllocationMethod DYNAMIC = new IPAllocationMethod("Dynamic"); - - private String value; + public static final IPAllocationMethod DYNAMIC = fromString("Dynamic"); /** - * Creates a custom value for IPAllocationMethod. - * @param value the custom value + * Creates or finds a IPAllocationMethod from its string representation. + * @param name a name to look for + * @return the corresponding IPAllocationMethod */ - public IPAllocationMethod(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IPAllocationMethod fromString(String name) { + return fromString(name, IPAllocationMethod.class); } - @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); - } + /** + * @return known IPAllocationMethod values + */ + public static Collection values() { + return values(IPAllocationMethod.class); } } 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 0afc2e2a7e0..0cb7b82f33f 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IPVersion. */ -public final class IPVersion { +public final class IPVersion extends ExpandableStringEnum { /** Static value IPv4 for IPVersion. */ - public static final IPVersion IPV4 = new IPVersion("IPv4"); + public static final IPVersion IPV4 = fromString("IPv4"); /** Static value IPv6 for IPVersion. */ - public static final IPVersion IPV6 = new IPVersion("IPv6"); - - private String value; + public static final IPVersion IPV6 = fromString("IPv6"); /** - * Creates a custom value for IPVersion. - * @param value the custom value + * Creates or finds a IPVersion from its string representation. + * @param name a name to look for + * @return the corresponding IPVersion */ - public IPVersion(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IPVersion fromString(String name) { + return fromString(name, IPVersion.class); } - @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); - } + /** + * @return known IPVersion values + */ + public static Collection values() { + return values(IPVersion.class); } } 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 94372a5a6c7..b55ccce065d 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,61 +8,49 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IkeEncryption. */ -public final class IkeEncryption { +public final class IkeEncryption extends ExpandableStringEnum { /** Static value DES for IkeEncryption. */ - public static final IkeEncryption DES = new IkeEncryption("DES"); + public static final IkeEncryption DES = fromString("DES"); /** Static value DES3 for IkeEncryption. */ - public static final IkeEncryption DES3 = new IkeEncryption("DES3"); + public static final IkeEncryption DES3 = fromString("DES3"); /** Static value AES128 for IkeEncryption. */ - public static final IkeEncryption AES128 = new IkeEncryption("AES128"); + public static final IkeEncryption AES128 = fromString("AES128"); /** Static value AES192 for IkeEncryption. */ - public static final IkeEncryption AES192 = new IkeEncryption("AES192"); + public static final IkeEncryption AES192 = fromString("AES192"); /** Static value AES256 for IkeEncryption. */ - public static final IkeEncryption AES256 = new IkeEncryption("AES256"); + public static final IkeEncryption AES256 = fromString("AES256"); - private String value; + /** Static value GCMAES256 for IkeEncryption. */ + public static final IkeEncryption GCMAES256 = fromString("GCMAES256"); + + /** Static value GCMAES128 for IkeEncryption. */ + public static final IkeEncryption GCMAES128 = fromString("GCMAES128"); /** - * Creates a custom value for IkeEncryption. - * @param value the custom value + * Creates or finds a IkeEncryption from its string representation. + * @param name a name to look for + * @return the corresponding IkeEncryption */ - public IkeEncryption(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IkeEncryption fromString(String name) { + return fromString(name, IkeEncryption.class); } - @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); - } + /** + * @return known IkeEncryption values + */ + public static Collection values() { + return values(IkeEncryption.class); } } 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 5b6941ed0b0..6b3670c4f21 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,58 +8,46 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IkeIntegrity. */ -public final class IkeIntegrity { +public final class IkeIntegrity extends ExpandableStringEnum { /** Static value MD5 for IkeIntegrity. */ - public static final IkeIntegrity MD5 = new IkeIntegrity("MD5"); + public static final IkeIntegrity MD5 = fromString("MD5"); /** Static value SHA1 for IkeIntegrity. */ - public static final IkeIntegrity SHA1 = new IkeIntegrity("SHA1"); + public static final IkeIntegrity SHA1 = fromString("SHA1"); /** Static value SHA256 for IkeIntegrity. */ - public static final IkeIntegrity SHA256 = new IkeIntegrity("SHA256"); + public static final IkeIntegrity SHA256 = fromString("SHA256"); /** Static value SHA384 for IkeIntegrity. */ - public static final IkeIntegrity SHA384 = new IkeIntegrity("SHA384"); + public static final IkeIntegrity SHA384 = fromString("SHA384"); - private String value; + /** Static value GCMAES256 for IkeIntegrity. */ + public static final IkeIntegrity GCMAES256 = fromString("GCMAES256"); + + /** Static value GCMAES128 for IkeIntegrity. */ + public static final IkeIntegrity GCMAES128 = fromString("GCMAES128"); /** - * Creates a custom value for IkeIntegrity. - * @param value the custom value + * Creates or finds a IkeIntegrity from its string representation. + * @param name a name to look for + * @return the corresponding IkeIntegrity */ - public IkeIntegrity(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IkeIntegrity fromString(String name) { + return fromString(name, IkeIntegrity.class); } - @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); - } + /** + * @return known IkeIntegrity values + */ + public static Collection values() { + return values(IkeIntegrity.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpFlowProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpFlowProtocol.java new file mode 100644 index 00000000000..a860d8bb5e3 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpFlowProtocol.java @@ -0,0 +1,41 @@ +/** + * 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 IpFlowProtocol. + */ +public final class IpFlowProtocol extends ExpandableStringEnum { + /** Static value TCP for IpFlowProtocol. */ + public static final IpFlowProtocol TCP = fromString("TCP"); + + /** Static value UDP for IpFlowProtocol. */ + public static final IpFlowProtocol UDP = fromString("UDP"); + + /** + * Creates or finds a IpFlowProtocol from its string representation. + * @param name a name to look for + * @return the corresponding IpFlowProtocol + */ + @JsonCreator + public static IpFlowProtocol fromString(String name) { + return fromString(name, IpFlowProtocol.class); + } + + /** + * @return known IpFlowProtocol values + */ + public static Collection values() { + return values(IpFlowProtocol.class); + } +} 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 new file mode 100644 index 00000000000..cf44b31c8ee --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/IpTag.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network; + +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 da9af5b5a4c..cd624bf0332 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,73 +8,55 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IpsecEncryption. */ -public final class IpsecEncryption { +public final class IpsecEncryption extends ExpandableStringEnum { /** Static value None for IpsecEncryption. */ - public static final IpsecEncryption NONE = new IpsecEncryption("None"); + public static final IpsecEncryption NONE = fromString("None"); /** Static value DES for IpsecEncryption. */ - public static final IpsecEncryption DES = new IpsecEncryption("DES"); + public static final IpsecEncryption DES = fromString("DES"); /** Static value DES3 for IpsecEncryption. */ - public static final IpsecEncryption DES3 = new IpsecEncryption("DES3"); + public static final IpsecEncryption DES3 = fromString("DES3"); /** Static value AES128 for IpsecEncryption. */ - public static final IpsecEncryption AES128 = new IpsecEncryption("AES128"); + public static final IpsecEncryption AES128 = fromString("AES128"); /** Static value AES192 for IpsecEncryption. */ - public static final IpsecEncryption AES192 = new IpsecEncryption("AES192"); + public static final IpsecEncryption AES192 = fromString("AES192"); /** Static value AES256 for IpsecEncryption. */ - public static final IpsecEncryption AES256 = new IpsecEncryption("AES256"); + public static final IpsecEncryption AES256 = fromString("AES256"); /** Static value GCMAES128 for IpsecEncryption. */ - public static final IpsecEncryption GCMAES128 = new IpsecEncryption("GCMAES128"); + public static final IpsecEncryption GCMAES128 = fromString("GCMAES128"); /** Static value GCMAES192 for IpsecEncryption. */ - public static final IpsecEncryption GCMAES192 = new IpsecEncryption("GCMAES192"); + public static final IpsecEncryption GCMAES192 = fromString("GCMAES192"); /** Static value GCMAES256 for IpsecEncryption. */ - public static final IpsecEncryption GCMAES256 = new IpsecEncryption("GCMAES256"); - - private String value; + public static final IpsecEncryption GCMAES256 = fromString("GCMAES256"); /** - * Creates a custom value for IpsecEncryption. - * @param value the custom value + * Creates or finds a IpsecEncryption from its string representation. + * @param name a name to look for + * @return the corresponding IpsecEncryption */ - public IpsecEncryption(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IpsecEncryption fromString(String name) { + return fromString(name, IpsecEncryption.class); } - @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); - } + /** + * @return known IpsecEncryption values + */ + public static Collection values() { + return values(IpsecEncryption.class); } } 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 59a97cceec5..a7685667a32 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,64 +8,46 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IpsecIntegrity. */ -public final class IpsecIntegrity { +public final class IpsecIntegrity extends ExpandableStringEnum { /** Static value MD5 for IpsecIntegrity. */ - public static final IpsecIntegrity MD5 = new IpsecIntegrity("MD5"); + public static final IpsecIntegrity MD5 = fromString("MD5"); /** Static value SHA1 for IpsecIntegrity. */ - public static final IpsecIntegrity SHA1 = new IpsecIntegrity("SHA1"); + public static final IpsecIntegrity SHA1 = fromString("SHA1"); /** Static value SHA256 for IpsecIntegrity. */ - public static final IpsecIntegrity SHA256 = new IpsecIntegrity("SHA256"); + public static final IpsecIntegrity SHA256 = fromString("SHA256"); /** Static value GCMAES128 for IpsecIntegrity. */ - public static final IpsecIntegrity GCMAES128 = new IpsecIntegrity("GCMAES128"); + public static final IpsecIntegrity GCMAES128 = fromString("GCMAES128"); /** Static value GCMAES192 for IpsecIntegrity. */ - public static final IpsecIntegrity GCMAES192 = new IpsecIntegrity("GCMAES192"); + public static final IpsecIntegrity GCMAES192 = fromString("GCMAES192"); /** Static value GCMAES256 for IpsecIntegrity. */ - public static final IpsecIntegrity GCMAES256 = new IpsecIntegrity("GCMAES256"); - - private String value; + public static final IpsecIntegrity GCMAES256 = fromString("GCMAES256"); /** - * Creates a custom value for IpsecIntegrity. - * @param value the custom value + * Creates or finds a IpsecIntegrity from its string representation. + * @param name a name to look for + * @return the corresponding IpsecIntegrity */ - public IpsecIntegrity(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IpsecIntegrity fromString(String name) { + return fromString(name, IpsecIntegrity.class); } - @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); - } + /** + * @return known IpsecIntegrity values + */ + public static Collection values() { + return values(IpsecIntegrity.class); } } 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 1d82ea634f0..db764e329fa 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'. + * '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'. + * 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', 'GCMAES128'. */ @JsonProperty(value = "ikeIntegrity", required = true) private IkeIntegrity ikeIntegrity; @@ -66,8 +66,9 @@ public class IpsecPolicy { private DhGroup dhGroup; /** - * The DH Groups used in IKE Phase 2 for new child SA. Possible values - * include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', 'ECP384', 'PFS24'. + * 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; 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 dd17c448703..53b744deb8e 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,73 +8,55 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for IssueType. */ -public final class IssueType { +public final class IssueType extends ExpandableStringEnum { /** Static value Unknown for IssueType. */ - public static final IssueType UNKNOWN = new IssueType("Unknown"); + public static final IssueType UNKNOWN = fromString("Unknown"); /** Static value AgentStopped for IssueType. */ - public static final IssueType AGENT_STOPPED = new IssueType("AgentStopped"); + public static final IssueType AGENT_STOPPED = fromString("AgentStopped"); /** Static value GuestFirewall for IssueType. */ - public static final IssueType GUEST_FIREWALL = new IssueType("GuestFirewall"); + public static final IssueType GUEST_FIREWALL = fromString("GuestFirewall"); /** Static value DnsResolution for IssueType. */ - public static final IssueType DNS_RESOLUTION = new IssueType("DnsResolution"); + public static final IssueType DNS_RESOLUTION = fromString("DnsResolution"); /** Static value SocketBind for IssueType. */ - public static final IssueType SOCKET_BIND = new IssueType("SocketBind"); + public static final IssueType SOCKET_BIND = fromString("SocketBind"); /** Static value NetworkSecurityRule for IssueType. */ - public static final IssueType NETWORK_SECURITY_RULE = new IssueType("NetworkSecurityRule"); + public static final IssueType NETWORK_SECURITY_RULE = fromString("NetworkSecurityRule"); /** Static value UserDefinedRoute for IssueType. */ - public static final IssueType USER_DEFINED_ROUTE = new IssueType("UserDefinedRoute"); + public static final IssueType USER_DEFINED_ROUTE = fromString("UserDefinedRoute"); /** Static value PortThrottled for IssueType. */ - public static final IssueType PORT_THROTTLED = new IssueType("PortThrottled"); + public static final IssueType PORT_THROTTLED = fromString("PortThrottled"); /** Static value Platform for IssueType. */ - public static final IssueType PLATFORM = new IssueType("Platform"); - - private String value; + public static final IssueType PLATFORM = fromString("Platform"); /** - * Creates a custom value for IssueType. - * @param value the custom value + * Creates or finds a IssueType from its string representation. + * @param name a name to look for + * @return the corresponding IssueType */ - public IssueType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static IssueType fromString(String name) { + return fromString(name, IssueType.class); } - @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); - } + /** + * @return known IssueType values + */ + public static Collection values() { + return values(IssueType.class); } } 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 bd8805bb8a9..07af803b429 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for LoadBalancerSkuName. */ -public final class LoadBalancerSkuName { +public final class LoadBalancerSkuName extends ExpandableStringEnum { /** Static value Basic for LoadBalancerSkuName. */ - public static final LoadBalancerSkuName BASIC = new LoadBalancerSkuName("Basic"); + public static final LoadBalancerSkuName BASIC = fromString("Basic"); /** Static value Standard for LoadBalancerSkuName. */ - public static final LoadBalancerSkuName STANDARD = new LoadBalancerSkuName("Standard"); - - private String value; + public static final LoadBalancerSkuName STANDARD = fromString("Standard"); /** - * Creates a custom value for LoadBalancerSkuName. - * @param value the custom value + * Creates or finds a LoadBalancerSkuName from its string representation. + * @param name a name to look for + * @return the corresponding LoadBalancerSkuName */ - public LoadBalancerSkuName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static LoadBalancerSkuName fromString(String name) { + return fromString(name, LoadBalancerSkuName.class); } - @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); - } + /** + * @return known LoadBalancerSkuName values + */ + public static Collection values() { + return values(LoadBalancerSkuName.class); } } 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 7c35ba2a4eb..a05f626404f 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,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for LoadDistribution. */ -public final class LoadDistribution { +public final class LoadDistribution extends ExpandableStringEnum { /** Static value Default for LoadDistribution. */ - public static final LoadDistribution DEFAULT = new LoadDistribution("Default"); + public static final LoadDistribution DEFAULT = fromString("Default"); /** Static value SourceIP for LoadDistribution. */ - public static final LoadDistribution SOURCE_IP = new LoadDistribution("SourceIP"); + public static final LoadDistribution SOURCE_IP = fromString("SourceIP"); /** Static value SourceIPProtocol for LoadDistribution. */ - public static final LoadDistribution SOURCE_IPPROTOCOL = new LoadDistribution("SourceIPProtocol"); - - private String value; + public static final LoadDistribution SOURCE_IPPROTOCOL = fromString("SourceIPProtocol"); /** - * Creates a custom value for LoadDistribution. - * @param value the custom value + * Creates or finds a LoadDistribution from its string representation. + * @param name a name to look for + * @return the corresponding LoadDistribution */ - public LoadDistribution(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static LoadDistribution fromString(String name) { + return fromString(name, LoadDistribution.class); } - @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); - } + /** + * @return known LoadDistribution values + */ + public static Collection values() { + return values(LoadDistribution.class); } } 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 new file mode 100644 index 00000000000..da14968066d --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LogSpecification.java @@ -0,0 +1,95 @@ +/** + * 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 new file mode 100644 index 00000000000..01c4d449ae4 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/MetricSpecification.java @@ -0,0 +1,382 @@ +/** + * 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 72ccb2233dd..e5c40e98cb5 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,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for NetworkOperationStatus. */ -public final class NetworkOperationStatus { +public final class NetworkOperationStatus extends ExpandableStringEnum { /** Static value InProgress for NetworkOperationStatus. */ - public static final NetworkOperationStatus IN_PROGRESS = new NetworkOperationStatus("InProgress"); + public static final NetworkOperationStatus IN_PROGRESS = fromString("InProgress"); /** Static value Succeeded for NetworkOperationStatus. */ - public static final NetworkOperationStatus SUCCEEDED = new NetworkOperationStatus("Succeeded"); + public static final NetworkOperationStatus SUCCEEDED = fromString("Succeeded"); /** Static value Failed for NetworkOperationStatus. */ - public static final NetworkOperationStatus FAILED = new NetworkOperationStatus("Failed"); - - private String value; + public static final NetworkOperationStatus FAILED = fromString("Failed"); /** - * Creates a custom value for NetworkOperationStatus. - * @param value the custom value + * Creates or finds a NetworkOperationStatus from its string representation. + * @param name a name to look for + * @return the corresponding NetworkOperationStatus */ - public NetworkOperationStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static NetworkOperationStatus fromString(String name) { + return fromString(name, NetworkOperationStatus.class); } - @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); - } + /** + * @return known NetworkOperationStatus values + */ + public static Collection values() { + return values(NetworkOperationStatus.class); } } 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 72934e6b656..7dce1b03015 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,64 +8,46 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for NextHopType. */ -public final class NextHopType { +public final class NextHopType extends ExpandableStringEnum { /** Static value Internet for NextHopType. */ - public static final NextHopType INTERNET = new NextHopType("Internet"); + public static final NextHopType INTERNET = fromString("Internet"); /** Static value VirtualAppliance for NextHopType. */ - public static final NextHopType VIRTUAL_APPLIANCE = new NextHopType("VirtualAppliance"); + public static final NextHopType VIRTUAL_APPLIANCE = fromString("VirtualAppliance"); /** Static value VirtualNetworkGateway for NextHopType. */ - public static final NextHopType VIRTUAL_NETWORK_GATEWAY = new NextHopType("VirtualNetworkGateway"); + public static final NextHopType VIRTUAL_NETWORK_GATEWAY = fromString("VirtualNetworkGateway"); /** Static value VnetLocal for NextHopType. */ - public static final NextHopType VNET_LOCAL = new NextHopType("VnetLocal"); + public static final NextHopType VNET_LOCAL = fromString("VnetLocal"); /** Static value HyperNetGateway for NextHopType. */ - public static final NextHopType HYPER_NET_GATEWAY = new NextHopType("HyperNetGateway"); + public static final NextHopType HYPER_NET_GATEWAY = fromString("HyperNetGateway"); /** Static value None for NextHopType. */ - public static final NextHopType NONE = new NextHopType("None"); - - private String value; + public static final NextHopType NONE = fromString("None"); /** - * Creates a custom value for NextHopType. - * @param value the custom value + * Creates or finds a NextHopType from its string representation. + * @param name a name to look for + * @return the corresponding NextHopType */ - public NextHopType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static NextHopType fromString(String name) { + return fromString(name, NextHopType.class); } - @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); - } + /** + * @return known NextHopType values + */ + public static Collection values() { + return values(NextHopType.class); } } 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 new file mode 100644 index 00000000000..91e8fba4da6 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationDisplay.java @@ -0,0 +1,121 @@ +/** + * 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 new file mode 100644 index 00000000000..097a2cb2db4 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/OperationPropertiesFormatServiceSpecification.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network; + +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 db57348e220..9a8bbe337a6 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,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for Origin. */ -public final class Origin { +public final class Origin extends ExpandableStringEnum { /** Static value Local for Origin. */ - public static final Origin LOCAL = new Origin("Local"); + public static final Origin LOCAL = fromString("Local"); /** Static value Inbound for Origin. */ - public static final Origin INBOUND = new Origin("Inbound"); + public static final Origin INBOUND = fromString("Inbound"); /** Static value Outbound for Origin. */ - public static final Origin OUTBOUND = new Origin("Outbound"); - - private String value; + public static final Origin OUTBOUND = fromString("Outbound"); /** - * Creates a custom value for Origin. - * @param value the custom value + * Creates or finds a Origin from its string representation. + * @param name a name to look for + * @return the corresponding Origin */ - public Origin(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static Origin fromString(String name) { + return fromString(name, Origin.class); } - @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); - } + /** + * @return known Origin values + */ + public static Collection values() { + return values(Origin.class); } } 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 318994e05c1..b85b4a5ff7a 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,61 +8,43 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for PcError. */ -public final class PcError { +public final class PcError extends ExpandableStringEnum { /** Static value InternalError for PcError. */ - public static final PcError INTERNAL_ERROR = new PcError("InternalError"); + public static final PcError INTERNAL_ERROR = fromString("InternalError"); /** Static value AgentStopped for PcError. */ - public static final PcError AGENT_STOPPED = new PcError("AgentStopped"); + public static final PcError AGENT_STOPPED = fromString("AgentStopped"); /** Static value CaptureFailed for PcError. */ - public static final PcError CAPTURE_FAILED = new PcError("CaptureFailed"); + public static final PcError CAPTURE_FAILED = fromString("CaptureFailed"); /** Static value LocalFileFailed for PcError. */ - public static final PcError LOCAL_FILE_FAILED = new PcError("LocalFileFailed"); + public static final PcError LOCAL_FILE_FAILED = fromString("LocalFileFailed"); /** Static value StorageFailed for PcError. */ - public static final PcError STORAGE_FAILED = new PcError("StorageFailed"); - - private String value; + public static final PcError STORAGE_FAILED = fromString("StorageFailed"); /** - * Creates a custom value for PcError. - * @param value the custom value + * Creates or finds a PcError from its string representation. + * @param name a name to look for + * @return the corresponding PcError */ - public PcError(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static PcError fromString(String name) { + return fromString(name, PcError.class); } - @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); - } + /** + * @return known PcError values + */ + public static Collection values() { + return values(PcError.class); } } 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 38056e9708c..332c5408aeb 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,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for PcProtocol. */ -public final class PcProtocol { +public final class PcProtocol extends ExpandableStringEnum { /** Static value TCP for PcProtocol. */ - public static final PcProtocol TCP = new PcProtocol("TCP"); + public static final PcProtocol TCP = fromString("TCP"); /** Static value UDP for PcProtocol. */ - public static final PcProtocol UDP = new PcProtocol("UDP"); + public static final PcProtocol UDP = fromString("UDP"); /** Static value Any for PcProtocol. */ - public static final PcProtocol ANY = new PcProtocol("Any"); - - private String value; + public static final PcProtocol ANY = fromString("Any"); /** - * Creates a custom value for PcProtocol. - * @param value the custom value + * Creates or finds a PcProtocol from its string representation. + * @param name a name to look for + * @return the corresponding PcProtocol */ - public PcProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static PcProtocol fromString(String name) { + return fromString(name, PcProtocol.class); } - @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); - } + /** + * @return known PcProtocol values + */ + public static Collection values() { + return values(PcProtocol.class); } } 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 c6e172a7470..a4a98398d43 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,61 +8,43 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for PcStatus. */ -public final class PcStatus { +public final class PcStatus extends ExpandableStringEnum { /** Static value NotStarted for PcStatus. */ - public static final PcStatus NOT_STARTED = new PcStatus("NotStarted"); + public static final PcStatus NOT_STARTED = fromString("NotStarted"); /** Static value Running for PcStatus. */ - public static final PcStatus RUNNING = new PcStatus("Running"); + public static final PcStatus RUNNING = fromString("Running"); /** Static value Stopped for PcStatus. */ - public static final PcStatus STOPPED = new PcStatus("Stopped"); + public static final PcStatus STOPPED = fromString("Stopped"); /** Static value Error for PcStatus. */ - public static final PcStatus ERROR = new PcStatus("Error"); + public static final PcStatus ERROR = fromString("Error"); /** Static value Unknown for PcStatus. */ - public static final PcStatus UNKNOWN = new PcStatus("Unknown"); - - private String value; + public static final PcStatus UNKNOWN = fromString("Unknown"); /** - * Creates a custom value for PcStatus. - * @param value the custom value + * Creates or finds a PcStatus from its string representation. + * @param name a name to look for + * @return the corresponding PcStatus */ - public PcStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static PcStatus fromString(String name) { + return fromString(name, PcStatus.class); } - @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); - } + /** + * @return known PcStatus values + */ + public static Collection values() { + return values(PcStatus.class); } } 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 227876b2dd6..e2d1f2aeb76 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,67 +8,55 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for PfsGroup. */ -public final class PfsGroup { +public final class PfsGroup extends ExpandableStringEnum { /** Static value None for PfsGroup. */ - public static final PfsGroup NONE = new PfsGroup("None"); + public static final PfsGroup NONE = fromString("None"); /** Static value PFS1 for PfsGroup. */ - public static final PfsGroup PFS1 = new PfsGroup("PFS1"); + public static final PfsGroup PFS1 = fromString("PFS1"); /** Static value PFS2 for PfsGroup. */ - public static final PfsGroup PFS2 = new PfsGroup("PFS2"); + public static final PfsGroup PFS2 = fromString("PFS2"); /** Static value PFS2048 for PfsGroup. */ - public static final PfsGroup PFS2048 = new PfsGroup("PFS2048"); + public static final PfsGroup PFS2048 = fromString("PFS2048"); /** Static value ECP256 for PfsGroup. */ - public static final PfsGroup ECP256 = new PfsGroup("ECP256"); + public static final PfsGroup ECP256 = fromString("ECP256"); /** Static value ECP384 for PfsGroup. */ - public static final PfsGroup ECP384 = new PfsGroup("ECP384"); + public static final PfsGroup ECP384 = fromString("ECP384"); /** Static value PFS24 for PfsGroup. */ - public static final PfsGroup PFS24 = new PfsGroup("PFS24"); + public static final PfsGroup PFS24 = fromString("PFS24"); - private String value; + /** Static value PFS14 for PfsGroup. */ + public static final PfsGroup PFS14 = fromString("PFS14"); + + /** Static value PFSMM for PfsGroup. */ + public static final PfsGroup PFSMM = fromString("PFSMM"); /** - * Creates a custom value for PfsGroup. - * @param value the custom value + * Creates or finds a PfsGroup from its string representation. + * @param name a name to look for + * @return the corresponding PfsGroup */ - public PfsGroup(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static PfsGroup fromString(String name) { + return fromString(name, PfsGroup.class); } - @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); - } + /** + * @return known PfsGroup values + */ + public static Collection values() { + return values(PfsGroup.class); } } 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 014f1724607..6c4352821fa 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ProbeProtocol. */ -public final class ProbeProtocol { +public final class ProbeProtocol extends ExpandableStringEnum { /** Static value Http for ProbeProtocol. */ - public static final ProbeProtocol HTTP = new ProbeProtocol("Http"); + public static final ProbeProtocol HTTP = fromString("Http"); /** Static value Tcp for ProbeProtocol. */ - public static final ProbeProtocol TCP = new ProbeProtocol("Tcp"); - - private String value; + public static final ProbeProtocol TCP = fromString("Tcp"); /** - * Creates a custom value for ProbeProtocol. - * @param value the custom value + * Creates or finds a ProbeProtocol from its string representation. + * @param name a name to look for + * @return the corresponding ProbeProtocol */ - public ProbeProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ProbeProtocol fromString(String name) { + return fromString(name, ProbeProtocol.class); } - @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); - } + /** + * @return known ProbeProtocol values + */ + public static Collection values() { + return values(ProbeProtocol.class); } } 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 b79db0cc738..f8f21ec67ca 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ProcessorArchitecture. */ -public final class ProcessorArchitecture { +public final class ProcessorArchitecture extends ExpandableStringEnum { /** Static value Amd64 for ProcessorArchitecture. */ - public static final ProcessorArchitecture AMD64 = new ProcessorArchitecture("Amd64"); + public static final ProcessorArchitecture AMD64 = fromString("Amd64"); /** Static value X86 for ProcessorArchitecture. */ - public static final ProcessorArchitecture X86 = new ProcessorArchitecture("X86"); - - private String value; + public static final ProcessorArchitecture X86 = fromString("X86"); /** - * Creates a custom value for ProcessorArchitecture. - * @param value the custom value + * Creates or finds a ProcessorArchitecture from its string representation. + * @param name a name to look for + * @return the corresponding ProcessorArchitecture */ - public ProcessorArchitecture(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ProcessorArchitecture fromString(String name) { + return fromString(name, ProcessorArchitecture.class); } - @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); - } + /** + * @return known ProcessorArchitecture values + */ + public static Collection values() { + return values(ProcessorArchitecture.class); } } 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 5239385043e..8a30dace2f0 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,52 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for Protocol. */ -public final class Protocol { - /** Static value TCP for Protocol. */ - public static final Protocol TCP = new Protocol("TCP"); +public final class Protocol extends ExpandableStringEnum { + /** Static value Tcp for Protocol. */ + public static final Protocol TCP = fromString("Tcp"); - /** Static value UDP for Protocol. */ - public static final Protocol UDP = new Protocol("UDP"); + /** Static value Http for Protocol. */ + public static final Protocol HTTP = fromString("Http"); - private String value; + /** Static value Https for Protocol. */ + public static final Protocol HTTPS = fromString("Https"); + + /** Static value Icmp for Protocol. */ + public static final Protocol ICMP = fromString("Icmp"); /** - * Creates a custom value for Protocol. - * @param value the custom value + * Creates or finds a Protocol from its string representation. + * @param name a name to look for + * @return the corresponding Protocol */ - public Protocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static Protocol fromString(String name) { + return fromString(name, Protocol.class); } - @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); - } + /** + * @return known Protocol values + */ + public static Collection values() { + return values(Protocol.class); } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProtocolConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProtocolConfiguration.java new file mode 100644 index 00000000000..2efd779648a --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ProtocolConfiguration.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration of the protocol. + */ +public class ProtocolConfiguration { + /** + * The hTTPConfiguration property. + */ + @JsonProperty(value = "HTTPConfiguration") + private HTTPConfiguration hTTPConfiguration; + + /** + * Get the hTTPConfiguration value. + * + * @return the hTTPConfiguration value + */ + public HTTPConfiguration hTTPConfiguration() { + return this.hTTPConfiguration; + } + + /** + * Set the hTTPConfiguration value. + * + * @param hTTPConfiguration the hTTPConfiguration value to set + * @return the ProtocolConfiguration object itself. + */ + public ProtocolConfiguration withHTTPConfiguration(HTTPConfiguration hTTPConfiguration) { + this.hTTPConfiguration = hTTPConfiguration; + return this; + } + +} 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 f8c378d086a..087a96a1b8f 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,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ProvisioningState. */ -public final class ProvisioningState { +public final class ProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = new ProvisioningState("Succeeded"); + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** Static value Updating for ProvisioningState. */ - public static final ProvisioningState UPDATING = new ProvisioningState("Updating"); + public static final ProvisioningState UPDATING = fromString("Updating"); /** Static value Deleting for ProvisioningState. */ - public static final ProvisioningState DELETING = new ProvisioningState("Deleting"); + public static final ProvisioningState DELETING = fromString("Deleting"); /** Static value Failed for ProvisioningState. */ - public static final ProvisioningState FAILED = new ProvisioningState("Failed"); - - private String value; + public static final ProvisioningState FAILED = fromString("Failed"); /** - * Creates a custom value for ProvisioningState. - * @param value the custom value + * Creates or finds a ProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ProvisioningState */ - public ProvisioningState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); } - @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); - } + /** + * @return known ProvisioningState values + */ + public static Collection values() { + return values(ProvisioningState.class); } } 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 4662e9c40db..0e794a4e3db 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for PublicIPAddressSkuName. */ -public final class PublicIPAddressSkuName { +public final class PublicIPAddressSkuName extends ExpandableStringEnum { /** Static value Basic for PublicIPAddressSkuName. */ - public static final PublicIPAddressSkuName BASIC = new PublicIPAddressSkuName("Basic"); + public static final PublicIPAddressSkuName BASIC = fromString("Basic"); /** Static value Standard for PublicIPAddressSkuName. */ - public static final PublicIPAddressSkuName STANDARD = new PublicIPAddressSkuName("Standard"); - - private String value; + public static final PublicIPAddressSkuName STANDARD = fromString("Standard"); /** - * Creates a custom value for PublicIPAddressSkuName. - * @param value the custom value + * Creates or finds a PublicIPAddressSkuName from its string representation. + * @param name a name to look for + * @return the corresponding PublicIPAddressSkuName */ - public PublicIPAddressSkuName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static PublicIPAddressSkuName fromString(String name) { + return fromString(name, PublicIPAddressSkuName.class); } - @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); - } + /** + * @return known PublicIPAddressSkuName values + */ + public static Collection values() { + return values(PublicIPAddressSkuName.class); } } 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 9516bcebc2f..614cf4aa12a 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,61 +8,43 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for RouteNextHopType. */ -public final class RouteNextHopType { +public final class RouteNextHopType extends ExpandableStringEnum { /** Static value VirtualNetworkGateway for RouteNextHopType. */ - public static final RouteNextHopType VIRTUAL_NETWORK_GATEWAY = new RouteNextHopType("VirtualNetworkGateway"); + public static final RouteNextHopType VIRTUAL_NETWORK_GATEWAY = fromString("VirtualNetworkGateway"); /** Static value VnetLocal for RouteNextHopType. */ - public static final RouteNextHopType VNET_LOCAL = new RouteNextHopType("VnetLocal"); + public static final RouteNextHopType VNET_LOCAL = fromString("VnetLocal"); /** Static value Internet for RouteNextHopType. */ - public static final RouteNextHopType INTERNET = new RouteNextHopType("Internet"); + public static final RouteNextHopType INTERNET = fromString("Internet"); /** Static value VirtualAppliance for RouteNextHopType. */ - public static final RouteNextHopType VIRTUAL_APPLIANCE = new RouteNextHopType("VirtualAppliance"); + public static final RouteNextHopType VIRTUAL_APPLIANCE = fromString("VirtualAppliance"); /** Static value None for RouteNextHopType. */ - public static final RouteNextHopType NONE = new RouteNextHopType("None"); - - private String value; + public static final RouteNextHopType NONE = fromString("None"); /** - * Creates a custom value for RouteNextHopType. - * @param value the custom value + * Creates or finds a RouteNextHopType from its string representation. + * @param name a name to look for + * @return the corresponding RouteNextHopType */ - public RouteNextHopType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static RouteNextHopType fromString(String name) { + return fromString(name, RouteNextHopType.class); } - @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); - } + /** + * @return known RouteNextHopType values + */ + public static Collection values() { + return values(RouteNextHopType.class); } } 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 bcf540e056b..d5e67a37081 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for SecurityRuleAccess. */ -public final class SecurityRuleAccess { +public final class SecurityRuleAccess extends ExpandableStringEnum { /** Static value Allow for SecurityRuleAccess. */ - public static final SecurityRuleAccess ALLOW = new SecurityRuleAccess("Allow"); + public static final SecurityRuleAccess ALLOW = fromString("Allow"); /** Static value Deny for SecurityRuleAccess. */ - public static final SecurityRuleAccess DENY = new SecurityRuleAccess("Deny"); - - private String value; + public static final SecurityRuleAccess DENY = fromString("Deny"); /** - * Creates a custom value for SecurityRuleAccess. - * @param value the custom value + * Creates or finds a SecurityRuleAccess from its string representation. + * @param name a name to look for + * @return the corresponding SecurityRuleAccess */ - public SecurityRuleAccess(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static SecurityRuleAccess fromString(String name) { + return fromString(name, SecurityRuleAccess.class); } - @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); - } + /** + * @return known SecurityRuleAccess values + */ + public static Collection values() { + return values(SecurityRuleAccess.class); } } 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 ef85548cde5..69100a07df9 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for SecurityRuleDirection. */ -public final class SecurityRuleDirection { +public final class SecurityRuleDirection extends ExpandableStringEnum { /** Static value Inbound for SecurityRuleDirection. */ - public static final SecurityRuleDirection INBOUND = new SecurityRuleDirection("Inbound"); + public static final SecurityRuleDirection INBOUND = fromString("Inbound"); /** Static value Outbound for SecurityRuleDirection. */ - public static final SecurityRuleDirection OUTBOUND = new SecurityRuleDirection("Outbound"); - - private String value; + public static final SecurityRuleDirection OUTBOUND = fromString("Outbound"); /** - * Creates a custom value for SecurityRuleDirection. - * @param value the custom value + * Creates or finds a SecurityRuleDirection from its string representation. + * @param name a name to look for + * @return the corresponding SecurityRuleDirection */ - public SecurityRuleDirection(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static SecurityRuleDirection fromString(String name) { + return fromString(name, SecurityRuleDirection.class); } - @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); - } + /** + * @return known SecurityRuleDirection values + */ + public static Collection values() { + return values(SecurityRuleDirection.class); } } 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 421d8fc478b..6261d89f4bc 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,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for SecurityRuleProtocol. */ -public final class SecurityRuleProtocol { +public final class SecurityRuleProtocol extends ExpandableStringEnum { /** Static value Tcp for SecurityRuleProtocol. */ - public static final SecurityRuleProtocol TCP = new SecurityRuleProtocol("Tcp"); + public static final SecurityRuleProtocol TCP = fromString("Tcp"); /** Static value Udp for SecurityRuleProtocol. */ - public static final SecurityRuleProtocol UDP = new SecurityRuleProtocol("Udp"); + public static final SecurityRuleProtocol UDP = fromString("Udp"); /** Static value * for SecurityRuleProtocol. */ - public static final SecurityRuleProtocol ASTERISK = new SecurityRuleProtocol("*"); - - private String value; + public static final SecurityRuleProtocol ASTERISK = fromString("*"); /** - * Creates a custom value for SecurityRuleProtocol. - * @param value the custom value + * Creates or finds a SecurityRuleProtocol from its string representation. + * @param name a name to look for + * @return the corresponding SecurityRuleProtocol */ - public SecurityRuleProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static SecurityRuleProtocol fromString(String name) { + return fromString(name, SecurityRuleProtocol.class); } - @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); - } + /** + * @return known SecurityRuleProtocol values + */ + public static Collection values() { + return values(SecurityRuleProtocol.class); } } 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 642d411c2b4..ad61376c79f 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,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for ServiceProviderProvisioningState. */ -public final class ServiceProviderProvisioningState { +public final class ServiceProviderProvisioningState extends ExpandableStringEnum { /** Static value NotProvisioned for ServiceProviderProvisioningState. */ - public static final ServiceProviderProvisioningState NOT_PROVISIONED = new ServiceProviderProvisioningState("NotProvisioned"); + public static final ServiceProviderProvisioningState NOT_PROVISIONED = fromString("NotProvisioned"); /** Static value Provisioning for ServiceProviderProvisioningState. */ - public static final ServiceProviderProvisioningState PROVISIONING = new ServiceProviderProvisioningState("Provisioning"); + public static final ServiceProviderProvisioningState PROVISIONING = fromString("Provisioning"); /** Static value Provisioned for ServiceProviderProvisioningState. */ - public static final ServiceProviderProvisioningState PROVISIONED = new ServiceProviderProvisioningState("Provisioned"); + public static final ServiceProviderProvisioningState PROVISIONED = fromString("Provisioned"); /** Static value Deprovisioning for ServiceProviderProvisioningState. */ - public static final ServiceProviderProvisioningState DEPROVISIONING = new ServiceProviderProvisioningState("Deprovisioning"); - - private String value; + public static final ServiceProviderProvisioningState DEPROVISIONING = fromString("Deprovisioning"); /** - * Creates a custom value for ServiceProviderProvisioningState. - * @param value the custom value + * Creates or finds a ServiceProviderProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ServiceProviderProvisioningState */ - public ServiceProviderProvisioningState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static ServiceProviderProvisioningState fromString(String name) { + return fromString(name, ServiceProviderProvisioningState.class); } - @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); - } + /** + * @return known ServiceProviderProvisioningState values + */ + public static Collection values() { + return values(ServiceProviderProvisioningState.class); } } 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 6469d9cbc28..aef63c34bd6 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for Severity. */ -public final class Severity { +public final class Severity extends ExpandableStringEnum { /** Static value Error for Severity. */ - public static final Severity ERROR = new Severity("Error"); + public static final Severity ERROR = fromString("Error"); /** Static value Warning for Severity. */ - public static final Severity WARNING = new Severity("Warning"); - - private String value; + public static final Severity WARNING = fromString("Warning"); /** - * Creates a custom value for Severity. - * @param value the custom value + * Creates or finds a Severity from its string representation. + * @param name a name to look for + * @return the corresponding Severity */ - public Severity(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static Severity fromString(String name) { + return fromString(name, Severity.class); } - @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); - } + /** + * @return known Severity values + */ + public static Collection values() { + return values(Severity.class); } } 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 new file mode 100644 index 00000000000..a22d58580db --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TagsObject.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network; + +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 9b4141859a7..aac8d9ab797 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,52 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for TransportProtocol. */ -public final class TransportProtocol { +public final class TransportProtocol extends ExpandableStringEnum { /** Static value Udp for TransportProtocol. */ - public static final TransportProtocol UDP = new TransportProtocol("Udp"); + public static final TransportProtocol UDP = fromString("Udp"); /** Static value Tcp for TransportProtocol. */ - public static final TransportProtocol TCP = new TransportProtocol("Tcp"); + public static final TransportProtocol TCP = fromString("Tcp"); - private String value; + /** Static value All for TransportProtocol. */ + public static final TransportProtocol ALL = fromString("All"); /** - * Creates a custom value for TransportProtocol. - * @param value the custom value + * Creates or finds a TransportProtocol from its string representation. + * @param name a name to look for + * @return the corresponding TransportProtocol */ - public TransportProtocol(String value) { - this.value = value; + @JsonCreator + public static TransportProtocol fromString(String name) { + return fromString(name, 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); - } + /** + * @return known TransportProtocol values + */ + public static Collection values() { + return values(TransportProtocol.class); } } 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 349bf23dda2..ebbcb65f05f 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,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VirtualNetworkGatewayConnectionStatus. */ -public final class VirtualNetworkGatewayConnectionStatus { +public final class VirtualNetworkGatewayConnectionStatus extends ExpandableStringEnum { /** Static value Unknown for VirtualNetworkGatewayConnectionStatus. */ - public static final VirtualNetworkGatewayConnectionStatus UNKNOWN = new VirtualNetworkGatewayConnectionStatus("Unknown"); + public static final VirtualNetworkGatewayConnectionStatus UNKNOWN = fromString("Unknown"); /** Static value Connecting for VirtualNetworkGatewayConnectionStatus. */ - public static final VirtualNetworkGatewayConnectionStatus CONNECTING = new VirtualNetworkGatewayConnectionStatus("Connecting"); + public static final VirtualNetworkGatewayConnectionStatus CONNECTING = fromString("Connecting"); /** Static value Connected for VirtualNetworkGatewayConnectionStatus. */ - public static final VirtualNetworkGatewayConnectionStatus CONNECTED = new VirtualNetworkGatewayConnectionStatus("Connected"); + public static final VirtualNetworkGatewayConnectionStatus CONNECTED = fromString("Connected"); /** Static value NotConnected for VirtualNetworkGatewayConnectionStatus. */ - public static final VirtualNetworkGatewayConnectionStatus NOT_CONNECTED = new VirtualNetworkGatewayConnectionStatus("NotConnected"); - - private String value; + public static final VirtualNetworkGatewayConnectionStatus NOT_CONNECTED = fromString("NotConnected"); /** - * Creates a custom value for VirtualNetworkGatewayConnectionStatus. - * @param value the custom value + * Creates or finds a VirtualNetworkGatewayConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewayConnectionStatus */ - public VirtualNetworkGatewayConnectionStatus(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VirtualNetworkGatewayConnectionStatus fromString(String name) { + return fromString(name, VirtualNetworkGatewayConnectionStatus.class); } - @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); - } + /** + * @return known VirtualNetworkGatewayConnectionStatus values + */ + public static Collection values() { + return values(VirtualNetworkGatewayConnectionStatus.class); } } 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 8f87ef1613d..476cddd4096 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,58 +8,40 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VirtualNetworkGatewayConnectionType. */ -public final class VirtualNetworkGatewayConnectionType { +public final class VirtualNetworkGatewayConnectionType extends ExpandableStringEnum { /** Static value IPsec for VirtualNetworkGatewayConnectionType. */ - public static final VirtualNetworkGatewayConnectionType IPSEC = new VirtualNetworkGatewayConnectionType("IPsec"); + public static final VirtualNetworkGatewayConnectionType IPSEC = fromString("IPsec"); /** Static value Vnet2Vnet for VirtualNetworkGatewayConnectionType. */ - public static final VirtualNetworkGatewayConnectionType VNET2VNET = new VirtualNetworkGatewayConnectionType("Vnet2Vnet"); + public static final VirtualNetworkGatewayConnectionType VNET2VNET = fromString("Vnet2Vnet"); /** Static value ExpressRoute for VirtualNetworkGatewayConnectionType. */ - public static final VirtualNetworkGatewayConnectionType EXPRESS_ROUTE = new VirtualNetworkGatewayConnectionType("ExpressRoute"); + public static final VirtualNetworkGatewayConnectionType EXPRESS_ROUTE = fromString("ExpressRoute"); /** Static value VPNClient for VirtualNetworkGatewayConnectionType. */ - public static final VirtualNetworkGatewayConnectionType VPNCLIENT = new VirtualNetworkGatewayConnectionType("VPNClient"); - - private String value; + public static final VirtualNetworkGatewayConnectionType VPNCLIENT = fromString("VPNClient"); /** - * Creates a custom value for VirtualNetworkGatewayConnectionType. - * @param value the custom value + * Creates or finds a VirtualNetworkGatewayConnectionType from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewayConnectionType */ - public VirtualNetworkGatewayConnectionType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VirtualNetworkGatewayConnectionType fromString(String name) { + return fromString(name, VirtualNetworkGatewayConnectionType.class); } - @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); - } + /** + * @return known VirtualNetworkGatewayConnectionType values + */ + public static Collection values() { + return values(VirtualNetworkGatewayConnectionType.class); } } 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 568790fde40..5063df10008 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,67 +8,49 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VirtualNetworkGatewaySkuName. */ -public final class VirtualNetworkGatewaySkuName { +public final class VirtualNetworkGatewaySkuName extends ExpandableStringEnum { /** Static value Basic for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName BASIC = new VirtualNetworkGatewaySkuName("Basic"); + public static final VirtualNetworkGatewaySkuName BASIC = fromString("Basic"); /** Static value HighPerformance for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName HIGH_PERFORMANCE = new VirtualNetworkGatewaySkuName("HighPerformance"); + public static final VirtualNetworkGatewaySkuName HIGH_PERFORMANCE = fromString("HighPerformance"); /** Static value Standard for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName STANDARD = new VirtualNetworkGatewaySkuName("Standard"); + public static final VirtualNetworkGatewaySkuName STANDARD = fromString("Standard"); /** Static value UltraPerformance for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName ULTRA_PERFORMANCE = new VirtualNetworkGatewaySkuName("UltraPerformance"); + public static final VirtualNetworkGatewaySkuName ULTRA_PERFORMANCE = fromString("UltraPerformance"); /** Static value VpnGw1 for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName VPN_GW1 = new VirtualNetworkGatewaySkuName("VpnGw1"); + public static final VirtualNetworkGatewaySkuName VPN_GW1 = fromString("VpnGw1"); /** Static value VpnGw2 for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName VPN_GW2 = new VirtualNetworkGatewaySkuName("VpnGw2"); + public static final VirtualNetworkGatewaySkuName VPN_GW2 = fromString("VpnGw2"); /** Static value VpnGw3 for VirtualNetworkGatewaySkuName. */ - public static final VirtualNetworkGatewaySkuName VPN_GW3 = new VirtualNetworkGatewaySkuName("VpnGw3"); - - private String value; + public static final VirtualNetworkGatewaySkuName VPN_GW3 = fromString("VpnGw3"); /** - * Creates a custom value for VirtualNetworkGatewaySkuName. - * @param value the custom value + * Creates or finds a VirtualNetworkGatewaySkuName from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewaySkuName */ - public VirtualNetworkGatewaySkuName(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VirtualNetworkGatewaySkuName fromString(String name) { + return fromString(name, VirtualNetworkGatewaySkuName.class); } - @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); - } + /** + * @return known VirtualNetworkGatewaySkuName values + */ + public static Collection values() { + return values(VirtualNetworkGatewaySkuName.class); } } 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 11917e628d6..0672fff53ab 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,67 +8,49 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VirtualNetworkGatewaySkuTier. */ -public final class VirtualNetworkGatewaySkuTier { +public final class VirtualNetworkGatewaySkuTier extends ExpandableStringEnum { /** Static value Basic for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier BASIC = new VirtualNetworkGatewaySkuTier("Basic"); + public static final VirtualNetworkGatewaySkuTier BASIC = fromString("Basic"); /** Static value HighPerformance for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier HIGH_PERFORMANCE = new VirtualNetworkGatewaySkuTier("HighPerformance"); + public static final VirtualNetworkGatewaySkuTier HIGH_PERFORMANCE = fromString("HighPerformance"); /** Static value Standard for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier STANDARD = new VirtualNetworkGatewaySkuTier("Standard"); + public static final VirtualNetworkGatewaySkuTier STANDARD = fromString("Standard"); /** Static value UltraPerformance for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier ULTRA_PERFORMANCE = new VirtualNetworkGatewaySkuTier("UltraPerformance"); + public static final VirtualNetworkGatewaySkuTier ULTRA_PERFORMANCE = fromString("UltraPerformance"); /** Static value VpnGw1 for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier VPN_GW1 = new VirtualNetworkGatewaySkuTier("VpnGw1"); + public static final VirtualNetworkGatewaySkuTier VPN_GW1 = fromString("VpnGw1"); /** Static value VpnGw2 for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier VPN_GW2 = new VirtualNetworkGatewaySkuTier("VpnGw2"); + public static final VirtualNetworkGatewaySkuTier VPN_GW2 = fromString("VpnGw2"); /** Static value VpnGw3 for VirtualNetworkGatewaySkuTier. */ - public static final VirtualNetworkGatewaySkuTier VPN_GW3 = new VirtualNetworkGatewaySkuTier("VpnGw3"); - - private String value; + public static final VirtualNetworkGatewaySkuTier VPN_GW3 = fromString("VpnGw3"); /** - * Creates a custom value for VirtualNetworkGatewaySkuTier. - * @param value the custom value + * Creates or finds a VirtualNetworkGatewaySkuTier from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewaySkuTier */ - public VirtualNetworkGatewaySkuTier(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VirtualNetworkGatewaySkuTier fromString(String name) { + return fromString(name, VirtualNetworkGatewaySkuTier.class); } - @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); - } + /** + * @return known VirtualNetworkGatewaySkuTier values + */ + public static Collection values() { + return values(VirtualNetworkGatewaySkuTier.class); } } 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 8dfcac42d67..ffa7be90f28 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VirtualNetworkGatewayType. */ -public final class VirtualNetworkGatewayType { +public final class VirtualNetworkGatewayType extends ExpandableStringEnum { /** Static value Vpn for VirtualNetworkGatewayType. */ - public static final VirtualNetworkGatewayType VPN = new VirtualNetworkGatewayType("Vpn"); + public static final VirtualNetworkGatewayType VPN = fromString("Vpn"); /** Static value ExpressRoute for VirtualNetworkGatewayType. */ - public static final VirtualNetworkGatewayType EXPRESS_ROUTE = new VirtualNetworkGatewayType("ExpressRoute"); - - private String value; + public static final VirtualNetworkGatewayType EXPRESS_ROUTE = fromString("ExpressRoute"); /** - * Creates a custom value for VirtualNetworkGatewayType. - * @param value the custom value + * Creates or finds a VirtualNetworkGatewayType from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkGatewayType */ - public VirtualNetworkGatewayType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VirtualNetworkGatewayType fromString(String name) { + return fromString(name, VirtualNetworkGatewayType.class); } - @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); - } + /** + * @return known VirtualNetworkGatewayType values + */ + public static Collection values() { + return values(VirtualNetworkGatewayType.class); } } 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 9dde89237c2..bcb267dfa83 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,55 +8,37 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VirtualNetworkPeeringState. */ -public final class VirtualNetworkPeeringState { +public final class VirtualNetworkPeeringState extends ExpandableStringEnum { /** Static value Initiated for VirtualNetworkPeeringState. */ - public static final VirtualNetworkPeeringState INITIATED = new VirtualNetworkPeeringState("Initiated"); + public static final VirtualNetworkPeeringState INITIATED = fromString("Initiated"); /** Static value Connected for VirtualNetworkPeeringState. */ - public static final VirtualNetworkPeeringState CONNECTED = new VirtualNetworkPeeringState("Connected"); + public static final VirtualNetworkPeeringState CONNECTED = fromString("Connected"); /** Static value Disconnected for VirtualNetworkPeeringState. */ - public static final VirtualNetworkPeeringState DISCONNECTED = new VirtualNetworkPeeringState("Disconnected"); - - private String value; + public static final VirtualNetworkPeeringState DISCONNECTED = fromString("Disconnected"); /** - * Creates a custom value for VirtualNetworkPeeringState. - * @param value the custom value + * Creates or finds a VirtualNetworkPeeringState from its string representation. + * @param name a name to look for + * @return the corresponding VirtualNetworkPeeringState */ - public VirtualNetworkPeeringState(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VirtualNetworkPeeringState fromString(String name) { + return fromString(name, VirtualNetworkPeeringState.class); } - @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); - } + /** + * @return known VirtualNetworkPeeringState values + */ + public static Collection values() { + return values(VirtualNetworkPeeringState.class); } } 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 0a2d18612b8..0c6f95e17a6 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,6 +42,12 @@ 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. @@ -136,6 +142,26 @@ 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 ba668e8b825..a7fe2adcbb7 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VpnClientProtocol. */ -public final class VpnClientProtocol { +public final class VpnClientProtocol extends ExpandableStringEnum { /** Static value IkeV2 for VpnClientProtocol. */ - public static final VpnClientProtocol IKE_V2 = new VpnClientProtocol("IkeV2"); + public static final VpnClientProtocol IKE_V2 = fromString("IkeV2"); /** Static value SSTP for VpnClientProtocol. */ - public static final VpnClientProtocol SSTP = new VpnClientProtocol("SSTP"); - - private String value; + public static final VpnClientProtocol SSTP = fromString("SSTP"); /** - * Creates a custom value for VpnClientProtocol. - * @param value the custom value + * Creates or finds a VpnClientProtocol from its string representation. + * @param name a name to look for + * @return the corresponding VpnClientProtocol */ - public VpnClientProtocol(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VpnClientProtocol fromString(String name) { + return fromString(name, VpnClientProtocol.class); } - @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); - } + /** + * @return known VpnClientProtocol values + */ + public static Collection values() { + return values(VpnClientProtocol.class); } } 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 2c2ceb07d4f..f1d84d48518 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,52 +8,34 @@ package com.microsoft.azure.management.network; -import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; /** * Defines values for VpnType. */ -public final class VpnType { +public final class VpnType extends ExpandableStringEnum { /** Static value PolicyBased for VpnType. */ - public static final VpnType POLICY_BASED = new VpnType("PolicyBased"); + public static final VpnType POLICY_BASED = fromString("PolicyBased"); /** Static value RouteBased for VpnType. */ - public static final VpnType ROUTE_BASED = new VpnType("RouteBased"); - - private String value; + public static final VpnType ROUTE_BASED = fromString("RouteBased"); /** - * Creates a custom value for VpnType. - * @param value the custom value + * Creates or finds a VpnType from its string representation. + * @param name a name to look for + * @return the corresponding VpnType */ - public VpnType(String value) { - this.value = value; - } - - @JsonValue - @Override - public String toString() { - return value; + @JsonCreator + public static VpnType fromString(String name) { + return fromString(name, VpnType.class); } - @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); - } + /** + * @return known VpnType values + */ + public static Collection values() { + return values(VpnType.class); } } 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 a0c8e765efe..0919888ac9c 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,6 +119,12 @@ 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. */ @@ -138,12 +144,6 @@ 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,6 +453,26 @@ 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. * @@ -513,23 +533,4 @@ 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 54f92882cdf..6d548476f72 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,12 +24,14 @@ 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; @@ -43,7 +45,7 @@ * An instance of this class provides access to all the operations defined * in ApplicationGateways. */ -public class ApplicationGatewaysInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class ApplicationGatewaysInner implements InnerSupportsGet, InnerSupportsDelete { /** The Retrofit service to perform REST calls. */ private ApplicationGatewaysService service; /** The service client containing this operation class. */ @@ -85,13 +87,21 @@ 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 list" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ApplicationGateways listAll" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways") - Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listAll(@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") @@ -137,9 +147,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 listNext" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.ApplicationGateways listAllNext" }) @GET - Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listAllNext(@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 @@ -208,7 +218,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -274,7 +284,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -291,9 +301,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); } @@ -360,7 +370,7 @@ public Observable> getByResourceGroupWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -452,7 +462,7 @@ public Observable> createOrUpdateWithSe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -527,7 +537,7 @@ public Observable> beginCreateOrUpdateW throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -544,7 +554,321 @@ 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), 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); @@ -641,7 +965,7 @@ public Observable>> listByResource if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -671,12 +995,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 list() { - ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + public PagedList listAll() { + ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -688,13 +1012,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + public ServiceFuture> listAllAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), + listAllSinglePageAsync(), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); + return listAllNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -706,8 +1030,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ApplicationGatewayInner> object */ - public Observable> listAsync() { - return listWithServiceResponseAsync() + public Observable> listAllAsync() { + return listAllWithServiceResponseAsync() .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -722,8 +1046,8 @@ public Page call(ServiceResponse>> listWithServiceResponseAsync() { - return listSinglePageAsync() + public Observable>> listAllWithServiceResponseAsync() { + return listAllSinglePageAsync() .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -731,7 +1055,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -742,17 +1066,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>> listSinglePageAsync() { + public Observable>> listAllSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; - return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + final String apiVersion = "2018-04-01"; + return service.listAll(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); + ServiceResponse> result = listAllDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -761,7 +1085,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -829,7 +1153,7 @@ public Observable> startWithServiceResponseAsync(String re if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -895,7 +1219,7 @@ public Observable> beginStartWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginStart(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -979,7 +1303,7 @@ public Observable> stopWithServiceResponseAsync(String res if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -1045,7 +1369,7 @@ public Observable> beginStopWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginStop(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1130,7 +1454,7 @@ public Observable> backend if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; 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()); @@ -1201,7 +1525,7 @@ public Observable> backend if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -1268,7 +1592,7 @@ public Observable> beginBa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.beginBackendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1350,7 +1674,7 @@ public Observable> beginBa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginBackendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1421,7 +1745,7 @@ public Observable, Observable>>() { @Override @@ -1491,7 +1815,7 @@ public Observable> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listAvailableSslOptions(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1596,7 +1920,7 @@ public Observable, Observable>>>() { @Override @@ -1673,7 +1997,7 @@ public Observable> g if (predefinedPolicyName == null) { throw new IllegalArgumentException("Parameter predefinedPolicyName is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getSslPredefinedPolicy(this.client.subscriptionId(), predefinedPolicyName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1815,12 +2139,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 listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listAllNext(final String nextPageLink) { + ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -1834,13 +2158,13 @@ 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> listAllNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), + listAllNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); + return listAllNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -1853,8 +2177,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ApplicationGatewayInner> object */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) + public Observable> listAllNextAsync(final String nextPageLink) { + return listAllNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1870,8 +2194,8 @@ public Page call(ServiceResponse>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) + public Observable>> listAllNextWithServiceResponseAsync(final String nextPageLink) { + return listAllNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1879,7 +2203,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -1891,17 +2215,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>> listNextSinglePageAsync(final String nextPageLink) { + public Observable>> listAllNextSinglePageAsync(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()) + return service.listAllNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listNextDelegate(response); + ServiceResponse> result = listAllNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1910,7 +2234,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listAllNextDelegate(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 new file mode 100644 index 00000000000..6bf08b666f0 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupInner.java @@ -0,0 +1,68 @@ +/** + * 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 new file mode 100644 index 00000000000..54944074465 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupsInner.java @@ -0,0 +1,948 @@ +/** + * 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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.delete(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.beginDelete(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.getByResourceGroup(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), parameters, 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.beginCreateOrUpdate(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), parameters, 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."); + } + final String apiVersion = "2018-04-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); + } + + /** + * 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."); + } + final String apiVersion = "2018-04-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); + } + + /** + * 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 new file mode 100644 index 00000000000..4cdc5368f72 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableEndpointServicesInner.java @@ -0,0 +1,293 @@ +/** + * 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."); + } + final String apiVersion = "2018-04-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) { + 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 new file mode 100644 index 00000000000..214a415d5f7 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListInner.java @@ -0,0 +1,45 @@ +/** + * 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 new file mode 100644 index 00000000000..fd4bebfa759 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableProvidersListParametersInner.java @@ -0,0 +1,122 @@ +/** + * 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 new file mode 100644 index 00000000000..35d0d33ce38 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportInner.java @@ -0,0 +1,99 @@ +/** + * 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 new file mode 100644 index 00000000000..95f5a03be4c --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AzureReachabilityReportParametersInner.java @@ -0,0 +1,150 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.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 fe3a584896e..567d0cbddc0 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,7 +149,7 @@ public Observable>> listSinglePag if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, 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/ConnectionMonitorInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorInner.java new file mode 100644 index 00000000000..a7e5a421440 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorInner.java @@ -0,0 +1,179 @@ +/** + * 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 new file mode 100644 index 00000000000..f9811c3f7aa --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorQueryResultInner.java @@ -0,0 +1,73 @@ +/** + * 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.ConnectionMonitorSourceStatus; +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 { + /** + * Status of connection monitor source. Possible values include: 'Uknown', + * 'Active', 'Inactive'. + */ + @JsonProperty(value = "sourceStatus") + private ConnectionMonitorSourceStatus sourceStatus; + + /** + * Information about connection states. + */ + @JsonProperty(value = "states") + private List states; + + /** + * Get the sourceStatus value. + * + * @return the sourceStatus value + */ + public ConnectionMonitorSourceStatus sourceStatus() { + return this.sourceStatus; + } + + /** + * Set the sourceStatus value. + * + * @param sourceStatus the sourceStatus value to set + * @return the ConnectionMonitorQueryResultInner object itself. + */ + public ConnectionMonitorQueryResultInner withSourceStatus(ConnectionMonitorSourceStatus sourceStatus) { + this.sourceStatus = sourceStatus; + 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 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 new file mode 100644 index 00000000000..42139055d41 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorResultInner.java @@ -0,0 +1,331 @@ +/** + * 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 new file mode 100644 index 00000000000..520101d14db --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorsInner.java @@ -0,0 +1,1126 @@ +/** + * 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, 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."); + } + final String apiVersion = "2018-04-01"; + return service.get(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.delete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.beginDelete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.stop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.start(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.query(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-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) { + 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/ConnectivityParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectivityParametersInner.java index e0742f8b55e..b85e7952ee0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectivityParametersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectivityParametersInner.java @@ -10,6 +10,8 @@ import com.microsoft.azure.management.network.ConnectivitySource; import com.microsoft.azure.management.network.ConnectivityDestination; +import com.microsoft.azure.management.network.Protocol; +import com.microsoft.azure.management.network.ProtocolConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -28,6 +30,19 @@ public class ConnectivityParametersInner { @JsonProperty(value = "destination", required = true) private ConnectivityDestination destination; + /** + * Network protocol. Possible values include: 'Tcp', 'Http', 'Https', + * 'Icmp'. + */ + @JsonProperty(value = "protocol") + private Protocol protocol; + + /** + * The protocolConfiguration property. + */ + @JsonProperty(value = "protocolConfiguration") + private ProtocolConfiguration protocolConfiguration; + /** * Get the source value. * @@ -68,4 +83,44 @@ public ConnectivityParametersInner withDestination(ConnectivityDestination desti return this; } + /** + * Get the protocol value. + * + * @return the protocol value + */ + public Protocol protocol() { + return this.protocol; + } + + /** + * Set the protocol value. + * + * @param protocol the protocol value to set + * @return the ConnectivityParametersInner object itself. + */ + public ConnectivityParametersInner withProtocol(Protocol protocol) { + this.protocol = protocol; + return this; + } + + /** + * Get the protocolConfiguration value. + * + * @return the protocolConfiguration value + */ + public ProtocolConfiguration protocolConfiguration() { + return this.protocolConfiguration; + } + + /** + * Set the protocolConfiguration value. + * + * @param protocolConfiguration the protocolConfiguration value to set + * @return the ConnectivityParametersInner object itself. + */ + public ConnectivityParametersInner withProtocolConfiguration(ProtocolConfiguration protocolConfiguration) { + this.protocolConfiguration = protocolConfiguration; + return this; + } + } 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 new file mode 100644 index 00000000000..126630a932a --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlanInner.java @@ -0,0 +1,183 @@ +/** + * 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 java.util.List; +import com.microsoft.azure.SubResource; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * A DDoS protection plan in a resource group. + */ +@JsonFlatten +public class DdosProtectionPlanInner { + /** + * Resource ID. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Resource name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Resource location. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Resource tags. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * 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 id value. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * 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; + } + + /** + * 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 DdosProtectionPlanInner object itself. + */ + public DdosProtectionPlanInner 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 DdosProtectionPlanInner object itself. + */ + public DdosProtectionPlanInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * 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 new file mode 100644 index 00000000000..86d9ce2de88 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java @@ -0,0 +1,948 @@ +/** + * 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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.delete(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.beginDelete(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.getByResourceGroup(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), parameters, 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.beginCreateOrUpdate(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), parameters, 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."); + } + final String apiVersion = "2018-04-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); + } + + /** + * 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."); + } + final String apiVersion = "2018-04-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); + } + + /** + * 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 dbd80a3c090..eee7453ba2a 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,7 +170,7 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceResponseAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName, this.client.subscriptionId(), apiVersion, 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/EffectiveNetworkSecurityGroupListResultInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveNetworkSecurityGroupListResultInner.java new file mode 100644 index 00000000000..58f04f21ba4 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveNetworkSecurityGroupListResultInner.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.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 new file mode 100644 index 00000000000..25c973b549b --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EffectiveRouteListResultInner.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.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 new file mode 100644 index 00000000000..c7b4153c32b --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/EndpointServiceResultInner.java @@ -0,0 +1,48 @@ +/** + * 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 834fc180572..009eb0b3a32 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,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -249,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(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -325,7 +325,7 @@ public Observable> getWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> create throw new IllegalArgumentException("Parameter authorizationParameters is required and cannot be null."); } Validator.validate(authorizationParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -506,7 +506,7 @@ public Observable> beginC throw new IllegalArgumentException("Parameter authorizationParameters is required and cannot be null."); } Validator.validate(authorizationParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), authorizationParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -523,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(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -628,7 +628,7 @@ public Observable>> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, 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/ExpressRouteCircuitConnectionInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionInner.java new file mode 100644 index 00000000000..e7e790b0f3c --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionInner.java @@ -0,0 +1,202 @@ +/** + * 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 new file mode 100644 index 00000000000..9f4c16c01d5 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionsInner.java @@ -0,0 +1,553 @@ +/** + * 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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.delete(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.beginDelete(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.get(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), 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."); + } + Validator.validate(expressRouteCircuitConnectionParameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), expressRouteCircuitConnectionParameters, 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."); + } + Validator.validate(expressRouteCircuitConnectionParameters); + final String apiVersion = "2018-04-01"; + return service.beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), expressRouteCircuitConnectionParameters, 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 fd34cb65d3c..d7d61f33669 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,10 +8,11 @@ package com.microsoft.azure.management.network.implementation; -import com.microsoft.azure.management.network.ExpressRouteCircuitPeeringType; -import com.microsoft.azure.management.network.ExpressRouteCircuitPeeringState; +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 java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.SubResource; @@ -22,19 +23,17 @@ @JsonFlatten public class ExpressRouteCircuitPeeringInner extends SubResource { /** - * The PeeringType. Possible values are: 'AzurePublicPeering', - * 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: - * 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'. + * The peering type. Possible values include: 'AzurePublicPeering', + * 'AzurePrivatePeering', 'MicrosoftPeering'. */ @JsonProperty(value = "properties.peeringType") - private ExpressRouteCircuitPeeringType peeringType; + private ExpressRoutePeeringType peeringType; /** - * The state of peering. Possible values are: 'Disabled' and 'Enabled'. - * Possible values include: 'Disabled', 'Enabled'. + * The peering state. Possible values include: 'Disabled', 'Enabled'. */ @JsonProperty(value = "properties.state") - private ExpressRouteCircuitPeeringState state; + private ExpressRoutePeeringState state; /** * The Azure ASN. @@ -46,7 +45,7 @@ public class ExpressRouteCircuitPeeringInner extends SubResource { * The peer ASN. */ @JsonProperty(value = "properties.peerASN") - private Integer peerASN; + private Long peerASN; /** * The primary address prefix. @@ -127,6 +126,13 @@ 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. @@ -145,7 +151,7 @@ public class ExpressRouteCircuitPeeringInner extends SubResource { * * @return the peeringType value */ - public ExpressRouteCircuitPeeringType peeringType() { + public ExpressRoutePeeringType peeringType() { return this.peeringType; } @@ -155,7 +161,7 @@ public ExpressRouteCircuitPeeringType peeringType() { * @param peeringType the peeringType value to set * @return the ExpressRouteCircuitPeeringInner object itself. */ - public ExpressRouteCircuitPeeringInner withPeeringType(ExpressRouteCircuitPeeringType peeringType) { + public ExpressRouteCircuitPeeringInner withPeeringType(ExpressRoutePeeringType peeringType) { this.peeringType = peeringType; return this; } @@ -165,7 +171,7 @@ public ExpressRouteCircuitPeeringInner withPeeringType(ExpressRouteCircuitPeerin * * @return the state value */ - public ExpressRouteCircuitPeeringState state() { + public ExpressRoutePeeringState state() { return this.state; } @@ -175,7 +181,7 @@ public ExpressRouteCircuitPeeringState state() { * @param state the state value to set * @return the ExpressRouteCircuitPeeringInner object itself. */ - public ExpressRouteCircuitPeeringInner withState(ExpressRouteCircuitPeeringState state) { + public ExpressRouteCircuitPeeringInner withState(ExpressRoutePeeringState state) { this.state = state; return this; } @@ -205,7 +211,7 @@ public ExpressRouteCircuitPeeringInner withAzureASN(Integer azureASN) { * * @return the peerASN value */ - public Integer peerASN() { + public Long peerASN() { return this.peerASN; } @@ -215,7 +221,7 @@ public Integer peerASN() { * @param peerASN the peerASN value to set * @return the ExpressRouteCircuitPeeringInner object itself. */ - public ExpressRouteCircuitPeeringInner withPeerASN(Integer peerASN) { + public ExpressRouteCircuitPeeringInner withPeerASN(Long peerASN) { this.peerASN = peerASN; return this; } @@ -480,6 +486,26 @@ 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 61438136da2..303fa7e0dae 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,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -325,7 +325,7 @@ public Observable> getWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> createOrUpda throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); } Validator.validate(peeringParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -506,7 +506,7 @@ public Observable> beginCreateO throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); } Validator.validate(peeringParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> listSi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, 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/ExpressRouteCircuitsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsInner.java index 097da17a6a9..d690ea33067 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,6 +16,7 @@ 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,12 +25,14 @@ 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; @@ -85,6 +88,14 @@ 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); @@ -196,7 +207,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -262,7 +273,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -279,9 +290,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(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -348,7 +359,7 @@ public Observable> getByResourceGroupW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -440,7 +451,7 @@ public Observable> createOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -515,7 +526,7 @@ public Observable> beginCreateOrUpdate throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, circuitName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -532,7 +543,321 @@ 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, circuitName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, circuitName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, circuitName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, circuitName, this.client.subscriptionId(), 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); @@ -614,7 +939,7 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -695,7 +1020,7 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginListArpTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -794,7 +1119,7 @@ public 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()); } @@ -875,7 +1200,7 @@ public Observable, Observable>>() { @Override @@ -974,7 +1299,7 @@ public 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()); } @@ -1055,7 +1380,7 @@ public Observable, Observable>>() { @Override @@ -1140,7 +1465,7 @@ public Observable> getStatsWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getStats(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1231,7 +1556,7 @@ public Observable> getPeeringStat if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getPeeringStats(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1344,7 +1669,7 @@ public Observable>> listByResourc if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1449,7 +1774,7 @@ public Observable>> listSinglePag if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, 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/ExpressRouteCrossConnectionInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionInner.java new file mode 100644 index 00000000000..55dedf05b0c --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionInner.java @@ -0,0 +1,259 @@ +/** + * 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") + private String peeringLocation; + + /** + * The circuit bandwidth In Mbps. + */ + @JsonProperty(value = "properties.bandwidthInMbps") + private Integer bandwidthInMbps; + + /** + * The ExpressRouteCircuit. + */ + @JsonProperty(value = "properties.expressRouteCircuit") + 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; + } + + /** + * Set the peeringLocation value. + * + * @param peeringLocation the peeringLocation value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withPeeringLocation(String peeringLocation) { + this.peeringLocation = peeringLocation; + return this; + } + + /** + * Get the bandwidthInMbps value. + * + * @return the bandwidthInMbps value + */ + public Integer bandwidthInMbps() { + return this.bandwidthInMbps; + } + + /** + * Set the bandwidthInMbps value. + * + * @param bandwidthInMbps the bandwidthInMbps value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withBandwidthInMbps(Integer bandwidthInMbps) { + this.bandwidthInMbps = bandwidthInMbps; + return this; + } + + /** + * Get the expressRouteCircuit value. + * + * @return the expressRouteCircuit value + */ + public ExpressRouteCircuitReference expressRouteCircuit() { + return this.expressRouteCircuit; + } + + /** + * Set the expressRouteCircuit value. + * + * @param expressRouteCircuit the expressRouteCircuit value to set + * @return the ExpressRouteCrossConnectionInner object itself. + */ + public ExpressRouteCrossConnectionInner withExpressRouteCircuit(ExpressRouteCircuitReference expressRouteCircuit) { + this.expressRouteCircuit = expressRouteCircuit; + return this; + } + + /** + * 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 new file mode 100644 index 00000000000..6fa0a12eb6f --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringInner.java @@ -0,0 +1,414 @@ +/** + * 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") + 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; + } + + /** + * Set the gatewayManagerEtag value. + * + * @param gatewayManagerEtag the gatewayManagerEtag value to set + * @return the ExpressRouteCrossConnectionPeeringInner object itself. + */ + public ExpressRouteCrossConnectionPeeringInner withGatewayManagerEtag(String gatewayManagerEtag) { + this.gatewayManagerEtag = gatewayManagerEtag; + return this; + } + + /** + * 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 new file mode 100644 index 00000000000..7a8d3fecc55 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java @@ -0,0 +1,764 @@ +/** + * 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."); + } + final String apiVersion = "2018-04-01"; + return service.list(resourceGroupName, crossConnectionName, 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); + } + + /** + * 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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.delete(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.beginDelete(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.get(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), 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."); + } + Validator.validate(peeringParameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), peeringParameters, 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."); + } + Validator.validate(peeringParameters); + final String apiVersion = "2018-04-01"; + return service.beginCreateOrUpdate(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), peeringParameters, 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 new file mode 100644 index 00000000000..3a90e9302aa --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java @@ -0,0 +1,1676 @@ +/** + * 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."); + } + final String apiVersion = "2018-04-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); + } + + /** + * 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."); + } + final String apiVersion = "2018-04-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); + } + + /** + * 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."); + } + final String apiVersion = "2018-04-01"; + return service.getByResourceGroup(resourceGroupName, crossConnectionName, this.client.subscriptionId(), 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.createOrUpdate(resourceGroupName, crossConnectionName, this.client.subscriptionId(), parameters, 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.beginCreateOrUpdate(resourceGroupName, crossConnectionName, this.client.subscriptionId(), parameters, 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject crossConnectionParameters = new TagsObject(); + crossConnectionParameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject crossConnectionParameters = new TagsObject(); + crossConnectionParameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject crossConnectionParameters = new TagsObject(); + crossConnectionParameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject crossConnectionParameters = new TagsObject(); + crossConnectionParameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.listArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.beginListArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.listRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.beginListRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.listRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + return service.beginListRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), 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 new file mode 100644 index 00000000000..19ecefe1632 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner.java @@ -0,0 +1,61 @@ +/** + * 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/ExpressRouteServiceProvidersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProvidersInner.java index f3125b16d4a..66a699b65a3 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,7 +149,7 @@ public Observable>> listS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, 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/FrontendIPConfigurationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java index 7542115f9dc..418aa258671 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 SubResource subnet; + private SubnetInner subnet; /** * The reference of the Public IP resource. */ @JsonProperty(value = "properties.publicIPAddress") - private SubResource publicIPAddress; + private PublicIPAddressInner publicIPAddress; /** * Gets the provisioning state of the public IP resource. Possible values @@ -75,13 +75,6 @@ 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. @@ -95,6 +88,13 @@ 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 SubResource subnet() { + public SubnetInner subnet() { return this.subnet; } @@ -186,7 +186,7 @@ public SubResource subnet() { * @param subnet the subnet value to set * @return the FrontendIPConfigurationInner object itself. */ - public FrontendIPConfigurationInner withSubnet(SubResource subnet) { + public FrontendIPConfigurationInner withSubnet(SubnetInner subnet) { this.subnet = subnet; return this; } @@ -196,7 +196,7 @@ public FrontendIPConfigurationInner withSubnet(SubResource subnet) { * * @return the publicIPAddress value */ - public SubResource publicIPAddress() { + public PublicIPAddressInner publicIPAddress() { return this.publicIPAddress; } @@ -206,7 +206,7 @@ public SubResource publicIPAddress() { * @param publicIPAddress the publicIPAddress value to set * @return the FrontendIPConfigurationInner object itself. */ - public FrontendIPConfigurationInner withPublicIPAddress(SubResource publicIPAddress) { + public FrontendIPConfigurationInner withPublicIPAddress(PublicIPAddressInner publicIPAddress) { this.publicIPAddress = publicIPAddress; return this; } @@ -231,26 +231,6 @@ 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. * @@ -291,4 +271,24 @@ 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 a9ee803c898..47411a67475 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,8 +25,7 @@ public class InboundNatPoolInner extends SubResource { private SubResource frontendIPConfiguration; /** - * The transport protocol for the endpoint. Possible values are: 'Udp' or - * 'Tcp'. Possible values include: 'Udp', 'Tcp'. + * Possible values include: 'Udp', 'Tcp', 'All'. */ @JsonProperty(value = "properties.protocol", required = true) private TransportProtocol protocol; @@ -54,6 +53,23 @@ 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'. @@ -174,6 +190,46 @@ 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 20fcfc9766a..07fba4b35af 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,14 +33,13 @@ public class InboundNatRuleInner extends SubResource { private NetworkInterfaceIPConfigurationInner backendIPConfiguration; /** - * The transport protocol for the endpoint. Possible values are: 'Udp' or - * 'Tcp'. Possible values include: 'Udp', 'Tcp'. + * Possible values include: 'Udp', 'Tcp', 'All'. */ @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 3eb83f8253e..39ade7c5f21 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,7 +190,7 @@ public Observable>> listSinglePageAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -280,7 +280,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -353,7 +353,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -370,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(204, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -446,7 +446,7 @@ public Observable> getWithServiceResponseAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.get(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -535,7 +535,7 @@ public Observable> getWithServiceResponseAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -634,7 +634,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter inboundNatRuleParameters is required and cannot be null."); } Validator.validate(inboundNatRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -716,7 +716,7 @@ public Observable> beginCreateOrUpdateWithS throw new IllegalArgumentException("Parameter inboundNatRuleParameters is required and cannot be null."); } Validator.validate(inboundNatRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), inboundNatRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -733,8 +733,8 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) .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/LoadBalancerBackendAddressPoolsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerBackendAddressPoolsInner.java index 947e559171b..f2c932fce3a 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,7 +170,7 @@ public Observable>> listSinglePage if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceRespon if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, loadBalancerName, backendAddressPoolName, this.client.subscriptionId(), apiVersion, 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/LoadBalancerFrontendIPConfigurationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerFrontendIPConfigurationsInner.java index e59db9a3f1e..995d01cce6d 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,7 +170,7 @@ public Observable>> listSingl if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, loadBalancerName, frontendIPConfigurationName, this.client.subscriptionId(), apiVersion, 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/LoadBalancerInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerInner.java index e691a8e12ce..a0c114263a2 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,13 +99,6 @@ 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. * @@ -326,24 +319,4 @@ 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 7cf2a722173..33f05b5f887 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,7 +170,7 @@ public Observable>> listSinglePageA if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceRespons if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, loadBalancerName, loadBalancingRuleName, this.client.subscriptionId(), apiVersion, 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/LoadBalancerNetworkInterfacesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerNetworkInterfacesInner.java index 1224a54b02c..76dad7fd5a8 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,7 +165,7 @@ public Observable>> listSinglePageAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, 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/LoadBalancerProbesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerProbesInner.java index b1890507fa8..5e269a3b21f 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,7 +170,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, loadBalancerName, probeName, this.client.subscriptionId(), apiVersion, 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/LoadBalancersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java index e0afbcadfb0..5ea1f17cec2 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,6 +16,7 @@ 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,12 +25,14 @@ 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; @@ -84,6 +87,14 @@ 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); @@ -163,7 +174,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -229,7 +240,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -246,9 +257,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(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -315,7 +326,7 @@ public Observable> getByResourceGroupWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -397,7 +408,7 @@ public Observable> getByResourceGroupWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -489,7 +500,7 @@ public Observable> createOrUpdateWithServiceR throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -564,7 +575,7 @@ public Observable> beginCreateOrUpdateWithSer throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, loadBalancerName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -581,7 +592,321 @@ 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), 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); @@ -670,7 +995,7 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -783,7 +1108,7 @@ public Observable>> listByResourceGroupS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, 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/LoadBalancingRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleInner.java index 068382ae7ea..323e48c4e1c 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,8 +40,7 @@ public class LoadBalancingRuleInner extends SubResource { private SubResource probe; /** - * The transport protocol for the external endpoint. Possible values are - * 'Udp' or 'Tcp'. Possible values include: 'Udp', 'Tcp'. + * Possible values include: 'Udp', 'Tcp', 'All'. */ @JsonProperty(value = "properties.protocol", required = true) private TransportProtocol protocol; @@ -55,16 +54,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 1 and - * 65534. + * 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". */ @JsonProperty(value = "properties.frontendPort", required = true) private int frontendPort; /** * The port used for internal connections on the endpoint. Acceptable - * values are between 1 and 65535. + * values are between 0 and 65535. Note that value 0 enables "Any Port". */ @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 04b8b7dc3f2..0decf765c48 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,6 +15,7 @@ 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; @@ -23,12 +24,14 @@ 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; @@ -83,6 +86,14 @@ 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); @@ -163,7 +174,7 @@ public Observable> createOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -238,7 +249,7 @@ public Observable> beginCreateOrUpdate throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -255,8 +266,8 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -323,7 +334,7 @@ public Observable> getByResourceGroupW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -406,7 +417,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -472,7 +483,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -489,9 +500,323 @@ 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), 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); } @@ -587,7 +912,7 @@ public Observable>> listByResourc if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, 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/NetworkInterfaceIPConfigurationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java index bed19881641..2036b712338 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,7 +77,13 @@ public class NetworkInterfaceIPConfigurationInner extends SubResource { * Public IP address bound to the IP configuration. */ @JsonProperty(value = "properties.publicIPAddress") - private SubResource publicIPAddress; + private PublicIPAddressInner publicIPAddress; + + /** + * Application security groups in which the IP configuration is included. + */ + @JsonProperty(value = "properties.applicationSecurityGroups") + private List applicationSecurityGroups; /** * The provisioning state of the network interface IP configuration. @@ -264,7 +270,7 @@ public NetworkInterfaceIPConfigurationInner withPrimary(Boolean primary) { * * @return the publicIPAddress value */ - public SubResource publicIPAddress() { + public PublicIPAddressInner publicIPAddress() { return this.publicIPAddress; } @@ -274,11 +280,31 @@ public SubResource publicIPAddress() { * @param publicIPAddress the publicIPAddress value to set * @return the NetworkInterfaceIPConfigurationInner object itself. */ - public NetworkInterfaceIPConfigurationInner withPublicIPAddress(SubResource publicIPAddress) { + public NetworkInterfaceIPConfigurationInner withPublicIPAddress(PublicIPAddressInner 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 7b2885e8974..48e2989989c 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,7 +170,7 @@ public Observable>> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, 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/NetworkInterfaceInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java index 52602144686..1ccf033da22 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 SubResource networkSecurityGroup; + private NetworkSecurityGroupInner networkSecurityGroup; /** * A list of IPConfigurations of the network interface. @@ -112,7 +112,7 @@ public NetworkInterfaceInner withVirtualMachine(SubResource virtualMachine) { * * @return the networkSecurityGroup value */ - public SubResource networkSecurityGroup() { + public NetworkSecurityGroupInner networkSecurityGroup() { return this.networkSecurityGroup; } @@ -122,7 +122,7 @@ public SubResource networkSecurityGroup() { * @param networkSecurityGroup the networkSecurityGroup value to set * @return the NetworkInterfaceInner object itself. */ - public NetworkInterfaceInner withNetworkSecurityGroup(SubResource networkSecurityGroup) { + public NetworkInterfaceInner withNetworkSecurityGroup(NetworkSecurityGroupInner 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 edc87040448..0e7855e2d9d 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 { } /** - * Get all load balancers in a network interface. + * List 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) { } /** - * Get all load balancers in a network interface. + * List 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 } /** - * Get all load balancers in a network interface. + * List 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 } /** - * Get all load balancers in a network interface. + * List 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 } /** - * Get all load balancers in a network interface. + * List 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,7 +165,7 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -188,7 +188,7 @@ private ServiceResponse> listDelegate(Response nextPage(String nextPageLink) { } /** - * Get all load balancers in a network interface. + * List 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 @@ -228,7 +228,7 @@ public Observable>> call(String nextPage } /** - * Get all load balancers in a network interface. + * List 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 @@ -245,7 +245,7 @@ public Page call(ServiceResponse> res } /** - * Get all load balancers in a network interface. + * List 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 @@ -266,7 +266,7 @@ public Observable>> call(ServiceResponse } /** - * Get all load balancers in a network interface. + * List 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 fe2aae7bb84..3341a83a146 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,6 +16,7 @@ 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,12 +25,14 @@ 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; @@ -85,6 +88,14 @@ 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); @@ -121,6 +132,14 @@ 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); @@ -129,22 +148,6 @@ 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); @@ -153,6 +156,10 @@ 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); + } /** @@ -216,7 +223,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -282,7 +289,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -299,9 +306,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(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -368,7 +375,7 @@ public Observable> getByResourceGroupWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -450,7 +457,7 @@ public Observable> getByResourceGroupWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -542,7 +549,7 @@ public Observable> createOrUpdateWithServ throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -617,7 +624,7 @@ public Observable> beginCreateOrUpdateWit throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -634,252 +641,171 @@ public Observable> call(Response beginCreateOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Gets all network interfaces in a subscription. + * Updates a network interface tags. * + * @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 NetworkInterfaceInner 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(); - } - }; + public NetworkInterfaceInner updateTags(String resourceGroupName, String networkInterfaceName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body(); } /** - * Gets all network interfaces in a subscription. + * Updates a network interface tags. * + * @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) { - return AzureServiceFuture.fromPageResponse( - listSinglePageAsync(), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * Gets all network interfaces in a subscription. - * - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object - */ - public Observable> listAsync() { - return listWithServiceResponseAsync() - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + public ServiceFuture updateTagsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); } /** - * Gets all network interfaces in a subscription. + * Updates a network interface tags. * + * @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 for the request */ - 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)); - } - }); + public Observable updateTagsAsync(String resourceGroupName, String networkInterfaceName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); } /** - * Gets all network interfaces in a subscription. + * Updates a network interface tags. * + * @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 PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable for the request */ - public Observable>> listSinglePageAsync() { + 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."); + } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - 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); + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } - /** - * Gets all network interfaces in a resource group. + * 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 * @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 NetworkInterfaceInner 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(); - } - }; + public NetworkInterfaceInner updateTags(String resourceGroupName, String networkInterfaceName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags).toBlocking().last().body(); } /** - * Gets all network interfaces in a resource group. + * 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> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); + public ServiceFuture updateTagsAsync(String resourceGroupName, String networkInterfaceName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName, tags), serviceCallback); } /** - * Gets all network interfaces in a resource group. + * 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 PagedList<NetworkInterfaceInner> object + * @return the observable for the request */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + 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(); + } + }); } /** - * Gets all network interfaces in a resource group. + * 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 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. + * @return the observable for the request */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + public Observable> updateTagsWithServiceResponseAsync(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."); } - 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); + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** - * Gets all route tables applied to a network interface. + * Updates a network interface tags. * * @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<EffectiveRouteInner> object if successful. + * @return the NetworkInterfaceInner object if successful. */ - 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(); - } - }; + public NetworkInterfaceInner beginUpdateTags(String resourceGroupName, String networkInterfaceName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); } /** - * Gets all route tables applied to a network interface. + * Updates a network interface tags. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. @@ -887,67 +813,36 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - 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); + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); } /** - * Gets all route tables applied to a network interface. + * Updates a network interface tags. * * @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<EffectiveRouteInner> object + * @return the observable to the NetworkInterfaceInner object */ - 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(); - } - }); + public Observable beginUpdateTagsAsync(String resourceGroupName, String networkInterfaceName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, NetworkInterfaceInner>() { + @Override + public NetworkInterfaceInner call(ServiceResponse response) { + return response.body(); + } + }); } /** - * Gets all route tables applied to a network interface. + * Updates a network interface tags. * * @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<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. + * @return the observable to the NetworkInterfaceInner object */ - public Observable>> getEffectiveRouteTableSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -957,14 +852,17 @@ public Observable>> getEffectiveRouteT if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - 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>>>() { + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getEffectiveRouteTableDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -972,121 +870,188 @@ public Observable>> call(Response> 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 route tables applied to a network interface. + * 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 * @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<EffectiveRouteInner> object if successful. + * @return the NetworkInterfaceInner object if successful. */ - 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 beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public NetworkInterfaceInner beginUpdateTags(String resourceGroupName, String networkInterfaceName, Map 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(); } - }; + }); } /** - * Gets all route tables applied to a network interface. + * 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), 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 network interfaces 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<NetworkInterfaceInner> 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 network interfaces 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> beginGetEffectiveRouteTableAsync(final String resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - beginGetEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName), - new Func1>>>() { + listSinglePageAsync(), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return beginGetEffectiveRouteTableNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all route tables applied to a network interface. + * 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 to the PagedList<EffectiveRouteInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable> beginGetEffectiveRouteTableAsync(final String resourceGroupName, final String networkInterfaceName) { - return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName) - .map(new Func1>, Page>() { + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all route tables applied to a network interface. + * 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 to the PagedList<EffectiveRouteInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable>> beginGetEffectiveRouteTableWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { - return beginGetEffectiveRouteTableSinglePageAsync(resourceGroupName, networkInterfaceName) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .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(beginGetEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all route tables applied to a network interface. + * Gets all network interfaces in a subscription. * - 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. + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. */ - 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."); - } + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - 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>>>() { + final String apiVersion = "2018-04-01"; + return service.list(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 = beginGetEffectiveRouteTableDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1094,104 +1059,179 @@ public Observable>> call(Response> 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()) + 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 network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * * @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<EffectiveNetworkSecurityGroupInner> object if successful. + * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listEffectiveNetworkSecurityGroups(final String resourceGroupName, final String networkInterfaceName) { - ServiceResponse> response = listEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); - return new PagedList(response.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 listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network security groups applied to a network interface. + * 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 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> listEffectiveNetworkSecurityGroupsAsync(final String resourceGroupName, final String networkInterfaceName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName), - new Func1>>>() { + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * * @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<EffectiveNetworkSecurityGroupInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable> listEffectiveNetworkSecurityGroupsAsync(final String resourceGroupName, final String networkInterfaceName) { - return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName) - .map(new Func1>, Page>() { + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * * @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<EffectiveNetworkSecurityGroupInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable>> listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(final String resourceGroupName, final String networkInterfaceName) { - return listEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName) - .concatMap(new Func1>, Observable>>>() { + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .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(listEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network security groups applied to a network interface. + * 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."); + } + final String apiVersion = "2018-04-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); + } + + /** + * 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. * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param networkInterfaceName The name of the 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 PagedList<EffectiveNetworkSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. + * @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>> listEffectiveNetworkSecurityGroupsSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { + public Observable> getEffectiveRouteTableWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1201,14 +1241,81 @@ public Observable>> lis if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - 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>>>() { + final String apiVersion = "2018-04-01"; + Observable> observable = service.getEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), 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. + * + * @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> beginGetEffectiveRouteTableWithServiceResponseAsync(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."); + } + final String apiVersion = "2018-04-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 = listEffectiveNetworkSecurityGroupsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse clientResponse = beginGetEffectiveRouteTableDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -1216,9 +1323,9 @@ public Observable>> cal }); } - 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()) + private ServiceResponse beginGetEffectiveRouteTableDelegate(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); @@ -1232,16 +1339,10 @@ private ServiceResponse> listEffect * @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<EffectiveNetworkSecurityGroupInner> object if successful. + * @return the EffectiveNetworkSecurityGroupListResultInner object if successful. */ - public PagedList beginListEffectiveNetworkSecurityGroups(final String resourceGroupName, final String networkInterfaceName) { - ServiceResponse> response = beginListEffectiveNetworkSecurityGroupsSinglePageAsync(resourceGroupName, networkInterfaceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; + public EffectiveNetworkSecurityGroupListResultInner listEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) { + return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().body(); } /** @@ -1253,16 +1354,62 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - 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); + 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>() { + @Override + public EffectiveNetworkSecurityGroupListResultInner call(ServiceResponse response) { + return response.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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.listEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * 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 EffectiveNetworkSecurityGroupListResultInner object if successful. + */ + public EffectiveNetworkSecurityGroupListResultInner beginListEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) { + return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().body(); } /** @@ -1270,17 +1417,12 @@ public Observable>> cal * * @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 observable to the PagedList<EffectiveNetworkSecurityGroupInner> object + * @return the {@link ServiceFuture} object */ - 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(); - } - }); + public ServiceFuture beginListEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName), serviceCallback); } /** @@ -1289,31 +1431,26 @@ public Page call(ServiceResponse>> 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)); - } - }); + public Observable beginListEffectiveNetworkSecurityGroupsAsync(String resourceGroupName, String networkInterfaceName) { + return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).map(new Func1, EffectiveNetworkSecurityGroupListResultInner>() { + @Override + public EffectiveNetworkSecurityGroupListResultInner call(ServiceResponse response) { + return response.body(); + } + }); } /** * Gets all network security groups applied to a network interface. * - ServiceResponse> * @param resourceGroupName The name of the resource group. - ServiceResponse> * @param networkInterfaceName The name of the 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 PagedList<EffectiveNetworkSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the EffectiveNetworkSecurityGroupListResultInner object */ - public Observable>> beginListEffectiveNetworkSecurityGroupsSinglePageAsync(final String resourceGroupName, final String networkInterfaceName) { + public Observable> beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(String resourceGroupName, String networkInterfaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1323,14 +1460,14 @@ public Observable>> beg if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginListEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = beginListEffectiveNetworkSecurityGroupsDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse clientResponse = beginListEffectiveNetworkSecurityGroupsDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -1338,9 +1475,9 @@ public Observable>> cal }); } - private ServiceResponse> beginListEffectiveNetworkSecurityGroupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse beginListEffectiveNetworkSecurityGroupsDelegate(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); @@ -1791,102 +1928,129 @@ private ServiceResponse getVirtualMachineScaleSetNetworkI } /** - * Gets all network interfaces in a subscription. + * 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 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. * @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<NetworkInterfaceIPConfigurationInner> object if successful. */ - public PagedList listNext(final String nextPageLink) { - ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + 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()) { @Override - public Page nextPage(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network interfaces in a subscription. + * 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 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 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) { + public ServiceFuture> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network interfaces in a subscription. + * 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 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. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object */ - public Observable> listNextAsync(final String nextPageLink) { - return listNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + 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>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all network interfaces in a subscription. + * 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 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. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object */ - public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { - return listNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + 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>>>() { @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(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network interfaces in a subscription. + * 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. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<NetworkInterfaceIPConfigurationInner> 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."); + 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."); } - String nextUrl = String.format("%s", nextPageLink); - return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + 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."); + } + final String apiVersion = "2017-03-30"; + 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>>>() { @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 = listVirtualMachineScaleSetIpConfigurationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1894,110 +2058,134 @@ 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()) - .registerError(CloudException.class) - .build(response); - } - /** - * Gets all network interfaces in a resource group. + * 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 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. * @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<NetworkInterfaceIPConfigurationInner> object if successful. */ - public PagedList listByResourceGroupNext(final String nextPageLink) { - ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { + 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()) { @Override - public Page nextPage(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network interfaces in a resource group. + * 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 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 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) { + public ServiceFuture> listVirtualMachineScaleSetIpConfigurationsAsync(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex, final String networkInterfaceName, final String expand, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listByResourceGroupNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listVirtualMachineScaleSetIpConfigurationsSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listVirtualMachineScaleSetIpConfigurationsNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network interfaces in a resource group. + * 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 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. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object */ - public Observable> listByResourceGroupNextAsync(final String nextPageLink) { - return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { + 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>() { @Override - public Page call(ServiceResponse> response) { + public Page call(ServiceResponse> response) { return response.body(); } }); } /** - * Gets all network interfaces in a resource group. + * 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 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. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<NetworkInterfaceInner> object + * @return the observable to the PagedList<NetworkInterfaceIPConfigurationInner> object */ - public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { - return listByResourceGroupNextSinglePageAsync(nextPageLink) - .concatMap(new Func1>, Observable>>>() { + 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>>>() { @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(listVirtualMachineScaleSetIpConfigurationsNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network interfaces in a resource group. + * 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. + 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. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<NetworkInterfaceIPConfigurationInner> 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."); + 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."); } - String nextUrl = String.format("%s", nextPageLink); - return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + 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."); + } + final String apiVersion = "2017-03-30"; + return service.listVirtualMachineScaleSetIpConfigurations(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, 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 = listVirtualMachineScaleSetIpConfigurationsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -2005,110 +2193,105 @@ 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> listVirtualMachineScaleSetIpConfigurationsDelegate(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. + * 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 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. * @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<EffectiveRouteInner> object if successful. + * @return the NetworkInterfaceIPConfigurationInner object if successful. */ - 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(); - } - }; + public NetworkInterfaceIPConfigurationInner getVirtualMachineScaleSetIpConfiguration(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) { + return getVirtualMachineScaleSetIpConfigurationWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName).toBlocking().single().body(); } /** - * Gets all route tables applied to a network interface. + * 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 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 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> 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); - } - - /** - * Gets all route tables 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<EffectiveRouteInner> object - */ - public Observable> getEffectiveRouteTableNextAsync(final String nextPageLink) { - return getEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + 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); } /** - * Gets all route tables applied to a network interface. + * 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 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. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveRouteInner> object + * @return the observable to the NetworkInterfaceIPConfigurationInner object */ - 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)); - } - }); + 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(); + } + }); } /** - * Gets all route tables applied to a network interface. + * 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. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EffectiveRouteInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the NetworkInterfaceIPConfigurationInner object */ - public Observable>> getEffectiveRouteTableNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + 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."); } - String nextUrl = String.format("%s", nextPageLink); - return service.getEffectiveRouteTableNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + 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."); + } + final String apiVersion = "2017-03-30"; + 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>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = getEffectiveRouteTableNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse clientResponse = getVirtualMachineScaleSetIpConfigurationDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -2116,111 +2299,101 @@ public Observable>> call(Response> 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); - } - /** - * Gets all route tables applied to a network interface. + * 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 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. * @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<EffectiveRouteInner> object if successful. + * @return the NetworkInterfaceIPConfigurationInner object if successful. */ - 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(); - } - }; + 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(); } /** - * Gets all route tables applied to a network interface. + * 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 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 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> 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); - } - - /** - * Gets all route tables 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<EffectiveRouteInner> object - */ - public Observable> beginGetEffectiveRouteTableNextAsync(final String nextPageLink) { - return beginGetEffectiveRouteTableNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); + 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); } /** - * Gets all route tables applied to a network interface. + * 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 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. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<EffectiveRouteInner> object + * @return the observable to the NetworkInterfaceIPConfigurationInner object */ - 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)); - } - }); + 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(); + } + }); } /** - * Gets all route tables applied to a network interface. + * 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. + * @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. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<EffectiveRouteInner> object wrapped in {@link ServiceResponse} if successful. + * @return the observable to the NetworkInterfaceIPConfigurationInner object */ - public Observable>> beginGetEffectiveRouteTableNextSinglePageAsync(final String nextPageLink) { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + 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."); } - String nextUrl = String.format("%s", nextPageLink); - return service.beginGetEffectiveRouteTableNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + 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."); + } + final String apiVersion = "2017-03-30"; + return service.getVirtualMachineScaleSetIpConfiguration(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public Observable>> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse> result = beginGetEffectiveRouteTableNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); + ServiceResponse clientResponse = getVirtualMachineScaleSetIpConfigurationDelegate(response); + return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } @@ -2228,35 +2401,34 @@ public Observable>> call(Response> 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()) + private ServiceResponse getVirtualMachineScaleSetIpConfigurationDelegate(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 security groups applied to a network interface. + * Gets all network interfaces 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<EffectiveNetworkSecurityGroupInner> object if successful. + * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listEffectiveNetworkSecurityGroupsNext(final String nextPageLink) { - ServiceResponse> response = listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).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 listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @param serviceFuture the ServiceFuture object tracking the Retrofit calls @@ -2264,75 +2436,75 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listEffectiveNetworkSecurityGroupsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces 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<EffectiveNetworkSecurityGroupInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable> listEffectiveNetworkSecurityGroupsNextAsync(final String nextPageLink) { - return listEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink) - .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(); } }); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces 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<EffectiveNetworkSecurityGroupInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable>> listEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(final String nextPageLink) { - return listEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink) - .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(listEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a subscription. * - 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<EffectiveNetworkSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listEffectiveNetworkSecurityGroupsNextSinglePageAsync(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.listEffectiveNetworkSecurityGroupsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + 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 = listEffectiveNetworkSecurityGroupsNextDelegate(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); } @@ -2340,35 +2512,34 @@ public Observable>> cal }); } - 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()) + 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 network security groups applied to a network interface. + * Gets all network interfaces 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<EffectiveNetworkSecurityGroupInner> object if successful. + * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList beginListEffectiveNetworkSecurityGroupsNext(final String nextPageLink) { - ServiceResponse> response = beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).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 beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces 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 @@ -2376,75 +2547,75 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> beginListEffectiveNetworkSecurityGroupsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink), - new Func1>>>() { + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { @Override - public Observable>> call(String nextPageLink) { - return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink); + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); } }, serviceCallback); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces 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<EffectiveNetworkSecurityGroupInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable> beginListEffectiveNetworkSecurityGroupsNextAsync(final String nextPageLink) { - return beginListEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink) - .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(); } }); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces 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<EffectiveNetworkSecurityGroupInner> object + * @return the observable to the PagedList<NetworkInterfaceInner> object */ - public Observable>> beginListEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(final String nextPageLink) { - return beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(nextPageLink) - .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(beginListEffectiveNetworkSecurityGroupsNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); } }); } /** - * Gets all network security groups applied to a network interface. + * Gets all network interfaces in a resource group. * - 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<EffectiveNetworkSecurityGroupInner> object wrapped in {@link ServiceResponse} if successful. + * @return the PagedList<NetworkInterfaceInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> beginListEffectiveNetworkSecurityGroupsNextSinglePageAsync(final String nextPageLink) { + 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.beginListEffectiveNetworkSecurityGroupsNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { + 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 = beginListEffectiveNetworkSecurityGroupsNextDelegate(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); } @@ -2452,10 +2623,9 @@ public Observable>> cal }); } - 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()) + 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); } @@ -2682,4 +2852,115 @@ 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 4cdbda443cd..4bfbb90cedb 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 @@ -150,6 +150,45 @@ 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. */ @@ -176,6 +215,19 @@ 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. */ @@ -202,6 +254,32 @@ 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. */ @@ -397,6 +475,32 @@ 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. */ @@ -601,10 +705,16 @@ protected void initialize() { 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); @@ -620,6 +730,8 @@ 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); @@ -663,78 +775,7 @@ interface NetworkManagementClientService { } /** - * 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. + * Checks whether a domain name in the cloudapp.azure.com 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]$. @@ -748,7 +789,7 @@ public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location, } /** - * Checks whether a domain name in the cloudapp.net zone is available for use. + * Checks whether a domain name in the cloudapp.azure.com 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]$. @@ -761,7 +802,7 @@ public ServiceFuture checkDnsNameAvailabilityAsy } /** - * Checks whether a domain name in the cloudapp.net zone is available for use. + * Checks whether a domain name in the cloudapp.azure.com 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]$. @@ -778,7 +819,7 @@ public DnsNameAvailabilityResultInner call(ServiceResponse> checkDnsNameA if (this.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + if (domainNameLabel == null) { + throw new IllegalArgumentException("Parameter domainNameLabel is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; return service.checkDnsNameAvailability(location, this.subscriptionId(), domainNameLabel, apiVersion, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override 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 b73f2500d94..5a17bb7fbbf 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,6 +16,7 @@ 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,12 +25,14 @@ 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; @@ -84,6 +87,14 @@ 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); @@ -163,7 +174,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -229,7 +240,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -246,8 +257,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(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -315,7 +326,7 @@ public Observable> getByResourceGroup if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -397,7 +408,7 @@ public Observable> getByResourceGroup if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -489,7 +500,7 @@ public Observable> createOrUpdateWith throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -564,7 +575,7 @@ public Observable> beginCreateOrUpdat throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -581,7 +592,321 @@ 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), 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); @@ -670,7 +995,7 @@ public Observable>> listSinglePa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -783,7 +1108,7 @@ public Observable>> listByResour if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, 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/NetworkWatchersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatchersInner.java index d6ee5e1b5e0..d2598bf4592 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.TopologyParameters; +import com.microsoft.azure.management.network.TagsObject; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -26,12 +26,14 @@ 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; @@ -82,6 +84,10 @@ 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); @@ -92,7 +98,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, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TopologyParameters parameters, @Header("User-Agent") String userAgent); + 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); @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") @@ -158,6 +164,22 @@ 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); + } /** @@ -230,7 +252,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.createOrUpdate(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -315,7 +337,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -398,7 +420,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -464,7 +486,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -487,6 +509,177 @@ 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.updateTags(resourceGroupName, networkWatcherName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.updateTags(resourceGroupName, networkWatcherName, this.client.subscriptionId(), 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. * @@ -546,7 +739,7 @@ public Observable>> listByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -621,7 +814,7 @@ public Observable>> listWithServiceRes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -649,14 +842,14 @@ private ServiceResponse> listDelegate(Response getTopologyAsync(String resourceGroupName, String networkWatcherName, String targetResourceGroupName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceGroupName), serviceCallback); + public ServiceFuture getTopologyAsync(String resourceGroupName, String networkWatcherName, TopologyParametersInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters), serviceCallback); } /** @@ -678,12 +871,12 @@ public ServiceFuture getTopologyAsync(String resourceGroupName, S * * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. - * @param targetResourceGroupName The name of the target resource group to perform topology on. + * @param parameters Parameters that define the representation of topology. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the TopologyInner object */ - public Observable getTopologyAsync(String resourceGroupName, String networkWatcherName, String targetResourceGroupName) { - return getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, targetResourceGroupName).map(new Func1, TopologyInner>() { + public Observable getTopologyAsync(String resourceGroupName, String networkWatcherName, TopologyParametersInner parameters) { + return getTopologyWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1, TopologyInner>() { @Override public TopologyInner call(ServiceResponse response) { return response.body(); @@ -696,11 +889,11 @@ public TopologyInner call(ServiceResponse response) { * * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. - * @param targetResourceGroupName The name of the target resource group to perform topology on. + * @param parameters Parameters that define the representation of topology. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the TopologyInner object */ - public Observable> getTopologyWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceGroupName) { + public Observable> getTopologyWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, TopologyParametersInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -710,13 +903,12 @@ public Observable> getTopologyWithServiceResponse if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (targetResourceGroupName == null) { - throw new IllegalArgumentException("Parameter targetResourceGroupName is required and cannot be null."); + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } - 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()) + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.getTopology(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -807,7 +999,7 @@ public Observable> verifyIPFlowWi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -882,7 +1074,7 @@ public Observable> beginVerifyIPF throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginVerifyIPFlow(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -975,7 +1167,7 @@ public Observable> getNextHopWithServiceResp throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -1050,7 +1242,7 @@ public Observable> beginGetNextHopWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGetNextHop(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1142,7 +1334,7 @@ public Observable> getVMSecurityRu if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; SecurityGroupViewParameters parameters = new SecurityGroupViewParameters(); parameters.withTargetResourceId(targetResourceId); Observable> observable = service.getVMSecurityRules(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -1218,7 +1410,7 @@ public Observable> beginGetVMSecur if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; SecurityGroupViewParameters parameters = new SecurityGroupViewParameters(); parameters.withTargetResourceId(targetResourceId); return service.beginGetVMSecurityRules(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1313,7 +1505,7 @@ public Observable> getTroubleshootin throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -1388,7 +1580,7 @@ public Observable> beginGetTroublesh throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGetTroubleshooting(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1480,7 +1672,7 @@ public Observable> getTroubleshootin if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; QueryTroubleshootingParameters parameters = new QueryTroubleshootingParameters(); parameters.withTargetResourceId(targetResourceId); Observable> observable = service.getTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -1556,7 +1748,7 @@ public Observable> beginGetTroublesh if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; QueryTroubleshootingParameters parameters = new QueryTroubleshootingParameters(); parameters.withTargetResourceId(targetResourceId); return service.beginGetTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1651,7 +1843,7 @@ public Observable> setFlowLogConfigurat throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -1726,7 +1918,7 @@ public Observable> beginSetFlowLogConfi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginSetFlowLogConfiguration(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1818,7 +2010,7 @@ public Observable> getFlowLogStatusWith if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; FlowLogStatusParameters parameters = new FlowLogStatusParameters(); parameters.withTargetResourceId(targetResourceId); Observable> observable = service.getFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -1894,7 +2086,7 @@ public Observable> beginGetFlowLogStatu if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; FlowLogStatusParameters parameters = new FlowLogStatusParameters(); parameters.withTargetResourceId(targetResourceId); return service.beginGetFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1989,7 +2181,7 @@ public Observable> checkConnectivi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -2064,7 +2256,7 @@ public Observable> beginCheckConne throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCheckConnectivity(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2087,4 +2279,340 @@ 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.getAzureReachabilityReport(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.beginGetAzureReachabilityReport(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + Observable> observable = service.listAvailableProviders(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.beginListAvailableProviders(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = 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 new file mode 100644 index 00000000000..8d4e7462098 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationInner.java @@ -0,0 +1,125 @@ +/** + * 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 new file mode 100644 index 00000000000..794f9c5f7aa --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationsInner.java @@ -0,0 +1,281 @@ +/** + * 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() { + final String apiVersion = "2018-04-01"; + return service.list(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 { + 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 7d1a097ffa6..f5ad2d04515 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 @@ -176,7 +176,7 @@ public Observable> createWithServiceRe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -258,7 +258,7 @@ public Observable> beginCreateWithServ throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreate(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -349,7 +349,7 @@ public Observable> getWithServiceRespo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -439,7 +439,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -512,7 +512,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -529,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(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -603,7 +603,7 @@ public Observable> stopWithServiceResponseAsync(String res if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -676,7 +676,7 @@ public Observable> beginStopWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginStop(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -768,7 +768,7 @@ public Observable> getStatu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; Observable> observable = service.getStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -842,7 +842,7 @@ public Observable> beginGet if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGetStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -927,7 +927,7 @@ public Observable>> listWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, 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/PatchRouteFilterRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PatchRouteFilterRuleInner.java index 9aa47f75cb4..4dfe707da95 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,7 +10,6 @@ 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; @@ -60,12 +59,6 @@ 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. */ @@ -160,24 +153,4 @@ 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 63998471b13..63203b29699 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,6 +13,7 @@ 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; @@ -54,6 +55,12 @@ 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. */ @@ -181,6 +188,26 @@ 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 70d106b576e..2467ced6501 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,6 +16,7 @@ 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,12 +25,14 @@ 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; @@ -84,6 +87,14 @@ 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); @@ -183,7 +194,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -249,7 +260,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -266,9 +277,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(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -335,7 +346,7 @@ public Observable> getByResourceGroupWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -417,7 +428,7 @@ public Observable> getByResourceGroupWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -509,7 +520,7 @@ public Observable> createOrUpdateWithServi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -584,7 +595,7 @@ public Observable> beginCreateOrUpdateWith throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -601,7 +612,321 @@ 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), 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); @@ -690,7 +1015,7 @@ public Observable>> listSinglePageAsy if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -803,7 +1128,7 @@ public Observable>> listByResourceGro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, 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 11462b43196..3b81a354e46 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,7 +10,6 @@ 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; @@ -66,12 +65,6 @@ 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. */ @@ -197,24 +190,4 @@ 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 9d0b9cca7eb..2e63126c8f7 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,7 +168,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -241,7 +241,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -258,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(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -334,7 +334,7 @@ public Observable> getWithServiceResponseA if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -433,7 +433,7 @@ public Observable> createOrUpdateWithServi throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -515,7 +515,7 @@ public Observable> beginCreateOrUpdateWith throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -615,7 +615,7 @@ public Observable> updateWithServiceRespon throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -697,7 +697,7 @@ public Observable> beginUpdateWithServiceR throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -818,7 +818,7 @@ public Observable>> listByRouteFilter if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByRouteFilter(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, 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/RouteFiltersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java index a7126188547..f461ef0aa1d 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,7 +172,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -238,7 +238,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -255,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(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -324,7 +324,7 @@ public Observable> getByResourceGroupWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -406,7 +406,7 @@ public Observable> getByResourceGroupWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -498,7 +498,7 @@ public Observable> createOrUpdateWithServiceRe throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } Validator.validate(routeFilterParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -573,7 +573,7 @@ public Observable> beginCreateOrUpdateWithServ throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } Validator.validate(routeFilterParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -666,7 +666,7 @@ public Observable> updateWithServiceResponseAs throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } Validator.validate(routeFilterParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -741,7 +741,7 @@ public Observable> beginUpdateWithServiceRespo throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } Validator.validate(routeFilterParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -854,7 +854,7 @@ public Observable>> listByResourceGroupSi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -959,7 +959,7 @@ public Observable>> listSinglePageAsync() if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, 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/RouteTableInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTableInner.java index edcf27934d4..c361ff6074b 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,6 +30,13 @@ 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'. @@ -73,6 +80,26 @@ 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 284f9342bba..af7be12a4f4 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,6 +16,7 @@ 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,12 +25,14 @@ 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; @@ -84,6 +87,14 @@ 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); @@ -163,7 +174,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -229,7 +240,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -246,9 +257,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); } @@ -315,7 +326,7 @@ public Observable> getByResourceGroupWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -397,7 +408,7 @@ public Observable> getByResourceGroupWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -489,7 +500,7 @@ public Observable> createOrUpdateWithServiceRes throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -564,7 +575,7 @@ public Observable> beginCreateOrUpdateWithServi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, routeTableName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -587,6 +598,320 @@ 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), 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. * @@ -678,7 +1003,7 @@ public Observable>> listByResourceGroupSin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -783,7 +1108,7 @@ public Observable>> listSinglePageAsync() if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, 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/RoutesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java index be1e3925887..e6053d994b2 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,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -249,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(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); @@ -325,7 +325,7 @@ public Observable> getWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> createOrUpdateWithServiceResponse throw new IllegalArgumentException("Parameter routeParameters is required and cannot be null."); } Validator.validate(routeParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -506,7 +506,7 @@ public Observable> beginCreateOrUpdateWithServiceRes throw new IllegalArgumentException("Parameter routeParameters is required and cannot be null."); } Validator.validate(routeParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), routeParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, 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/SecurityRuleInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRuleInner.java index a155a249c76..419cabb6efe 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", required = true) + @JsonProperty(value = "properties.sourceAddressPrefix") private String sourceAddressPrefix; /** @@ -63,12 +63,18 @@ 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", required = true) + @JsonProperty(value = "properties.destinationAddressPrefix") private String destinationAddressPrefix; /** @@ -77,6 +83,12 @@ 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. */ @@ -253,6 +265,26 @@ 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. * @@ -293,6 +325,26 @@ 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 331b11e47a6..4ec2c9ea04a 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,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -249,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(204, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -325,7 +325,7 @@ public Observable> getWithServiceResponseAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> createOrUpdateWithServiceR throw new IllegalArgumentException("Parameter securityRuleParameters is required and cannot be null."); } Validator.validate(securityRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -506,7 +506,7 @@ public Observable> beginCreateOrUpdateWithSer throw new IllegalArgumentException("Parameter securityRuleParameters is required and cannot be null."); } Validator.validate(securityRuleParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), securityRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, 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/SubnetInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java index 9aa6c3f052d..4fd9a0b0b22 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.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.azure.management.network.ServiceEndpointPropertiesFormat; +import com.fasterxml.jackson.annotation.JsonProperty; 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 SubResource networkSecurityGroup; + private NetworkSecurityGroupInner networkSecurityGroup; /** * The reference of the RouteTable resource. */ @JsonProperty(value = "properties.routeTable") - private SubResource routeTable; + private RouteTableInner routeTable; /** * An array of service endpoints. @@ -43,7 +43,6 @@ 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. @@ -101,7 +100,7 @@ public SubnetInner withAddressPrefix(String addressPrefix) { * * @return the networkSecurityGroup value */ - public SubResource networkSecurityGroup() { + public NetworkSecurityGroupInner networkSecurityGroup() { return this.networkSecurityGroup; } @@ -111,7 +110,7 @@ public SubResource networkSecurityGroup() { * @param networkSecurityGroup the networkSecurityGroup value to set * @return the SubnetInner object itself. */ - public SubnetInner withNetworkSecurityGroup(SubResource networkSecurityGroup) { + public SubnetInner withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup) { this.networkSecurityGroup = networkSecurityGroup; return this; } @@ -121,7 +120,7 @@ public SubnetInner withNetworkSecurityGroup(SubResource networkSecurityGroup) { * * @return the routeTable value */ - public SubResource routeTable() { + public RouteTableInner routeTable() { return this.routeTable; } @@ -131,7 +130,7 @@ public SubResource routeTable() { * @param routeTable the routeTable value to set * @return the SubnetInner object itself. */ - public SubResource withRouteTable(SubResource routeTable) { + public SubnetInner withRouteTable(RouteTableInner 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 7ca792e8461..2f8f0592259 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,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -250,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(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -325,7 +325,7 @@ public Observable> getWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -414,7 +414,7 @@ public Observable> getWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -513,7 +513,7 @@ public Observable> createOrUpdateWithServiceRespons throw new IllegalArgumentException("Parameter subnetParameters is required and cannot be null."); } Validator.validate(subnetParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -595,7 +595,7 @@ public Observable> beginCreateOrUpdateWithServiceRe throw new IllegalArgumentException("Parameter subnetParameters is required and cannot be null."); } Validator.validate(subnetParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), subnetParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -717,7 +717,7 @@ public Observable>> listSinglePageAsync(final if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, 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/TopologyParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyParametersInner.java new file mode 100644 index 00000000000..5572c37a4b9 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/TopologyParametersInner.java @@ -0,0 +1,96 @@ +/** + * 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 481b80207b6..614db48a371 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,6 +15,12 @@ * 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. */ @@ -46,6 +52,15 @@ 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 047a6c7fea4..fcf8acc3178 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 { } /** - * Lists compute usages for a subscription. + * List network 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) { } /** - * Lists compute usages for a subscription. + * List network 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) { } /** - * Lists compute usages for a subscription. + * List network 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) { } /** - * Lists compute usages for a subscription. + * List network 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,7 +157,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -180,7 +180,7 @@ private ServiceResponse> listDelegate(Response nextPage(String nextPageLink) { } /** - * Lists compute usages for a subscription. + * List network 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 @@ -220,7 +220,7 @@ public Observable>> call(String nextPageLink) { } /** - * Lists compute usages for a subscription. + * List network usages for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -237,7 +237,7 @@ public Page call(ServiceResponse> response) { } /** - * Lists compute usages for a subscription. + * List network usages for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -258,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/VerificationIPFlowParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VerificationIPFlowParametersInner.java index c787a41d9fe..5f2c7f4bd45 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VerificationIPFlowParametersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VerificationIPFlowParametersInner.java @@ -9,7 +9,7 @@ package com.microsoft.azure.management.network.implementation; import com.microsoft.azure.management.network.Direction; -import com.microsoft.azure.management.network.Protocol; +import com.microsoft.azure.management.network.IpFlowProtocol; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -33,7 +33,7 @@ public class VerificationIPFlowParametersInner { * Protocol to be verified on. Possible values include: 'TCP', 'UDP'. */ @JsonProperty(value = "protocol", required = true) - private Protocol protocol; + private IpFlowProtocol protocol; /** * The local port. Acceptable values are a single integer in the range @@ -115,7 +115,7 @@ public VerificationIPFlowParametersInner withDirection(Direction direction) { * * @return the protocol value */ - public Protocol protocol() { + public IpFlowProtocol protocol() { return this.protocol; } @@ -125,7 +125,7 @@ public Protocol protocol() { * @param protocol the protocol value to set * @return the VerificationIPFlowParametersInner object itself. */ - public VerificationIPFlowParametersInner withProtocol(Protocol protocol) { + public VerificationIPFlowParametersInner withProtocol(IpFlowProtocol protocol) { this.protocol = protocol; return this; } 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 b52e097be1a..2aeb0692760 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 SubResource virtualNetworkGateway1; + private VirtualNetworkGatewayInner virtualNetworkGateway1; /** * The reference to virtual network gateway resource. */ @JsonProperty(value = "properties.virtualNetworkGateway2") - private SubResource virtualNetworkGateway2; + private VirtualNetworkGatewayInner virtualNetworkGateway2; /** * The reference to local network gateway resource. */ @JsonProperty(value = "properties.localNetworkGateway2") - private SubResource localNetworkGateway2; + private LocalNetworkGatewayInner localNetworkGateway2; /** * Gateway connection type. Possible values are: @@ -163,7 +163,7 @@ public VirtualNetworkGatewayConnectionInner withAuthorizationKey(String authoriz * * @return the virtualNetworkGateway1 value */ - public SubResource virtualNetworkGateway1() { + public VirtualNetworkGatewayInner virtualNetworkGateway1() { return this.virtualNetworkGateway1; } @@ -173,7 +173,7 @@ public SubResource virtualNetworkGateway1() { * @param virtualNetworkGateway1 the virtualNetworkGateway1 value to set * @return the VirtualNetworkGatewayConnectionInner object itself. */ - public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway1(SubResource virtualNetworkGateway1) { + public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway1(VirtualNetworkGatewayInner virtualNetworkGateway1) { this.virtualNetworkGateway1 = virtualNetworkGateway1; return this; } @@ -183,7 +183,7 @@ public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway1(SubResour * * @return the virtualNetworkGateway2 value */ - public SubResource virtualNetworkGateway2() { + public VirtualNetworkGatewayInner virtualNetworkGateway2() { return this.virtualNetworkGateway2; } @@ -193,7 +193,7 @@ public SubResource virtualNetworkGateway2() { * @param virtualNetworkGateway2 the virtualNetworkGateway2 value to set * @return the VirtualNetworkGatewayConnectionInner object itself. */ - public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway2(SubResource virtualNetworkGateway2) { + public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway2(VirtualNetworkGatewayInner virtualNetworkGateway2) { this.virtualNetworkGateway2 = virtualNetworkGateway2; return this; } @@ -203,7 +203,7 @@ public VirtualNetworkGatewayConnectionInner withVirtualNetworkGateway2(SubResour * * @return the localNetworkGateway2 value */ - public SubResource localNetworkGateway2() { + public LocalNetworkGatewayInner localNetworkGateway2() { return this.localNetworkGateway2; } @@ -213,7 +213,7 @@ public SubResource localNetworkGateway2() { * @param localNetworkGateway2 the localNetworkGateway2 value to set * @return the VirtualNetworkGatewayConnectionInner object itself. */ - public VirtualNetworkGatewayConnectionInner withLocalNetworkGateway2(SubResource localNetworkGateway2) { + public VirtualNetworkGatewayConnectionInner withLocalNetworkGateway2(LocalNetworkGatewayInner 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 c8af23e8c31..5be491f29af 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,6 +15,7 @@ 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; @@ -23,12 +24,14 @@ 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,6 +87,14 @@ 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); @@ -184,7 +195,7 @@ public Observable> createO throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -259,7 +270,7 @@ public Observable> beginCr throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -344,7 +355,7 @@ public Observable> getByRe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -427,7 +438,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -493,7 +504,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -517,6 +528,320 @@ 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), 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. * @@ -586,7 +911,7 @@ public Observable> setSharedKeyWithSer if (value == null) { throw new IllegalArgumentException("Parameter value is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; ConnectionSharedKeyInner parameters = new ConnectionSharedKeyInner(); parameters.withValue(value); Observable> observable = service.setSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -662,7 +987,7 @@ public Observable> beginSetSharedKeyWi if (value == null) { throw new IllegalArgumentException("Parameter value is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; ConnectionSharedKeyInner parameters = new ConnectionSharedKeyInner(); parameters.withValue(value); return service.beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -681,8 +1006,8 @@ public Observable> call(Response beginSetSharedKeyDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(201, new TypeToken() { }.getType()) .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -749,7 +1074,7 @@ public Observable> getSharedKeyWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -862,7 +1187,7 @@ public Observable>> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -950,7 +1275,7 @@ public Observable> resetSharedKey if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; ConnectionResetSharedKeyInner parameters = new ConnectionResetSharedKeyInner(); parameters.withKeyLength(keyLength); Observable> observable = service.resetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -1023,7 +1348,7 @@ public Observable> beginResetShar if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; ConnectionResetSharedKeyInner parameters = new ConnectionResetSharedKeyInner(); parameters.withKeyLength(keyLength); return service.beginResetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) 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 0e5538d39cd..d78cdbd80bb 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,6 +15,7 @@ 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; @@ -23,12 +24,14 @@ 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,6 +87,14 @@ 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); @@ -116,6 +127,14 @@ 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); @@ -124,6 +143,10 @@ 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); @@ -140,6 +163,26 @@ 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); @@ -220,7 +263,7 @@ public Observable> createOrUpdateWit throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -295,7 +338,7 @@ public Observable> beginCreateOrUpda throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -380,7 +423,7 @@ public Observable> getByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -463,7 +506,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -529,7 +572,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -546,9 +589,323 @@ 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(202, 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 virtual network gateway tags. + * + * @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 updateTags(String resourceGroupName, String virtualNetworkGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); + } + + /** + * Updates a virtual network gateway tags. + * + * @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); + } + + /** + * Updates a virtual network gateway tags. + * + * @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 updateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @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> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates a virtual network gateway tags. + * + * @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. + */ + public VirtualNetworkGatewayInner updateTags(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).toBlocking().last().body(); + } + + /** + * Updates a virtual network gateway tags. + * + * @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); + } + + /** + * Updates a virtual network gateway tags. + * + * @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 + */ + 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(); + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @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 + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates a virtual network gateway tags. + * + * @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 beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Updates a virtual network gateway tags. + * + * @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 beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Updates a virtual network gateway tags. + * + * @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 beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @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> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), 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 tags. + * + * @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. + */ + public VirtualNetworkGatewayInner beginUpdateTags(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).toBlocking().single().body(); + } + + /** + * Updates a virtual network gateway tags. + * + * @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 beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags), serviceCallback); + } + + /** + * Updates a virtual network gateway tags. + * + * @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 to the VirtualNetworkGatewayInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).map(new Func1, VirtualNetworkGatewayInner>() { + @Override + public VirtualNetworkGatewayInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates a virtual network gateway tags. + * + * @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 to the VirtualNetworkGatewayInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, Map tags) { + 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), 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); } @@ -644,7 +1001,7 @@ public Observable>> listByResou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -765,7 +1122,7 @@ public Observable, Observable>>>() { @Override @@ -849,7 +1206,7 @@ public Observable> resetWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); @@ -920,7 +1277,7 @@ public Observable> resetWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -987,7 +1344,7 @@ public Observable> beginResetWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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>>() { @@ -1069,7 +1426,7 @@ public Observable> beginResetWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginReset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1086,8 +1443,8 @@ public Observable> call(Response 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()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1162,7 +1519,7 @@ public Observable> generatevpnclientpackageWithServiceRe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -1237,7 +1594,7 @@ public Observable> beginGeneratevpnclientpackageWithServ throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGeneratevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1329,7 +1686,7 @@ public Observable> generateVpnProfileWithServiceResponse throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -1404,7 +1761,7 @@ public Observable> beginGenerateVpnProfileWithServiceRes throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGenerateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1422,6 +1779,159 @@ 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."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.getVpnProfilePackageUrl(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), 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. + * + * @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 beginGetVpnProfilePackageUrl(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnProfilePackageUrlWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).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. + * + * @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 beginGetVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetVpnProfilePackageUrlWithServiceResponseAsync(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 to the String object + */ + public Observable beginGetVpnProfilePackageUrlAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnProfilePackageUrlWithServiceResponseAsync(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 to the String object + */ + public Observable> beginGetVpnProfilePackageUrlWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginGetVpnProfilePackageUrl(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGetVpnProfilePackageUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGetVpnProfilePackageUrlDelegate(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); } @@ -1488,7 +1998,7 @@ public Observable> getBgpPeerStatu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); @@ -1559,7 +2069,7 @@ public Observable> getBgpPeerStatu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -1626,7 +2136,7 @@ public Observable> beginGetBgpPeer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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>>() { @@ -1708,7 +2218,7 @@ public Observable> beginGetBgpPeer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGetBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1731,6 +2241,90 @@ private ServiceResponse beginGetBgpPeerStatusDeleg .build(response); } + /** + * Gets a xml format representation for supported vpn devices. + * + * @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 supportedVpnDevices(String resourceGroupName, String virtualNetworkGatewayName) { + return supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().body(); + } + + /** + * Gets a xml format representation for supported vpn devices. + * + * @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 supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), serviceCallback); + } + + /** + * Gets a xml format representation for supported vpn devices. + * + * @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 String object + */ + public Observable supportedVpnDevicesAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return supportedVpnDevicesWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a xml format representation for supported vpn devices. + * + * @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 String object + */ + public Observable> supportedVpnDevicesWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = supportedVpnDevicesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse supportedVpnDevicesDelegate(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); + } + /** * This operation retrieves a list of routes the virtual network gateway has learned, including routes learned from BGP peers. * @@ -1793,7 +2387,7 @@ public Observable> getLearnedRoutes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -1860,7 +2454,7 @@ public Observable> beginGetLearnedR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGetLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1952,7 +2546,7 @@ public Observable> getAdvertisedRou if (peer == null) { throw new IllegalArgumentException("Parameter peer is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -2026,7 +2620,7 @@ public Observable> beginGetAdvertis if (peer == null) { throw new IllegalArgumentException("Parameter peer is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginGetAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2049,6 +2643,417 @@ private ServiceResponse beginGetAdvertisedRoutesDel .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. + * + * @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. + */ + public VpnClientIPsecParametersInner setVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + return setVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).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. + * + * @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); + } + + /** + * 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. + * + * @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>() { + @Override + public VpnClientIPsecParametersInner 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. + * + * @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) { + 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 (vpnclientIpsecParams == null) { + throw new IllegalArgumentException("Parameter vpnclientIpsecParams is required and cannot be null."); + } + Validator.validate(vpnclientIpsecParams); + final String apiVersion = "2018-04-01"; + Observable> observable = service.setVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), vpnclientIpsecParams, 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. + * + * @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. + */ + public VpnClientIPsecParametersInner beginSetVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + return beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).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. + * + * @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); + } + + /** + * 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. + * + * @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 + */ + public Observable beginSetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + return beginSetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams).map(new Func1, VpnClientIPsecParametersInner>() { + @Override + public VpnClientIPsecParametersInner 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. + * + * @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 + */ + public Observable> beginSetVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) { + 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 (vpnclientIpsecParams == null) { + throw new IllegalArgumentException("Parameter vpnclientIpsecParams is required and cannot be null."); + } + Validator.validate(vpnclientIpsecParams); + final String apiVersion = "2018-04-01"; + return service.beginSetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), vpnclientIpsecParams, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginSetVpnclientIpsecParametersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginSetVpnclientIpsecParametersDelegate(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. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway 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 VpnClientIPsecParametersInner object if successful. + */ + public VpnClientIPsecParametersInner getVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName) { + return getVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).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. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway 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 getVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), 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. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @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>() { + @Override + public VpnClientIPsecParametersInner 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. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> getVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + Observable> observable = service.getVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), 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. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway 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 VpnClientIPsecParametersInner object if successful. + */ + public VpnClientIPsecParametersInner beginGetVpnclientIpsecParameters(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).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. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway 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 beginGetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName), 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. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnClientIPsecParametersInner object + */ + public Observable beginGetVpnclientIpsecParametersAsync(String resourceGroupName, String virtualNetworkGatewayName) { + return beginGetVpnclientIpsecParametersWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).map(new Func1, VpnClientIPsecParametersInner>() { + @Override + public VpnClientIPsecParametersInner 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. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The virtual network gateway name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnClientIPsecParametersInner object + */ + public Observable> beginGetVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2018-04-01"; + return service.beginGetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = 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."); + } + Validator.validate(parameters); + final String apiVersion = "2018-04-01"; + return service.vpnDeviceConfigurationScript(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = vpnDeviceConfigurationScriptDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse vpnDeviceConfigurationScriptDelegate(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. * 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 d49512c79b0..9953fe351fd 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,6 +11,7 @@ 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; @@ -59,6 +60,27 @@ 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. @@ -186,6 +208,66 @@ 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 926097eb5aa..195433e6399 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,6 +9,7 @@ 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; @@ -50,11 +51,20 @@ public class VirtualNetworkPeeringInner extends SubResource { private Boolean useRemoteGateways; /** - * The reference of the remote virtual network. + * 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). */ @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: @@ -182,6 +192,26 @@ 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 200b8b188a6..5df48ebb41d 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,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -250,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(204, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -325,7 +325,7 @@ public Observable> getWithServiceRes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.get(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> createOrUpdateWit throw new IllegalArgumentException("Parameter virtualNetworkPeeringParameters is required and cannot be null."); } Validator.validate(virtualNetworkPeeringParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -506,7 +506,7 @@ public Observable> beginCreateOrUpda throw new IllegalArgumentException("Parameter virtualNetworkPeeringParameters is required and cannot be null."); } Validator.validate(virtualNetworkPeeringParameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), virtualNetworkPeeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> listSingleP if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, 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/VirtualNetworksInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java index 9238bd8bce4..8f7440219f2 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,6 +16,7 @@ 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,12 +25,14 @@ 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; @@ -84,6 +87,14 @@ 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); @@ -175,7 +186,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -241,7 +252,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginDelete(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -258,9 +269,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); } @@ -327,7 +338,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -409,7 +420,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.getByResourceGroup(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -501,7 +512,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-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()); } @@ -576,7 +587,7 @@ public Observable> beginCreateOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -599,6 +610,320 @@ 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), 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."); + } + final String apiVersion = "2018-04-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), 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."); + } + Validator.validate(tags); + final String apiVersion = "2018-04-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + return service.beginUpdateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), 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. * @@ -682,7 +1007,7 @@ public Observable>> listSinglePageAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -795,7 +1120,7 @@ public Observable>> listByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -879,7 +1204,7 @@ public Observable> checkIPAddr if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; final String ipAddress = null; return service.checkIPAddressAvailability(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), ipAddress, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -961,7 +1286,7 @@ public Observable> checkIPAddr if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.checkIPAddressAvailability(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), ipAddress, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1082,7 +1407,7 @@ public Observable>> listUsageSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-08-01"; + final String apiVersion = "2018-04-01"; return service.listUsage(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, 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/VpnClientIPsecParametersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientIPsecParametersInner.java new file mode 100644 index 00000000000..5af6e8841a7 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnClientIPsecParametersInner.java @@ -0,0 +1,242 @@ +/** + * 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 new file mode 100644 index 00000000000..84f9d8f2cc1 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VpnDeviceScriptParametersInner.java @@ -0,0 +1,95 @@ +/** + * 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; + } + +} From 55ad41377921f5bb95985836dd8048d0aca0e46e Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 26 Apr 2018 23:09:36 +0000 Subject: [PATCH 2/2] Generated from d16723e83f4c8cd10984b607401c649d6b9f1d47 Updated package to May version --- .../ApplicationGatewaysInner.java | 46 ++++++------ .../ApplicationSecurityGroupsInner.java | 14 ++-- .../AvailableEndpointServicesInner.java | 2 +- .../BgpServiceCommunitiesInner.java | 2 +- .../ConnectionMonitorsInner.java | 24 +++---- .../DdosProtectionPlansInner.java | 14 ++-- .../DefaultSecurityRulesInner.java | 4 +- ...xpressRouteCircuitAuthorizationsInner.java | 12 ++-- .../ExpressRouteCircuitConnectionsInner.java | 10 +-- .../ExpressRouteCircuitPeeringsInner.java | 12 ++-- .../ExpressRouteCircuitsInner.java | 38 +++++----- ...ressRouteCrossConnectionPeeringsInner.java | 12 ++-- .../ExpressRouteCrossConnectionsInner.java | 30 ++++---- .../ExpressRouteServiceProvidersInner.java | 2 +- .../implementation/InboundNatRulesInner.java | 14 ++-- .../LoadBalancerBackendAddressPoolsInner.java | 4 +- ...BalancerFrontendIPConfigurationsInner.java | 4 +- .../LoadBalancerLoadBalancingRulesInner.java | 4 +- .../LoadBalancerNetworkInterfacesInner.java | 2 +- .../LoadBalancerProbesInner.java | 4 +- .../implementation/LoadBalancersInner.java | 24 +++---- .../LocalNetworkGatewaysInner.java | 20 +++--- ...NetworkInterfaceIPConfigurationsInner.java | 4 +- .../NetworkInterfaceLoadBalancersInner.java | 2 +- .../NetworkInterfacesInner.java | 32 ++++----- .../NetworkManagementClientImpl.java | 2 +- .../NetworkSecurityGroupsInner.java | 24 +++---- .../implementation/NetworkWatchersInner.java | 58 +++++++-------- .../implementation/OperationsInner.java | 2 +- .../implementation/PacketCapturesInner.java | 20 +++--- .../PublicIPAddressesInner.java | 24 +++---- .../implementation/RouteFilterRulesInner.java | 16 ++--- .../implementation/RouteFiltersInner.java | 20 +++--- .../implementation/RouteTablesInner.java | 24 +++---- .../network/implementation/RoutesInner.java | 12 ++-- .../implementation/SecurityRulesInner.java | 12 ++-- .../network/implementation/SubnetsInner.java | 14 ++-- .../network/implementation/UsagesInner.java | 2 +- ...VirtualNetworkGatewayConnectionsInner.java | 30 ++++---- .../VirtualNetworkGatewaysInner.java | 70 +++++++++---------- .../VirtualNetworkPeeringsInner.java | 12 ++-- .../implementation/VirtualNetworksInner.java | 30 ++++---- 42 files changed, 354 insertions(+), 354 deletions(-) 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 6d548476f72..db70edc63ad 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 @@ -218,7 +218,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -284,7 +284,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -370,7 +370,7 @@ public Observable> getByResourceGroupWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -462,7 +462,7 @@ public Observable> createOrUpdateWithSe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -537,7 +537,7 @@ public Observable> beginCreateOrUpdateW throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -622,7 +622,7 @@ public Observable> updateTagsWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -696,7 +696,7 @@ public Observable> updateTagsWithServic throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); Observable> observable = service.updateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -765,7 +765,7 @@ public Observable> beginUpdateTagsWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -850,7 +850,7 @@ public Observable> beginUpdateTagsWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.beginUpdateTags(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -965,7 +965,7 @@ public Observable>> listByResource if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1070,7 +1070,7 @@ public Observable>> listAllSingleP if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listAll(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1153,7 +1153,7 @@ public Observable> startWithServiceResponseAsync(String re if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -1219,7 +1219,7 @@ public Observable> beginStartWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginStart(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1303,7 +1303,7 @@ public Observable> stopWithServiceResponseAsync(String res if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -1369,7 +1369,7 @@ public Observable> beginStopWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginStop(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1454,7 +1454,7 @@ public Observable> backend if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final String expand = null; 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()); @@ -1525,7 +1525,7 @@ public Observable> backend if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -1592,7 +1592,7 @@ public Observable> beginBa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final String expand = null; return service.beginBackendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1674,7 +1674,7 @@ public Observable> beginBa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginBackendHealth(resourceGroupName, applicationGatewayName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1745,7 +1745,7 @@ public Observable, Observable>>() { @Override @@ -1815,7 +1815,7 @@ public Observable> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listAvailableSslOptions(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1920,7 +1920,7 @@ public Observable, Observable>>>() { @Override @@ -1997,7 +1997,7 @@ public Observable> g if (predefinedPolicyName == null) { throw new IllegalArgumentException("Parameter predefinedPolicyName is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getSslPredefinedPolicy(this.client.subscriptionId(), predefinedPolicyName, apiVersion, 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/ApplicationSecurityGroupsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationSecurityGroupsInner.java index 54944074465..3d7971441ea 100644 --- 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 @@ -163,7 +163,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.delete(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -229,7 +229,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -315,7 +315,7 @@ public Observable> getByResourceG if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -407,7 +407,7 @@ public Observable> createOrUpdate throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.createOrUpdate(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -482,7 +482,7 @@ public Observable> beginCreateOrU throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, applicationSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -588,7 +588,7 @@ public Observable>> listSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -701,7 +701,7 @@ public Observable>> listByRe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, 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/AvailableEndpointServicesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/AvailableEndpointServicesInner.java index 4cdc5368f72..e214003979c 100644 --- 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 @@ -157,7 +157,7 @@ public Observable>> listSingleP if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(location, this.client.subscriptionId(), apiVersion, 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/BgpServiceCommunitiesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BgpServiceCommunitiesInner.java index 567d0cbddc0..ae85d72e777 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,7 +149,7 @@ public Observable>> listSinglePag if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, 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/ConnectionMonitorsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ConnectionMonitorsInner.java index 520101d14db..a7a691ae97c 100644 --- 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 @@ -184,7 +184,7 @@ public Observable> createOrUpdateW throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.createOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -266,7 +266,7 @@ public Observable> beginCreateOrUp throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -358,7 +358,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -448,7 +448,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.delete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -521,7 +521,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -612,7 +612,7 @@ public Observable> stopWithServiceResponseAsync(String res if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.stop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -685,7 +685,7 @@ public Observable> beginStopWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -776,7 +776,7 @@ public Observable> startWithServiceResponseAsync(String re if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.start(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -849,7 +849,7 @@ public Observable> beginStartWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -941,7 +941,7 @@ public Observable> queryWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.query(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1015,7 +1015,7 @@ public Observable> beginQuery if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1100,7 +1100,7 @@ public Observable>> listWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, 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/DdosProtectionPlansInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DdosProtectionPlansInner.java index 86d9ce2de88..1de97aa9830 100644 --- 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 @@ -163,7 +163,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.delete(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -229,7 +229,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -315,7 +315,7 @@ public Observable> getByResourceGroupWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -407,7 +407,7 @@ public Observable> createOrUpdateWithSe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.createOrUpdate(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -482,7 +482,7 @@ public Observable> beginCreateOrUpdateW throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, ddosProtectionPlanName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -588,7 +588,7 @@ public Observable>> listSinglePage if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -701,7 +701,7 @@ public Observable>> listByResource if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, 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/DefaultSecurityRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/DefaultSecurityRulesInner.java index eee7453ba2a..884aed6e08e 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,7 +170,7 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceResponseAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName, this.client.subscriptionId(), apiVersion, 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/ExpressRouteCircuitAuthorizationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java index 009eb0b3a32..ca519b87baa 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,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -325,7 +325,7 @@ public Observable> getWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> create throw new IllegalArgumentException("Parameter authorizationParameters is required and cannot be null."); } Validator.validate(authorizationParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -506,7 +506,7 @@ public Observable> beginC throw new IllegalArgumentException("Parameter authorizationParameters is required and cannot be null."); } Validator.validate(authorizationParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, circuitName, authorizationName, this.client.subscriptionId(), authorizationParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, 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/ExpressRouteCircuitConnectionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitConnectionsInner.java index 9f4c16c01d5..214292f1857 100644 --- 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 @@ -152,7 +152,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.delete(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -332,7 +332,7 @@ public Observable> getWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -438,7 +438,7 @@ public Observable> createOrU throw new IllegalArgumentException("Parameter expressRouteCircuitConnectionParameters is required and cannot be null."); } Validator.validate(expressRouteCircuitConnectionParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.createOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), expressRouteCircuitConnectionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -527,7 +527,7 @@ public Observable> beginCrea throw new IllegalArgumentException("Parameter expressRouteCircuitConnectionParameters is required and cannot be null."); } Validator.validate(expressRouteCircuitConnectionParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, this.client.subscriptionId(), expressRouteCircuitConnectionParameters, apiVersion, 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/ExpressRouteCircuitPeeringsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java index 303fa7e0dae..bbdaf661fb3 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,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -325,7 +325,7 @@ public Observable> getWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> createOrUpda throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); } Validator.validate(peeringParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -506,7 +506,7 @@ public Observable> beginCreateO throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); } Validator.validate(peeringParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> listSi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, 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/ExpressRouteCircuitsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsInner.java index d690ea33067..e2f65c177ee 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 @@ -207,7 +207,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -273,7 +273,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -359,7 +359,7 @@ public Observable> getByResourceGroupW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -451,7 +451,7 @@ public Observable> createOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -526,7 +526,7 @@ public Observable> beginCreateOrUpdate throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, circuitName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -611,7 +611,7 @@ public Observable> updateTagsWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -685,7 +685,7 @@ public Observable> updateTagsWithServi throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); Observable> observable = service.updateTags(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -754,7 +754,7 @@ public Observable> beginUpdateTagsWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -839,7 +839,7 @@ public Observable> beginUpdateTagsWith throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.beginUpdateTags(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -939,7 +939,7 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -1020,7 +1020,7 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginListArpTable(resourceGroupName, circuitName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1119,7 +1119,7 @@ public 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()); } @@ -1200,7 +1200,7 @@ public Observable, Observable>>() { @Override @@ -1299,7 +1299,7 @@ public 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()); } @@ -1380,7 +1380,7 @@ public Observable, Observable>>() { @Override @@ -1465,7 +1465,7 @@ public Observable> getStatsWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getStats(resourceGroupName, circuitName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1556,7 +1556,7 @@ public Observable> getPeeringStat if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getPeeringStats(resourceGroupName, circuitName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1669,7 +1669,7 @@ public Observable>> listByResourc if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1774,7 +1774,7 @@ public Observable>> listSinglePag if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, 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/ExpressRouteCrossConnectionPeeringsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionPeeringsInner.java index 7a8d3fecc55..9ae609d2274 100644 --- 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 @@ -190,7 +190,7 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, crossConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -280,7 +280,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.delete(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -353,7 +353,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -446,7 +446,7 @@ public Observable> getW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -545,7 +545,7 @@ public Observable> crea throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); } Validator.validate(peeringParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.createOrUpdate(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -627,7 +627,7 @@ public Observable> begi throw new IllegalArgumentException("Parameter peeringParameters is required and cannot be null."); } Validator.validate(peeringParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, crossConnectionName, peeringName, this.client.subscriptionId(), peeringParameters, apiVersion, 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/ExpressRouteCrossConnectionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCrossConnectionsInner.java index 3a90e9302aa..3842d063af3 100644 --- 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 @@ -211,7 +211,7 @@ public Observable>> listS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -324,7 +324,7 @@ public Observable>> listB if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -408,7 +408,7 @@ public Observable> getByResour if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, crossConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -500,7 +500,7 @@ public Observable> createOrUpd throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.createOrUpdate(resourceGroupName, crossConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -575,7 +575,7 @@ public Observable> beginCreate throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, crossConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -659,7 +659,7 @@ public Observable> updateTagsW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject crossConnectionParameters = new TagsObject(); crossConnectionParameters.withTags(null); @@ -733,7 +733,7 @@ public Observable> updateTagsW throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject crossConnectionParameters = new TagsObject(); crossConnectionParameters.withTags(tags); Observable> observable = service.updateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()); @@ -802,7 +802,7 @@ public Observable> beginUpdate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject crossConnectionParameters = new TagsObject(); crossConnectionParameters.withTags(null); @@ -887,7 +887,7 @@ public Observable> beginUpdate throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject crossConnectionParameters = new TagsObject(); crossConnectionParameters.withTags(tags); return service.beginUpdateTags(resourceGroupName, crossConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), crossConnectionParameters, this.client.userAgent()) @@ -987,7 +987,7 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.listArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1068,7 +1068,7 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginListArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1167,7 +1167,7 @@ public Observable> observable = service.listRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1248,7 +1248,7 @@ public Observable, Observable>>() { @Override @@ -1347,7 +1347,7 @@ public Observable> observable = service.listRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1428,7 +1428,7 @@ public Observable, Observable>>() { @Override 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 66a699b65a3..45ca517557e 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,7 +149,7 @@ public Observable>> listS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, 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/InboundNatRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRulesInner.java index 39ade7c5f21..4121fe29a97 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,7 +190,7 @@ public Observable>> listSinglePageAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -280,7 +280,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -353,7 +353,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -446,7 +446,7 @@ public Observable> getWithServiceResponseAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final String expand = null; return service.get(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -535,7 +535,7 @@ public Observable> getWithServiceResponseAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -634,7 +634,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter inboundNatRuleParameters is required and cannot be null."); } Validator.validate(inboundNatRuleParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -716,7 +716,7 @@ public Observable> beginCreateOrUpdateWithS throw new IllegalArgumentException("Parameter inboundNatRuleParameters is required and cannot be null."); } Validator.validate(inboundNatRuleParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, loadBalancerName, inboundNatRuleName, this.client.subscriptionId(), inboundNatRuleParameters, apiVersion, 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/LoadBalancerBackendAddressPoolsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerBackendAddressPoolsInner.java index f2c932fce3a..054eb7893bd 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,7 +170,7 @@ public Observable>> listSinglePage if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceRespon if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, loadBalancerName, backendAddressPoolName, this.client.subscriptionId(), apiVersion, 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/LoadBalancerFrontendIPConfigurationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerFrontendIPConfigurationsInner.java index 995d01cce6d..00aa907b86a 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,7 +170,7 @@ public Observable>> listSingl if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, loadBalancerName, frontendIPConfigurationName, this.client.subscriptionId(), apiVersion, 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/LoadBalancerLoadBalancingRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerLoadBalancingRulesInner.java index 33f05b5f887..d6f3d85035e 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,7 +170,7 @@ public Observable>> listSinglePageA if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceRespons if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, loadBalancerName, loadBalancingRuleName, this.client.subscriptionId(), apiVersion, 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/LoadBalancerNetworkInterfacesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerNetworkInterfacesInner.java index 76dad7fd5a8..e62d94bcb9b 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,7 +165,7 @@ public Observable>> listSinglePageAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, 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/LoadBalancerProbesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerProbesInner.java index 5e269a3b21f..e39baaedc68 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,7 +170,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, loadBalancerName, probeName, this.client.subscriptionId(), apiVersion, 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/LoadBalancersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java index 5ea1f17cec2..86e54f551f8 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 @@ -174,7 +174,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -240,7 +240,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -326,7 +326,7 @@ public Observable> getByResourceGroupWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -408,7 +408,7 @@ public Observable> getByResourceGroupWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -500,7 +500,7 @@ public Observable> createOrUpdateWithServiceR throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -575,7 +575,7 @@ public Observable> beginCreateOrUpdateWithSer throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, loadBalancerName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -660,7 +660,7 @@ public Observable> updateTagsWithServiceRespo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -734,7 +734,7 @@ public Observable> updateTagsWithServiceRespo throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); Observable> observable = service.updateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -803,7 +803,7 @@ public Observable> beginUpdateTagsWithService if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -888,7 +888,7 @@ public Observable> beginUpdateTagsWithService throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.beginUpdateTags(resourceGroupName, loadBalancerName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -995,7 +995,7 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1108,7 +1108,7 @@ public Observable>> listByResourceGroupS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, 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/LocalNetworkGatewaysInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java index 0decf765c48..570b25fc440 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 @@ -174,7 +174,7 @@ public Observable> createOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -249,7 +249,7 @@ public Observable> beginCreateOrUpdate throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -334,7 +334,7 @@ public Observable> getByResourceGroupW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -417,7 +417,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -483,7 +483,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -569,7 +569,7 @@ public Observable> updateTagsWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -643,7 +643,7 @@ public Observable> updateTagsWithServi throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); Observable> observable = service.updateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -712,7 +712,7 @@ public Observable> beginUpdateTagsWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -797,7 +797,7 @@ public Observable> beginUpdateTagsWith throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.beginUpdateTags(resourceGroupName, localNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -912,7 +912,7 @@ public Observable>> listByResourc if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, 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/NetworkInterfaceIPConfigurationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationsInner.java index 48e2989989c..0ba0d10c7af 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,7 +170,7 @@ public Observable>> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -261,7 +261,7 @@ public Observable> getWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, networkInterfaceName, ipConfigurationName, this.client.subscriptionId(), apiVersion, 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/NetworkInterfaceLoadBalancersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceLoadBalancersInner.java index 0e7855e2d9d..a1b5c0dfbdf 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 @@ -165,7 +165,7 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, 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/NetworkInterfacesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java index 3341a83a146..0fa228100cd 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 @@ -223,7 +223,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -289,7 +289,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -375,7 +375,7 @@ public Observable> getByResourceGroupWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -457,7 +457,7 @@ public Observable> getByResourceGroupWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -549,7 +549,7 @@ public Observable> createOrUpdateWithServ throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -624,7 +624,7 @@ public Observable> beginCreateOrUpdateWit throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -709,7 +709,7 @@ public Observable> updateTagsWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -783,7 +783,7 @@ public Observable> updateTagsWithServiceR throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); Observable> observable = service.updateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -852,7 +852,7 @@ public Observable> beginUpdateTagsWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -937,7 +937,7 @@ public Observable> beginUpdateTagsWithSer throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.beginUpdateTags(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1044,7 +1044,7 @@ public Observable>> listSinglePageAs if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1157,7 +1157,7 @@ public Observable>> listByResourceGr if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1241,7 +1241,7 @@ public Observable> getEffectiveRo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.getEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1308,7 +1308,7 @@ public Observable> beginGetEffect if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginGetEffectiveRouteTable(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1393,7 +1393,7 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.listEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1460,7 +1460,7 @@ public Observable> if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginListEffectiveNetworkSecurityGroups(resourceGroupName, networkInterfaceName, this.client.subscriptionId(), apiVersion, 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/NetworkManagementClientImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java index 4bfbb90cedb..aa1da9d561b 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 @@ -836,7 +836,7 @@ public Observable> checkDnsNameA if (domainNameLabel == null) { throw new IllegalArgumentException("Parameter domainNameLabel is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.checkDnsNameAvailability(location, this.subscriptionId(), domainNameLabel, apiVersion, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override 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 5a17bb7fbbf..932eaeb2e31 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 @@ -174,7 +174,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -240,7 +240,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -326,7 +326,7 @@ public Observable> getByResourceGroup if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -408,7 +408,7 @@ public Observable> getByResourceGroup if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -500,7 +500,7 @@ public Observable> createOrUpdateWith throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -575,7 +575,7 @@ public Observable> beginCreateOrUpdat throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -660,7 +660,7 @@ public Observable> updateTagsWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -734,7 +734,7 @@ public Observable> updateTagsWithServ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); Observable> observable = service.updateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -803,7 +803,7 @@ public Observable> beginUpdateTagsWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -888,7 +888,7 @@ public Observable> beginUpdateTagsWit throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.beginUpdateTags(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -995,7 +995,7 @@ public Observable>> listSinglePa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1108,7 +1108,7 @@ public Observable>> listByResour if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, 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/NetworkWatchersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkWatchersInner.java index d2598bf4592..0687df726aa 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 @@ -252,7 +252,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.createOrUpdate(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -337,7 +337,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -420,7 +420,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -486,7 +486,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -571,7 +571,7 @@ public Observable> updateTagsWithServiceRes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -656,7 +656,7 @@ public Observable> updateTagsWithServiceRes throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.updateTags(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -739,7 +739,7 @@ public Observable>> listByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -814,7 +814,7 @@ public Observable>> listWithServiceRes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -907,7 +907,7 @@ public Observable> getTopologyWithServiceResponse throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getTopology(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -999,7 +999,7 @@ public Observable> verifyIPFlowWi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -1074,7 +1074,7 @@ public Observable> beginVerifyIPF throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginVerifyIPFlow(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1167,7 +1167,7 @@ public Observable> getNextHopWithServiceResp throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -1242,7 +1242,7 @@ public Observable> beginGetNextHopWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginGetNextHop(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1334,7 +1334,7 @@ public Observable> getVMSecurityRu if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; SecurityGroupViewParameters parameters = new SecurityGroupViewParameters(); parameters.withTargetResourceId(targetResourceId); Observable> observable = service.getVMSecurityRules(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -1410,7 +1410,7 @@ public Observable> beginGetVMSecur if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; SecurityGroupViewParameters parameters = new SecurityGroupViewParameters(); parameters.withTargetResourceId(targetResourceId); return service.beginGetVMSecurityRules(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1505,7 +1505,7 @@ public Observable> getTroubleshootin throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -1580,7 +1580,7 @@ public Observable> beginGetTroublesh throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginGetTroubleshooting(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1672,7 +1672,7 @@ public Observable> getTroubleshootin if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; QueryTroubleshootingParameters parameters = new QueryTroubleshootingParameters(); parameters.withTargetResourceId(targetResourceId); Observable> observable = service.getTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -1748,7 +1748,7 @@ public Observable> beginGetTroublesh if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; QueryTroubleshootingParameters parameters = new QueryTroubleshootingParameters(); parameters.withTargetResourceId(targetResourceId); return service.beginGetTroubleshootingResult(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1843,7 +1843,7 @@ public Observable> setFlowLogConfigurat throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -1918,7 +1918,7 @@ public Observable> beginSetFlowLogConfi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginSetFlowLogConfiguration(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2010,7 +2010,7 @@ public Observable> getFlowLogStatusWith if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; FlowLogStatusParameters parameters = new FlowLogStatusParameters(); parameters.withTargetResourceId(targetResourceId); Observable> observable = service.getFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -2086,7 +2086,7 @@ public Observable> beginGetFlowLogStatu if (targetResourceId == null) { throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; FlowLogStatusParameters parameters = new FlowLogStatusParameters(); parameters.withTargetResourceId(targetResourceId); return service.beginGetFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -2181,7 +2181,7 @@ public Observable> checkConnectivi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -2256,7 +2256,7 @@ public Observable> beginCheckConne throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCheckConnectivity(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2349,7 +2349,7 @@ public Observable> getAzureReachab throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.getAzureReachabilityReport(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2424,7 +2424,7 @@ public Observable> beginGetAzureRe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginGetAzureReachabilityReport(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2517,7 +2517,7 @@ public Observable> listAvailablePro throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.listAvailableProviders(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2592,7 +2592,7 @@ public Observable> beginListAvailab throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginListAvailableProviders(resourceGroupName, networkWatcherName, this.client.subscriptionId(), parameters, apiVersion, 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/OperationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/OperationsInner.java index 794f9c5f7aa..e3654b74999 100644 --- 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 @@ -145,7 +145,7 @@ public Observable>> call(ServiceResponse>> listSinglePageAsync() { - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(apiVersion, 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/PacketCapturesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PacketCapturesInner.java index f5ad2d04515..e3ef27955fc 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 @@ -176,7 +176,7 @@ public Observable> createWithServiceRe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -258,7 +258,7 @@ public Observable> beginCreateWithServ throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreate(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -349,7 +349,7 @@ public Observable> getWithServiceRespo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -439,7 +439,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -512,7 +512,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -603,7 +603,7 @@ public Observable> stopWithServiceResponseAsync(String res if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -676,7 +676,7 @@ public Observable> beginStopWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginStop(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -768,7 +768,7 @@ public Observable> getStatu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -842,7 +842,7 @@ public Observable> beginGet if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginGetStatus(resourceGroupName, networkWatcherName, packetCaptureName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -927,7 +927,7 @@ public Observable>> listWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, 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/PublicIPAddressesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java index 2467ced6501..8a123e6c1e7 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 @@ -194,7 +194,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -260,7 +260,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -346,7 +346,7 @@ public Observable> getByResourceGroupWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -428,7 +428,7 @@ public Observable> getByResourceGroupWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -520,7 +520,7 @@ public Observable> createOrUpdateWithServi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -595,7 +595,7 @@ public Observable> beginCreateOrUpdateWith throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -680,7 +680,7 @@ public Observable> updateTagsWithServiceRe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -754,7 +754,7 @@ public Observable> updateTagsWithServiceRe throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); Observable> observable = service.updateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -823,7 +823,7 @@ public Observable> beginUpdateTagsWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -908,7 +908,7 @@ public Observable> beginUpdateTagsWithServ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.beginUpdateTags(resourceGroupName, publicIpAddressName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1015,7 +1015,7 @@ public Observable>> listSinglePageAsy if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1128,7 +1128,7 @@ public Observable>> listByResourceGro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, 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/RouteFilterRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFilterRulesInner.java index 2e63126c8f7..6d1f75bf2d1 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,7 +168,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -241,7 +241,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -334,7 +334,7 @@ public Observable> getWithServiceResponseA if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -433,7 +433,7 @@ public Observable> createOrUpdateWithServi throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -515,7 +515,7 @@ public Observable> beginCreateOrUpdateWith throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -615,7 +615,7 @@ public Observable> updateWithServiceRespon throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -697,7 +697,7 @@ public Observable> beginUpdateWithServiceR throw new IllegalArgumentException("Parameter routeFilterRuleParameters is required and cannot be null."); } Validator.validate(routeFilterRuleParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginUpdate(resourceGroupName, routeFilterName, ruleName, this.client.subscriptionId(), routeFilterRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -818,7 +818,7 @@ public Observable>> listByRouteFilter if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByRouteFilter(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, 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/RouteFiltersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java index f461ef0aa1d..8fd3cb5842b 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,7 +172,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -238,7 +238,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -324,7 +324,7 @@ public Observable> getByResourceGroupWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -406,7 +406,7 @@ public Observable> getByResourceGroupWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, routeFilterName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -498,7 +498,7 @@ public Observable> createOrUpdateWithServiceRe throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } Validator.validate(routeFilterParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -573,7 +573,7 @@ public Observable> beginCreateOrUpdateWithServ throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } Validator.validate(routeFilterParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -666,7 +666,7 @@ public Observable> updateWithServiceResponseAs throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } Validator.validate(routeFilterParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -741,7 +741,7 @@ public Observable> beginUpdateWithServiceRespo throw new IllegalArgumentException("Parameter routeFilterParameters is required and cannot be null."); } Validator.validate(routeFilterParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginUpdate(resourceGroupName, routeFilterName, this.client.subscriptionId(), routeFilterParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -854,7 +854,7 @@ public Observable>> listByResourceGroupSi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -959,7 +959,7 @@ public Observable>> listSinglePageAsync() if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, 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/RouteTablesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java index af7be12a4f4..71f6dbf30a6 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 @@ -174,7 +174,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -240,7 +240,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -326,7 +326,7 @@ public Observable> getByResourceGroupWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -408,7 +408,7 @@ public Observable> getByResourceGroupWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -500,7 +500,7 @@ public Observable> createOrUpdateWithServiceRes throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -575,7 +575,7 @@ public Observable> beginCreateOrUpdateWithServi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, routeTableName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -660,7 +660,7 @@ public Observable> updateTagsWithServiceRespons if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -734,7 +734,7 @@ public Observable> updateTagsWithServiceRespons throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); Observable> observable = service.updateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -803,7 +803,7 @@ public Observable> beginUpdateTagsWithServiceRe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -888,7 +888,7 @@ public Observable> beginUpdateTagsWithServiceRe throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.beginUpdateTags(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1003,7 +1003,7 @@ public Observable>> listByResourceGroupSin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1108,7 +1108,7 @@ public Observable>> listSinglePageAsync() if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, 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/RoutesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java index e6053d994b2..e8d4d97c44c 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,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -325,7 +325,7 @@ public Observable> getWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> createOrUpdateWithServiceResponse throw new IllegalArgumentException("Parameter routeParameters is required and cannot be null."); } Validator.validate(routeParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -506,7 +506,7 @@ public Observable> beginCreateOrUpdateWithServiceRes throw new IllegalArgumentException("Parameter routeParameters is required and cannot be null."); } Validator.validate(routeParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, routeTableName, routeName, this.client.subscriptionId(), routeParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, routeTableName, this.client.subscriptionId(), apiVersion, 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/SecurityRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java index 4ec2c9ea04a..923a29dcf86 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,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -325,7 +325,7 @@ public Observable> getWithServiceResponseAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> createOrUpdateWithServiceR throw new IllegalArgumentException("Parameter securityRuleParameters is required and cannot be null."); } Validator.validate(securityRuleParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -506,7 +506,7 @@ public Observable> beginCreateOrUpdateWithSer throw new IllegalArgumentException("Parameter securityRuleParameters is required and cannot be null."); } Validator.validate(securityRuleParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, securityRuleName, this.client.subscriptionId(), securityRuleParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> listSinglePageAsync( if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, networkSecurityGroupName, this.client.subscriptionId(), apiVersion, 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/SubnetsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java index 2f8f0592259..392007b0617 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,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -325,7 +325,7 @@ public Observable> getWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final String expand = null; return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -414,7 +414,7 @@ public Observable> getWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -513,7 +513,7 @@ public Observable> createOrUpdateWithServiceRespons throw new IllegalArgumentException("Parameter subnetParameters is required and cannot be null."); } Validator.validate(subnetParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -595,7 +595,7 @@ public Observable> beginCreateOrUpdateWithServiceRe throw new IllegalArgumentException("Parameter subnetParameters is required and cannot be null."); } Validator.validate(subnetParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), subnetParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -717,7 +717,7 @@ public Observable>> listSinglePageAsync(final if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, 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/UsagesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java index fcf8acc3178..ced0424e5c6 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 @@ -157,7 +157,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(location, this.client.subscriptionId(), apiVersion, 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/VirtualNetworkGatewayConnectionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java index 5be491f29af..02e838ecce5 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 @@ -195,7 +195,7 @@ public Observable> createO throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -270,7 +270,7 @@ public Observable> beginCr throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -355,7 +355,7 @@ public Observable> getByRe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -438,7 +438,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -504,7 +504,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -590,7 +590,7 @@ public Observable tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -664,7 +664,7 @@ public Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -733,7 +733,7 @@ public Observable tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -818,7 +818,7 @@ public Observable> setSharedKeyWithSer if (value == null) { throw new IllegalArgumentException("Parameter value is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; ConnectionSharedKeyInner parameters = new ConnectionSharedKeyInner(); parameters.withValue(value); Observable> observable = service.setSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -987,7 +987,7 @@ public Observable> beginSetSharedKeyWi if (value == null) { throw new IllegalArgumentException("Parameter value is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; ConnectionSharedKeyInner parameters = new ConnectionSharedKeyInner(); parameters.withValue(value); return service.beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1074,7 +1074,7 @@ public Observable> getSharedKeyWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1187,7 +1187,7 @@ public Observable>> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1275,7 +1275,7 @@ public Observable> resetSharedKey if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; ConnectionResetSharedKeyInner parameters = new ConnectionResetSharedKeyInner(); parameters.withKeyLength(keyLength); Observable> observable = service.resetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -1348,7 +1348,7 @@ public Observable> beginResetShar if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; ConnectionResetSharedKeyInner parameters = new ConnectionResetSharedKeyInner(); parameters.withKeyLength(keyLength); return service.beginResetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) 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 d78cdbd80bb..7cda3c824e6 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 @@ -263,7 +263,7 @@ public Observable> createOrUpdateWit throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -338,7 +338,7 @@ public Observable> beginCreateOrUpda throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -423,7 +423,7 @@ public Observable> getByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -506,7 +506,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -572,7 +572,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -658,7 +658,7 @@ public Observable> updateTagsWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -732,7 +732,7 @@ public Observable> updateTagsWithSer throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); Observable> observable = service.updateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -801,7 +801,7 @@ public Observable> beginUpdateTagsWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -886,7 +886,7 @@ public Observable> beginUpdateTagsWi throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.beginUpdateTags(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1001,7 +1001,7 @@ public Observable>> listByResou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1122,7 +1122,7 @@ public Observable, Observable>>>() { @Override @@ -1206,7 +1206,7 @@ public Observable> resetWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); @@ -1277,7 +1277,7 @@ public Observable> resetWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -1344,7 +1344,7 @@ public Observable> beginResetWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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>>() { @@ -1426,7 +1426,7 @@ public Observable> beginResetWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginReset(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), gatewayVip, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1519,7 +1519,7 @@ public Observable> generatevpnclientpackageWithServiceRe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -1594,7 +1594,7 @@ public Observable> beginGeneratevpnclientpackageWithServ throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginGeneratevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1686,7 +1686,7 @@ public Observable> generateVpnProfileWithServiceResponse throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -1761,7 +1761,7 @@ public Observable> beginGenerateVpnProfileWithServiceRes throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginGenerateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1846,7 +1846,7 @@ public Observable> getVpnProfilePackageUrlWithServiceRes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.getVpnProfilePackageUrl(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1913,7 +1913,7 @@ public Observable> beginGetVpnProfilePackageUrlWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginGetVpnProfilePackageUrl(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1998,7 +1998,7 @@ public Observable> getBgpPeerStatu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); @@ -2069,7 +2069,7 @@ public Observable> getBgpPeerStatu if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -2136,7 +2136,7 @@ public Observable> beginGetBgpPeer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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>>() { @@ -2218,7 +2218,7 @@ public Observable> beginGetBgpPeer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginGetBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2303,7 +2303,7 @@ public Observable> supportedVpnDevicesWithServiceRespons if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2387,7 +2387,7 @@ public Observable> getLearnedRoutes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -2454,7 +2454,7 @@ public Observable> beginGetLearnedR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginGetLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2546,7 +2546,7 @@ public Observable> getAdvertisedRou if (peer == null) { throw new IllegalArgumentException("Parameter peer is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -2620,7 +2620,7 @@ public Observable> beginGetAdvertis if (peer == null) { throw new IllegalArgumentException("Parameter peer is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginGetAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), peer, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2713,7 +2713,7 @@ public Observable> setVpnclientIp throw new IllegalArgumentException("Parameter vpnclientIpsecParams is required and cannot be null."); } Validator.validate(vpnclientIpsecParams); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.setVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), vpnclientIpsecParams, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2788,7 +2788,7 @@ public Observable> beginSetVpncli throw new IllegalArgumentException("Parameter vpnclientIpsecParams is required and cannot be null."); } Validator.validate(vpnclientIpsecParams); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginSetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), vpnclientIpsecParams, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2873,7 +2873,7 @@ public Observable> getVpnclientIp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; Observable> observable = service.getVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2940,7 +2940,7 @@ public Observable> beginGetVpncli if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginGetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -3032,7 +3032,7 @@ public Observable> vpnDeviceConfigurationScriptWithServi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.vpnDeviceConfigurationScript(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.subscriptionId(), parameters, apiVersion, 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/VirtualNetworkPeeringsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringsInner.java index 5df48ebb41d..ee618ddc7bf 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,7 +159,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -232,7 +232,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -325,7 +325,7 @@ public Observable> getWithServiceRes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.get(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -424,7 +424,7 @@ public Observable> createOrUpdateWit throw new IllegalArgumentException("Parameter virtualNetworkPeeringParameters is required and cannot be null."); } Validator.validate(virtualNetworkPeeringParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -506,7 +506,7 @@ public Observable> beginCreateOrUpda throw new IllegalArgumentException("Parameter virtualNetworkPeeringParameters is required and cannot be null."); } Validator.validate(virtualNetworkPeeringParameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, this.client.subscriptionId(), virtualNetworkPeeringParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -628,7 +628,7 @@ public Observable>> listSingleP if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, 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/VirtualNetworksInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java index 8f7440219f2..0975939f165 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 @@ -186,7 +186,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -252,7 +252,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginDelete(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -338,7 +338,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final String expand = null; return service.getByResourceGroup(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -420,7 +420,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.getByResourceGroup(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, expand, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -512,7 +512,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-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()); } @@ -587,7 +587,7 @@ public Observable> beginCreateOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.beginCreateOrUpdate(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -672,7 +672,7 @@ public Observable> updateTagsWithServiceRes if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -746,7 +746,7 @@ public Observable> updateTagsWithServiceRes throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); Observable> observable = service.updateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); @@ -815,7 +815,7 @@ public Observable> beginUpdateTagsWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -900,7 +900,7 @@ public Observable> beginUpdateTagsWithServi throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.beginUpdateTags(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -1007,7 +1007,7 @@ public Observable>> listSinglePageAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1120,7 +1120,7 @@ public Observable>> listByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1204,7 +1204,7 @@ public Observable> checkIPAddr if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; final String ipAddress = null; return service.checkIPAddressAvailability(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), ipAddress, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1286,7 +1286,7 @@ public Observable> checkIPAddr if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.checkIPAddressAvailability(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), ipAddress, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1407,7 +1407,7 @@ public Observable>> listUsageSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2018-04-01"; + final String apiVersion = "2018-05-01"; return service.listUsage(resourceGroupName, virtualNetworkName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override