From 5e50aacda73153c9897258ffdccfd6f1e94aaef3 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Fri, 24 Jan 2020 00:22:57 +0000 Subject: [PATCH] Generated from 0ecced6df75e2d271085933b39d22ca66930cc30 Add new api-version for network --- sdk/network/mgmt-v2019_04_01/pom.xml | 4 +- .../ApplicationGatewayOnDemandProbe.java | 49 +- .../ApplicationGatewaySslCipherSuite.java | 9 + .../AutoApprovedPrivateLinkService.java | 25 + .../AvailableEndpointServices.java | 5 +- .../AvailablePrivateEndpointType.java | 40 + .../AvailablePrivateEndpointTypes.java | 12 +- .../AvailableResourceGroupDelegations.java | 5 +- .../v2019_04_01/BackendAddressPool.java | 5 + .../BastionHostIPConfiguration.java | 13 +- ...ckPrivateLinkServiceVisibilityRequest.java | 43 + .../network/v2019_04_01/PrivateEndpoint.java | 6 +- .../PrivateEndpointConnection.java | 133 +-- .../v2019_04_01/PrivateLinkService.java | 39 +- .../PrivateLinkServiceConnection.java | 46 + .../PrivateLinkServiceConnectionState.java | 16 +- .../PrivateLinkServiceIpConfiguration.java | 79 +- .../PrivateLinkServiceVisibility.java | 25 + .../v2019_04_01/PrivateLinkServices.java | 43 +- .../network/v2019_04_01/PublicIPPrefix.java | 6 + .../network/v2019_04_01/ServiceTags.java | 6 +- .../network/v2019_04_01/Subnet.java | 62 +- .../ApplicationGatewaysImpl.java | 4 +- .../ApplicationGatewaysInner.java | 73 +- .../AutoApprovedPrivateLinkServiceImpl.java | 35 + .../AutoApprovedPrivateLinkServiceInner.java | 43 + .../AvailableEndpointServicesImpl.java | 6 +- .../AvailablePrivateEndpointTypeImpl.java | 50 + .../AvailablePrivateEndpointTypeInner.java | 42 +- .../AvailablePrivateEndpointTypesImpl.java | 30 +- .../AvailablePrivateEndpointTypesInner.java | 240 +++++ ...AvailableResourceGroupDelegationsImpl.java | 6 +- .../BackendAddressPoolImpl.java | 5 + .../BackendAddressPoolInner.java | 15 + .../ConnectionMonitorsImpl.java | 10 +- .../ConnectionMonitorsInner.java | 2 - .../DefaultSecurityRulesImpl.java | 10 +- ...ExpressRouteCircuitAuthorizationsImpl.java | 10 +- .../ExpressRouteCircuitConnectionsImpl.java | 10 +- .../ExpressRouteCircuitPeeringsImpl.java | 10 +- .../ExpressRouteCircuitsInner.java | 2 - .../ExpressRouteConnectionsImpl.java | 10 +- ...pressRouteCrossConnectionPeeringsImpl.java | 10 +- .../ExpressRouteCrossConnectionsInner.java | 2 - .../implementation/ExpressRouteLinksImpl.java | 10 +- .../HubVirtualNetworkConnectionsImpl.java | 10 +- .../implementation/InboundNatRulesImpl.java | 10 +- .../LoadBalancerBackendAddressPoolsImpl.java | 10 +- ...dBalancerFrontendIPConfigurationsImpl.java | 10 +- .../LoadBalancerLoadBalancingRulesImpl.java | 10 +- .../LoadBalancerOutboundRulesImpl.java | 10 +- .../LoadBalancerProbesImpl.java | 10 +- .../NetworkInterfaceIPConfigurationsImpl.java | 10 +- ...NetworkInterfaceTapConfigurationsImpl.java | 10 +- .../implementation/NetworkInterfacesImpl.java | 20 +- .../NetworkInterfacesInner.java | 2 - .../NetworkManagementClientImpl.java | 44 +- .../implementation/NetworkManager.java | 36 +- .../implementation/NetworkProfilesInner.java | 89 ++ .../implementation/NetworkWatchersInner.java | 2 - .../implementation/OutboundRuleInner.java | 2 +- .../implementation/P2sVpnGatewaysInner.java | 2 - .../P2sVpnServerConfigurationsImpl.java | 10 +- .../implementation/PacketCapturesImpl.java | 10 +- .../implementation/PacketCapturesInner.java | 2 - ...eerExpressRouteCircuitConnectionsImpl.java | 10 +- .../PrivateEndpointConnectionImpl.java | 138 +++ .../PrivateEndpointConnectionInner.java | 148 +++ .../implementation/PrivateEndpointImpl.java | 3 +- .../implementation/PrivateEndpointInner.java | 18 +- .../implementation/PrivateEndpointsInner.java | 16 +- .../PrivateLinkServiceImpl.java | 25 +- .../PrivateLinkServiceInner.java | 41 +- .../PrivateLinkServiceVisibilityImpl.java | 31 + .../PrivateLinkServiceVisibilityInner.java | 43 + .../PrivateLinkServicesImpl.java | 77 +- .../PrivateLinkServicesInner.java | 859 +++++++++++++++++- .../implementation/PublicIPPrefixImpl.java | 6 + .../implementation/PublicIPPrefixInner.java | 17 + .../implementation/RouteFilterRulesImpl.java | 10 +- .../implementation/RoutesImpl.java | 10 +- .../implementation/SecurityRulesImpl.java | 10 +- .../ServiceEndpointPolicyDefinitionsImpl.java | 10 +- .../implementation/ServiceTagsInner.java | 8 +- .../implementation/SubnetImpl.java | 22 + .../implementation/SubnetInner.java | 52 ++ .../implementation/SubnetsImpl.java | 10 +- .../implementation/SubnetsInner.java | 2 - ...VirtualNetworkGatewayConnectionsInner.java | 2 - .../VirtualNetworkGatewaysInner.java | 184 +++- .../VirtualNetworkPeeringsImpl.java | 10 +- .../implementation/VpnConnectionsImpl.java | 10 +- .../implementation/VpnGatewaysInner.java | 2 - .../VpnSitesConfigurationsInner.java | 2 - 94 files changed, 2911 insertions(+), 480 deletions(-) create mode 100644 sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AutoApprovedPrivateLinkService.java create mode 100644 sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailablePrivateEndpointType.java create mode 100644 sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/CheckPrivateLinkServiceVisibilityRequest.java create mode 100644 sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceVisibility.java create mode 100644 sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AutoApprovedPrivateLinkServiceImpl.java create mode 100644 sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AutoApprovedPrivateLinkServiceInner.java create mode 100644 sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypeImpl.java create mode 100644 sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointConnectionImpl.java create mode 100644 sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointConnectionInner.java create mode 100644 sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceVisibilityImpl.java create mode 100644 sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceVisibilityInner.java diff --git a/sdk/network/mgmt-v2019_04_01/pom.xml b/sdk/network/mgmt-v2019_04_01/pom.xml index e212b1f9c5d6f..2c06d85ab6434 100644 --- a/sdk/network/mgmt-v2019_04_01/pom.xml +++ b/sdk/network/mgmt-v2019_04_01/pom.xml @@ -11,7 +11,7 @@ com.microsoft.azure azure-arm-parent - 1.2.0 + 1.1.0 ../../../pom.management.xml azure-mgmt-network @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/ApplicationGatewayOnDemandProbe.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/ApplicationGatewayOnDemandProbe.java index 589745596b9ac..a8545e3d634d2 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/ApplicationGatewayOnDemandProbe.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/ApplicationGatewayOnDemandProbe.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.network.v2019_04_01; +import com.microsoft.azure.SubResource; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -56,18 +57,18 @@ public class ApplicationGatewayOnDemandProbe { private ApplicationGatewayProbeHealthResponseMatch match; /** - * Name of backend pool of application gateway to which probe request will - * be sent. + * Reference of backend pool of application gateway to which probe request + * will be sent. */ - @JsonProperty(value = "backendPoolName") - private String backendPoolName; + @JsonProperty(value = "backendAddressPool") + private SubResource backendAddressPool; /** - * Name of backend http setting of application gateway to be used for test - * probe. + * Reference of backend http setting of application gateway to be used for + * test probe. */ - @JsonProperty(value = "backendHttpSettingName") - private String backendHttpSettingName; + @JsonProperty(value = "backendHttpSettings") + private SubResource backendHttpSettings; /** * Get the protocol used for the probe. Possible values include: 'Http', 'Https'. @@ -190,42 +191,42 @@ public ApplicationGatewayOnDemandProbe withMatch(ApplicationGatewayProbeHealthRe } /** - * Get name of backend pool of application gateway to which probe request will be sent. + * Get reference of backend pool of application gateway to which probe request will be sent. * - * @return the backendPoolName value + * @return the backendAddressPool value */ - public String backendPoolName() { - return this.backendPoolName; + public SubResource backendAddressPool() { + return this.backendAddressPool; } /** - * Set name of backend pool of application gateway to which probe request will be sent. + * Set reference of backend pool of application gateway to which probe request will be sent. * - * @param backendPoolName the backendPoolName value to set + * @param backendAddressPool the backendAddressPool value to set * @return the ApplicationGatewayOnDemandProbe object itself. */ - public ApplicationGatewayOnDemandProbe withBackendPoolName(String backendPoolName) { - this.backendPoolName = backendPoolName; + public ApplicationGatewayOnDemandProbe withBackendAddressPool(SubResource backendAddressPool) { + this.backendAddressPool = backendAddressPool; return this; } /** - * Get name of backend http setting of application gateway to be used for test probe. + * Get reference of backend http setting of application gateway to be used for test probe. * - * @return the backendHttpSettingName value + * @return the backendHttpSettings value */ - public String backendHttpSettingName() { - return this.backendHttpSettingName; + public SubResource backendHttpSettings() { + return this.backendHttpSettings; } /** - * Set name of backend http setting of application gateway to be used for test probe. + * Set reference of backend http setting of application gateway to be used for test probe. * - * @param backendHttpSettingName the backendHttpSettingName value to set + * @param backendHttpSettings the backendHttpSettings value to set * @return the ApplicationGatewayOnDemandProbe object itself. */ - public ApplicationGatewayOnDemandProbe withBackendHttpSettingName(String backendHttpSettingName) { - this.backendHttpSettingName = backendHttpSettingName; + public ApplicationGatewayOnDemandProbe withBackendHttpSettings(SubResource backendHttpSettings) { + this.backendHttpSettings = backendHttpSettings; return this; } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/ApplicationGatewaySslCipherSuite.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/ApplicationGatewaySslCipherSuite.java index 7227026246852..15207a890173b 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/ApplicationGatewaySslCipherSuite.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/ApplicationGatewaySslCipherSuite.java @@ -91,6 +91,15 @@ public final class ApplicationGatewaySslCipherSuite extends ExpandableStringEnum /** Static value TLS_RSA_WITH_3DES_EDE_CBC_SHA for ApplicationGatewaySslCipherSuite. */ public static final ApplicationGatewaySslCipherSuite TLS_RSA_WITH_3DES_EDE_CBC_SHA = fromString("TLS_RSA_WITH_3DES_EDE_CBC_SHA"); + /** Static value TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = fromString("TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA"); + + /** Static value TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = fromString("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"); + + /** Static value TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 for ApplicationGatewaySslCipherSuite. */ + public static final ApplicationGatewaySslCipherSuite TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = fromString("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"); + /** * Creates or finds a ApplicationGatewaySslCipherSuite from its string representation. * @param name a name to look for diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AutoApprovedPrivateLinkService.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AutoApprovedPrivateLinkService.java new file mode 100644 index 0000000000000..4ba09b8cbbf50 --- /dev/null +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AutoApprovedPrivateLinkService.java @@ -0,0 +1,25 @@ +/** + * 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.v2019_04_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_04_01.implementation.AutoApprovedPrivateLinkServiceInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_04_01.implementation.NetworkManager; + +/** + * Type representing AutoApprovedPrivateLinkService. + */ +public interface AutoApprovedPrivateLinkService extends HasInner, HasManager { + /** + * @return the privateLinkService value. + */ + String privateLinkService(); + +} diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailableEndpointServices.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailableEndpointServices.java index b205a50ad1ef0..ec1beee81ade3 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailableEndpointServices.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailableEndpointServices.java @@ -9,12 +9,13 @@ package com.microsoft.azure.management.network.v2019_04_01; import rx.Observable; -import com.microsoft.azure.management.network.v2019_04_01.EndpointServiceResult; +import com.microsoft.azure.management.network.v2019_04_01.implementation.AvailableEndpointServicesInner; +import com.microsoft.azure.arm.model.HasInner; /** * Type representing AvailableEndpointServices. */ -public interface AvailableEndpointServices { +public interface AvailableEndpointServices extends HasInner { /** * List what values of endpoint services are available for use. * diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailablePrivateEndpointType.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailablePrivateEndpointType.java new file mode 100644 index 0000000000000..f38c8e9d0ec0d --- /dev/null +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailablePrivateEndpointType.java @@ -0,0 +1,40 @@ +/** + * 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.v2019_04_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.network.v2019_04_01.implementation.AvailablePrivateEndpointTypeInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_04_01.implementation.NetworkManager; + +/** + * Type representing AvailablePrivateEndpointType. + */ +public interface AvailablePrivateEndpointType extends HasInner, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the resourceName value. + */ + String resourceName(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailablePrivateEndpointTypes.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailablePrivateEndpointTypes.java index 90c55661a5df8..3cdbc85052b82 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailablePrivateEndpointTypes.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailablePrivateEndpointTypes.java @@ -20,9 +20,19 @@ public interface AvailablePrivateEndpointTypes extends HasInner listAsync(final String location); + Observable listByResourceGroupAsync(final String location, final String resourceGroupName); + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String location); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailableResourceGroupDelegations.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailableResourceGroupDelegations.java index 1f57b41d5c203..a6a0e80384b1a 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailableResourceGroupDelegations.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailableResourceGroupDelegations.java @@ -9,12 +9,13 @@ package com.microsoft.azure.management.network.v2019_04_01; import rx.Observable; -import com.microsoft.azure.management.network.v2019_04_01.LocationAvailableDelegationModel; +import com.microsoft.azure.management.network.v2019_04_01.implementation.AvailableResourceGroupDelegationsInner; +import com.microsoft.azure.arm.model.HasInner; /** * Type representing AvailableResourceGroupDelegations. */ -public interface AvailableResourceGroupDelegations { +public interface AvailableResourceGroupDelegations extends HasInner { /** * Gets all of the available subnet delegations for this resource group in this region. * diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/BackendAddressPool.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/BackendAddressPool.java index 6d1093da0a5c1..78a9daac20384 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/BackendAddressPool.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/BackendAddressPool.java @@ -51,6 +51,11 @@ public interface BackendAddressPool extends HasInner, I */ SubResource outboundRule(); + /** + * @return the outboundRules value. + */ + List outboundRules(); + /** * @return the provisioningState value. */ diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/BastionHostIPConfiguration.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/BastionHostIPConfiguration.java index e5113fab3e32f..d54fc5da1f050 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/BastionHostIPConfiguration.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/BastionHostIPConfiguration.java @@ -47,7 +47,7 @@ public class BastionHostIPConfiguration extends SubResource { * Name of the resource that is unique within a resource group. This name * can be used to access the resource. */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "name") private String name; /** @@ -151,6 +151,17 @@ public String name() { return this.name; } + /** + * Set name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the BastionHostIPConfiguration object itself. + */ + public BastionHostIPConfiguration withName(String name) { + this.name = name; + return this; + } + /** * Get a unique read-only string that changes whenever the resource is updated. * diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/CheckPrivateLinkServiceVisibilityRequest.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/CheckPrivateLinkServiceVisibilityRequest.java new file mode 100644 index 0000000000000..bb5be367f787d --- /dev/null +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/CheckPrivateLinkServiceVisibilityRequest.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.v2019_04_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Request body of the CheckPrivateLinkServiceVisibility API service call. + */ +public class CheckPrivateLinkServiceVisibilityRequest { + /** + * The alias of the private link service. + */ + @JsonProperty(value = "privateLinkServiceAlias") + private String privateLinkServiceAlias; + + /** + * Get the alias of the private link service. + * + * @return the privateLinkServiceAlias value + */ + public String privateLinkServiceAlias() { + return this.privateLinkServiceAlias; + } + + /** + * Set the alias of the private link service. + * + * @param privateLinkServiceAlias the privateLinkServiceAlias value to set + * @return the CheckPrivateLinkServiceVisibilityRequest object itself. + */ + public CheckPrivateLinkServiceVisibilityRequest withPrivateLinkServiceAlias(String privateLinkServiceAlias) { + this.privateLinkServiceAlias = privateLinkServiceAlias; + return this; + } + +} diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateEndpoint.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateEndpoint.java index b6da4e090e124..d0c5274097ad8 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateEndpoint.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateEndpoint.java @@ -49,7 +49,7 @@ public interface PrivateEndpoint extends HasInner, Resourc /** * @return the provisioningState value. */ - String provisioningState(); + ProvisioningState provisioningState(); /** * @return the subnet value. @@ -84,7 +84,7 @@ interface WithGroup extends GroupableResourceCore.DefinitionStages.WithGroup, Indexable, Updatable, HasManager { /** - * The resource of private end point. + * @return the etag value. */ - @JsonProperty(value = "properties.privateEndpoint") - private PrivateEndpointInner privateEndpoint; + String etag(); /** - * A collection of information about the state of the connection between - * service consumer and provider. + * @return the id value. */ - @JsonProperty(value = "properties.privateLinkServiceConnectionState") - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + String id(); /** - * The name of the resource that is unique within a resource group. This - * name can be used to access the resource. + * @return the name value. */ - @JsonProperty(value = "name") - private String name; + String name(); /** - * Get the resource of private end point. - * - * @return the privateEndpoint value + * @return the privateEndpoint value. */ - public PrivateEndpointInner privateEndpoint() { - return this.privateEndpoint; - } + PrivateEndpoint privateEndpoint(); /** - * Set the resource of private end point. - * - * @param privateEndpoint the privateEndpoint value to set - * @return the PrivateEndpointConnection object itself. + * @return the privateLinkServiceConnectionState value. */ - public PrivateEndpointConnection withPrivateEndpoint(PrivateEndpointInner privateEndpoint) { - this.privateEndpoint = privateEndpoint; - return this; - } + PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); /** - * Get a collection of information about the state of the connection between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value + * @return the provisioningState value. */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; - } + ProvisioningState provisioningState(); /** - * Set a collection of information about the state of the connection between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set - * @return the PrivateEndpointConnection object itself. + * @return the type value. */ - public PrivateEndpointConnection withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; - return this; - } + String type(); /** - * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. - * - * @return the name value + * The template for a PrivateEndpointConnection update operation, containing all the settings that can be modified. */ - public String name() { - return this.name; + interface Update extends Appliable, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState { } /** - * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. - * - * @param name the name value to set - * @return the PrivateEndpointConnection object itself. + * Grouping of PrivateEndpointConnection update stages. */ - public PrivateEndpointConnection withName(String name) { - this.name = name; - return this; - } + interface UpdateStages { + /** + * The stage of the privateendpointconnection update allowing to specify Id. + */ + interface WithId { + /** + * Specifies id. + * @param id Resource ID + * @return the next update stage + */ + Update withId(String id); + } + /** + * The stage of the privateendpointconnection update allowing to specify Name. + */ + interface WithName { + /** + * Specifies name. + * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource + * @return the next update stage + */ + Update withName(String name); + } + + /** + * The stage of the privateendpointconnection update allowing to specify PrivateEndpoint. + */ + interface WithPrivateEndpoint { + /** + * Specifies privateEndpoint. + * @param privateEndpoint The resource of private end point + * @return the next update stage + */ + Update withPrivateEndpoint(PrivateEndpointInner privateEndpoint); + } + + /** + * The stage of the privateendpointconnection update allowing to specify PrivateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies privateLinkServiceConnectionState. + * @param privateLinkServiceConnectionState A collection of information about the state of the connection between service consumer and provider + * @return the next update stage + */ + Update withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } + + } } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkService.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkService.java index 048842ad662d0..f4664008cb9be 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkService.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkService.java @@ -20,6 +20,7 @@ import com.microsoft.azure.management.network.v2019_04_01.implementation.NetworkManager; import java.util.List; import com.microsoft.azure.management.network.v2019_04_01.implementation.FrontendIPConfigurationInner; +import com.microsoft.azure.management.network.v2019_04_01.implementation.PrivateEndpointConnectionInner; import com.microsoft.azure.management.network.v2019_04_01.implementation.PrivateLinkServiceInner; /** @@ -52,9 +53,9 @@ public interface PrivateLinkService extends HasInner, R List ipConfigurations(); /** - * @return the loadBalancerFrontendIPConfigurations value. + * @return the loadBalancerFrontendIpConfigurations value. */ - List loadBalancerFrontendIPConfigurations(); + List loadBalancerFrontendIpConfigurations(); /** * @return the networkInterfaces value. @@ -69,7 +70,7 @@ public interface PrivateLinkService extends HasInner, R /** * @return the provisioningState value. */ - String provisioningState(); + ProvisioningState provisioningState(); /** * @return the visibility value. @@ -116,7 +117,7 @@ interface WithAutoApproval { interface WithEtag { /** * Specifies etag. - * @param etag Gets a unique read-only string that changes whenever the resource is updated + * @param etag A unique read-only string that changes whenever the resource is updated * @return the next definition stage */ WithCreate withEtag(String etag); @@ -147,15 +148,15 @@ interface WithIpConfigurations { } /** - * The stage of the privatelinkservice definition allowing to specify LoadBalancerFrontendIPConfigurations. + * The stage of the privatelinkservice definition allowing to specify LoadBalancerFrontendIpConfigurations. */ - interface WithLoadBalancerFrontendIPConfigurations { + interface WithLoadBalancerFrontendIpConfigurations { /** - * Specifies loadBalancerFrontendIPConfigurations. - * @param loadBalancerFrontendIPConfigurations An array of references to the load balancer IP configurations + * Specifies loadBalancerFrontendIpConfigurations. + * @param loadBalancerFrontendIpConfigurations An array of references to the load balancer IP configurations * @return the next definition stage */ - WithCreate withLoadBalancerFrontendIPConfigurations(List loadBalancerFrontendIPConfigurations); + WithCreate withLoadBalancerFrontendIpConfigurations(List loadBalancerFrontendIpConfigurations); } /** @@ -167,7 +168,7 @@ interface WithPrivateEndpointConnections { * @param privateEndpointConnections An array of list about connections to the private endpoint * @return the next definition stage */ - WithCreate withPrivateEndpointConnections(List privateEndpointConnections); + WithCreate withPrivateEndpointConnections(List privateEndpointConnections); } /** @@ -187,13 +188,13 @@ interface WithVisibility { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAutoApproval, DefinitionStages.WithEtag, DefinitionStages.WithFqdns, DefinitionStages.WithIpConfigurations, DefinitionStages.WithLoadBalancerFrontendIPConfigurations, DefinitionStages.WithPrivateEndpointConnections, DefinitionStages.WithVisibility { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAutoApproval, DefinitionStages.WithEtag, DefinitionStages.WithFqdns, DefinitionStages.WithIpConfigurations, DefinitionStages.WithLoadBalancerFrontendIpConfigurations, DefinitionStages.WithPrivateEndpointConnections, DefinitionStages.WithVisibility { } } /** * The template for a PrivateLinkService update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAutoApproval, UpdateStages.WithEtag, UpdateStages.WithFqdns, UpdateStages.WithIpConfigurations, UpdateStages.WithLoadBalancerFrontendIPConfigurations, UpdateStages.WithPrivateEndpointConnections, UpdateStages.WithVisibility { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAutoApproval, UpdateStages.WithEtag, UpdateStages.WithFqdns, UpdateStages.WithIpConfigurations, UpdateStages.WithLoadBalancerFrontendIpConfigurations, UpdateStages.WithPrivateEndpointConnections, UpdateStages.WithVisibility { } /** @@ -218,7 +219,7 @@ interface WithAutoApproval { interface WithEtag { /** * Specifies etag. - * @param etag Gets a unique read-only string that changes whenever the resource is updated + * @param etag A unique read-only string that changes whenever the resource is updated * @return the next update stage */ Update withEtag(String etag); @@ -249,15 +250,15 @@ interface WithIpConfigurations { } /** - * The stage of the privatelinkservice update allowing to specify LoadBalancerFrontendIPConfigurations. + * The stage of the privatelinkservice update allowing to specify LoadBalancerFrontendIpConfigurations. */ - interface WithLoadBalancerFrontendIPConfigurations { + interface WithLoadBalancerFrontendIpConfigurations { /** - * Specifies loadBalancerFrontendIPConfigurations. - * @param loadBalancerFrontendIPConfigurations An array of references to the load balancer IP configurations + * Specifies loadBalancerFrontendIpConfigurations. + * @param loadBalancerFrontendIpConfigurations An array of references to the load balancer IP configurations * @return the next update stage */ - Update withLoadBalancerFrontendIPConfigurations(List loadBalancerFrontendIPConfigurations); + Update withLoadBalancerFrontendIpConfigurations(List loadBalancerFrontendIpConfigurations); } /** @@ -269,7 +270,7 @@ interface WithPrivateEndpointConnections { * @param privateEndpointConnections An array of list about connections to the private endpoint * @return the next update stage */ - Update withPrivateEndpointConnections(List privateEndpointConnections); + Update withPrivateEndpointConnections(List privateEndpointConnections); } /** diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceConnection.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceConnection.java index 8ff9c590b31c4..424e566cf2b6d 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceConnection.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceConnection.java @@ -18,6 +18,13 @@ */ @JsonFlatten public class PrivateLinkServiceConnection extends SubResource { + /** + * The provisioning state of the private link service connection. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + /** * The resource id of private link service. */ @@ -52,6 +59,27 @@ public class PrivateLinkServiceConnection extends SubResource { @JsonProperty(value = "name") private String name; + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * 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 provisioning state of the private link service connection. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + /** * Get the resource id of private link service. * @@ -152,4 +180,22 @@ public PrivateLinkServiceConnection withName(String name) { return this; } + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceConnectionState.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceConnectionState.java index d5545600bf918..3e86274c6e802 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceConnectionState.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceConnectionState.java @@ -32,8 +32,8 @@ public class PrivateLinkServiceConnectionState { * A message indicating if changes on the service provider require any * updates on the consumer. */ - @JsonProperty(value = "actionRequired") - private String actionRequired; + @JsonProperty(value = "actionsRequired") + private String actionsRequired; /** * Get indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. @@ -78,20 +78,20 @@ public PrivateLinkServiceConnectionState withDescription(String description) { /** * Get a message indicating if changes on the service provider require any updates on the consumer. * - * @return the actionRequired value + * @return the actionsRequired value */ - public String actionRequired() { - return this.actionRequired; + public String actionsRequired() { + return this.actionsRequired; } /** * Set a message indicating if changes on the service provider require any updates on the consumer. * - * @param actionRequired the actionRequired value to set + * @param actionsRequired the actionsRequired value to set * @return the PrivateLinkServiceConnectionState object itself. */ - public PrivateLinkServiceConnectionState withActionRequired(String actionRequired) { - this.actionRequired = actionRequired; + public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; return this; } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceIpConfiguration.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceIpConfiguration.java index 089b4498ff610..28ce5a4a4f314 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceIpConfiguration.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceIpConfiguration.java @@ -9,15 +9,15 @@ package com.microsoft.azure.management.network.v2019_04_01; import com.microsoft.azure.management.network.v2019_04_01.implementation.SubnetInner; -import com.microsoft.azure.management.network.v2019_04_01.implementation.PublicIPAddressInner; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; /** * The private link service ip configuration. */ @JsonFlatten -public class PrivateLinkServiceIpConfiguration { +public class PrivateLinkServiceIpConfiguration extends SubResource { /** * The private IP address of the IP configuration. */ @@ -38,17 +38,17 @@ public class PrivateLinkServiceIpConfiguration { private SubnetInner subnet; /** - * The reference of the public IP resource. + * Whether the ip configuration is primary or not. */ - @JsonProperty(value = "properties.publicIPAddress") - private PublicIPAddressInner publicIPAddress; + @JsonProperty(value = "properties.primary") + private Boolean primary; /** - * Gets the provisioning state of the public IP resource. Possible values - * are: 'Updating', 'Deleting', and 'Failed'. + * The provisioning state of the private link service ip configuration. + * Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. */ - @JsonProperty(value = "properties.provisioningState") - private String provisioningState; + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; /** * Available from Api-Version 2016-03-30 onwards, it represents whether the @@ -64,6 +64,18 @@ public class PrivateLinkServiceIpConfiguration { @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; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + /** * Get the private IP address of the IP configuration. * @@ -125,45 +137,34 @@ public PrivateLinkServiceIpConfiguration withSubnet(SubnetInner subnet) { } /** - * Get the reference of the public IP resource. + * Get whether the ip configuration is primary or not. * - * @return the publicIPAddress value + * @return the primary value */ - public PublicIPAddressInner publicIPAddress() { - return this.publicIPAddress; + public Boolean primary() { + return this.primary; } /** - * Set the reference of the public IP resource. + * Set whether the ip configuration is primary or not. * - * @param publicIPAddress the publicIPAddress value to set + * @param primary the primary value to set * @return the PrivateLinkServiceIpConfiguration object itself. */ - public PrivateLinkServiceIpConfiguration withPublicIPAddress(PublicIPAddressInner publicIPAddress) { - this.publicIPAddress = publicIPAddress; + public PrivateLinkServiceIpConfiguration withPrimary(Boolean primary) { + this.primary = primary; return this; } /** - * Get gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. + * Get the provisioning state of the private link service ip configuration. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. * * @return the provisioningState value */ - public String provisioningState() { + public ProvisioningState provisioningState() { return this.provisioningState; } - /** - * Set gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - * - * @param provisioningState the provisioningState value to set - * @return the PrivateLinkServiceIpConfiguration object itself. - */ - public PrivateLinkServiceIpConfiguration withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - /** * Get available from Api-Version 2016-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values include: 'IPv4', 'IPv6'. * @@ -204,4 +205,22 @@ public PrivateLinkServiceIpConfiguration withName(String name) { return this; } + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceVisibility.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceVisibility.java new file mode 100644 index 0000000000000..b1d7fe4dc41d2 --- /dev/null +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServiceVisibility.java @@ -0,0 +1,25 @@ +/** + * 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.v2019_04_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_04_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_04_01.implementation.PrivateLinkServiceVisibilityInner; + +/** + * Type representing PrivateLinkServiceVisibility. + */ +public interface PrivateLinkServiceVisibility extends HasInner, HasManager { + /** + * @return the visible value. + */ + Boolean visible(); + +} diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServices.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServices.java index 98a2582d945f5..b1b3d8649a528 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServices.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PrivateLinkServices.java @@ -15,35 +15,62 @@ import rx.Observable; import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; import com.microsoft.azure.arm.collection.SupportsListing; -import rx.Completable; import com.microsoft.azure.management.network.v2019_04_01.implementation.PrivateLinkServicesInner; import com.microsoft.azure.arm.model.HasInner; +import rx.Completable; +import com.microsoft.azure.management.network.v2019_04_01.AutoApprovedPrivateLinkService; /** * Type representing PrivateLinkServices. */ public interface PrivateLinkServices extends SupportsCreating, SupportsDeletingByResourceGroup, SupportsBatchDeletion, SupportsGettingByResourceGroup, SupportsListingByResourceGroup, SupportsListing, HasInner { /** - * Approve or reject private end point connection for a private link service in a subscription. + * Delete private end point connection for a private link service in a subscription. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the private link service. * @param peConnectionName The name of the private end point connection. - * @param parameters Parameters supplied to approve or reject the private end point connection. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Completable updatePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnection parameters); + Completable deletePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName); /** - * Delete private end point connection for a private link service in a subscription. + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable checkPrivateLinkServiceVisibilityAsync(String location); + + /** + * Checks the subscription is visible to private link service. * + * @param location The location of the domain name. * @param resourceGroupName The name of the resource group. - * @param serviceName The name of the private link service. - * @param peConnectionName The name of the private end point connection. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Completable deletePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName); + Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName); + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAutoApprovedPrivateLinkServicesAsync(final String location); + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAutoApprovedPrivateLinkServicesByResourceGroupAsync(final String location, final String resourceGroupName); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PublicIPPrefix.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PublicIPPrefix.java index 0cf716b0a9f98..9e0b0614335a3 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PublicIPPrefix.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/PublicIPPrefix.java @@ -19,6 +19,7 @@ import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.network.v2019_04_01.implementation.NetworkManager; import java.util.List; +import com.microsoft.azure.SubResource; import com.microsoft.azure.management.network.v2019_04_01.implementation.PublicIPPrefixInner; /** @@ -40,6 +41,11 @@ public interface PublicIPPrefix extends HasInner, Resource, */ List ipTags(); + /** + * @return the loadBalancerFrontendIpConfiguration value. + */ + SubResource loadBalancerFrontendIpConfiguration(); + /** * @return the prefixLength value. */ diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/ServiceTags.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/ServiceTags.java index 8dcbcfa669b3b..b78af6c31f484 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/ServiceTags.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/ServiceTags.java @@ -9,15 +9,17 @@ package com.microsoft.azure.management.network.v2019_04_01; import rx.Observable; +import com.microsoft.azure.management.network.v2019_04_01.implementation.ServiceTagsInner; +import com.microsoft.azure.arm.model.HasInner; /** * Type representing ServiceTags. */ -public interface ServiceTags { +public interface ServiceTags extends HasInner { /** * Gets a list of service tag information resources. * - * @param location The location. + * @param location The location that will be used as a reference for version (not as a filter based on location, you will get the list of service tags with prefix details across all regions but limited to the cloud that your subscription belongs to). * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/Subnet.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/Subnet.java index 9635e6b84eebf..3a805aa893a8d 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/Subnet.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/Subnet.java @@ -79,11 +79,21 @@ public interface Subnet extends HasInner, Indexable, Refreshable privateEndpoints(); + /** + * @return the privateLinkServiceNetworkPolicies value. + */ + String privateLinkServiceNetworkPolicies(); + /** * @return the provisioningState value. */ @@ -244,6 +254,30 @@ interface WithNetworkSecurityGroup { WithCreate withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup); } + /** + * The stage of the subnet definition allowing to specify PrivateEndpointNetworkPolicies. + */ + interface WithPrivateEndpointNetworkPolicies { + /** + * Specifies privateEndpointNetworkPolicies. + * @param privateEndpointNetworkPolicies Enable or Disable private end point on the subnet + * @return the next definition stage + */ + WithCreate withPrivateEndpointNetworkPolicies(String privateEndpointNetworkPolicies); + } + + /** + * The stage of the subnet definition allowing to specify PrivateLinkServiceNetworkPolicies. + */ + interface WithPrivateLinkServiceNetworkPolicies { + /** + * Specifies privateLinkServiceNetworkPolicies. + * @param privateLinkServiceNetworkPolicies Enable or Disable private link service on the subnet + * @return the next definition stage + */ + WithCreate withPrivateLinkServiceNetworkPolicies(String privateLinkServiceNetworkPolicies); + } + /** * The stage of the subnet definition allowing to specify ProvisioningState. */ @@ -321,13 +355,13 @@ interface WithServiceEndpoints { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, DefinitionStages.WithAddressPrefix, DefinitionStages.WithAddressPrefixes, DefinitionStages.WithDelegations, DefinitionStages.WithEtag, DefinitionStages.WithId, DefinitionStages.WithName, DefinitionStages.WithNatGateway, DefinitionStages.WithNetworkSecurityGroup, DefinitionStages.WithProvisioningState, DefinitionStages.WithResourceNavigationLinks, DefinitionStages.WithRouteTable, DefinitionStages.WithServiceAssociationLinks, DefinitionStages.WithServiceEndpointPolicies, DefinitionStages.WithServiceEndpoints { + interface WithCreate extends Creatable, DefinitionStages.WithAddressPrefix, DefinitionStages.WithAddressPrefixes, DefinitionStages.WithDelegations, DefinitionStages.WithEtag, DefinitionStages.WithId, DefinitionStages.WithName, DefinitionStages.WithNatGateway, DefinitionStages.WithNetworkSecurityGroup, DefinitionStages.WithPrivateEndpointNetworkPolicies, DefinitionStages.WithPrivateLinkServiceNetworkPolicies, DefinitionStages.WithProvisioningState, DefinitionStages.WithResourceNavigationLinks, DefinitionStages.WithRouteTable, DefinitionStages.WithServiceAssociationLinks, DefinitionStages.WithServiceEndpointPolicies, DefinitionStages.WithServiceEndpoints { } } /** * The template for a Subnet update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, UpdateStages.WithAddressPrefix, UpdateStages.WithAddressPrefixes, UpdateStages.WithDelegations, UpdateStages.WithEtag, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithNatGateway, UpdateStages.WithNetworkSecurityGroup, UpdateStages.WithProvisioningState, UpdateStages.WithResourceNavigationLinks, UpdateStages.WithRouteTable, UpdateStages.WithServiceAssociationLinks, UpdateStages.WithServiceEndpointPolicies, UpdateStages.WithServiceEndpoints { + interface Update extends Appliable, UpdateStages.WithAddressPrefix, UpdateStages.WithAddressPrefixes, UpdateStages.WithDelegations, UpdateStages.WithEtag, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithNatGateway, UpdateStages.WithNetworkSecurityGroup, UpdateStages.WithPrivateEndpointNetworkPolicies, UpdateStages.WithPrivateLinkServiceNetworkPolicies, UpdateStages.WithProvisioningState, UpdateStages.WithResourceNavigationLinks, UpdateStages.WithRouteTable, UpdateStages.WithServiceAssociationLinks, UpdateStages.WithServiceEndpointPolicies, UpdateStages.WithServiceEndpoints { } /** @@ -430,6 +464,30 @@ interface WithNetworkSecurityGroup { Update withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecurityGroup); } + /** + * The stage of the subnet update allowing to specify PrivateEndpointNetworkPolicies. + */ + interface WithPrivateEndpointNetworkPolicies { + /** + * Specifies privateEndpointNetworkPolicies. + * @param privateEndpointNetworkPolicies Enable or Disable private end point on the subnet + * @return the next update stage + */ + Update withPrivateEndpointNetworkPolicies(String privateEndpointNetworkPolicies); + } + + /** + * The stage of the subnet update allowing to specify PrivateLinkServiceNetworkPolicies. + */ + interface WithPrivateLinkServiceNetworkPolicies { + /** + * Specifies privateLinkServiceNetworkPolicies. + * @param privateLinkServiceNetworkPolicies Enable or Disable private link service on the subnet + * @return the next update stage + */ + Update withPrivateLinkServiceNetworkPolicies(String privateLinkServiceNetworkPolicies); + } + /** * The stage of the subnet update allowing to specify ProvisioningState. */ diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ApplicationGatewaysImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ApplicationGatewaysImpl.java index 3ba6a907257f4..d38a45c4f4a25 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ApplicationGatewaysImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ApplicationGatewaysImpl.java @@ -106,13 +106,13 @@ public ApplicationGateway call(ApplicationGatewayInner inner) { @Override public PagedList list() { ApplicationGatewaysInner client = this.inner(); - return this.wrapList(client.listAll()); + return this.wrapList(client.list()); } @Override public Observable listAsync() { ApplicationGatewaysInner client = this.inner(); - return client.listAllAsync() + return client.listAsync() .flatMapIterable(new Func1, Iterable>() { @Override public Iterable call(Page page) { diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ApplicationGatewaysInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ApplicationGatewaysInner.java index feafac7fe78e6..5756e7492df12 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ApplicationGatewaysInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ApplicationGatewaysInner.java @@ -10,6 +10,7 @@ import com.microsoft.azure.arm.collection.InnerSupportsGet; import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import com.microsoft.azure.arm.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; @@ -44,14 +45,12 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined * in ApplicationGateways. */ -public class ApplicationGatewaysInner implements InnerSupportsGet, InnerSupportsDelete { +public class ApplicationGatewaysInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { /** The Retrofit service to perform REST calls. */ private ApplicationGatewaysService service; /** The service client containing this operation class. */ @@ -105,9 +104,9 @@ interface ApplicationGatewaysService { @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.v2019_04_01.ApplicationGateways listAll" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_04_01.ApplicationGateways list" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways") - Observable> listAll(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_04_01.ApplicationGateways start" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start") @@ -173,9 +172,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.v2019_04_01.ApplicationGateways listAllNext" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_04_01.ApplicationGateways listNext" }) @GET - Observable> listAllNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_04_01.ApplicationGateways listAvailableSslPredefinedPoliciesNext" }) @GET @@ -1021,12 +1020,12 @@ private ServiceResponse> listByResourceGroupDe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<ApplicationGatewayInner> object if successful. */ - public PagedList listAll() { - ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -1038,13 +1037,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAllAsync(final ListOperationCallback serviceCallback) { + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listAllSinglePageAsync(), + listSinglePageAsync(), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -1056,8 +1055,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ApplicationGatewayInner> object */ - public Observable> listAllAsync() { - return listAllWithServiceResponseAsync() + public Observable> listAsync() { + return listWithServiceResponseAsync() .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -1072,8 +1071,8 @@ public Page call(ServiceResponse>> listAllWithServiceResponseAsync() { - return listAllSinglePageAsync() + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -1081,7 +1080,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -1092,17 +1091,17 @@ public Observable>> call(ServiceRe * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ApplicationGatewayInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listAllSinglePageAsync() { + public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } final String apiVersion = "2019-04-01"; - return service.listAll(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listAllDelegate(response); + ServiceResponse> result = listDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -1111,7 +1110,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listAllDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) @@ -2712,12 +2711,12 @@ private ServiceResponse> listByResourceGroupNe * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<ApplicationGatewayInner> object if successful. */ - public PagedList listAllNext(final String nextPageLink) { - ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); } }; } @@ -2731,13 +2730,13 @@ public Page nextPage(String nextPageLink) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listAllNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listAllNextSinglePageAsync(nextPageLink), + listNextSinglePageAsync(nextPageLink), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink); + return listNextSinglePageAsync(nextPageLink); } }, serviceCallback); @@ -2750,8 +2749,8 @@ public Observable>> call(String ne * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<ApplicationGatewayInner> object */ - public Observable> listAllNextAsync(final String nextPageLink) { - return listAllNextWithServiceResponseAsync(nextPageLink) + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -2767,8 +2766,8 @@ public Page call(ServiceResponse>> listAllNextWithServiceResponseAsync(final String nextPageLink) { - return listAllNextSinglePageAsync(nextPageLink) + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -2776,7 +2775,7 @@ public Observable>> call(ServiceRe if (nextPageLink == null) { return Observable.just(page); } - return Observable.just(page).concatWith(listAllNextWithServiceResponseAsync(nextPageLink)); + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); } }); } @@ -2788,17 +2787,17 @@ public Observable>> call(ServiceRe * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<ApplicationGatewayInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listAllNextSinglePageAsync(final String nextPageLink) { + public Observable>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); - return service.listAllNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { try { - ServiceResponse> result = listAllNextDelegate(response); + ServiceResponse> result = listNextDelegate(response); return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); @@ -2807,7 +2806,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listAllNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AutoApprovedPrivateLinkServiceImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AutoApprovedPrivateLinkServiceImpl.java new file mode 100644 index 0000000000000..8dd87c596f7e1 --- /dev/null +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AutoApprovedPrivateLinkServiceImpl.java @@ -0,0 +1,35 @@ +/** + * 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.v2019_04_01.implementation; + +import com.microsoft.azure.management.network.v2019_04_01.AutoApprovedPrivateLinkService; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class AutoApprovedPrivateLinkServiceImpl extends WrapperImpl implements AutoApprovedPrivateLinkService { + private final NetworkManager manager; + + AutoApprovedPrivateLinkServiceImpl(AutoApprovedPrivateLinkServiceInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public String privateLinkService() { + return this.inner().privateLinkService(); + } + +} diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AutoApprovedPrivateLinkServiceInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AutoApprovedPrivateLinkServiceInner.java new file mode 100644 index 0000000000000..3459846219014 --- /dev/null +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AutoApprovedPrivateLinkServiceInner.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.v2019_04_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The information of an AutoApprovedPrivateLinkService. + */ +public class AutoApprovedPrivateLinkServiceInner { + /** + * The id of the private link service resource. + */ + @JsonProperty(value = "privateLinkService") + private String privateLinkService; + + /** + * Get the id of the private link service resource. + * + * @return the privateLinkService value + */ + public String privateLinkService() { + return this.privateLinkService; + } + + /** + * Set the id of the private link service resource. + * + * @param privateLinkService the privateLinkService value to set + * @return the AutoApprovedPrivateLinkServiceInner object itself. + */ + public AutoApprovedPrivateLinkServiceInner withPrivateLinkService(String privateLinkService) { + this.privateLinkService = privateLinkService; + return this; + } + +} diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailableEndpointServicesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailableEndpointServicesImpl.java index e20237b04e53d..fafc00a1a6093 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailableEndpointServicesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailableEndpointServicesImpl.java @@ -4,7 +4,7 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * abc + * */ package com.microsoft.azure.management.network.v2019_04_01.implementation; @@ -28,7 +28,7 @@ public NetworkManager manager() { return this.manager; } - private EndpointServiceResultImpl wrapEndpointServiceResultModel(EndpointServiceResultInner inner) { + private EndpointServiceResultImpl wrapModel(EndpointServiceResultInner inner) { return new EndpointServiceResultImpl(inner, manager()); } @@ -45,7 +45,7 @@ public Iterable call(Page() { @Override public EndpointServiceResult call(EndpointServiceResultInner inner) { - return wrapEndpointServiceResultModel(inner); + return wrapModel(inner); } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypeImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypeImpl.java new file mode 100644 index 0000000000000..d13653e52f6e4 --- /dev/null +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypeImpl.java @@ -0,0 +1,50 @@ +/** + * 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.v2019_04_01.implementation; + +import com.microsoft.azure.management.network.v2019_04_01.AvailablePrivateEndpointType; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import rx.Observable; + +class AvailablePrivateEndpointTypeImpl extends WrapperImpl implements AvailablePrivateEndpointType { + private final NetworkManager manager; + + AvailablePrivateEndpointTypeImpl(AvailablePrivateEndpointTypeInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String resourceName() { + return this.inner().resourceName(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypeInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypeInner.java index a09717beb2987..385f0f129e789 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypeInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypeInner.java @@ -14,6 +14,12 @@ * The information of an AvailablePrivateEndpointType. */ public class AvailablePrivateEndpointTypeInner { + /** + * The name of the service and resource. + */ + @JsonProperty(value = "name") + private String name; + /** * A unique identifier of the AvailablePrivateEndpoint Type resource. */ @@ -29,8 +35,28 @@ public class AvailablePrivateEndpointTypeInner { /** * The name of the service and resource. */ - @JsonProperty(value = "serviceName") - private String serviceName; + @JsonProperty(value = "resourceName") + private String resourceName; + + /** + * Get the name of the service and resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the service and resource. + * + * @param name the name value to set + * @return the AvailablePrivateEndpointTypeInner object itself. + */ + public AvailablePrivateEndpointTypeInner withName(String name) { + this.name = name; + return this; + } /** * Get a unique identifier of the AvailablePrivateEndpoint Type resource. @@ -75,20 +101,20 @@ public AvailablePrivateEndpointTypeInner withType(String type) { /** * Get the name of the service and resource. * - * @return the serviceName value + * @return the resourceName value */ - public String serviceName() { - return this.serviceName; + public String resourceName() { + return this.resourceName; } /** * Set the name of the service and resource. * - * @param serviceName the serviceName value to set + * @param resourceName the resourceName value to set * @return the AvailablePrivateEndpointTypeInner object itself. */ - public AvailablePrivateEndpointTypeInner withServiceName(String serviceName) { - this.serviceName = serviceName; + public AvailablePrivateEndpointTypeInner withResourceName(String resourceName) { + this.resourceName = resourceName; return this; } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypesImpl.java index 5f6752201ae1b..4c5bfe53e0a35 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypesImpl.java @@ -14,7 +14,7 @@ import rx.Observable; import rx.functions.Func1; import com.microsoft.azure.Page; -import com.microsoft.azure.management.network.v2019_04_01.LocationAvailablePrivateEndpointType; +import com.microsoft.azure.management.network.v2019_04_01.AvailablePrivateEndpointType; class AvailablePrivateEndpointTypesImpl extends WrapperImpl implements AvailablePrivateEndpointTypes { private final NetworkManager manager; @@ -28,12 +28,30 @@ public NetworkManager manager() { return this.manager; } - private LocationAvailablePrivateEndpointTypeImpl wrapModel(AvailablePrivateEndpointTypeInner inner) { - return new LocationAvailablePrivateEndpointTypeImpl(inner, manager()); + private AvailablePrivateEndpointTypeImpl wrapModel(AvailablePrivateEndpointTypeInner inner) { + return new AvailablePrivateEndpointTypeImpl(inner, manager()); } @Override - public Observable listAsync(final String location) { + public Observable listByResourceGroupAsync(final String location, final String resourceGroupName) { + AvailablePrivateEndpointTypesInner client = this.inner(); + return client.listByResourceGroupAsync(location, resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AvailablePrivateEndpointType call(AvailablePrivateEndpointTypeInner inner) { + return new AvailablePrivateEndpointTypeImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAsync(final String location) { AvailablePrivateEndpointTypesInner client = this.inner(); return client.listAsync(location) .flatMapIterable(new Func1, Iterable>() { @@ -42,9 +60,9 @@ public Iterable call(Page() { + .map(new Func1() { @Override - public LocationAvailablePrivateEndpointType call(AvailablePrivateEndpointTypeInner inner) { + public AvailablePrivateEndpointType call(AvailablePrivateEndpointTypeInner inner) { return wrapModel(inner); } }); diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypesInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypesInner.java index 56b3e47fa7a7c..f30cbf49e842a 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypesInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailablePrivateEndpointTypesInner.java @@ -60,10 +60,18 @@ interface AvailablePrivateEndpointTypesService { @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes") 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.v2019_04_01.AvailablePrivateEndpointTypes listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes") + Observable> listByResourceGroup(@Path("location") String location, @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.v2019_04_01.AvailablePrivateEndpointTypes 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.v2019_04_01.AvailablePrivateEndpointTypes listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -179,6 +187,127 @@ private ServiceResponse> listDelegat .build(response); } + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @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<AvailablePrivateEndpointTypeInner> object if successful. + */ + public PagedList listByResourceGroup(final String location, final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(location, resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @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 location, final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(location, resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailablePrivateEndpointTypeInner> object + */ + public Observable> listByResourceGroupAsync(final String location, final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(location, resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AvailablePrivateEndpointTypeInner> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String location, final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(location, 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)); + } + }); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + ServiceResponse> * @param location The location of the domain name. + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailablePrivateEndpointTypeInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String location, final String resourceGroupName) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + 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 = "2019-04-01"; + return service.listByResourceGroup(location, 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); + } + /** * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. * @@ -290,4 +419,115 @@ private ServiceResponse> listNextDel .build(response); } + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @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<AvailablePrivateEndpointTypeInner> 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(); + } + }; + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @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); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @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<AvailablePrivateEndpointTypeInner> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + * @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<AvailablePrivateEndpointTypeInner> 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)); + } + }); + } + + /** + * Returns all of the resource types that can be linked to a Private Endpoint in this subscription in this region. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AvailablePrivateEndpointTypeInner> 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/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailableResourceGroupDelegationsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailableResourceGroupDelegationsImpl.java index a97ed65356aaa..a26aac7bac2bf 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailableResourceGroupDelegationsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/AvailableResourceGroupDelegationsImpl.java @@ -4,7 +4,7 @@ * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * abc + * */ package com.microsoft.azure.management.network.v2019_04_01.implementation; @@ -28,7 +28,7 @@ public NetworkManager manager() { return this.manager; } - private LocationAvailableDelegationModelImpl wrapLocationAvailableDelegationModelModel(AvailableDelegationInner inner) { + private LocationAvailableDelegationModelImpl wrapModel(AvailableDelegationInner inner) { return new LocationAvailableDelegationModelImpl(inner, manager()); } @@ -45,7 +45,7 @@ public Iterable call(Page pa .map(new Func1() { @Override public LocationAvailableDelegationModel call(AvailableDelegationInner inner) { - return wrapLocationAvailableDelegationModelModel(inner); + return wrapModel(inner); } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/BackendAddressPoolImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/BackendAddressPoolImpl.java index 8b9fc856a1aab..0e666b60f33a2 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/BackendAddressPoolImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/BackendAddressPoolImpl.java @@ -80,6 +80,11 @@ public SubResource outboundRule() { return this.inner().outboundRule(); } + @Override + public List outboundRules() { + return this.inner().outboundRules(); + } + @Override public String provisioningState() { return this.inner().provisioningState(); diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/BackendAddressPoolInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/BackendAddressPoolInner.java index 899e7910dc096..c70c63036b52b 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/BackendAddressPoolInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/BackendAddressPoolInner.java @@ -37,6 +37,12 @@ public class BackendAddressPoolInner extends SubResource { @JsonProperty(value = "properties.outboundRule", access = JsonProperty.Access.WRITE_ONLY) private SubResource outboundRule; + /** + * Gets outbound rules that use this backend address pool. + */ + @JsonProperty(value = "properties.outboundRules", access = JsonProperty.Access.WRITE_ONLY) + private List outboundRules; + /** * Get provisioning state of the public IP resource. Possible values are: * 'Updating', 'Deleting', and 'Failed'. @@ -84,6 +90,15 @@ public SubResource outboundRule() { return this.outboundRule; } + /** + * Get gets outbound rules that use this backend address pool. + * + * @return the outboundRules value + */ + public List outboundRules() { + return this.outboundRules; + } + /** * Get get provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ConnectionMonitorsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ConnectionMonitorsImpl.java index 7cf32d1066a7d..1a15702b97ef7 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ConnectionMonitorsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ConnectionMonitorsImpl.java @@ -89,10 +89,14 @@ public ConnectionMonitorResult call(ConnectionMonitorResultInner inner) { public Observable getAsync(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { ConnectionMonitorsInner client = this.inner(); return client.getAsync(resourceGroupName, networkWatcherName, connectionMonitorName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ConnectionMonitorResult call(ConnectionMonitorResultInner inner) { - return wrapModel(inner); + public Observable call(ConnectionMonitorResultInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ConnectionMonitorResult)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ConnectionMonitorsInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ConnectionMonitorsInner.java index 37668ec9af94f..161adc4c8bdd3 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ConnectionMonitorsInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ConnectionMonitorsInner.java @@ -32,8 +32,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/DefaultSecurityRulesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/DefaultSecurityRulesImpl.java index bbe2fa365b9a3..68c9a76db903b 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/DefaultSecurityRulesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/DefaultSecurityRulesImpl.java @@ -54,10 +54,14 @@ public NetworkSecurityGroupSecurityRuleModel call(SecurityRuleInner inner) { public Observable getAsync(String resourceGroupName, String networkSecurityGroupName, String defaultSecurityRuleName) { DefaultSecurityRulesInner client = this.inner(); return client.getAsync(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public NetworkSecurityGroupSecurityRuleModel call(SecurityRuleInner inner) { - return wrapModel(inner); + public Observable call(SecurityRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NetworkSecurityGroupSecurityRuleModel)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitAuthorizationsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitAuthorizationsImpl.java index b859c93af405d..e2ff528358aa1 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitAuthorizationsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitAuthorizationsImpl.java @@ -64,10 +64,14 @@ public ExpressRouteCircuitAuthorization call(ExpressRouteCircuitAuthorizationInn public Observable getAsync(String resourceGroupName, String circuitName, String authorizationName) { ExpressRouteCircuitAuthorizationsInner client = this.inner(); return client.getAsync(resourceGroupName, circuitName, authorizationName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ExpressRouteCircuitAuthorization call(ExpressRouteCircuitAuthorizationInner inner) { - return wrapModel(inner); + public Observable call(ExpressRouteCircuitAuthorizationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExpressRouteCircuitAuthorization)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitConnectionsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitConnectionsImpl.java index 52db41b42b61e..ab088d2e5351d 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitConnectionsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitConnectionsImpl.java @@ -64,10 +64,14 @@ public ExpressRouteCircuitConnection call(ExpressRouteCircuitConnectionInner inn public Observable getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { ExpressRouteCircuitConnectionsInner client = this.inner(); return client.getAsync(resourceGroupName, circuitName, peeringName, connectionName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ExpressRouteCircuitConnection call(ExpressRouteCircuitConnectionInner inner) { - return wrapModel(inner); + public Observable call(ExpressRouteCircuitConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExpressRouteCircuitConnection)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitPeeringsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitPeeringsImpl.java index 3607d89adfb37..17349d4782daa 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitPeeringsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitPeeringsImpl.java @@ -64,10 +64,14 @@ public ExpressRouteCircuitPeering call(ExpressRouteCircuitPeeringInner inner) { public Observable getAsync(String resourceGroupName, String circuitName, String peeringName) { ExpressRouteCircuitPeeringsInner client = this.inner(); return client.getAsync(resourceGroupName, circuitName, peeringName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ExpressRouteCircuitPeering call(ExpressRouteCircuitPeeringInner inner) { - return wrapModel(inner); + public Observable call(ExpressRouteCircuitPeeringInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExpressRouteCircuitPeering)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitsInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitsInner.java index 278b8a4619a8a..274001086a6fc 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitsInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCircuitsInner.java @@ -43,8 +43,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteConnectionsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteConnectionsImpl.java index c3d50c344a6c3..1eec89a21c7d4 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteConnectionsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteConnectionsImpl.java @@ -58,10 +58,14 @@ public ExpressRouteConnectionList call(ExpressRouteConnectionListInner inner) { public Observable getAsync(String resourceGroupName, String expressRouteGatewayName, String connectionName) { ExpressRouteConnectionsInner client = this.inner(); return client.getAsync(resourceGroupName, expressRouteGatewayName, connectionName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ExpressRouteConnection call(ExpressRouteConnectionInner inner) { - return wrapModel(inner); + public Observable call(ExpressRouteConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExpressRouteConnection)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCrossConnectionPeeringsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCrossConnectionPeeringsImpl.java index 02c54a4001386..5b373e1ce817f 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCrossConnectionPeeringsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCrossConnectionPeeringsImpl.java @@ -64,10 +64,14 @@ public ExpressRouteCrossConnectionPeering call(ExpressRouteCrossConnectionPeerin public Observable getAsync(String resourceGroupName, String crossConnectionName, String peeringName) { ExpressRouteCrossConnectionPeeringsInner client = this.inner(); return client.getAsync(resourceGroupName, crossConnectionName, peeringName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ExpressRouteCrossConnectionPeering call(ExpressRouteCrossConnectionPeeringInner inner) { - return wrapModel(inner); + public Observable call(ExpressRouteCrossConnectionPeeringInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExpressRouteCrossConnectionPeering)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCrossConnectionsInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCrossConnectionsInner.java index dc39986007676..72759ee2137ca 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCrossConnectionsInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteCrossConnectionsInner.java @@ -41,8 +41,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteLinksImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteLinksImpl.java index a510cc8aad273..4416e7a2ee89e 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteLinksImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ExpressRouteLinksImpl.java @@ -54,10 +54,14 @@ public ExpressRouteLink call(ExpressRouteLinkInner inner) { public Observable getAsync(String resourceGroupName, String expressRoutePortName, String linkName) { ExpressRouteLinksInner client = this.inner(); return client.getAsync(resourceGroupName, expressRoutePortName, linkName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ExpressRouteLink call(ExpressRouteLinkInner inner) { - return wrapModel(inner); + public Observable call(ExpressRouteLinkInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExpressRouteLink)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/HubVirtualNetworkConnectionsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/HubVirtualNetworkConnectionsImpl.java index 2a65a9b3644fe..d9e38f76d6373 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/HubVirtualNetworkConnectionsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/HubVirtualNetworkConnectionsImpl.java @@ -54,10 +54,14 @@ public HubVirtualNetworkConnection call(HubVirtualNetworkConnectionInner inner) public Observable getAsync(String resourceGroupName, String virtualHubName, String connectionName) { HubVirtualNetworkConnectionsInner client = this.inner(); return client.getAsync(resourceGroupName, virtualHubName, connectionName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public HubVirtualNetworkConnection call(HubVirtualNetworkConnectionInner inner) { - return wrapModel(inner); + public Observable call(HubVirtualNetworkConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((HubVirtualNetworkConnection)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/InboundNatRulesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/InboundNatRulesImpl.java index 9ffe03a72312f..afd4b9822e862 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/InboundNatRulesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/InboundNatRulesImpl.java @@ -64,10 +64,14 @@ public InboundNatRule call(InboundNatRuleInner inner) { public Observable getAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName) { InboundNatRulesInner client = this.inner(); return client.getAsync(resourceGroupName, loadBalancerName, inboundNatRuleName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public InboundNatRule call(InboundNatRuleInner inner) { - return wrapModel(inner); + public Observable call(InboundNatRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((InboundNatRule)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerBackendAddressPoolsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerBackendAddressPoolsImpl.java index 08d09c39a9ee5..3be6dda39cd98 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerBackendAddressPoolsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerBackendAddressPoolsImpl.java @@ -54,10 +54,14 @@ public BackendAddressPool call(BackendAddressPoolInner inner) { public Observable getAsync(String resourceGroupName, String loadBalancerName, String backendAddressPoolName) { LoadBalancerBackendAddressPoolsInner client = this.inner(); return client.getAsync(resourceGroupName, loadBalancerName, backendAddressPoolName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public BackendAddressPool call(BackendAddressPoolInner inner) { - return wrapModel(inner); + public Observable call(BackendAddressPoolInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((BackendAddressPool)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerFrontendIPConfigurationsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerFrontendIPConfigurationsImpl.java index ab12a9ebe2906..6043d4b188cde 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerFrontendIPConfigurationsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerFrontendIPConfigurationsImpl.java @@ -54,10 +54,14 @@ public FrontendIPConfiguration call(FrontendIPConfigurationInner inner) { public Observable getAsync(String resourceGroupName, String loadBalancerName, String frontendIPConfigurationName) { LoadBalancerFrontendIPConfigurationsInner client = this.inner(); return client.getAsync(resourceGroupName, loadBalancerName, frontendIPConfigurationName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public FrontendIPConfiguration call(FrontendIPConfigurationInner inner) { - return wrapModel(inner); + public Observable call(FrontendIPConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((FrontendIPConfiguration)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerLoadBalancingRulesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerLoadBalancingRulesImpl.java index b72aa21a10579..2c62a324751b1 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerLoadBalancingRulesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerLoadBalancingRulesImpl.java @@ -54,10 +54,14 @@ public LoadBalancingRule call(LoadBalancingRuleInner inner) { public Observable getAsync(String resourceGroupName, String loadBalancerName, String loadBalancingRuleName) { LoadBalancerLoadBalancingRulesInner client = this.inner(); return client.getAsync(resourceGroupName, loadBalancerName, loadBalancingRuleName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public LoadBalancingRule call(LoadBalancingRuleInner inner) { - return wrapModel(inner); + public Observable call(LoadBalancingRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((LoadBalancingRule)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerOutboundRulesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerOutboundRulesImpl.java index 470327ac7c20c..7017b84366585 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerOutboundRulesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerOutboundRulesImpl.java @@ -54,10 +54,14 @@ public OutboundRule call(OutboundRuleInner inner) { public Observable getAsync(String resourceGroupName, String loadBalancerName, String outboundRuleName) { LoadBalancerOutboundRulesInner client = this.inner(); return client.getAsync(resourceGroupName, loadBalancerName, outboundRuleName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public OutboundRule call(OutboundRuleInner inner) { - return wrapModel(inner); + public Observable call(OutboundRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((OutboundRule)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerProbesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerProbesImpl.java index b0df7e8ac93f8..50b61af91b770 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerProbesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/LoadBalancerProbesImpl.java @@ -54,10 +54,14 @@ public Probe call(ProbeInner inner) { public Observable getAsync(String resourceGroupName, String loadBalancerName, String probeName) { LoadBalancerProbesInner client = this.inner(); return client.getAsync(resourceGroupName, loadBalancerName, probeName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public Probe call(ProbeInner inner) { - return wrapModel(inner); + public Observable call(ProbeInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Probe)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfaceIPConfigurationsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfaceIPConfigurationsImpl.java index d68f83cbea4cd..e8f02a3275bb1 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfaceIPConfigurationsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfaceIPConfigurationsImpl.java @@ -54,10 +54,14 @@ public NetworkInterfaceNetworkInterfaceIPConfiguration call(NetworkInterfaceIPCo public Observable getAsync(String resourceGroupName, String networkInterfaceName, String ipConfigurationName) { NetworkInterfaceIPConfigurationsInner client = this.inner(); return client.getAsync(resourceGroupName, networkInterfaceName, ipConfigurationName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public NetworkInterfaceNetworkInterfaceIPConfiguration call(NetworkInterfaceIPConfigurationInner inner) { - return wrapModel(inner); + public Observable call(NetworkInterfaceIPConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NetworkInterfaceNetworkInterfaceIPConfiguration)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfaceTapConfigurationsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfaceTapConfigurationsImpl.java index 08825708eb7f7..4a04234d4cbb9 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfaceTapConfigurationsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfaceTapConfigurationsImpl.java @@ -64,10 +64,14 @@ public NetworkInterfaceTapConfiguration call(NetworkInterfaceTapConfigurationInn public Observable getAsync(String resourceGroupName, String networkInterfaceName, String tapConfigurationName) { NetworkInterfaceTapConfigurationsInner client = this.inner(); return client.getAsync(resourceGroupName, networkInterfaceName, tapConfigurationName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public NetworkInterfaceTapConfiguration call(NetworkInterfaceTapConfigurationInner inner) { - return wrapModel(inner); + public Observable call(NetworkInterfaceTapConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NetworkInterfaceTapConfiguration)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfacesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfacesImpl.java index ec94d8d9d10c5..ebc55c2c22646 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfacesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfacesImpl.java @@ -67,10 +67,14 @@ private Observable getNetworkInterfaceIPCo @Override public Observable getByResourceGroupAsync(String resourceGroupName, String name) { - return this.getNetworkInterfaceInnerUsingNetworkInterfacesInnerAsync(resourceGroupName, name).map(new Func1 () { + return this.getNetworkInterfaceInnerUsingNetworkInterfacesInnerAsync(resourceGroupName, name).flatMap(new Func1> () { @Override - public NetworkInterface call(NetworkInterfaceInner inner) { - return wrapNetworkInterfaceModel(inner); + public Observable call(NetworkInterfaceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NetworkInterface)wrapNetworkInterfaceModel(inner)); + } } }); } @@ -192,10 +196,14 @@ public LoadBalancerNetworkInterface call(NetworkInterfaceInner inner) { public Observable getVirtualMachineScaleSetIpConfigurationAsync(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String ipConfigurationName) { NetworkInterfacesInner client = this.inner(); return client.getVirtualMachineScaleSetIpConfigurationAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, ipConfigurationName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public VirtualMachineScaleSetNetworkInterfaceIPConfiguration call(NetworkInterfaceIPConfigurationInner inner) { - return wrapVirtualMachineScaleSetNetworkInterfaceIPConfigurationModel(inner); + public Observable call(NetworkInterfaceIPConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((VirtualMachineScaleSetNetworkInterfaceIPConfiguration)wrapVirtualMachineScaleSetNetworkInterfaceIPConfigurationModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfacesInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfacesInner.java index 52f00bdc4a145..868501360ebf1 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfacesInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkInterfacesInner.java @@ -43,8 +43,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkManagementClientImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkManagementClientImpl.java index d7a1dd0808868..62ea042ec34a8 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkManagementClientImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkManagementClientImpl.java @@ -12,6 +12,8 @@ import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; import com.microsoft.azure.CloudException; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; import com.microsoft.azure.management.network.v2019_04_01.ErrorException; import com.microsoft.rest.credentials.ServiceClientCredentials; import com.microsoft.rest.RestClient; @@ -202,32 +204,6 @@ public AvailableResourceGroupDelegationsInner availableResourceGroupDelegations( return this.availableResourceGroupDelegations; } - /** - * The AvailablePrivateEndpointTypesInner object to access its operations. - */ - private AvailablePrivateEndpointTypesInner availablePrivateEndpointTypes; - - /** - * Gets the AvailablePrivateEndpointTypesInner object to access its operations. - * @return the AvailablePrivateEndpointTypesInner object. - */ - public AvailablePrivateEndpointTypesInner availablePrivateEndpointTypes() { - return this.availablePrivateEndpointTypes; - } - - /** - * The AvailableResourceGroupPrivateEndpointTypesInner object to access its operations. - */ - private AvailableResourceGroupPrivateEndpointTypesInner availableResourceGroupPrivateEndpointTypes; - - /** - * Gets the AvailableResourceGroupPrivateEndpointTypesInner object to access its operations. - * @return the AvailableResourceGroupPrivateEndpointTypesInner object. - */ - public AvailableResourceGroupPrivateEndpointTypesInner availableResourceGroupPrivateEndpointTypes() { - return this.availableResourceGroupPrivateEndpointTypes; - } - /** * The AzureFirewallsInner object to access its operations. */ @@ -488,6 +464,19 @@ public PrivateEndpointsInner privateEndpoints() { return this.privateEndpoints; } + /** + * The AvailablePrivateEndpointTypesInner object to access its operations. + */ + private AvailablePrivateEndpointTypesInner availablePrivateEndpointTypes; + + /** + * Gets the AvailablePrivateEndpointTypesInner object to access its operations. + * @return the AvailablePrivateEndpointTypesInner object. + */ + public AvailablePrivateEndpointTypesInner availablePrivateEndpointTypes() { + return this.availablePrivateEndpointTypes; + } + /** * The PrivateLinkServicesInner object to access its operations. */ @@ -1203,8 +1192,6 @@ protected void initialize() { this.applicationSecurityGroups = new ApplicationSecurityGroupsInner(restClient().retrofit(), this); this.availableDelegations = new AvailableDelegationsInner(restClient().retrofit(), this); this.availableResourceGroupDelegations = new AvailableResourceGroupDelegationsInner(restClient().retrofit(), this); - this.availablePrivateEndpointTypes = new AvailablePrivateEndpointTypesInner(restClient().retrofit(), this); - this.availableResourceGroupPrivateEndpointTypes = new AvailableResourceGroupPrivateEndpointTypesInner(restClient().retrofit(), this); this.azureFirewalls = new AzureFirewallsInner(restClient().retrofit(), this); this.azureFirewallFqdnTags = new AzureFirewallFqdnTagsInner(restClient().retrofit(), this); this.bastionHosts = new BastionHostsInner(restClient().retrofit(), this); @@ -1225,6 +1212,7 @@ protected void initialize() { this.expressRoutePorts = new ExpressRoutePortsInner(restClient().retrofit(), this); this.expressRouteLinks = new ExpressRouteLinksInner(restClient().retrofit(), this); this.privateEndpoints = new PrivateEndpointsInner(restClient().retrofit(), this); + this.availablePrivateEndpointTypes = new AvailablePrivateEndpointTypesInner(restClient().retrofit(), this); this.privateLinkServices = new PrivateLinkServicesInner(restClient().retrofit(), this); this.loadBalancers = new LoadBalancersInner(restClient().retrofit(), this); this.loadBalancerBackendAddressPools = new LoadBalancerBackendAddressPoolsInner(restClient().retrofit(), this); diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkManager.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkManager.java index c38d295de0d70..a11191245451a 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkManager.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkManager.java @@ -20,8 +20,6 @@ import com.microsoft.azure.management.network.v2019_04_01.ApplicationSecurityGroups; import com.microsoft.azure.management.network.v2019_04_01.AvailableDelegations; import com.microsoft.azure.management.network.v2019_04_01.AvailableResourceGroupDelegations; -import com.microsoft.azure.management.network.v2019_04_01.AvailablePrivateEndpointTypes; -import com.microsoft.azure.management.network.v2019_04_01.AvailableResourceGroupPrivateEndpointTypes; import com.microsoft.azure.management.network.v2019_04_01.AzureFirewalls; import com.microsoft.azure.management.network.v2019_04_01.AzureFirewallFqdnTags; import com.microsoft.azure.management.network.v2019_04_01.BastionHosts; @@ -42,6 +40,7 @@ import com.microsoft.azure.management.network.v2019_04_01.ExpressRoutePorts; import com.microsoft.azure.management.network.v2019_04_01.ExpressRouteLinks; import com.microsoft.azure.management.network.v2019_04_01.PrivateEndpoints; +import com.microsoft.azure.management.network.v2019_04_01.AvailablePrivateEndpointTypes; import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServices; import com.microsoft.azure.management.network.v2019_04_01.LoadBalancers; import com.microsoft.azure.management.network.v2019_04_01.LoadBalancerBackendAddressPools; @@ -105,8 +104,6 @@ public final class NetworkManager extends ManagerCore> delete(@Path("resourceGroupName") String resourceGroupName, @Path("networkProfileName") String networkProfileName, @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.v2019_04_01.NetworkProfiles beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("resourceGroupName") String resourceGroupName, @Path("networkProfileName") String networkProfileName, @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.v2019_04_01.NetworkProfiles getByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}") Observable> getByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("networkProfileName") String networkProfileName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Query("$expand") String expand, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -167,6 +171,91 @@ public Observable> deleteWithServiceResponseAsync(String r return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } + /** + * Deletes the specified network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the NetworkProfile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 networkProfileName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, networkProfileName).toBlocking().single().body(); + } + + /** + * Deletes the specified network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the NetworkProfile. + * @param serviceCallback 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 networkProfileName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkProfileName), serviceCallback); + } + + /** + * Deletes the specified network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the NetworkProfile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String networkProfileName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, networkProfileName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified network profile. + * + * @param resourceGroupName The name of the resource group. + * @param networkProfileName The name of the NetworkProfile. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String networkProfileName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (networkProfileName == null) { + throw new IllegalArgumentException("Parameter networkProfileName 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 = "2019-04-01"; + return service.beginDelete(resourceGroupName, networkProfileName, 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 network profile in a specified resource group. * diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkWatchersInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkWatchersInner.java index 59c1f9014bd74..4e380cd7dff65 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkWatchersInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkWatchersInner.java @@ -51,8 +51,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/OutboundRuleInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/OutboundRuleInner.java index d04ef06c78ed6..6cd28c9115f22 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/OutboundRuleInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/OutboundRuleInner.java @@ -15,7 +15,7 @@ import com.microsoft.rest.serializer.JsonFlatten; /** - * Outbound pool of the load balancer. + * Outbound rule of the load balancer. */ @JsonFlatten public class OutboundRuleInner extends SubResource { diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/P2sVpnGatewaysInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/P2sVpnGatewaysInner.java index f62b6aef4a52a..625e3c3d8f1b7 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/P2sVpnGatewaysInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/P2sVpnGatewaysInner.java @@ -46,8 +46,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/P2sVpnServerConfigurationsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/P2sVpnServerConfigurationsImpl.java index cffe71e9baf69..530558f115b2c 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/P2sVpnServerConfigurationsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/P2sVpnServerConfigurationsImpl.java @@ -64,10 +64,14 @@ public P2SVpnServerConfiguration call(P2SVpnServerConfigurationInner inner) { public Observable getAsync(String resourceGroupName, String virtualWanName, String p2SVpnServerConfigurationName) { P2sVpnServerConfigurationsInner client = this.inner(); return client.getAsync(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public P2SVpnServerConfiguration call(P2SVpnServerConfigurationInner inner) { - return wrapModel(inner); + public Observable call(P2SVpnServerConfigurationInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((P2SVpnServerConfiguration)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PacketCapturesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PacketCapturesImpl.java index 41b5be1b79162..b1d49066c4d47 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PacketCapturesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PacketCapturesImpl.java @@ -83,10 +83,14 @@ public PacketCaptureResult call(PacketCaptureResultInner inner) { public Observable getAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName) { PacketCapturesInner client = this.inner(); return client.getAsync(resourceGroupName, networkWatcherName, packetCaptureName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public PacketCaptureResult call(PacketCaptureResultInner inner) { - return wrapModel(inner); + public Observable call(PacketCaptureResultInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PacketCaptureResult)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PacketCapturesInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PacketCapturesInner.java index 95e462a1d5df3..1b5ae80c24099 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PacketCapturesInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PacketCapturesInner.java @@ -32,8 +32,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PeerExpressRouteCircuitConnectionsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PeerExpressRouteCircuitConnectionsImpl.java index 570d0a46fe819..49a4768d2c995 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PeerExpressRouteCircuitConnectionsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PeerExpressRouteCircuitConnectionsImpl.java @@ -54,10 +54,14 @@ public PeerExpressRouteCircuitConnection call(PeerExpressRouteCircuitConnectionI public Observable getAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName) { PeerExpressRouteCircuitConnectionsInner client = this.inner(); return client.getAsync(resourceGroupName, circuitName, peeringName, connectionName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public PeerExpressRouteCircuitConnection call(PeerExpressRouteCircuitConnectionInner inner) { - return wrapModel(inner); + public Observable call(PeerExpressRouteCircuitConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PeerExpressRouteCircuitConnection)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointConnectionImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 0000000000000..687adbb0bedd1 --- /dev/null +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointConnectionImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_04_01.implementation; + +import com.microsoft.azure.management.network.v2019_04_01.PrivateEndpointConnection; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServiceConnectionState; +import com.microsoft.azure.management.network.v2019_04_01.ProvisioningState; +import com.microsoft.azure.management.network.v2019_04_01.PrivateEndpoint; + +class PrivateEndpointConnectionImpl extends CreatableUpdatableImpl implements PrivateEndpointConnection, PrivateEndpointConnection.Update { + private final NetworkManager manager; + private String resourceGroupName; + private String serviceName; + private String peConnectionName; + + PrivateEndpointConnectionImpl(String name, NetworkManager manager) { + super(name, new PrivateEndpointConnectionInner()); + this.manager = manager; + // Set resource name + this.peConnectionName = name; + // + } + + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner inner, NetworkManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.peConnectionName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.serviceName = IdParsingUtils.getValueFromIdByName(inner.id(), "privateLinkServices"); + this.peConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "privateEndpointConnections"); + // + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + PrivateLinkServicesInner client = this.manager().inner().privateLinkServices(); + return null; // NOP createResourceAsync implementation as create is not supported + } + + @Override + public Observable updateResourceAsync() { + PrivateLinkServicesInner client = this.manager().inner().privateLinkServices(); + return client.updatePrivateEndpointConnectionAsync(this.resourceGroupName, this.serviceName, this.peConnectionName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + PrivateLinkServicesInner client = this.manager().inner().privateLinkServices(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String etag() { + return this.inner().etag(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public PrivateEndpoint privateEndpoint() { + PrivateEndpointInner inner = this.inner().privateEndpoint(); + if (inner != null) { + return new PrivateEndpointImpl(inner.name(), inner, manager()); + } else { + return null; + } + } + + @Override + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.inner().privateLinkServiceConnectionState(); + } + + @Override + public ProvisioningState provisioningState() { + return this.inner().provisioningState(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public PrivateEndpointConnectionImpl withId(String id) { + this.inner().withId(id); + return this; + } + + @Override + public PrivateEndpointConnectionImpl withName(String name) { + this.inner().withName(name); + return this; + } + + @Override + public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpointInner privateEndpoint) { + this.inner().withPrivateEndpoint(privateEndpoint); + return this; + } + + @Override + public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.inner().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + +} diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointConnectionInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointConnectionInner.java new file mode 100644 index 0000000000000..4f5daa88e6846 --- /dev/null +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointConnectionInner.java @@ -0,0 +1,148 @@ +/** + * 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.v2019_04_01.implementation; + +import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServiceConnectionState; +import com.microsoft.azure.management.network.v2019_04_01.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * PrivateEndpointConnection resource. + */ +@JsonFlatten +public class PrivateEndpointConnectionInner extends SubResource { + /** + * The resource of private end point. + */ + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpointInner privateEndpoint; + + /** + * A collection of information about the state of the connection between + * service consumer and provider. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /** + * The provisioning state of the private endpoint connection. Possible + * values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The 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; + + /** + * The resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * 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 resource of private end point. + * + * @return the privateEndpoint value + */ + public PrivateEndpointInner privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpointInner privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get a collection of information about the state of the connection between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set a collection of information about the state of the connection between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the provisioning state of the private endpoint connection. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the resource that is unique within a resource group. This name can be used to access the resource. + * + * @param name the name value to set + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the resource type. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get a unique read-only string that changes whenever the resource is updated. + * + * @return the etag value + */ + public String etag() { + return this.etag; + } + +} diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointImpl.java index 27df4311b8658..2fd6ba27a31f7 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointImpl.java @@ -12,6 +12,7 @@ import com.microsoft.azure.management.network.v2019_04_01.PrivateEndpoint; import rx.Observable; import java.util.List; +import com.microsoft.azure.management.network.v2019_04_01.ProvisioningState; import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServiceConnection; import java.util.ArrayList; import com.microsoft.azure.management.network.v2019_04_01.NetworkInterface; @@ -75,7 +76,7 @@ public List privateLinkServiceConnections() { } @Override - public String provisioningState() { + public ProvisioningState provisioningState() { return this.inner().provisioningState(); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointInner.java index 3607998daf345..adb893f4e46ec 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateEndpointInner.java @@ -9,6 +9,7 @@ package com.microsoft.azure.management.network.v2019_04_01.implementation; import java.util.List; +import com.microsoft.azure.management.network.v2019_04_01.ProvisioningState; import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServiceConnection; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -35,11 +36,11 @@ public class PrivateEndpointInner extends Resource { private List networkInterfaces; /** - * The provisioning state of the private endpoint. Possible values are: - * 'Updating', 'Deleting', and 'Failed'. + * The provisioning state of the private endpoint. Possible values include: + * 'Succeeded', 'Updating', 'Deleting', 'Failed'. */ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + private ProvisioningState provisioningState; /** * A grouping of information about the connection to the remote resource. @@ -56,8 +57,7 @@ public class PrivateEndpointInner extends Resource { private List manualPrivateLinkServiceConnections; /** - * Gets a unique read-only string that changes whenever the resource is - * updated. + * A unique read-only string that changes whenever the resource is updated. */ @JsonProperty(value = "etag") private String etag; @@ -98,11 +98,11 @@ public List networkInterfaces() { } /** - * Get the provisioning state of the private endpoint. Possible values are: 'Updating', 'Deleting', and 'Failed'. + * Get the provisioning state of the private endpoint. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. * * @return the provisioningState value */ - public String provisioningState() { + public ProvisioningState provisioningState() { return this.provisioningState; } @@ -147,7 +147,7 @@ public PrivateEndpointInner withManualPrivateLinkServiceConnections(List getByResourceGroupDelegate(Respons * * @param resourceGroupName The name of the resource group. * @param privateEndpointName The name of the private endpoint. - * @param parameters Parameters supplied to the create or update private endpoint operation + * @param parameters Parameters supplied to the create or update private endpoint operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -439,7 +439,7 @@ public PrivateEndpointInner createOrUpdate(String resourceGroupName, String priv * * @param resourceGroupName The name of the resource group. * @param privateEndpointName The name of the private endpoint. - * @param parameters Parameters supplied to the create or update private endpoint operation + * @param parameters Parameters supplied to the create or update private endpoint 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 @@ -453,7 +453,7 @@ public ServiceFuture createOrUpdateAsync(String resourceGr * * @param resourceGroupName The name of the resource group. * @param privateEndpointName The name of the private endpoint. - * @param parameters Parameters supplied to the create or update private endpoint operation + * @param parameters Parameters supplied to the create or update private endpoint operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ @@ -471,7 +471,7 @@ public PrivateEndpointInner call(ServiceResponse response) * * @param resourceGroupName The name of the resource group. * @param privateEndpointName The name of the private endpoint. - * @param parameters Parameters supplied to the create or update private endpoint operation + * @param parameters Parameters supplied to the create or update private endpoint operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ @@ -499,7 +499,7 @@ public Observable> createOrUpdateWithServi * * @param resourceGroupName The name of the resource group. * @param privateEndpointName The name of the private endpoint. - * @param parameters Parameters supplied to the create or update private endpoint operation + * @param parameters Parameters supplied to the create or update private endpoint operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -514,7 +514,7 @@ public PrivateEndpointInner beginCreateOrUpdate(String resourceGroupName, String * * @param resourceGroupName The name of the resource group. * @param privateEndpointName The name of the private endpoint. - * @param parameters Parameters supplied to the create or update private endpoint operation + * @param parameters Parameters supplied to the create or update private endpoint 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 @@ -528,7 +528,7 @@ public ServiceFuture beginCreateOrUpdateAsync(String resou * * @param resourceGroupName The name of the resource group. * @param privateEndpointName The name of the private endpoint. - * @param parameters Parameters supplied to the create or update private endpoint operation + * @param parameters Parameters supplied to the create or update private endpoint operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PrivateEndpointInner object */ @@ -546,7 +546,7 @@ public PrivateEndpointInner call(ServiceResponse response) * * @param resourceGroupName The name of the resource group. * @param privateEndpointName The name of the private endpoint. - * @param parameters Parameters supplied to the create or update private endpoint operation + * @param parameters Parameters supplied to the create or update private endpoint operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PrivateEndpointInner object */ diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceImpl.java index 5e35f1d63d3b5..a873bb602bf7d 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceImpl.java @@ -13,12 +13,13 @@ import rx.Observable; import java.util.List; import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServiceIpConfiguration; -import com.microsoft.azure.management.network.v2019_04_01.PrivateEndpointConnection; +import com.microsoft.azure.management.network.v2019_04_01.ProvisioningState; import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServicePropertiesVisibility; import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServicePropertiesAutoApproval; import java.util.ArrayList; import com.microsoft.azure.management.network.v2019_04_01.FrontendIPConfiguration; import com.microsoft.azure.management.network.v2019_04_01.NetworkInterface; +import com.microsoft.azure.management.network.v2019_04_01.PrivateEndpointConnection; class PrivateLinkServiceImpl extends GroupableResourceCoreImpl implements PrivateLinkService, PrivateLinkService.Definition, PrivateLinkService.Update { PrivateLinkServiceImpl(String name, PrivateLinkServiceInner inner, NetworkManager manager) { @@ -77,10 +78,10 @@ public List ipConfigurations() { } @Override - public List loadBalancerFrontendIPConfigurations() { + public List loadBalancerFrontendIpConfigurations() { List lst = new ArrayList(); - if (this.inner().loadBalancerFrontendIPConfigurations() != null) { - for (FrontendIPConfigurationInner inner : this.inner().loadBalancerFrontendIPConfigurations()) { + if (this.inner().loadBalancerFrontendIpConfigurations() != null) { + for (FrontendIPConfigurationInner inner : this.inner().loadBalancerFrontendIpConfigurations()) { lst.add( new FrontendIPConfigurationImpl(inner, manager())); } } @@ -100,11 +101,17 @@ public List networkInterfaces() { @Override public List privateEndpointConnections() { - return this.inner().privateEndpointConnections(); + List lst = new ArrayList(); + if (this.inner().privateEndpointConnections() != null) { + for (PrivateEndpointConnectionInner inner : this.inner().privateEndpointConnections()) { + lst.add( new PrivateEndpointConnectionImpl(inner, manager())); + } + } + return lst; } @Override - public String provisioningState() { + public ProvisioningState provisioningState() { return this.inner().provisioningState(); } @@ -138,13 +145,13 @@ public PrivateLinkServiceImpl withIpConfigurations(List loadBalancerFrontendIPConfigurations) { - this.inner().withLoadBalancerFrontendIPConfigurations(loadBalancerFrontendIPConfigurations); + public PrivateLinkServiceImpl withLoadBalancerFrontendIpConfigurations(List loadBalancerFrontendIpConfigurations) { + this.inner().withLoadBalancerFrontendIpConfigurations(loadBalancerFrontendIpConfigurations); return this; } @Override - public PrivateLinkServiceImpl withPrivateEndpointConnections(List privateEndpointConnections) { + public PrivateLinkServiceImpl withPrivateEndpointConnections(List privateEndpointConnections) { this.inner().withPrivateEndpointConnections(privateEndpointConnections); return this; } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceInner.java index ec762b76ee389..129f6c90cd6d9 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceInner.java @@ -10,7 +10,7 @@ import java.util.List; import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServiceIpConfiguration; -import com.microsoft.azure.management.network.v2019_04_01.PrivateEndpointConnection; +import com.microsoft.azure.management.network.v2019_04_01.ProvisioningState; import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServicePropertiesVisibility; import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServicePropertiesAutoApproval; import com.fasterxml.jackson.annotation.JsonProperty; @@ -27,8 +27,8 @@ public class PrivateLinkServiceInner extends Resource { /** * An array of references to the load balancer IP configurations. */ - @JsonProperty(value = "properties.loadBalancerFrontendIPConfigurations") - private List loadBalancerFrontendIPConfigurations; + @JsonProperty(value = "properties.loadBalancerFrontendIpConfigurations") + private List loadBalancerFrontendIpConfigurations; /** * An array of references to the private link service IP configuration. @@ -44,17 +44,17 @@ public class PrivateLinkServiceInner extends Resource { private List networkInterfaces; /** - * The provisioning state of the private link service. Possible values are: - * 'Updating', 'Succeeded', and 'Failed'. + * The provisioning state of the private link service. Possible values + * include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. */ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; + private ProvisioningState provisioningState; /** * An array of list about connections to the private endpoint. */ @JsonProperty(value = "properties.privateEndpointConnections") - private List privateEndpointConnections; + private List privateEndpointConnections; /** * The visibility list of the private link service. @@ -81,8 +81,7 @@ public class PrivateLinkServiceInner extends Resource { private String alias; /** - * Gets a unique read-only string that changes whenever the resource is - * updated. + * A unique read-only string that changes whenever the resource is updated. */ @JsonProperty(value = "etag") private String etag; @@ -96,20 +95,20 @@ public class PrivateLinkServiceInner extends Resource { /** * Get an array of references to the load balancer IP configurations. * - * @return the loadBalancerFrontendIPConfigurations value + * @return the loadBalancerFrontendIpConfigurations value */ - public List loadBalancerFrontendIPConfigurations() { - return this.loadBalancerFrontendIPConfigurations; + public List loadBalancerFrontendIpConfigurations() { + return this.loadBalancerFrontendIpConfigurations; } /** * Set an array of references to the load balancer IP configurations. * - * @param loadBalancerFrontendIPConfigurations the loadBalancerFrontendIPConfigurations value to set + * @param loadBalancerFrontendIpConfigurations the loadBalancerFrontendIpConfigurations value to set * @return the PrivateLinkServiceInner object itself. */ - public PrivateLinkServiceInner withLoadBalancerFrontendIPConfigurations(List loadBalancerFrontendIPConfigurations) { - this.loadBalancerFrontendIPConfigurations = loadBalancerFrontendIPConfigurations; + public PrivateLinkServiceInner withLoadBalancerFrontendIpConfigurations(List loadBalancerFrontendIpConfigurations) { + this.loadBalancerFrontendIpConfigurations = loadBalancerFrontendIpConfigurations; return this; } @@ -143,11 +142,11 @@ public List networkInterfaces() { } /** - * Get the provisioning state of the private link service. Possible values are: 'Updating', 'Succeeded', and 'Failed'. + * Get the provisioning state of the private link service. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. * * @return the provisioningState value */ - public String provisioningState() { + public ProvisioningState provisioningState() { return this.provisioningState; } @@ -156,7 +155,7 @@ public String provisioningState() { * * @return the privateEndpointConnections value */ - public List privateEndpointConnections() { + public List privateEndpointConnections() { return this.privateEndpointConnections; } @@ -166,7 +165,7 @@ public List privateEndpointConnections() { * @param privateEndpointConnections the privateEndpointConnections value to set * @return the PrivateLinkServiceInner object itself. */ - public PrivateLinkServiceInner withPrivateEndpointConnections(List privateEndpointConnections) { + public PrivateLinkServiceInner withPrivateEndpointConnections(List privateEndpointConnections) { this.privateEndpointConnections = privateEndpointConnections; return this; } @@ -241,7 +240,7 @@ public String alias() { } /** - * Get gets a unique read-only string that changes whenever the resource is updated. + * Get a unique read-only string that changes whenever the resource is updated. * * @return the etag value */ @@ -250,7 +249,7 @@ public String etag() { } /** - * Set gets a unique read-only string that changes whenever the resource is updated. + * Set a unique read-only string that changes whenever the resource is updated. * * @param etag the etag value to set * @return the PrivateLinkServiceInner object itself. diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceVisibilityImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceVisibilityImpl.java new file mode 100644 index 0000000000000..d411399ab229a --- /dev/null +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceVisibilityImpl.java @@ -0,0 +1,31 @@ +/** + * 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.v2019_04_01.implementation; + +import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServiceVisibility; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class PrivateLinkServiceVisibilityImpl extends WrapperImpl implements PrivateLinkServiceVisibility { + private final NetworkManager manager; + PrivateLinkServiceVisibilityImpl(PrivateLinkServiceVisibilityInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public Boolean visible() { + return this.inner().visible(); + } + +} diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceVisibilityInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceVisibilityInner.java new file mode 100644 index 0000000000000..886f8f9673837 --- /dev/null +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServiceVisibilityInner.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.v2019_04_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for the CheckPrivateLinkServiceVisibility API service call. + */ +public class PrivateLinkServiceVisibilityInner { + /** + * Private Link Service Visibility (True/False). + */ + @JsonProperty(value = "visible") + private Boolean visible; + + /** + * Get private Link Service Visibility (True/False). + * + * @return the visible value + */ + public Boolean visible() { + return this.visible; + } + + /** + * Set private Link Service Visibility (True/False). + * + * @param visible the visible value to set + * @return the PrivateLinkServiceVisibilityInner object itself. + */ + public PrivateLinkServiceVisibilityInner withVisible(Boolean visible) { + this.visible = visible; + return this; + } + +} diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServicesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServicesImpl.java index 1bbbae55f5a0e..6121c63533a22 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServicesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServicesImpl.java @@ -22,7 +22,8 @@ import rx.functions.Func1; import com.microsoft.azure.PagedList; import com.microsoft.azure.Page; -import com.microsoft.azure.management.network.v2019_04_01.PrivateEndpointConnection; +import com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServiceVisibility; +import com.microsoft.azure.management.network.v2019_04_01.AutoApprovedPrivateLinkService; class PrivateLinkServicesImpl extends GroupableResourcesCoreImpl implements PrivateLinkServices { protected PrivateLinkServicesImpl(NetworkManager manager) { @@ -126,12 +127,6 @@ public PrivateLinkServiceImpl define(String name) { return wrapModel(name); } - @Override - public Completable updatePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnection parameters) { - PrivateLinkServicesInner client = this.inner(); - return client.updatePrivateEndpointConnectionAsync(resourceGroupName, serviceName, peConnectionName, parameters).toCompletable(); - } - @Override protected PrivateLinkServiceImpl wrapModel(PrivateLinkServiceInner inner) { return new PrivateLinkServiceImpl(inner.name(), inner, manager()); @@ -142,10 +137,78 @@ protected PrivateLinkServiceImpl wrapModel(String name) { return new PrivateLinkServiceImpl(name, new PrivateLinkServiceInner(), this.manager()); } + private PrivateEndpointConnectionImpl wrapPrivateEndpointConnectionModel(PrivateEndpointConnectionInner inner) { + return new PrivateEndpointConnectionImpl(inner, manager()); + } + + private AutoApprovedPrivateLinkServiceImpl wrapAutoApprovedPrivateLinkServiceModel(AutoApprovedPrivateLinkServiceInner inner) { + return new AutoApprovedPrivateLinkServiceImpl(inner, manager()); + } + @Override public Completable deletePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName) { PrivateLinkServicesInner client = this.inner(); return client.deletePrivateEndpointConnectionAsync(resourceGroupName, serviceName, peConnectionName).toCompletable(); } + @Override + public Observable checkPrivateLinkServiceVisibilityAsync(String location) { + PrivateLinkServicesInner client = this.inner(); + return client.checkPrivateLinkServiceVisibilityAsync(location) + .map(new Func1() { + @Override + public PrivateLinkServiceVisibility call(PrivateLinkServiceVisibilityInner inner) { + return new PrivateLinkServiceVisibilityImpl(inner, manager()); + } + }); + } + + @Override + public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName) { + PrivateLinkServicesInner client = this.inner(); + return client.checkPrivateLinkServiceVisibilityByResourceGroupAsync(location, resourceGroupName) + .map(new Func1() { + @Override + public PrivateLinkServiceVisibility call(PrivateLinkServiceVisibilityInner inner) { + return new PrivateLinkServiceVisibilityImpl(inner, manager()); + } + }); + } + + @Override + public Observable listAutoApprovedPrivateLinkServicesAsync(final String location) { + PrivateLinkServicesInner client = this.inner(); + return client.listAutoApprovedPrivateLinkServicesAsync(location) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AutoApprovedPrivateLinkService call(AutoApprovedPrivateLinkServiceInner inner) { + return wrapAutoApprovedPrivateLinkServiceModel(inner); + } + }); + } + + @Override + public Observable listAutoApprovedPrivateLinkServicesByResourceGroupAsync(final String location, final String resourceGroupName) { + PrivateLinkServicesInner client = this.inner(); + return client.listAutoApprovedPrivateLinkServicesByResourceGroupAsync(location, resourceGroupName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public AutoApprovedPrivateLinkService call(AutoApprovedPrivateLinkServiceInner inner) { + return new AutoApprovedPrivateLinkServiceImpl(inner, manager()); + } + }); + } + } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServicesInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServicesInner.java index 599c8e663a691..c40f9b16a1785 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServicesInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PrivateLinkServicesInner.java @@ -14,9 +14,10 @@ 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.v2019_04_01.CheckPrivateLinkServiceVisibilityRequest; import com.microsoft.azure.management.network.v2019_04_01.ErrorException; -import com.microsoft.azure.management.network.v2019_04_01.PrivateEndpointConnection; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -32,6 +33,7 @@ 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.http.Url; @@ -95,7 +97,7 @@ interface PrivateLinkServicesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServices updatePrivateEndpointConnection" }) @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}") - Observable> updatePrivateEndpointConnection(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("peConnectionName") String peConnectionName, @Path("subscriptionId") String subscriptionId, @Body PrivateEndpointConnection parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updatePrivateEndpointConnection(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("peConnectionName") String peConnectionName, @Path("subscriptionId") String subscriptionId, @Body PrivateEndpointConnectionInner 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.v2019_04_01.PrivateLinkServices deletePrivateEndpointConnection" }) @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", method = "DELETE", hasBody = true) @@ -105,6 +107,22 @@ interface PrivateLinkServicesService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}", method = "DELETE", hasBody = true) Observable> beginDeletePrivateEndpointConnection(@Path("resourceGroupName") String resourceGroupName, @Path("serviceName") String serviceName, @Path("peConnectionName") String peConnectionName, @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.v2019_04_01.PrivateLinkServices checkPrivateLinkServiceVisibility" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") + Observable> checkPrivateLinkServiceVisibility(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckPrivateLinkServiceVisibilityRequest parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServices checkPrivateLinkServiceVisibilityByResourceGroup" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") + Observable> checkPrivateLinkServiceVisibilityByResourceGroup(@Path("location") String location, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckPrivateLinkServiceVisibilityRequest parameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_04_01.PrivateLinkServices listAutoApprovedPrivateLinkServices" }) + @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices") + Observable> listAutoApprovedPrivateLinkServices(@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.v2019_04_01.PrivateLinkServices listAutoApprovedPrivateLinkServicesByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices") + Observable> listAutoApprovedPrivateLinkServicesByResourceGroup(@Path("location") String location, @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.v2019_04_01.PrivateLinkServices listByResourceGroupNext" }) @GET Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -113,6 +131,14 @@ interface PrivateLinkServicesService { @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.v2019_04_01.PrivateLinkServices listAutoApprovedPrivateLinkServicesNext" }) + @GET + Observable> listAutoApprovedPrivateLinkServicesNext(@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.v2019_04_01.PrivateLinkServices listAutoApprovedPrivateLinkServicesByResourceGroupNext" }) + @GET + Observable> listAutoApprovedPrivateLinkServicesByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -437,7 +463,7 @@ private ServiceResponse getByResourceGroupDelegate(Resp * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the private link service. - * @param parameters Parameters supplied to the create or update private link service operation + * @param parameters Parameters supplied to the create or update private link service operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -452,7 +478,7 @@ public PrivateLinkServiceInner createOrUpdate(String resourceGroupName, String s * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the private link service. - * @param parameters Parameters supplied to the create or update private link service operation + * @param parameters Parameters supplied to the create or update private link service 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 @@ -466,7 +492,7 @@ public ServiceFuture createOrUpdateAsync(String resourc * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the private link service. - * @param parameters Parameters supplied to the create or update private link service operation + * @param parameters Parameters supplied to the create or update private link service operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ @@ -484,7 +510,7 @@ public PrivateLinkServiceInner call(ServiceResponse res * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the private link service. - * @param parameters Parameters supplied to the create or update private link service operation + * @param parameters Parameters supplied to the create or update private link service operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ @@ -512,7 +538,7 @@ public Observable> createOrUpdateWithSe * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the private link service. - * @param parameters Parameters supplied to the create or update private link service operation + * @param parameters Parameters supplied to the create or update private link service operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -527,7 +553,7 @@ public PrivateLinkServiceInner beginCreateOrUpdate(String resourceGroupName, Str * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the private link service. - * @param parameters Parameters supplied to the create or update private link service operation + * @param parameters Parameters supplied to the create or update private link service 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 @@ -541,7 +567,7 @@ public ServiceFuture beginCreateOrUpdateAsync(String re * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the private link service. - * @param parameters Parameters supplied to the create or update private link service operation + * @param parameters Parameters supplied to the create or update private link service operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PrivateLinkServiceInner object */ @@ -559,7 +585,7 @@ public PrivateLinkServiceInner call(ServiceResponse res * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the private link service. - * @param parameters Parameters supplied to the create or update private link service operation + * @param parameters Parameters supplied to the create or update private link service operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PrivateLinkServiceInner object */ @@ -828,9 +854,10 @@ private ServiceResponse> listDelegate(Response * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateEndpointConnectionInner object if successful. */ - public void updatePrivateEndpointConnection(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnection parameters) { - updatePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName, parameters).toBlocking().single().body(); + public PrivateEndpointConnectionInner updatePrivateEndpointConnection(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnectionInner parameters) { + return updatePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName, parameters).toBlocking().single().body(); } /** @@ -844,7 +871,7 @@ public void updatePrivateEndpointConnection(String resourceGroupName, String ser * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updatePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnection parameters, final ServiceCallback serviceCallback) { + public ServiceFuture updatePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnectionInner parameters, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(updatePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName, parameters), serviceCallback); } @@ -856,12 +883,12 @@ public ServiceFuture updatePrivateEndpointConnectionAsync(String resourceG * @param peConnectionName The name of the private end point connection. * @param parameters Parameters supplied to approve or reject the private end point connection. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the PrivateEndpointConnectionInner object */ - public Observable updatePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnection parameters) { - return updatePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName, parameters).map(new Func1, Void>() { + public Observable updatePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnectionInner parameters) { + return updatePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName, parameters).map(new Func1, PrivateEndpointConnectionInner>() { @Override - public Void call(ServiceResponse response) { + public PrivateEndpointConnectionInner call(ServiceResponse response) { return response.body(); } }); @@ -875,9 +902,9 @@ public Void call(ServiceResponse response) { * @param peConnectionName The name of the private end point connection. * @param parameters Parameters supplied to approve or reject the private end point connection. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceResponse} object if successful. + * @return the observable to the PrivateEndpointConnectionInner object */ - public Observable> updatePrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnection parameters) { + public Observable> updatePrivateEndpointConnectionWithServiceResponseAsync(String resourceGroupName, String serviceName, String peConnectionName, PrivateEndpointConnectionInner parameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -896,11 +923,11 @@ public Observable> updatePrivateEndpointConnectionWithServ Validator.validate(parameters); final String apiVersion = "2019-04-01"; return service.updatePrivateEndpointConnection(resourceGroupName, serviceName, peConnectionName, this.client.subscriptionId(), parameters, 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 clientResponse = updatePrivateEndpointConnectionDelegate(response); + ServiceResponse clientResponse = updatePrivateEndpointConnectionDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -909,9 +936,9 @@ public Observable> call(Response response) { }); } - private ServiceResponse updatePrivateEndpointConnectionDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse updatePrivateEndpointConnectionDelegate(Response response) throws ErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(ErrorException.class) .build(response); } @@ -1081,6 +1108,566 @@ private ServiceResponse beginDeletePrivateEndpointConnectionDelegate(Respo .build(response); } + /** + * Checks the subscription is visible to private link service. + * + * @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 PrivateLinkServiceVisibilityInner object if successful. + */ + public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(String location) { + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Checks the subscription is visible to private link service. + * + * @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 checkPrivateLinkServiceVisibilityAsync(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable checkPrivateLinkServiceVisibilityAsync(String location) { + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).map(new Func1, PrivateLinkServiceVisibilityInner>() { + @Override + public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(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 = "2019-04-01"; + final String privateLinkServiceAlias = null; + CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); + parameters.withPrivateLinkServiceAlias(null); + return service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateLinkServiceVisibilityInner object if successful. + */ + public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(String location, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).toBlocking().single().body(); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param privateLinkServiceAlias The alias of the private link service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias), serviceCallback); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { + @Override + public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(String location, String privateLinkServiceAlias) { + 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 = "2019-04-01"; + CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); + parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); + return service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkPrivateLinkServiceVisibilityDelegate(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); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @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 PrivateLinkServiceVisibilityInner object if successful. + */ + public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName) { + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).toBlocking().single().body(); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @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 checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName), serviceCallback); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName) { + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).map(new Func1, PrivateLinkServiceVisibilityInner>() { + @Override + public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + 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 = "2019-04-01"; + final String privateLinkServiceAlias = null; + CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); + parameters.withPrivateLinkServiceAlias(null); + return service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateLinkServiceVisibilityInner object if successful. + */ + public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).toBlocking().single().body(); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param privateLinkServiceAlias The alias of the private link service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias), serviceCallback); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { + @Override + public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + 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 = "2019-04-01"; + CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); + parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); + return service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityByResourceGroupDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkPrivateLinkServiceVisibilityByResourceGroupDelegate(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); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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 PagedList<AutoApprovedPrivateLinkServiceInner> object if successful. + */ + public PagedList listAutoApprovedPrivateLinkServices(final String location) { + ServiceResponse> response = listAutoApprovedPrivateLinkServicesSinglePageAsync(location).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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> listAutoApprovedPrivateLinkServicesAsync(final String location, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAutoApprovedPrivateLinkServicesSinglePageAsync(location), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable> listAutoApprovedPrivateLinkServicesAsync(final String location) { + return listAutoApprovedPrivateLinkServicesWithServiceResponseAsync(location) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable>> listAutoApprovedPrivateLinkServicesWithServiceResponseAsync(final String location) { + return listAutoApprovedPrivateLinkServicesSinglePageAsync(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(listAutoApprovedPrivateLinkServicesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + ServiceResponse> * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AutoApprovedPrivateLinkServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAutoApprovedPrivateLinkServicesSinglePageAsync(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 = "2019-04-01"; + return service.listAutoApprovedPrivateLinkServices(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAutoApprovedPrivateLinkServicesDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAutoApprovedPrivateLinkServicesDelegate(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); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @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<AutoApprovedPrivateLinkServiceInner> object if successful. + */ + public PagedList listAutoApprovedPrivateLinkServicesByResourceGroup(final String location, final String resourceGroupName) { + ServiceResponse> response = listAutoApprovedPrivateLinkServicesByResourceGroupSinglePageAsync(location, resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @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> listAutoApprovedPrivateLinkServicesByResourceGroupAsync(final String location, final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAutoApprovedPrivateLinkServicesByResourceGroupSinglePageAsync(location, resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable> listAutoApprovedPrivateLinkServicesByResourceGroupAsync(final String location, final String resourceGroupName) { + return listAutoApprovedPrivateLinkServicesByResourceGroupWithServiceResponseAsync(location, resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable>> listAutoApprovedPrivateLinkServicesByResourceGroupWithServiceResponseAsync(final String location, final String resourceGroupName) { + return listAutoApprovedPrivateLinkServicesByResourceGroupSinglePageAsync(location, 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(listAutoApprovedPrivateLinkServicesByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + ServiceResponse> * @param location The location of the domain name. + ServiceResponse> * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AutoApprovedPrivateLinkServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAutoApprovedPrivateLinkServicesByResourceGroupSinglePageAsync(final String location, final String resourceGroupName) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + 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 = "2019-04-01"; + return service.listAutoApprovedPrivateLinkServicesByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAutoApprovedPrivateLinkServicesByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAutoApprovedPrivateLinkServicesByResourceGroupDelegate(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 private link services in a resource group. * @@ -1303,4 +1890,226 @@ private ServiceResponse> listNextDelegate(Resp .build(response); } + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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<AutoApprovedPrivateLinkServiceInner> object if successful. + */ + public PagedList listAutoApprovedPrivateLinkServicesNext(final String nextPageLink) { + ServiceResponse> response = listAutoApprovedPrivateLinkServicesNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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> listAutoApprovedPrivateLinkServicesNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAutoApprovedPrivateLinkServicesNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable> listAutoApprovedPrivateLinkServicesNextAsync(final String nextPageLink) { + return listAutoApprovedPrivateLinkServicesNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable>> listAutoApprovedPrivateLinkServicesNextWithServiceResponseAsync(final String nextPageLink) { + return listAutoApprovedPrivateLinkServicesNextSinglePageAsync(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(listAutoApprovedPrivateLinkServicesNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AutoApprovedPrivateLinkServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAutoApprovedPrivateLinkServicesNextSinglePageAsync(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.listAutoApprovedPrivateLinkServicesNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAutoApprovedPrivateLinkServicesNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAutoApprovedPrivateLinkServicesNextDelegate(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); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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<AutoApprovedPrivateLinkServiceInner> object if successful. + */ + public PagedList listAutoApprovedPrivateLinkServicesByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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> listAutoApprovedPrivateLinkServicesByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable> listAutoApprovedPrivateLinkServicesByResourceGroupNextAsync(final String nextPageLink) { + return listAutoApprovedPrivateLinkServicesByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + * @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<AutoApprovedPrivateLinkServiceInner> object + */ + public Observable>> listAutoApprovedPrivateLinkServicesByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(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(listAutoApprovedPrivateLinkServicesByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns all of the private link service ids that can be linked to a Private Endpoint with auto approved in this subscription in this region. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<AutoApprovedPrivateLinkServiceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listAutoApprovedPrivateLinkServicesByResourceGroupNextSinglePageAsync(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.listAutoApprovedPrivateLinkServicesByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listAutoApprovedPrivateLinkServicesByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listAutoApprovedPrivateLinkServicesByResourceGroupNextDelegate(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/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PublicIPPrefixImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PublicIPPrefixImpl.java index 8e2d0099b504e..3335b01026a86 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PublicIPPrefixImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PublicIPPrefixImpl.java @@ -16,6 +16,7 @@ import java.util.List; import com.microsoft.azure.management.network.v2019_04_01.IpTag; import com.microsoft.azure.management.network.v2019_04_01.ReferencedPublicIpAddress; +import com.microsoft.azure.SubResource; class PublicIPPrefixImpl extends GroupableResourceCoreImpl implements PublicIPPrefix, PublicIPPrefix.Definition, PublicIPPrefix.Update { PublicIPPrefixImpl(String name, PublicIPPrefixInner inner, NetworkManager manager) { @@ -63,6 +64,11 @@ public List ipTags() { return this.inner().ipTags(); } + @Override + public SubResource loadBalancerFrontendIpConfiguration() { + return this.inner().loadBalancerFrontendIpConfiguration(); + } + @Override public Integer prefixLength() { return this.inner().prefixLength(); diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PublicIPPrefixInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PublicIPPrefixInner.java index b622c099ddbc0..91f20d710fffc 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PublicIPPrefixInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/PublicIPPrefixInner.java @@ -13,6 +13,7 @@ import java.util.List; import com.microsoft.azure.management.network.v2019_04_01.IpTag; import com.microsoft.azure.management.network.v2019_04_01.ReferencedPublicIpAddress; +import com.microsoft.azure.SubResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.rest.SkipParentValidation; @@ -60,6 +61,13 @@ public class PublicIPPrefixInner extends Resource { @JsonProperty(value = "properties.publicIPAddresses") private List publicIPAddresses; + /** + * The reference to load balancer frontend IP configuration associated with + * the public IP prefix. + */ + @JsonProperty(value = "properties.loadBalancerFrontendIpConfiguration", access = JsonProperty.Access.WRITE_ONLY) + private SubResource loadBalancerFrontendIpConfiguration; + /** * The resource GUID property of the public IP prefix resource. */ @@ -212,6 +220,15 @@ public PublicIPPrefixInner withPublicIPAddresses(List return this; } + /** + * Get the reference to load balancer frontend IP configuration associated with the public IP prefix. + * + * @return the loadBalancerFrontendIpConfiguration value + */ + public SubResource loadBalancerFrontendIpConfiguration() { + return this.loadBalancerFrontendIpConfiguration; + } + /** * Get the resource GUID property of the public IP prefix resource. * diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/RouteFilterRulesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/RouteFilterRulesImpl.java index 66f7eb66099bd..c9abc995c142e 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/RouteFilterRulesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/RouteFilterRulesImpl.java @@ -64,10 +64,14 @@ public RouteFilterRule call(RouteFilterRuleInner inner) { public Observable getAsync(String resourceGroupName, String routeFilterName, String ruleName) { RouteFilterRulesInner client = this.inner(); return client.getAsync(resourceGroupName, routeFilterName, ruleName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public RouteFilterRule call(RouteFilterRuleInner inner) { - return wrapModel(inner); + public Observable call(RouteFilterRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((RouteFilterRule)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/RoutesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/RoutesImpl.java index 8ec035f5db8ef..92fc65243fc06 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/RoutesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/RoutesImpl.java @@ -64,10 +64,14 @@ public Route call(RouteInner inner) { public Observable getAsync(String resourceGroupName, String routeTableName, String routeName) { RoutesInner client = this.inner(); return client.getAsync(resourceGroupName, routeTableName, routeName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public Route call(RouteInner inner) { - return wrapModel(inner); + public Observable call(RouteInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Route)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SecurityRulesImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SecurityRulesImpl.java index e3d75df64c38e..2fb4743cac0dd 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SecurityRulesImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SecurityRulesImpl.java @@ -64,10 +64,14 @@ public NetworkSecurityGroupSecurityRule call(SecurityRuleInner inner) { public Observable getAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { SecurityRulesInner client = this.inner(); return client.getAsync(resourceGroupName, networkSecurityGroupName, securityRuleName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public NetworkSecurityGroupSecurityRule call(SecurityRuleInner inner) { - return wrapModel(inner); + public Observable call(SecurityRuleInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NetworkSecurityGroupSecurityRule)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ServiceEndpointPolicyDefinitionsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ServiceEndpointPolicyDefinitionsImpl.java index 412f565946821..b5927d08dd0f8 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ServiceEndpointPolicyDefinitionsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ServiceEndpointPolicyDefinitionsImpl.java @@ -64,10 +64,14 @@ public ServiceEndpointPolicyDefinition call(ServiceEndpointPolicyDefinitionInner public Observable getAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName) { ServiceEndpointPolicyDefinitionsInner client = this.inner(); return client.getAsync(resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public ServiceEndpointPolicyDefinition call(ServiceEndpointPolicyDefinitionInner inner) { - return wrapModel(inner); + public Observable call(ServiceEndpointPolicyDefinitionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ServiceEndpointPolicyDefinition)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ServiceTagsInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ServiceTagsInner.java index d502158915183..158f00ff01513 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ServiceTagsInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ServiceTagsInner.java @@ -60,7 +60,7 @@ interface ServiceTagsService { /** * Gets a list of service tag information resources. * - * @param location The location. + * @param location The location that will be used as a reference for version (not as a filter based on location, you will get the list of service tags with prefix details across all regions but limited to the cloud that your subscription belongs to). * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -73,7 +73,7 @@ public ServiceTagsListResultInner list(String location) { /** * Gets a list of service tag information resources. * - * @param location The location. + * @param location The location that will be used as a reference for version (not as a filter based on location, you will get the list of service tags with prefix details across all regions but limited to the cloud that your subscription belongs to). * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object @@ -85,7 +85,7 @@ public ServiceFuture listAsync(String location, fina /** * Gets a list of service tag information resources. * - * @param location The location. + * @param location The location that will be used as a reference for version (not as a filter based on location, you will get the list of service tags with prefix details across all regions but limited to the cloud that your subscription belongs to). * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ServiceTagsListResultInner object */ @@ -101,7 +101,7 @@ public ServiceTagsListResultInner call(ServiceResponse privateEndpoints() { List lst = new ArrayList(); @@ -146,6 +151,11 @@ public List privateEndpoints() { return lst; } + @Override + public String privateLinkServiceNetworkPolicies() { + return this.inner().privateLinkServiceNetworkPolicies(); + } + @Override public String provisioningState() { return this.inner().provisioningState(); @@ -247,6 +257,18 @@ public SubnetImpl withNetworkSecurityGroup(NetworkSecurityGroupInner networkSecu return this; } + @Override + public SubnetImpl withPrivateEndpointNetworkPolicies(String privateEndpointNetworkPolicies) { + this.inner().withPrivateEndpointNetworkPolicies(privateEndpointNetworkPolicies); + return this; + } + + @Override + public SubnetImpl withPrivateLinkServiceNetworkPolicies(String privateLinkServiceNetworkPolicies) { + this.inner().withPrivateLinkServiceNetworkPolicies(privateLinkServiceNetworkPolicies); + return this; + } + @Override public SubnetImpl withProvisioningState(String provisioningState) { this.inner().withProvisioningState(provisioningState); diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SubnetInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SubnetInner.java index 7f4e687cf3dbd..435907f9c8851 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SubnetInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SubnetInner.java @@ -114,6 +114,18 @@ public class SubnetInner extends SubResource { @JsonProperty(value = "properties.provisioningState") private String provisioningState; + /** + * Enable or Disable private end point on the subnet. + */ + @JsonProperty(value = "properties.privateEndpointNetworkPolicies") + private String privateEndpointNetworkPolicies; + + /** + * Enable or Disable private link service on the subnet. + */ + @JsonProperty(value = "properties.privateLinkServiceNetworkPolicies") + private String privateLinkServiceNetworkPolicies; + /** * The name of the resource that is unique within a resource group. This * name can be used to access the resource. @@ -383,6 +395,46 @@ public SubnetInner withProvisioningState(String provisioningState) { return this; } + /** + * Get enable or Disable private end point on the subnet. + * + * @return the privateEndpointNetworkPolicies value + */ + public String privateEndpointNetworkPolicies() { + return this.privateEndpointNetworkPolicies; + } + + /** + * Set enable or Disable private end point on the subnet. + * + * @param privateEndpointNetworkPolicies the privateEndpointNetworkPolicies value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withPrivateEndpointNetworkPolicies(String privateEndpointNetworkPolicies) { + this.privateEndpointNetworkPolicies = privateEndpointNetworkPolicies; + return this; + } + + /** + * Get enable or Disable private link service on the subnet. + * + * @return the privateLinkServiceNetworkPolicies value + */ + public String privateLinkServiceNetworkPolicies() { + return this.privateLinkServiceNetworkPolicies; + } + + /** + * Set enable or Disable private link service on the subnet. + * + * @param privateLinkServiceNetworkPolicies the privateLinkServiceNetworkPolicies value to set + * @return the SubnetInner object itself. + */ + public SubnetInner withPrivateLinkServiceNetworkPolicies(String privateLinkServiceNetworkPolicies) { + this.privateLinkServiceNetworkPolicies = privateLinkServiceNetworkPolicies; + return this; + } + /** * Get the name of the resource that is unique within a resource group. This name can be used to access the resource. * diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SubnetsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SubnetsImpl.java index 60400bd17b878..051af222de215 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SubnetsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SubnetsImpl.java @@ -71,10 +71,14 @@ public Subnet call(SubnetInner inner) { public Observable getAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { SubnetsInner client = this.inner(); return client.getAsync(resourceGroupName, virtualNetworkName, subnetName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public Subnet call(SubnetInner inner) { - return wrapModel(inner); + public Observable call(SubnetInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Subnet)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SubnetsInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SubnetsInner.java index 874e345630ab7..f34edefa59def 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SubnetsInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/SubnetsInner.java @@ -38,8 +38,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkGatewayConnectionsInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkGatewayConnectionsInner.java index 11d8b45144849..6b2f524cef513 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkGatewayConnectionsInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkGatewayConnectionsInner.java @@ -42,8 +42,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkGatewaysInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkGatewaysInner.java index aa4ddc44802a9..8984af9db2167 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkGatewaysInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkGatewaysInner.java @@ -44,8 +44,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined @@ -129,10 +127,18 @@ interface VirtualNetworkGatewaysService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage") Observable> generatevpnclientpackage(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_04_01.VirtualNetworkGateways beginGeneratevpnclientpackage" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage") + Observable> beginGeneratevpnclientpackage(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_04_01.VirtualNetworkGateways generateVpnProfile" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile") Observable> generateVpnProfile(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkGatewayName") String virtualNetworkGatewayName, @Path("subscriptionId") String subscriptionId, @Body VpnClientParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_04_01.VirtualNetworkGateways beginGenerateVpnProfile" }) + @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 VpnClientParameters 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.v2019_04_01.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); @@ -1625,7 +1631,7 @@ private ServiceResponse beginResetVpnClientSharedKeyDelegate(Response generatevpnclientpackageAsync(String resourceGroupN * @param virtualNetworkGatewayName The name of the virtual network gateway. * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the String object + * @return the observable for the request */ public Observable generatevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { @@ -1667,7 +1673,7 @@ public String call(ServiceResponse response) { * @param virtualNetworkGatewayName The name of the virtual network gateway. * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the String object + * @return the observable for the request */ public Observable> generatevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { if (resourceGroupName == null) { @@ -1684,12 +1690,87 @@ public Observable> generatevpnclientpackageWithServiceRe } Validator.validate(parameters); final String apiVersion = "2019-04-01"; - return service.generatevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + Observable> observable = service.generatevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String beginGeneratevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + return beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body(); + } + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginGeneratevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); + } + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginGeneratevpnclientpackageAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + return beginGeneratevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates VPN client package for P2S client of the virtual network gateway in the specified resource group. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginGeneratevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-04-01"; + return service.beginGeneratevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = generatevpnclientpackageDelegate(response); + ServiceResponse clientResponse = beginGeneratevpnclientpackageDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1698,7 +1779,7 @@ public Observable> call(Response response) }); } - private ServiceResponse generatevpnclientpackageDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginGeneratevpnclientpackageDelegate(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()) @@ -1718,7 +1799,7 @@ private ServiceResponse generatevpnclientpackageDelegate(Response generateVpnProfileAsync(String resourceGroupName, S * @param virtualNetworkGatewayName The name of the virtual network gateway. * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the String object + * @return the observable for the request */ public Observable generateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { return generateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { @@ -1760,7 +1841,7 @@ public String call(ServiceResponse response) { * @param virtualNetworkGatewayName The name of the virtual network gateway. * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the String object + * @return the observable for the request */ public Observable> generateVpnProfileWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { if (resourceGroupName == null) { @@ -1777,12 +1858,87 @@ public Observable> generateVpnProfileWithServiceResponse } Validator.validate(parameters); final String apiVersion = "2019-04-01"; - return service.generateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + Observable> observable = service.generateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the String object if successful. + */ + public String beginGenerateVpnProfile(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().body(); + } + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginGenerateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters), serviceCallback); + } + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable beginGenerateVpnProfileAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + return beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).map(new Func1, String>() { + @Override + public String call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates VPN profile for P2S client of the virtual network gateway in the specified resource group. Used for IKEV2 and radius based authentication. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkGatewayName The name of the virtual network gateway. + * @param parameters Parameters supplied to the generate virtual network gateway VPN client package operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + public Observable> beginGenerateVpnProfileWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkGatewayName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String apiVersion = "2019-04-01"; + return service.beginGenerateVpnProfile(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = generateVpnProfileDelegate(response); + ServiceResponse clientResponse = beginGenerateVpnProfileDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1791,7 +1947,7 @@ public Observable> call(Response response) }); } - private ServiceResponse generateVpnProfileDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginGenerateVpnProfileDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkPeeringsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkPeeringsImpl.java index 66fd4a9148fed..28c790682feb3 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkPeeringsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworkPeeringsImpl.java @@ -64,10 +64,14 @@ public VirtualNetworkPeering call(VirtualNetworkPeeringInner inner) { public Observable getAsync(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { VirtualNetworkPeeringsInner client = this.inner(); return client.getAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public VirtualNetworkPeering call(VirtualNetworkPeeringInner inner) { - return wrapModel(inner); + public Observable call(VirtualNetworkPeeringInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((VirtualNetworkPeering)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VpnConnectionsImpl.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VpnConnectionsImpl.java index 623acfebb3204..c169d8f9ef90b 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VpnConnectionsImpl.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VpnConnectionsImpl.java @@ -64,10 +64,14 @@ public VpnConnection call(VpnConnectionInner inner) { public Observable getAsync(String resourceGroupName, String gatewayName, String connectionName) { VpnConnectionsInner client = this.inner(); return client.getAsync(resourceGroupName, gatewayName, connectionName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public VpnConnection call(VpnConnectionInner inner) { - return wrapModel(inner); + public Observable call(VpnConnectionInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((VpnConnection)wrapModel(inner)); + } } }); } diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VpnGatewaysInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VpnGatewaysInner.java index fd478cffe4ab2..3108577b650d3 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VpnGatewaysInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VpnGatewaysInner.java @@ -44,8 +44,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined diff --git a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VpnSitesConfigurationsInner.java b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VpnSitesConfigurationsInner.java index e32f9f3cd4165..c70ea1231341e 100644 --- a/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VpnSitesConfigurationsInner.java +++ b/sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VpnSitesConfigurationsInner.java @@ -29,8 +29,6 @@ import rx.Observable; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; -import com.microsoft.azure.LongRunningFinalState; -import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined