diff --git a/sdk/network/mgmt-v2019_02_01/pom.xml b/sdk/network/mgmt-v2019_02_01/pom.xml index e0c2127149732..65789d8bd865d 100644 --- a/sdk/network/mgmt-v2019_02_01/pom.xml +++ b/sdk/network/mgmt-v2019_02_01/pom.xml @@ -8,11 +8,11 @@ 4.0.0 com.microsoft.azure.network.v2019_02_01 - + com.microsoft.azure azure-arm-parent - 1.2.0 - ../../parents/azure-arm-parent + 1.1.0 + ../../../pom.management.xml azure-mgmt-network 1.0.0-beta @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ApplicationGatewayOnDemandProbe.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ApplicationGatewayOnDemandProbe.java index 9ab68288e9ea1..05455f83b63c8 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ApplicationGatewayOnDemandProbe.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ApplicationGatewayOnDemandProbe.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.network.v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ApplicationGatewaySslCipherSuite.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ApplicationGatewaySslCipherSuite.java index d1c082dcd087f..80532d9c087c2 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ApplicationGatewaySslCipherSuite.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/BackendAddressPool.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/BackendAddressPool.java index fcaa34177213b..e52b3ba55f182 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/BackendAddressPool.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/PublicIPPrefix.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/PublicIPPrefix.java index ad5d5b747882e..1e222a1960c74 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/PublicIPPrefix.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/PublicIPPrefix.java @@ -19,6 +19,7 @@ import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.network.v2019_02_01.implementation.NetworkManager; import java.util.List; +import com.microsoft.azure.SubResource; import com.microsoft.azure.management.network.v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ResourceNavigationLinks.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ResourceNavigationLinks.java new file mode 100644 index 0000000000000..244f1eb41a56e --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ResourceNavigationLinks.java @@ -0,0 +1,30 @@ +/** + * 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_02_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_02_01.implementation.ResourceNavigationLinksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ResourceNavigationLinks. + */ +public interface ResourceNavigationLinks extends HasInner { + /** + * Gets a list of resource navigation links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String virtualNetworkName, String subnetName); + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ResourceNavigationLinksListResult.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ResourceNavigationLinksListResult.java new file mode 100644 index 0000000000000..77600e9fa578e --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ResourceNavigationLinksListResult.java @@ -0,0 +1,32 @@ +/** + * 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_02_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_02_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_02_01.implementation.ResourceNavigationLinksListResultInner; +import com.microsoft.azure.management.network.v2019_02_01.implementation.ResourceNavigationLinkInner; +import java.util.List; + +/** + * Type representing ResourceNavigationLinksListResult. + */ +public interface ResourceNavigationLinksListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ServiceAssociationLinks.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ServiceAssociationLinks.java new file mode 100644 index 0000000000000..cfca4e2f7d1c7 --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ServiceAssociationLinks.java @@ -0,0 +1,30 @@ +/** + * 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_02_01; + +import rx.Observable; +import com.microsoft.azure.management.network.v2019_02_01.implementation.ServiceAssociationLinksInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ServiceAssociationLinks. + */ +public interface ServiceAssociationLinks extends HasInner { + /** + * Gets a list of service association links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String virtualNetworkName, String subnetName); + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ServiceAssociationLinksListResult.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ServiceAssociationLinksListResult.java new file mode 100644 index 0000000000000..afafd94d43b88 --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ServiceAssociationLinksListResult.java @@ -0,0 +1,32 @@ +/** + * 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_02_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.network.v2019_02_01.implementation.NetworkManager; +import com.microsoft.azure.management.network.v2019_02_01.implementation.ServiceAssociationLinksListResultInner; +import com.microsoft.azure.management.network.v2019_02_01.implementation.ServiceAssociationLinkInner; +import java.util.List; + +/** + * Type representing ServiceAssociationLinksListResult. + */ +public interface ServiceAssociationLinksListResult extends HasInner, HasManager { + /** + * @return the nextLink value. + */ + String nextLink(); + + /** + * @return the value value. + */ + List value(); + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/Subnet.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/Subnet.java index 1c91e493c9bd8..7d8d9102597df 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/Subnet.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/Subnet.java @@ -20,7 +20,9 @@ import java.util.List; import com.microsoft.azure.SubResource; import com.microsoft.azure.management.network.v2019_02_01.implementation.NetworkSecurityGroupInner; +import com.microsoft.azure.management.network.v2019_02_01.implementation.ResourceNavigationLinkInner; import com.microsoft.azure.management.network.v2019_02_01.implementation.RouteTableInner; +import com.microsoft.azure.management.network.v2019_02_01.implementation.ServiceAssociationLinkInner; import com.microsoft.azure.management.network.v2019_02_01.implementation.ServiceEndpointPolicyInner; /** @@ -95,7 +97,7 @@ public interface Subnet extends HasInner, Indexable, Refreshable resourceNavigationLinks(); + List resourceNavigationLinks(); /** * @return the routeTable value. @@ -105,7 +107,7 @@ public interface Subnet extends HasInner, Indexable, Refreshable serviceAssociationLinks(); + List serviceAssociationLinks(); /** * @return the serviceEndpointPolicies value. @@ -263,7 +265,7 @@ interface WithResourceNavigationLinks { * @param resourceNavigationLinks Gets an array of references to the external resources using subnet * @return the next definition stage */ - WithCreate withResourceNavigationLinks(List resourceNavigationLinks); + WithCreate withResourceNavigationLinks(List resourceNavigationLinks); } /** @@ -287,7 +289,7 @@ interface WithServiceAssociationLinks { * @param serviceAssociationLinks Gets an array of references to services injecting into this subnet * @return the next definition stage */ - WithCreate withServiceAssociationLinks(List serviceAssociationLinks); + WithCreate withServiceAssociationLinks(List serviceAssociationLinks); } /** @@ -449,7 +451,7 @@ interface WithResourceNavigationLinks { * @param resourceNavigationLinks Gets an array of references to the external resources using subnet * @return the next update stage */ - Update withResourceNavigationLinks(List resourceNavigationLinks); + Update withResourceNavigationLinks(List resourceNavigationLinks); } /** @@ -473,7 +475,7 @@ interface WithServiceAssociationLinks { * @param serviceAssociationLinks Gets an array of references to services injecting into this subnet * @return the next update stage */ - Update withServiceAssociationLinks(List serviceAssociationLinks); + Update withServiceAssociationLinks(List serviceAssociationLinks); } /** diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/VirtualNetworkGateway.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/VirtualNetworkGateway.java index 282a1250f9463..0dae6a525db85 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/VirtualNetworkGateway.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/VirtualNetworkGateway.java @@ -143,7 +143,7 @@ interface WithBgpSettings { interface WithCustomRoutes { /** * Specifies customRoutes. - * @param customRoutes The reference of the address space resource which represents the custom routes address space specified by the the customer for virtual network gateway and VpnClient + * @param customRoutes The reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient * @return the next definition stage */ WithCreate withCustomRoutes(AddressSpace customRoutes); @@ -305,7 +305,7 @@ interface WithBgpSettings { interface WithCustomRoutes { /** * Specifies customRoutes. - * @param customRoutes The reference of the address space resource which represents the custom routes address space specified by the the customer for virtual network gateway and VpnClient + * @param customRoutes The reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient * @return the next update stage */ Update withCustomRoutes(AddressSpace customRoutes); diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ApplicationGatewaysImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ApplicationGatewaysImpl.java index 4d2ce434d35a6..270a0017957d5 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ApplicationGatewaysImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ApplicationGatewaysInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ApplicationGatewaysInner.java index c89bbcd480757..3580a6c117a02 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ApplicationGatewaysInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01.ApplicationGateways listAll" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_02_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_02_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_02_01.ApplicationGateways listAllNext" }) + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_02_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_02_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-02-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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/BackendAddressPoolImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/BackendAddressPoolImpl.java index 60f2d86a43982..247d8b5157f06 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/BackendAddressPoolImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/BackendAddressPoolInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/BackendAddressPoolInner.java index b7a712cc6d2f0..5105b7c680550 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/BackendAddressPoolInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ConnectionMonitorsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ConnectionMonitorsImpl.java index 08c2787961877..6c814a06f449f 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ConnectionMonitorsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ConnectionMonitorsInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ConnectionMonitorsInner.java index e2af26f0088e0..f904685f4e6f6 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ConnectionMonitorsInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/DefaultSecurityRulesImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/DefaultSecurityRulesImpl.java index 9f34829c0d57f..d9a02c7b8b58c 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/DefaultSecurityRulesImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCircuitAuthorizationsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCircuitAuthorizationsImpl.java index 8f0d09d456e1e..17ed96992d775 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCircuitAuthorizationsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCircuitConnectionsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCircuitConnectionsImpl.java index 5806f09052c86..4c6f6b9416c51 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCircuitConnectionsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCircuitPeeringsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCircuitPeeringsImpl.java index 6cf69fb163158..fc598fa65b74e 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCircuitPeeringsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCircuitsInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCircuitsInner.java index da6e6cb8dca57..236ea2c23b07a 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCircuitsInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteConnectionsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteConnectionsImpl.java index 16766e8aa962b..1916d3e37771f 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteConnectionsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCrossConnectionPeeringsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCrossConnectionPeeringsImpl.java index e206d4da0cfec..1aa93dfa58ee4 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCrossConnectionPeeringsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCrossConnectionsInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCrossConnectionsInner.java index d77612ee0dbc9..769f171f6ef58 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteCrossConnectionsInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteLinksImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteLinksImpl.java index 8eab85a82ac70..9ae7d46aa236e 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRouteLinksImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/HubVirtualNetworkConnectionsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/HubVirtualNetworkConnectionsImpl.java index c1b4d82453534..8213e5c49e43d 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/HubVirtualNetworkConnectionsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/InboundNatRulesImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/InboundNatRulesImpl.java index 3ded187f9c794..4480bd5aaf23a 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/InboundNatRulesImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerBackendAddressPoolsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerBackendAddressPoolsImpl.java index 9cc1c070d4732..f279284663afc 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerBackendAddressPoolsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerFrontendIPConfigurationsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerFrontendIPConfigurationsImpl.java index a0f47d374505e..1d5cd2551d334 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerFrontendIPConfigurationsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerLoadBalancingRulesImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerLoadBalancingRulesImpl.java index 18bb4fb20654d..7fa5be458434a 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerLoadBalancingRulesImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerOutboundRulesImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerOutboundRulesImpl.java index d2ee6c2b37e05..213e40082d645 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerOutboundRulesImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerProbesImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerProbesImpl.java index 981e581da5b8a..8ecb56c699cd9 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/LoadBalancerProbesImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkInterfaceIPConfigurationsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkInterfaceIPConfigurationsImpl.java index 39404a3fe5847..620446b60b070 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkInterfaceIPConfigurationsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkInterfaceTapConfigurationsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkInterfaceTapConfigurationsImpl.java index 8410eb1bda1fe..a6f96039efa31 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkInterfaceTapConfigurationsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkInterfacesImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkInterfacesImpl.java index 490c937ca6bf9..85021ea1fbff3 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkInterfacesImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkInterfacesInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkInterfacesInner.java index 857ae13ed5887..bbdfcca37f8a7 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkInterfacesInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkManagementClientImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkManagementClientImpl.java index fdf307052605d..18502a37a0388 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkManagementClientImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01.ErrorException; import com.microsoft.rest.credentials.ServiceClientCredentials; import com.microsoft.rest.RestClient; @@ -866,6 +868,32 @@ public SubnetsInner subnets() { return this.subnets; } + /** + * The ResourceNavigationLinksInner object to access its operations. + */ + private ResourceNavigationLinksInner resourceNavigationLinks; + + /** + * Gets the ResourceNavigationLinksInner object to access its operations. + * @return the ResourceNavigationLinksInner object. + */ + public ResourceNavigationLinksInner resourceNavigationLinks() { + return this.resourceNavigationLinks; + } + + /** + * The ServiceAssociationLinksInner object to access its operations. + */ + private ServiceAssociationLinksInner serviceAssociationLinks; + + /** + * Gets the ServiceAssociationLinksInner object to access its operations. + * @return the ServiceAssociationLinksInner object. + */ + public ServiceAssociationLinksInner serviceAssociationLinks() { + return this.serviceAssociationLinks; + } + /** * The VirtualNetworkPeeringsInner object to access its operations. */ @@ -1151,6 +1179,8 @@ protected void initialize() { this.usages = new UsagesInner(restClient().retrofit(), this); this.virtualNetworks = new VirtualNetworksInner(restClient().retrofit(), this); this.subnets = new SubnetsInner(restClient().retrofit(), this); + this.resourceNavigationLinks = new ResourceNavigationLinksInner(restClient().retrofit(), this); + this.serviceAssociationLinks = new ServiceAssociationLinksInner(restClient().retrofit(), this); this.virtualNetworkPeerings = new VirtualNetworkPeeringsInner(restClient().retrofit(), this); this.virtualNetworkGateways = new VirtualNetworkGatewaysInner(restClient().retrofit(), this); this.virtualNetworkGatewayConnections = new VirtualNetworkGatewayConnectionsInner(restClient().retrofit(), this); diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkManager.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkManager.java index b52e33cb62dec..836adc9bd5e44 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkManager.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkManager.java @@ -72,6 +72,8 @@ import com.microsoft.azure.management.network.v2019_02_01.Usages; import com.microsoft.azure.management.network.v2019_02_01.VirtualNetworks; import com.microsoft.azure.management.network.v2019_02_01.Subnets; +import com.microsoft.azure.management.network.v2019_02_01.ResourceNavigationLinks; +import com.microsoft.azure.management.network.v2019_02_01.ServiceAssociationLinks; import com.microsoft.azure.management.network.v2019_02_01.VirtualNetworkPeerings; import com.microsoft.azure.management.network.v2019_02_01.VirtualNetworkGateways; import com.microsoft.azure.management.network.v2019_02_01.VirtualNetworkGatewayConnections; @@ -150,6 +152,8 @@ 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_02_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_02_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-02-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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkWatchersInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkWatchersInner.java index 6e297b088ca5b..77f75c708db7a 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/NetworkWatchersInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/OutboundRuleInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/OutboundRuleInner.java index 4aa2873aab15c..1fe66c756c24b 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/OutboundRuleInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/P2sVpnGatewaysInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/P2sVpnGatewaysInner.java index 0a454b328da37..d1574c701195c 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/P2sVpnGatewaysInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/P2sVpnServerConfigurationsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/P2sVpnServerConfigurationsImpl.java index e4d8c83aa97e9..45a9962cca625 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/P2sVpnServerConfigurationsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PacketCapturesImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PacketCapturesImpl.java index 8753b415d3419..cd1a7cd0df6cf 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PacketCapturesImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PacketCapturesInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PacketCapturesInner.java index 450562b2ebb36..a4444e2df7dbf 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PacketCapturesInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PeerExpressRouteCircuitConnectionsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PeerExpressRouteCircuitConnectionsImpl.java index 939fd67787600..9a271a76f8182 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PeerExpressRouteCircuitConnectionsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PublicIPPrefixImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PublicIPPrefixImpl.java index b12043e8b3c0e..71f4ee6c16d36 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PublicIPPrefixImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PublicIPPrefixImpl.java @@ -16,6 +16,7 @@ import java.util.List; import com.microsoft.azure.management.network.v2019_02_01.IpTag; import com.microsoft.azure.management.network.v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PublicIPPrefixInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PublicIPPrefixInner.java index d421ca0db50de..0a5f4a14bea3e 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PublicIPPrefixInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/PublicIPPrefixInner.java @@ -13,6 +13,7 @@ import java.util.List; import com.microsoft.azure.management.network.v2019_02_01.IpTag; import com.microsoft.azure.management.network.v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinkInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinkInner.java new file mode 100644 index 0000000000000..bfe5b3984f3c3 --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinkInner.java @@ -0,0 +1,129 @@ +/** + * 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_02_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * ResourceNavigationLink resource. + */ +@JsonFlatten +public class ResourceNavigationLinkInner extends SubResource { + /** + * Resource type of the linked resource. + */ + @JsonProperty(value = "properties.linkedResourceType") + private String linkedResourceType; + + /** + * Link to the external resource. + */ + @JsonProperty(value = "properties.link") + private String link; + + /** + * Provisioning state of the ResourceNavigationLink resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Name of the resource that is unique within a resource group. This name + * can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get resource type of the linked resource. + * + * @return the linkedResourceType value + */ + public String linkedResourceType() { + return this.linkedResourceType; + } + + /** + * Set resource type of the linked resource. + * + * @param linkedResourceType the linkedResourceType value to set + * @return the ResourceNavigationLinkInner object itself. + */ + public ResourceNavigationLinkInner withLinkedResourceType(String linkedResourceType) { + this.linkedResourceType = linkedResourceType; + return this; + } + + /** + * Get link to the external resource. + * + * @return the link value + */ + public String link() { + return this.link; + } + + /** + * Set link to the external resource. + * + * @param link the link value to set + * @return the ResourceNavigationLinkInner object itself. + */ + public ResourceNavigationLinkInner withLink(String link) { + this.link = link; + return this; + } + + /** + * Get provisioning state of the ResourceNavigationLink resource. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get 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 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 ResourceNavigationLinkInner object itself. + */ + public ResourceNavigationLinkInner withName(String name) { + this.name = 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; + } + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinksImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinksImpl.java new file mode 100644 index 0000000000000..06d532b06aaf8 --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinksImpl.java @@ -0,0 +1,42 @@ +/** + * 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. + * abc + */ + +package com.microsoft.azure.management.network.v2019_02_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_02_01.ResourceNavigationLinks; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_02_01.ResourceNavigationLinksListResult; + +class ResourceNavigationLinksImpl extends WrapperImpl implements ResourceNavigationLinks { + private final NetworkManager manager; + + ResourceNavigationLinksImpl(NetworkManager manager) { + super(manager.inner().resourceNavigationLinks()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable getAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + ResourceNavigationLinksInner client = this.inner(); + return client.getAsync(resourceGroupName, virtualNetworkName, subnetName) + .map(new Func1() { + @Override + public ResourceNavigationLinksListResult call(ResourceNavigationLinksListResultInner inner) { + return new ResourceNavigationLinksListResultImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinksInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinksInner.java new file mode 100644 index 0000000000000..e5f1dd5c23cf6 --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinksInner.java @@ -0,0 +1,151 @@ +/** + * 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_02_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ResourceNavigationLinks. + */ +public class ResourceNavigationLinksInner { + /** The Retrofit service to perform REST calls. */ + private ResourceNavigationLinksService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ResourceNavigationLinksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ResourceNavigationLinksInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ResourceNavigationLinksService.class); + this.client = client; + } + + /** + * The interface defining all the services for ResourceNavigationLinks to be + * used by Retrofit to perform actually REST calls. + */ + interface ResourceNavigationLinksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_02_01.ResourceNavigationLinks get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ResourceNavigationLinks") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of resource navigation links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ResourceNavigationLinksListResultInner object if successful. + */ + public ResourceNavigationLinksListResultInner get(String resourceGroupName, String virtualNetworkName, String subnetName) { + return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().single().body(); + } + + /** + * Gets a list of resource navigation links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String virtualNetworkName, String subnetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName), serviceCallback); + } + + /** + * Gets a list of resource navigation links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResourceNavigationLinksListResultInner object + */ + public Observable getAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).map(new Func1, ResourceNavigationLinksListResultInner>() { + @Override + public ResourceNavigationLinksListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a list of resource navigation links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ResourceNavigationLinksListResultInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName 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-02-01"; + return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinksListResultImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinksListResultImpl.java new file mode 100644 index 0000000000000..382ed83a8d0c9 --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinksListResultImpl.java @@ -0,0 +1,37 @@ +/** + * 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_02_01.implementation; + +import com.microsoft.azure.management.network.v2019_02_01.ResourceNavigationLinksListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class ResourceNavigationLinksListResultImpl extends WrapperImpl implements ResourceNavigationLinksListResult { + private final NetworkManager manager; + ResourceNavigationLinksListResultImpl(ResourceNavigationLinksListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinksListResultInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinksListResultInner.java new file mode 100644 index 0000000000000..27d83d4f0c74b --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ResourceNavigationLinksListResultInner.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_02_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for ResourceNavigationLinks_Get operation. + */ +public class ResourceNavigationLinksListResultInner { + /** + * The resource navigation links in a subnet. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the resource navigation links in a subnet. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the resource navigation links in a subnet. + * + * @param value the value value to set + * @return the ResourceNavigationLinksListResultInner object itself. + */ + public ResourceNavigationLinksListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the URL to get the next set of results. + * + * @param nextLink the nextLink value to set + * @return the ResourceNavigationLinksListResultInner object itself. + */ + public ResourceNavigationLinksListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/RouteFilterRulesImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/RouteFilterRulesImpl.java index ea243dd7b1c7a..380b1e105f34a 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/RouteFilterRulesImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/RoutesImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/RoutesImpl.java index 2ac917f0dc134..a96ba862dbc8d 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/RoutesImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SecurityRulesImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SecurityRulesImpl.java index eefe2a3c4a5b4..a6e3b47c665c2 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SecurityRulesImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinkInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinkInner.java new file mode 100644 index 0000000000000..f365447263260 --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinkInner.java @@ -0,0 +1,129 @@ +/** + * 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_02_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.SubResource; + +/** + * ServiceAssociationLink resource. + */ +@JsonFlatten +public class ServiceAssociationLinkInner extends SubResource { + /** + * Resource type of the linked resource. + */ + @JsonProperty(value = "properties.linkedResourceType") + private String linkedResourceType; + + /** + * Link to the external resource. + */ + @JsonProperty(value = "properties.link") + private String link; + + /** + * Provisioning state of the ServiceAssociationLink resource. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /** + * Name of the resource that is unique within a resource group. This name + * can be used to access the resource. + */ + @JsonProperty(value = "name") + private String name; + + /** + * A unique read-only string that changes whenever the resource is updated. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get resource type of the linked resource. + * + * @return the linkedResourceType value + */ + public String linkedResourceType() { + return this.linkedResourceType; + } + + /** + * Set resource type of the linked resource. + * + * @param linkedResourceType the linkedResourceType value to set + * @return the ServiceAssociationLinkInner object itself. + */ + public ServiceAssociationLinkInner withLinkedResourceType(String linkedResourceType) { + this.linkedResourceType = linkedResourceType; + return this; + } + + /** + * Get link to the external resource. + * + * @return the link value + */ + public String link() { + return this.link; + } + + /** + * Set link to the external resource. + * + * @param link the link value to set + * @return the ServiceAssociationLinkInner object itself. + */ + public ServiceAssociationLinkInner withLink(String link) { + this.link = link; + return this; + } + + /** + * Get provisioning state of the ServiceAssociationLink resource. + * + * @return the provisioningState value + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get 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 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 ServiceAssociationLinkInner object itself. + */ + public ServiceAssociationLinkInner withName(String name) { + this.name = 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; + } + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinksImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinksImpl.java new file mode 100644 index 0000000000000..099567b9f972f --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinksImpl.java @@ -0,0 +1,42 @@ +/** + * 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. + * abc + */ + +package com.microsoft.azure.management.network.v2019_02_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.network.v2019_02_01.ServiceAssociationLinks; +import rx.functions.Func1; +import rx.Observable; +import com.microsoft.azure.management.network.v2019_02_01.ServiceAssociationLinksListResult; + +class ServiceAssociationLinksImpl extends WrapperImpl implements ServiceAssociationLinks { + private final NetworkManager manager; + + ServiceAssociationLinksImpl(NetworkManager manager) { + super(manager.inner().serviceAssociationLinks()); + this.manager = manager; + } + + public NetworkManager manager() { + return this.manager; + } + + @Override + public Observable getAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + ServiceAssociationLinksInner client = this.inner(); + return client.getAsync(resourceGroupName, virtualNetworkName, subnetName) + .map(new Func1() { + @Override + public ServiceAssociationLinksListResult call(ServiceAssociationLinksListResultInner inner) { + return new ServiceAssociationLinksListResultImpl(inner, manager()); + } + }); + } + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinksInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinksInner.java new file mode 100644 index 0000000000000..a22be8b79a841 --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinksInner.java @@ -0,0 +1,151 @@ +/** + * 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_02_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ServiceAssociationLinks. + */ +public class ServiceAssociationLinksInner { + /** The Retrofit service to perform REST calls. */ + private ServiceAssociationLinksService service; + /** The service client containing this operation class. */ + private NetworkManagementClientImpl client; + + /** + * Initializes an instance of ServiceAssociationLinksInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ServiceAssociationLinksInner(Retrofit retrofit, NetworkManagementClientImpl client) { + this.service = retrofit.create(ServiceAssociationLinksService.class); + this.client = client; + } + + /** + * The interface defining all the services for ServiceAssociationLinks to be + * used by Retrofit to perform actually REST calls. + */ + interface ServiceAssociationLinksService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_02_01.ServiceAssociationLinks get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ServiceAssociationLinks") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("virtualNetworkName") String virtualNetworkName, @Path("subnetName") String subnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets a list of service association links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ServiceAssociationLinksListResultInner object if successful. + */ + public ServiceAssociationLinksListResultInner get(String resourceGroupName, String virtualNetworkName, String subnetName) { + return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().single().body(); + } + + /** + * Gets a list of service association links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String virtualNetworkName, String subnetName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName), serviceCallback); + } + + /** + * Gets a list of service association links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceAssociationLinksListResultInner object + */ + public Observable getAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).map(new Func1, ServiceAssociationLinksListResultInner>() { + @Override + public ServiceAssociationLinksListResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a list of service association links for a subnet. + * + * @param resourceGroupName The name of the resource group. + * @param virtualNetworkName The name of the virtual network. + * @param subnetName The name of the subnet. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ServiceAssociationLinksListResultInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String virtualNetworkName, String subnetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualNetworkName == null) { + throw new IllegalArgumentException("Parameter virtualNetworkName is required and cannot be null."); + } + if (subnetName == null) { + throw new IllegalArgumentException("Parameter subnetName 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-02-01"; + return service.get(resourceGroupName, virtualNetworkName, subnetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinksListResultImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinksListResultImpl.java new file mode 100644 index 0000000000000..fd470c1050d72 --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinksListResultImpl.java @@ -0,0 +1,37 @@ +/** + * 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_02_01.implementation; + +import com.microsoft.azure.management.network.v2019_02_01.ServiceAssociationLinksListResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import java.util.List; + +class ServiceAssociationLinksListResultImpl extends WrapperImpl implements ServiceAssociationLinksListResult { + private final NetworkManager manager; + ServiceAssociationLinksListResultImpl(ServiceAssociationLinksListResultInner inner, NetworkManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public NetworkManager manager() { + return this.manager; + } + + @Override + public String nextLink() { + return this.inner().nextLink(); + } + + @Override + public List value() { + return this.inner().value(); + } + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinksListResultInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinksListResultInner.java new file mode 100644 index 0000000000000..59c09e7d6e725 --- /dev/null +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceAssociationLinksListResultInner.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_02_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for ServiceAssociationLinks_Get operation. + */ +public class ServiceAssociationLinksListResultInner { + /** + * The service association links in a subnet. + */ + @JsonProperty(value = "value") + private List value; + + /** + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the service association links in a subnet. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set the service association links in a subnet. + * + * @param value the value value to set + * @return the ServiceAssociationLinksListResultInner object itself. + */ + public ServiceAssociationLinksListResultInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the URL to get the next set of results. + * + * @return the nextLink value + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the URL to get the next set of results. + * + * @param nextLink the nextLink value to set + * @return the ServiceAssociationLinksListResultInner object itself. + */ + public ServiceAssociationLinksListResultInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + +} diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceEndpointPolicyDefinitionsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceEndpointPolicyDefinitionsImpl.java index cc3da3598810c..9e79151a60810 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ServiceEndpointPolicyDefinitionsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetImpl.java index 39df67c867360..0c2398a38b9b8 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetImpl.java @@ -16,8 +16,6 @@ import com.microsoft.azure.management.network.v2019_02_01.ServiceEndpointPropertiesFormat; import com.microsoft.azure.management.network.v2019_02_01.IPConfiguration; import com.microsoft.azure.management.network.v2019_02_01.IPConfigurationProfile; -import com.microsoft.azure.management.network.v2019_02_01.ResourceNavigationLink; -import com.microsoft.azure.management.network.v2019_02_01.ServiceAssociationLink; import com.microsoft.azure.management.network.v2019_02_01.Delegation; import java.util.ArrayList; import com.microsoft.azure.management.network.v2019_02_01.InterfaceEndpoint; @@ -159,7 +157,7 @@ public String purpose() { } @Override - public List resourceNavigationLinks() { + public List resourceNavigationLinks() { return this.inner().resourceNavigationLinks(); } @@ -174,7 +172,7 @@ public RouteTable routeTable() { } @Override - public List serviceAssociationLinks() { + public List serviceAssociationLinks() { return this.inner().serviceAssociationLinks(); } @@ -256,7 +254,7 @@ public SubnetImpl withProvisioningState(String provisioningState) { } @Override - public SubnetImpl withResourceNavigationLinks(List resourceNavigationLinks) { + public SubnetImpl withResourceNavigationLinks(List resourceNavigationLinks) { this.inner().withResourceNavigationLinks(resourceNavigationLinks); return this; } @@ -268,7 +266,7 @@ public SubnetImpl withRouteTable(RouteTableInner routeTable) { } @Override - public SubnetImpl withServiceAssociationLinks(List serviceAssociationLinks) { + public SubnetImpl withServiceAssociationLinks(List serviceAssociationLinks) { this.inner().withServiceAssociationLinks(serviceAssociationLinks); return this; } diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetInner.java index 497664f7c24a9..3162674fe2b0b 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetInner.java @@ -13,8 +13,6 @@ import com.microsoft.azure.management.network.v2019_02_01.ServiceEndpointPropertiesFormat; import com.microsoft.azure.management.network.v2019_02_01.IPConfiguration; import com.microsoft.azure.management.network.v2019_02_01.IPConfigurationProfile; -import com.microsoft.azure.management.network.v2019_02_01.ResourceNavigationLink; -import com.microsoft.azure.management.network.v2019_02_01.ServiceAssociationLink; import com.microsoft.azure.management.network.v2019_02_01.Delegation; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -89,13 +87,13 @@ public class SubnetInner extends SubResource { * Gets an array of references to the external resources using subnet. */ @JsonProperty(value = "properties.resourceNavigationLinks") - private List resourceNavigationLinks; + private List resourceNavigationLinks; /** * Gets an array of references to services injecting into this subnet. */ @JsonProperty(value = "properties.serviceAssociationLinks") - private List serviceAssociationLinks; + private List serviceAssociationLinks; /** * Gets an array of references to the delegations on the subnet. @@ -301,7 +299,7 @@ public List ipConfigurationProfiles() { * * @return the resourceNavigationLinks value */ - public List resourceNavigationLinks() { + public List resourceNavigationLinks() { return this.resourceNavigationLinks; } @@ -311,7 +309,7 @@ public List resourceNavigationLinks() { * @param resourceNavigationLinks the resourceNavigationLinks value to set * @return the SubnetInner object itself. */ - public SubnetInner withResourceNavigationLinks(List resourceNavigationLinks) { + public SubnetInner withResourceNavigationLinks(List resourceNavigationLinks) { this.resourceNavigationLinks = resourceNavigationLinks; return this; } @@ -321,7 +319,7 @@ public SubnetInner withResourceNavigationLinks(List reso * * @return the serviceAssociationLinks value */ - public List serviceAssociationLinks() { + public List serviceAssociationLinks() { return this.serviceAssociationLinks; } @@ -331,7 +329,7 @@ public List serviceAssociationLinks() { * @param serviceAssociationLinks the serviceAssociationLinks value to set * @return the SubnetInner object itself. */ - public SubnetInner withServiceAssociationLinks(List serviceAssociationLinks) { + public SubnetInner withServiceAssociationLinks(List serviceAssociationLinks) { this.serviceAssociationLinks = serviceAssociationLinks; return this; } diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetsImpl.java index 10418e55a08fa..dbea2f0b1dc53 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetsInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetsInner.java index 106ab5b20ae53..70e17c9332dcf 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/SubnetsInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkGatewayConnectionsInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkGatewayConnectionsInner.java index 2ae7937706495..b3e1231c811a3 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkGatewayConnectionsInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkGatewayInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkGatewayInner.java index 3328210f77f65..9fcb709bff1c8 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkGatewayInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkGatewayInner.java @@ -91,7 +91,7 @@ public class VirtualNetworkGatewayInner extends Resource { /** * The reference of the address space resource which represents the custom - * routes address space specified by the the customer for virtual network + * routes address space specified by the customer for virtual network * gateway and VpnClient. */ @JsonProperty(value = "properties.customRoutes") @@ -304,7 +304,7 @@ public VirtualNetworkGatewayInner withBgpSettings(BgpSettings bgpSettings) { } /** - * Get the reference of the address space resource which represents the custom routes address space specified by the the customer for virtual network gateway and VpnClient. + * Get the reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient. * * @return the customRoutes value */ @@ -313,7 +313,7 @@ public AddressSpace customRoutes() { } /** - * Set the reference of the address space resource which represents the custom routes address space specified by the the customer for virtual network gateway and VpnClient. + * Set the reference of the address space resource which represents the custom routes address space specified by the customer for virtual network gateway and VpnClient. * * @param customRoutes the customRoutes value to set * @return the VirtualNetworkGatewayInner object itself. diff --git a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkGatewaysInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkGatewaysInner.java index 215ec9e9e97d7..de3ad3925bd07 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkGatewaysInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_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_02_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_02_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_02_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); @@ -1617,7 +1623,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>() { @@ -1659,7 +1665,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) { @@ -1676,12 +1682,87 @@ public Observable> generatevpnclientpackageWithServiceRe } Validator.validate(parameters); final String apiVersion = "2019-02-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-02-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); @@ -1690,7 +1771,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()) @@ -1710,7 +1791,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>() { @@ -1752,7 +1833,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) { @@ -1769,12 +1850,87 @@ public Observable> generateVpnProfileWithServiceResponse } Validator.validate(parameters); final String apiVersion = "2019-02-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-02-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); @@ -1783,7 +1939,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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkPeeringsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkPeeringsImpl.java index e1c4587f99e7b..8fec5ceb58258 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkPeeringsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VpnConnectionsImpl.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VpnConnectionsImpl.java index 6701bad96e9a2..dec1c19617798 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VpnConnectionsImpl.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VpnSitesConfigurationsInner.java b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VpnSitesConfigurationsInner.java index 6800d2a64ecb2..283bff48a8e75 100644 --- a/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VpnSitesConfigurationsInner.java +++ b/sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_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