From 2c4a7f7fcf2e5be4087464cf424cb60a1bcae08e Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 20 Aug 2020 23:12:58 +0000 Subject: [PATCH] Update from master --- sdk/network/mgmt-v2019_09_01/pom.xml | 6 +- .../v2019_09_01/BastionConnectProtocol.java | 41 + .../BastionShareableLinkListRequest.java | 45 + .../v2019_09_01/ConnectivityParameters.java | 27 + .../v2019_09_01/ExpressRouteCircuit.java | 100 +- .../ExpressRouteCircuitAuthorization.java | 52 +- .../ExpressRouteCircuitConnection.java | 28 +- .../ExpressRouteCircuitPeering.java | 101 +- .../network/v2019_09_01/SessionIds.java | 44 + .../network/v2019_09_01/Subnet.java | 2 - .../management/network/v2019_09_01/VM.java | 46 + .../implementation/AzureFirewallsInner.java | 178 +- .../BastionActiveSessionInner.java | 184 ++ .../BastionSessionStateInner.java | 62 + .../BastionShareableLinkInner.java | 90 + .../ConnectionMonitorsInner.java | 28 +- .../ExpressRouteCircuitAuthorizationImpl.java | 12 + ...ExpressRouteCircuitAuthorizationInner.java | 26 +- .../ExpressRouteCircuitConnectionImpl.java | 6 + .../ExpressRouteCircuitConnectionInner.java | 13 +- .../ExpressRouteCircuitImpl.java | 24 + .../ExpressRouteCircuitInner.java | 52 +- .../ExpressRouteCircuitPeeringImpl.java | 24 + .../ExpressRouteCircuitPeeringInner.java | 52 +- .../NetworkManagementClientImpl.java | 2627 +++++++++++++++-- .../PrivateLinkServicesInner.java | 342 ++- 26 files changed, 3953 insertions(+), 259 deletions(-) create mode 100644 sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionConnectProtocol.java create mode 100644 sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionShareableLinkListRequest.java create mode 100644 sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SessionIds.java create mode 100644 sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VM.java create mode 100644 sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionActiveSessionInner.java create mode 100644 sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionSessionStateInner.java create mode 100644 sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionShareableLinkInner.java diff --git a/sdk/network/mgmt-v2019_09_01/pom.xml b/sdk/network/mgmt-v2019_09_01/pom.xml index 4bc9d64d52f87..467b63b9a441c 100644 --- a/sdk/network/mgmt-v2019_09_01/pom.xml +++ b/sdk/network/mgmt-v2019_09_01/pom.xml @@ -11,11 +11,11 @@ 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-1 + 1.0.0-beta jar Microsoft Azure SDK for Network Management This package contains Microsoft Network Management SDK. diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionConnectProtocol.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionConnectProtocol.java new file mode 100644 index 0000000000000..185275705140e --- /dev/null +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionConnectProtocol.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for BastionConnectProtocol. + */ +public final class BastionConnectProtocol extends ExpandableStringEnum { + /** Static value SSH for BastionConnectProtocol. */ + public static final BastionConnectProtocol SSH = fromString("SSH"); + + /** Static value RDP for BastionConnectProtocol. */ + public static final BastionConnectProtocol RDP = fromString("RDP"); + + /** + * Creates or finds a BastionConnectProtocol from its string representation. + * @param name a name to look for + * @return the corresponding BastionConnectProtocol + */ + @JsonCreator + public static BastionConnectProtocol fromString(String name) { + return fromString(name, BastionConnectProtocol.class); + } + + /** + * @return known BastionConnectProtocol values + */ + public static Collection values() { + return values(BastionConnectProtocol.class); + } +} diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionShareableLinkListRequest.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionShareableLinkListRequest.java new file mode 100644 index 0000000000000..717180fc491ec --- /dev/null +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/BastionShareableLinkListRequest.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.BastionShareableLinkInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Post request for all the Bastion Shareable Link endpoints. + */ +public class BastionShareableLinkListRequest { + /** + * List of VM references. + */ + @JsonProperty(value = "vms") + private List vms; + + /** + * Get list of VM references. + * + * @return the vms value + */ + public List vms() { + return this.vms; + } + + /** + * Set list of VM references. + * + * @param vms the vms value to set + * @return the BastionShareableLinkListRequest object itself. + */ + public BastionShareableLinkListRequest withVms(List vms) { + this.vms = vms; + return this; + } + +} diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityParameters.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityParameters.java index f1d30ab1919bf..e9848f0ad2703 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityParameters.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ConnectivityParameters.java @@ -39,6 +39,13 @@ public class ConnectivityParameters { @JsonProperty(value = "protocolConfiguration") private ProtocolConfiguration protocolConfiguration; + /** + * Preferred IP version of the connection. Possible values include: 'IPv4', + * 'IPv6'. + */ + @JsonProperty(value = "preferredIPVersion") + private IPVersion preferredIPVersion; + /** * Get describes the source of the connection. * @@ -119,4 +126,24 @@ public ConnectivityParameters withProtocolConfiguration(ProtocolConfiguration pr return this; } + /** + * Get preferred IP version of the connection. Possible values include: 'IPv4', 'IPv6'. + * + * @return the preferredIPVersion value + */ + public IPVersion preferredIPVersion() { + return this.preferredIPVersion; + } + + /** + * Set preferred IP version of the connection. Possible values include: 'IPv4', 'IPv6'. + * + * @param preferredIPVersion the preferredIPVersion value to set + * @return the ConnectivityParameters object itself. + */ + public ConnectivityParameters withPreferredIPVersion(IPVersion preferredIPVersion) { + this.preferredIPVersion = preferredIPVersion; + return this; + } + } diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuit.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuit.java index 05cf62524e6a3..9a7b485e445ca 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuit.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuit.java @@ -166,6 +166,18 @@ interface WithBandwidthInGbps { WithCreate withBandwidthInGbps(Double bandwidthInGbps); } + /** + * The stage of the expressroutecircuit definition allowing to specify CircuitProvisioningState. + */ + interface WithCircuitProvisioningState { + /** + * Specifies circuitProvisioningState. + * @param circuitProvisioningState The CircuitProvisioningState state of the resource + * @return the next definition stage + */ + WithCreate withCircuitProvisioningState(String circuitProvisioningState); + } + /** * The stage of the expressroutecircuit definition allowing to specify ExpressRoutePort. */ @@ -190,6 +202,18 @@ interface WithGatewayManagerEtag { WithCreate withGatewayManagerEtag(String gatewayManagerEtag); } + /** + * The stage of the expressroutecircuit definition allowing to specify GlobalReachEnabled. + */ + interface WithGlobalReachEnabled { + /** + * Specifies globalReachEnabled. + * @param globalReachEnabled Flag denoting Global reach status + * @return the next definition stage + */ + WithCreate withGlobalReachEnabled(Boolean globalReachEnabled); + } + /** * The stage of the expressroutecircuit definition allowing to specify Peerings. */ @@ -202,6 +226,18 @@ interface WithPeerings { WithCreate withPeerings(List peerings); } + /** + * The stage of the expressroutecircuit definition allowing to specify ServiceKey. + */ + interface WithServiceKey { + /** + * Specifies serviceKey. + * @param serviceKey The ServiceKey + * @return the next definition stage + */ + WithCreate withServiceKey(String serviceKey); + } + /** * The stage of the expressroutecircuit definition allowing to specify ServiceProviderNotes. */ @@ -226,6 +262,18 @@ interface WithServiceProviderProperties { WithCreate withServiceProviderProperties(ExpressRouteCircuitServiceProviderProperties serviceProviderProperties); } + /** + * The stage of the expressroutecircuit definition allowing to specify ServiceProviderProvisioningState. + */ + interface WithServiceProviderProvisioningState { + /** + * Specifies serviceProviderProvisioningState. + * @param serviceProviderProvisioningState The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + * @return the next definition stage + */ + WithCreate withServiceProviderProvisioningState(ServiceProviderProvisioningState serviceProviderProvisioningState); + } + /** * The stage of the expressroutecircuit definition allowing to specify Sku. */ @@ -243,13 +291,13 @@ interface WithSku { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAllowClassicOperations, DefinitionStages.WithAuthorizations, DefinitionStages.WithBandwidthInGbps, DefinitionStages.WithExpressRoutePort, DefinitionStages.WithGatewayManagerEtag, DefinitionStages.WithPeerings, DefinitionStages.WithServiceProviderNotes, DefinitionStages.WithServiceProviderProperties, DefinitionStages.WithSku { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithAllowClassicOperations, DefinitionStages.WithAuthorizations, DefinitionStages.WithBandwidthInGbps, DefinitionStages.WithCircuitProvisioningState, DefinitionStages.WithExpressRoutePort, DefinitionStages.WithGatewayManagerEtag, DefinitionStages.WithGlobalReachEnabled, DefinitionStages.WithPeerings, DefinitionStages.WithServiceKey, DefinitionStages.WithServiceProviderNotes, DefinitionStages.WithServiceProviderProperties, DefinitionStages.WithServiceProviderProvisioningState, DefinitionStages.WithSku { } } /** * The template for a ExpressRouteCircuit update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAllowClassicOperations, UpdateStages.WithAuthorizations, UpdateStages.WithBandwidthInGbps, UpdateStages.WithExpressRoutePort, UpdateStages.WithGatewayManagerEtag, UpdateStages.WithPeerings, UpdateStages.WithServiceProviderNotes, UpdateStages.WithServiceProviderProperties, UpdateStages.WithSku { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithAllowClassicOperations, UpdateStages.WithAuthorizations, UpdateStages.WithBandwidthInGbps, UpdateStages.WithCircuitProvisioningState, UpdateStages.WithExpressRoutePort, UpdateStages.WithGatewayManagerEtag, UpdateStages.WithGlobalReachEnabled, UpdateStages.WithPeerings, UpdateStages.WithServiceKey, UpdateStages.WithServiceProviderNotes, UpdateStages.WithServiceProviderProperties, UpdateStages.WithServiceProviderProvisioningState, UpdateStages.WithSku { } /** @@ -292,6 +340,18 @@ interface WithBandwidthInGbps { Update withBandwidthInGbps(Double bandwidthInGbps); } + /** + * The stage of the expressroutecircuit update allowing to specify CircuitProvisioningState. + */ + interface WithCircuitProvisioningState { + /** + * Specifies circuitProvisioningState. + * @param circuitProvisioningState The CircuitProvisioningState state of the resource + * @return the next update stage + */ + Update withCircuitProvisioningState(String circuitProvisioningState); + } + /** * The stage of the expressroutecircuit update allowing to specify ExpressRoutePort. */ @@ -316,6 +376,18 @@ interface WithGatewayManagerEtag { Update withGatewayManagerEtag(String gatewayManagerEtag); } + /** + * The stage of the expressroutecircuit update allowing to specify GlobalReachEnabled. + */ + interface WithGlobalReachEnabled { + /** + * Specifies globalReachEnabled. + * @param globalReachEnabled Flag denoting Global reach status + * @return the next update stage + */ + Update withGlobalReachEnabled(Boolean globalReachEnabled); + } + /** * The stage of the expressroutecircuit update allowing to specify Peerings. */ @@ -328,6 +400,18 @@ interface WithPeerings { Update withPeerings(List peerings); } + /** + * The stage of the expressroutecircuit update allowing to specify ServiceKey. + */ + interface WithServiceKey { + /** + * Specifies serviceKey. + * @param serviceKey The ServiceKey + * @return the next update stage + */ + Update withServiceKey(String serviceKey); + } + /** * The stage of the expressroutecircuit update allowing to specify ServiceProviderNotes. */ @@ -352,6 +436,18 @@ interface WithServiceProviderProperties { Update withServiceProviderProperties(ExpressRouteCircuitServiceProviderProperties serviceProviderProperties); } + /** + * The stage of the expressroutecircuit update allowing to specify ServiceProviderProvisioningState. + */ + interface WithServiceProviderProvisioningState { + /** + * Specifies serviceProviderProvisioningState. + * @param serviceProviderProvisioningState The ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + * @return the next update stage + */ + Update withServiceProviderProvisioningState(ServiceProviderProvisioningState serviceProviderProvisioningState); + } + /** * The stage of the expressroutecircuit update allowing to specify Sku. */ diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitAuthorization.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitAuthorization.java index 19cb2d26ba6eb..fdb567c618ba2 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitAuthorization.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitAuthorization.java @@ -86,6 +86,30 @@ interface WithExpressRouteCircuit { WithCreate withExistingExpressRouteCircuit(String resourceGroupName, String circuitName); } + /** + * The stage of the expressroutecircuitauthorization definition allowing to specify AuthorizationKey. + */ + interface WithAuthorizationKey { + /** + * Specifies authorizationKey. + * @param authorizationKey The authorization key + * @return the next definition stage + */ + WithCreate withAuthorizationKey(String authorizationKey); + } + + /** + * The stage of the expressroutecircuitauthorization definition allowing to specify AuthorizationUseStatus. + */ + interface WithAuthorizationUseStatus { + /** + * Specifies authorizationUseStatus. + * @param authorizationUseStatus The authorization use status. Possible values include: 'Available', 'InUse' + * @return the next definition stage + */ + WithCreate withAuthorizationUseStatus(AuthorizationUseStatus authorizationUseStatus); + } + /** * The stage of the expressroutecircuitauthorization definition allowing to specify Id. */ @@ -115,19 +139,43 @@ interface WithName { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, DefinitionStages.WithId, DefinitionStages.WithName { + interface WithCreate extends Creatable, DefinitionStages.WithAuthorizationKey, DefinitionStages.WithAuthorizationUseStatus, DefinitionStages.WithId, DefinitionStages.WithName { } } /** * The template for a ExpressRouteCircuitAuthorization update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, UpdateStages.WithId, UpdateStages.WithName { + interface Update extends Appliable, UpdateStages.WithAuthorizationKey, UpdateStages.WithAuthorizationUseStatus, UpdateStages.WithId, UpdateStages.WithName { } /** * Grouping of ExpressRouteCircuitAuthorization update stages. */ interface UpdateStages { + /** + * The stage of the expressroutecircuitauthorization update allowing to specify AuthorizationKey. + */ + interface WithAuthorizationKey { + /** + * Specifies authorizationKey. + * @param authorizationKey The authorization key + * @return the next update stage + */ + Update withAuthorizationKey(String authorizationKey); + } + + /** + * The stage of the expressroutecircuitauthorization update allowing to specify AuthorizationUseStatus. + */ + interface WithAuthorizationUseStatus { + /** + * Specifies authorizationUseStatus. + * @param authorizationUseStatus The authorization use status. Possible values include: 'Available', 'InUse' + * @return the next update stage + */ + Update withAuthorizationUseStatus(AuthorizationUseStatus authorizationUseStatus); + } + /** * The stage of the expressroutecircuitauthorization update allowing to specify Id. */ diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitConnection.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitConnection.java index 63f06bd0115f6..4142a4cabce84 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitConnection.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitConnection.java @@ -127,6 +127,18 @@ interface WithAuthorizationKey { WithCreate withAuthorizationKey(String authorizationKey); } + /** + * The stage of the expressroutecircuitconnection definition allowing to specify CircuitConnectionStatus. + */ + interface WithCircuitConnectionStatus { + /** + * Specifies circuitConnectionStatus. + * @param circuitConnectionStatus Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected' + * @return the next definition stage + */ + WithCreate withCircuitConnectionStatus(CircuitConnectionStatus circuitConnectionStatus); + } + /** * The stage of the expressroutecircuitconnection definition allowing to specify ExpressRouteCircuitPeering. */ @@ -180,13 +192,13 @@ interface WithPeerExpressRouteCircuitPeering { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, DefinitionStages.WithAddressPrefix, DefinitionStages.WithAuthorizationKey, DefinitionStages.WithExpressRouteCircuitPeering, DefinitionStages.WithId, DefinitionStages.WithName, DefinitionStages.WithPeerExpressRouteCircuitPeering { + interface WithCreate extends Creatable, DefinitionStages.WithAddressPrefix, DefinitionStages.WithAuthorizationKey, DefinitionStages.WithCircuitConnectionStatus, DefinitionStages.WithExpressRouteCircuitPeering, DefinitionStages.WithId, DefinitionStages.WithName, DefinitionStages.WithPeerExpressRouteCircuitPeering { } } /** * The template for a ExpressRouteCircuitConnection update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, UpdateStages.WithAddressPrefix, UpdateStages.WithAuthorizationKey, UpdateStages.WithExpressRouteCircuitPeering, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithPeerExpressRouteCircuitPeering { + interface Update extends Appliable, UpdateStages.WithAddressPrefix, UpdateStages.WithAuthorizationKey, UpdateStages.WithCircuitConnectionStatus, UpdateStages.WithExpressRouteCircuitPeering, UpdateStages.WithId, UpdateStages.WithName, UpdateStages.WithPeerExpressRouteCircuitPeering { } /** @@ -217,6 +229,18 @@ interface WithAuthorizationKey { Update withAuthorizationKey(String authorizationKey); } + /** + * The stage of the expressroutecircuitconnection update allowing to specify CircuitConnectionStatus. + */ + interface WithCircuitConnectionStatus { + /** + * Specifies circuitConnectionStatus. + * @param circuitConnectionStatus Express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected' + * @return the next update stage + */ + Update withCircuitConnectionStatus(CircuitConnectionStatus circuitConnectionStatus); + } + /** * The stage of the expressroutecircuitconnection update allowing to specify ExpressRouteCircuitPeering. */ diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeering.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeering.java index 4ea8dbe21476c..a3709a358bccf 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeering.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/ExpressRouteCircuitPeering.java @@ -19,6 +19,7 @@ import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkManager; import com.microsoft.azure.SubResource; import java.util.List; +import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitConnectionInner; import com.microsoft.azure.management.network.v2019_09_01.implementation.ExpressRouteCircuitStatsInner; /** @@ -174,6 +175,30 @@ interface WithExpressRouteCircuit { WithCreate withExistingExpressRouteCircuit(String resourceGroupName, String circuitName); } + /** + * The stage of the expressroutecircuitpeering definition allowing to specify AzureASN. + */ + interface WithAzureASN { + /** + * Specifies azureASN. + * @param azureASN The Azure ASN + * @return the next definition stage + */ + WithCreate withAzureASN(Integer azureASN); + } + + /** + * The stage of the expressroutecircuitpeering definition allowing to specify Connections. + */ + interface WithConnections { + /** + * Specifies connections. + * @param connections The list of circuit connections associated with Azure Private Peering for this circuit + * @return the next definition stage + */ + WithCreate withConnections(List connections); + } + /** * The stage of the expressroutecircuitpeering definition allowing to specify ExpressRouteConnection. */ @@ -270,6 +295,18 @@ interface WithPeeringType { WithCreate withPeeringType(ExpressRoutePeeringType peeringType); } + /** + * The stage of the expressroutecircuitpeering definition allowing to specify PrimaryAzurePort. + */ + interface WithPrimaryAzurePort { + /** + * Specifies primaryAzurePort. + * @param primaryAzurePort The primary port + * @return the next definition stage + */ + WithCreate withPrimaryAzurePort(String primaryAzurePort); + } + /** * The stage of the expressroutecircuitpeering definition allowing to specify PrimaryPeerAddressPrefix. */ @@ -294,6 +331,18 @@ interface WithRouteFilter { WithCreate withRouteFilter(SubResource routeFilter); } + /** + * The stage of the expressroutecircuitpeering definition allowing to specify SecondaryAzurePort. + */ + interface WithSecondaryAzurePort { + /** + * Specifies secondaryAzurePort. + * @param secondaryAzurePort The secondary port + * @return the next definition stage + */ + WithCreate withSecondaryAzurePort(String secondaryAzurePort); + } + /** * The stage of the expressroutecircuitpeering definition allowing to specify SecondaryPeerAddressPrefix. */ @@ -359,19 +408,43 @@ interface WithVlanId { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, DefinitionStages.WithExpressRouteConnection, DefinitionStages.WithGatewayManagerEtag, DefinitionStages.WithId, DefinitionStages.WithIpv6PeeringConfig, DefinitionStages.WithMicrosoftPeeringConfig, DefinitionStages.WithName, DefinitionStages.WithPeerASN, DefinitionStages.WithPeeringType, DefinitionStages.WithPrimaryPeerAddressPrefix, DefinitionStages.WithRouteFilter, DefinitionStages.WithSecondaryPeerAddressPrefix, DefinitionStages.WithSharedKey, DefinitionStages.WithState, DefinitionStages.WithStats, DefinitionStages.WithVlanId { + interface WithCreate extends Creatable, DefinitionStages.WithAzureASN, DefinitionStages.WithConnections, DefinitionStages.WithExpressRouteConnection, DefinitionStages.WithGatewayManagerEtag, DefinitionStages.WithId, DefinitionStages.WithIpv6PeeringConfig, DefinitionStages.WithMicrosoftPeeringConfig, DefinitionStages.WithName, DefinitionStages.WithPeerASN, DefinitionStages.WithPeeringType, DefinitionStages.WithPrimaryAzurePort, DefinitionStages.WithPrimaryPeerAddressPrefix, DefinitionStages.WithRouteFilter, DefinitionStages.WithSecondaryAzurePort, DefinitionStages.WithSecondaryPeerAddressPrefix, DefinitionStages.WithSharedKey, DefinitionStages.WithState, DefinitionStages.WithStats, DefinitionStages.WithVlanId { } } /** * The template for a ExpressRouteCircuitPeering update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, UpdateStages.WithExpressRouteConnection, UpdateStages.WithGatewayManagerEtag, UpdateStages.WithId, UpdateStages.WithIpv6PeeringConfig, UpdateStages.WithMicrosoftPeeringConfig, UpdateStages.WithName, UpdateStages.WithPeerASN, UpdateStages.WithPeeringType, UpdateStages.WithPrimaryPeerAddressPrefix, UpdateStages.WithRouteFilter, UpdateStages.WithSecondaryPeerAddressPrefix, UpdateStages.WithSharedKey, UpdateStages.WithState, UpdateStages.WithStats, UpdateStages.WithVlanId { + interface Update extends Appliable, UpdateStages.WithAzureASN, UpdateStages.WithConnections, UpdateStages.WithExpressRouteConnection, UpdateStages.WithGatewayManagerEtag, UpdateStages.WithId, UpdateStages.WithIpv6PeeringConfig, UpdateStages.WithMicrosoftPeeringConfig, UpdateStages.WithName, UpdateStages.WithPeerASN, UpdateStages.WithPeeringType, UpdateStages.WithPrimaryAzurePort, UpdateStages.WithPrimaryPeerAddressPrefix, UpdateStages.WithRouteFilter, UpdateStages.WithSecondaryAzurePort, UpdateStages.WithSecondaryPeerAddressPrefix, UpdateStages.WithSharedKey, UpdateStages.WithState, UpdateStages.WithStats, UpdateStages.WithVlanId { } /** * Grouping of ExpressRouteCircuitPeering update stages. */ interface UpdateStages { + /** + * The stage of the expressroutecircuitpeering update allowing to specify AzureASN. + */ + interface WithAzureASN { + /** + * Specifies azureASN. + * @param azureASN The Azure ASN + * @return the next update stage + */ + Update withAzureASN(Integer azureASN); + } + + /** + * The stage of the expressroutecircuitpeering update allowing to specify Connections. + */ + interface WithConnections { + /** + * Specifies connections. + * @param connections The list of circuit connections associated with Azure Private Peering for this circuit + * @return the next update stage + */ + Update withConnections(List connections); + } + /** * The stage of the expressroutecircuitpeering update allowing to specify ExpressRouteConnection. */ @@ -468,6 +541,18 @@ interface WithPeeringType { Update withPeeringType(ExpressRoutePeeringType peeringType); } + /** + * The stage of the expressroutecircuitpeering update allowing to specify PrimaryAzurePort. + */ + interface WithPrimaryAzurePort { + /** + * Specifies primaryAzurePort. + * @param primaryAzurePort The primary port + * @return the next update stage + */ + Update withPrimaryAzurePort(String primaryAzurePort); + } + /** * The stage of the expressroutecircuitpeering update allowing to specify PrimaryPeerAddressPrefix. */ @@ -492,6 +577,18 @@ interface WithRouteFilter { Update withRouteFilter(SubResource routeFilter); } + /** + * The stage of the expressroutecircuitpeering update allowing to specify SecondaryAzurePort. + */ + interface WithSecondaryAzurePort { + /** + * Specifies secondaryAzurePort. + * @param secondaryAzurePort The secondary port + * @return the next update stage + */ + Update withSecondaryAzurePort(String secondaryAzurePort); + } + /** * The stage of the expressroutecircuitpeering update allowing to specify SecondaryPeerAddressPrefix. */ diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SessionIds.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SessionIds.java new file mode 100644 index 0000000000000..30b304125ceb7 --- /dev/null +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/SessionIds.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.network.v2019_09_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of session ids. + */ +public class SessionIds { + /** + * List of session ids. + */ + @JsonProperty(value = "sessionIds") + private List sessionIds; + + /** + * Get list of session ids. + * + * @return the sessionIds value + */ + public List sessionIds() { + return this.sessionIds; + } + + /** + * Set list of session ids. + * + * @param sessionIds the sessionIds value to set + * @return the SessionIds object itself. + */ + public SessionIds withSessionIds(List sessionIds) { + this.sessionIds = sessionIds; + return this; + } + +} diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Subnet.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Subnet.java index a53788c19d083..1ee508e1aa060 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Subnet.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/Subnet.java @@ -22,8 +22,6 @@ import com.microsoft.azure.management.network.v2019_09_01.implementation.NetworkSecurityGroupInner; import com.microsoft.azure.management.network.v2019_09_01.implementation.RouteTableInner; import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceEndpointPolicyInner; -import com.microsoft.azure.management.network.v2019_09_01.implementation.ResourceNavigationLinkInner; -import com.microsoft.azure.management.network.v2019_09_01.implementation.ServiceAssociationLinkInner; /** * Type representing Subnet. diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VM.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VM.java new file mode 100644 index 0000000000000..b5924ce6487b9 --- /dev/null +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/VM.java @@ -0,0 +1,46 @@ +/** + * 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_09_01; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.SkipParentValidation; +import com.microsoft.azure.Resource; + +/** + * Describes a Virtual Machine. + */ +@SkipParentValidation +public class VM extends Resource { + /** + * Resource ID. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get resource ID. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set resource ID. + * + * @param id the id value to set + * @return the VM object itself. + */ + public VM withId(String id) { + this.id = id; + return this; + } + +} diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallsInner.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallsInner.java index 342e7ad49138f..838f485ee7be5 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallsInner.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/AzureFirewallsInner.java @@ -91,6 +91,10 @@ interface AzureFirewallsService { @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}") Observable> updateTags(@Path("resourceGroupName") String resourceGroupName, @Path("azureFirewallName") String azureFirewallName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.AzureFirewalls beginUpdateTags" }) + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}") + Observable> beginUpdateTags(@Path("resourceGroupName") String resourceGroupName, @Path("azureFirewallName") String azureFirewallName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body TagsObject parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.AzureFirewalls listByResourceGroup" }) @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls") 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); @@ -523,7 +527,7 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response * @return the AzureFirewallInner object if successful. */ public AzureFirewallInner updateTags(String resourceGroupName, String azureFirewallName) { - return updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName).toBlocking().single().body(); + return updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName).toBlocking().last().body(); } /** @@ -545,7 +549,7 @@ public ServiceFuture updateTagsAsync(String resourceGroupNam * @param resourceGroupName The name of the resource group. * @param azureFirewallName The name of the Azure Firewall. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AzureFirewallInner object + * @return the observable for the request */ public Observable updateTagsAsync(String resourceGroupName, String azureFirewallName) { return updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName).map(new Func1, AzureFirewallInner>() { @@ -562,7 +566,7 @@ public AzureFirewallInner call(ServiceResponse response) { * @param resourceGroupName The name of the resource group. * @param azureFirewallName The name of the Azure Firewall. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the AzureFirewallInner object + * @return the observable for the request */ public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String azureFirewallName) { if (resourceGroupName == null) { @@ -578,12 +582,155 @@ public Observable> updateTagsWithServiceResp final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); - return service.updateTags(resourceGroupName, azureFirewallName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + Observable> observable = service.updateTags(resourceGroupName, azureFirewallName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AzureFirewallInner object if successful. + */ + public AzureFirewallInner updateTags(String resourceGroupName, String azureFirewallName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName, tags).toBlocking().last().body(); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param tags Resource tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture updateTagsAsync(String resourceGroupName, String azureFirewallName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName, tags), serviceCallback); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable updateTagsAsync(String resourceGroupName, String azureFirewallName, Map tags) { + return updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName, tags).map(new Func1, AzureFirewallInner>() { + @Override + public AzureFirewallInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param tags Resource tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String azureFirewallName, Map tags) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (azureFirewallName == null) { + throw new IllegalArgumentException("Parameter azureFirewallName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + Validator.validate(tags); + final String apiVersion = "2019-09-01"; + TagsObject parameters = new TagsObject(); + parameters.withTags(tags); + Observable> observable = service.updateTags(resourceGroupName, azureFirewallName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the AzureFirewallInner object if successful. + */ + public AzureFirewallInner beginUpdateTags(String resourceGroupName, String azureFirewallName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName).toBlocking().single().body(); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String azureFirewallName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName), serviceCallback); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureFirewallInner object + */ + public Observable beginUpdateTagsAsync(String resourceGroupName, String azureFirewallName) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName).map(new Func1, AzureFirewallInner>() { + @Override + public AzureFirewallInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Updates tags of an Azure Firewall resource. + * + * @param resourceGroupName The name of the resource group. + * @param azureFirewallName The name of the Azure Firewall. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the AzureFirewallInner object + */ + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String azureFirewallName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (azureFirewallName == null) { + throw new IllegalArgumentException("Parameter azureFirewallName 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-09-01"; + final Map tags = null; + TagsObject parameters = new TagsObject(); + parameters.withTags(null); + return service.beginUpdateTags(resourceGroupName, azureFirewallName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateTagsDelegate(response); + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -603,8 +750,8 @@ public Observable> call(Response tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName, tags).toBlocking().single().body(); + public AzureFirewallInner beginUpdateTags(String resourceGroupName, String azureFirewallName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName, tags).toBlocking().single().body(); } /** @@ -617,8 +764,8 @@ public AzureFirewallInner updateTags(String resourceGroupName, String azureFirew * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateTagsAsync(String resourceGroupName, String azureFirewallName, Map tags, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName, tags), serviceCallback); + public ServiceFuture beginUpdateTagsAsync(String resourceGroupName, String azureFirewallName, Map tags, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName, tags), serviceCallback); } /** @@ -630,8 +777,8 @@ public ServiceFuture updateTagsAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AzureFirewallInner object */ - public Observable updateTagsAsync(String resourceGroupName, String azureFirewallName, Map tags) { - return updateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName, tags).map(new Func1, AzureFirewallInner>() { + public Observable beginUpdateTagsAsync(String resourceGroupName, String azureFirewallName, Map tags) { + return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, azureFirewallName, tags).map(new Func1, AzureFirewallInner>() { @Override public AzureFirewallInner call(ServiceResponse response) { return response.body(); @@ -648,7 +795,7 @@ public AzureFirewallInner call(ServiceResponse response) { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AzureFirewallInner object */ - public Observable> updateTagsWithServiceResponseAsync(String resourceGroupName, String azureFirewallName, Map tags) { + public Observable> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String azureFirewallName, Map tags) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -662,12 +809,12 @@ public Observable> updateTagsWithServiceResp final String apiVersion = "2019-09-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); - return service.updateTags(resourceGroupName, azureFirewallName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.beginUpdateTags(resourceGroupName, azureFirewallName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = updateTagsDelegate(response); + ServiceResponse clientResponse = beginUpdateTagsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -676,9 +823,10 @@ public Observable> call(Response updateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginUpdateTagsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionActiveSessionInner.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionActiveSessionInner.java new file mode 100644 index 0000000000000..36d2f9d577360 --- /dev/null +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionActiveSessionInner.java @@ -0,0 +1,184 @@ +/** + * 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_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.BastionConnectProtocol; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The session detail for a target. + */ +public class BastionActiveSessionInner { + /** + * A unique id for the session. + */ + @JsonProperty(value = "sessionId", access = JsonProperty.Access.WRITE_ONLY) + private String sessionId; + + /** + * The time when the session started. + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private Object startTime; + + /** + * The subscription id for the target virtual machine. + */ + @JsonProperty(value = "targetSubscriptionId", access = JsonProperty.Access.WRITE_ONLY) + private String targetSubscriptionId; + + /** + * The type of the resource. + */ + @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) + private String resourceType; + + /** + * The host name of the target. + */ + @JsonProperty(value = "targetHostName", access = JsonProperty.Access.WRITE_ONLY) + private String targetHostName; + + /** + * The resource group of the target. + */ + @JsonProperty(value = "targetResourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String targetResourceGroup; + + /** + * The user name who is active on this session. + */ + @JsonProperty(value = "userName", access = JsonProperty.Access.WRITE_ONLY) + private String userName; + + /** + * The IP Address of the target. + */ + @JsonProperty(value = "targetIpAddress", access = JsonProperty.Access.WRITE_ONLY) + private String targetIpAddress; + + /** + * The protocol used to connect to the target. Possible values include: + * 'SSH', 'RDP'. + */ + @JsonProperty(value = "protocol", access = JsonProperty.Access.WRITE_ONLY) + private BastionConnectProtocol protocol; + + /** + * The resource id of the target. + */ + @JsonProperty(value = "targetResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String targetResourceId; + + /** + * Duration in mins the session has been active. + */ + @JsonProperty(value = "sessionDurationInMins", access = JsonProperty.Access.WRITE_ONLY) + private Double sessionDurationInMins; + + /** + * Get a unique id for the session. + * + * @return the sessionId value + */ + public String sessionId() { + return this.sessionId; + } + + /** + * Get the time when the session started. + * + * @return the startTime value + */ + public Object startTime() { + return this.startTime; + } + + /** + * Get the subscription id for the target virtual machine. + * + * @return the targetSubscriptionId value + */ + public String targetSubscriptionId() { + return this.targetSubscriptionId; + } + + /** + * Get the type of the resource. + * + * @return the resourceType value + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Get the host name of the target. + * + * @return the targetHostName value + */ + public String targetHostName() { + return this.targetHostName; + } + + /** + * Get the resource group of the target. + * + * @return the targetResourceGroup value + */ + public String targetResourceGroup() { + return this.targetResourceGroup; + } + + /** + * Get the user name who is active on this session. + * + * @return the userName value + */ + public String userName() { + return this.userName; + } + + /** + * Get the IP Address of the target. + * + * @return the targetIpAddress value + */ + public String targetIpAddress() { + return this.targetIpAddress; + } + + /** + * Get the protocol used to connect to the target. Possible values include: 'SSH', 'RDP'. + * + * @return the protocol value + */ + public BastionConnectProtocol protocol() { + return this.protocol; + } + + /** + * Get the resource id of the target. + * + * @return the targetResourceId value + */ + public String targetResourceId() { + return this.targetResourceId; + } + + /** + * Get duration in mins the session has been active. + * + * @return the sessionDurationInMins value + */ + public Double sessionDurationInMins() { + return this.sessionDurationInMins; + } + +} diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionSessionStateInner.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionSessionStateInner.java new file mode 100644 index 0000000000000..3c3036b8b2272 --- /dev/null +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionSessionStateInner.java @@ -0,0 +1,62 @@ +/** + * 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_09_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The session state detail for a target. + */ +public class BastionSessionStateInner { + /** + * A unique id for the session. + */ + @JsonProperty(value = "sessionId", access = JsonProperty.Access.WRITE_ONLY) + private String sessionId; + + /** + * Used for extra information. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * The state of the session. Disconnected/Failed/NotFound. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private String state; + + /** + * Get a unique id for the session. + * + * @return the sessionId value + */ + public String sessionId() { + return this.sessionId; + } + + /** + * Get used for extra information. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Get the state of the session. Disconnected/Failed/NotFound. + * + * @return the state value + */ + public String state() { + return this.state; + } + +} diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionShareableLinkInner.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionShareableLinkInner.java new file mode 100644 index 0000000000000..2069408915b3a --- /dev/null +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/BastionShareableLinkInner.java @@ -0,0 +1,90 @@ +/** + * 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_09_01.implementation; + +import com.microsoft.azure.management.network.v2019_09_01.VM; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Bastion Shareable Link. + */ +public class BastionShareableLinkInner { + /** + * Reference of the virtual machine resource. + */ + @JsonProperty(value = "vm", required = true) + private VM vm; + + /** + * The unique Bastion Shareable Link to the virtual machine. + */ + @JsonProperty(value = "bsl", access = JsonProperty.Access.WRITE_ONLY) + private String bsl; + + /** + * The time when the link was created. + */ + @JsonProperty(value = "createdAt", access = JsonProperty.Access.WRITE_ONLY) + private String createdAt; + + /** + * Optional field indicating the warning or error message related to the vm + * in case of partial failure. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get reference of the virtual machine resource. + * + * @return the vm value + */ + public VM vm() { + return this.vm; + } + + /** + * Set reference of the virtual machine resource. + * + * @param vm the vm value to set + * @return the BastionShareableLinkInner object itself. + */ + public BastionShareableLinkInner withVm(VM vm) { + this.vm = vm; + return this; + } + + /** + * Get the unique Bastion Shareable Link to the virtual machine. + * + * @return the bsl value + */ + public String bsl() { + return this.bsl; + } + + /** + * Get the time when the link was created. + * + * @return the createdAt value + */ + public String createdAt() { + return this.createdAt; + } + + /** + * Get optional field indicating the warning or error message related to the vm in case of partial failure. + * + * @return the message value + */ + public String message() { + return this.message; + } + +} diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorsInner.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorsInner.java index 215de38806034..0820a7446b7a1 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorsInner.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ConnectionMonitorsInner.java @@ -193,7 +193,7 @@ public Observable> createOrUpdateW throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; Observable> observable = service.createOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -275,7 +275,7 @@ public Observable> beginCreateOrUp throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; return service.beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -367,7 +367,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; return service.get(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -457,7 +457,7 @@ public Observable> deleteWithServiceResponseAsync(String r if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; Observable> observable = service.delete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -530,7 +530,7 @@ public Observable> beginDeleteWithServiceResponseAsync(Str if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; return service.beginDelete(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -622,7 +622,7 @@ public Observable> updateTagsWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; final Map tags = null; TagsObject parameters = new TagsObject(); parameters.withTags(null); @@ -714,7 +714,7 @@ public Observable> updateTagsWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(tags); - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; TagsObject parameters = new TagsObject(); parameters.withTags(tags); return service.updateTags(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) @@ -806,7 +806,7 @@ public Observable> stopWithServiceResponseAsync(String res if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; Observable> observable = service.stop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); } @@ -879,7 +879,7 @@ public Observable> beginStopWithServiceResponseAsync(Strin if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; return service.beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -970,7 +970,7 @@ public Observable> startWithServiceResponseAsync(String re if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; Observable> observable = service.start(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); } @@ -1043,7 +1043,7 @@ public Observable> beginStartWithServiceResponseAsync(Stri if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; return service.beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1135,7 +1135,7 @@ public Observable> queryWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; Observable> observable = service.query(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); } @@ -1209,7 +1209,7 @@ public Observable> beginQuery if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; return service.beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1294,7 +1294,7 @@ public Observable>> listWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2019-06-01"; + final String apiVersion = "2019-09-01"; return service.list(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationImpl.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationImpl.java index 677da33a36677..c9e10414513cf 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationImpl.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationImpl.java @@ -113,6 +113,18 @@ public ExpressRouteCircuitAuthorizationImpl withExistingExpressRouteCircuit(Stri return this; } + @Override + public ExpressRouteCircuitAuthorizationImpl withAuthorizationKey(String authorizationKey) { + this.inner().withAuthorizationKey(authorizationKey); + return this; + } + + @Override + public ExpressRouteCircuitAuthorizationImpl withAuthorizationUseStatus(AuthorizationUseStatus authorizationUseStatus) { + this.inner().withAuthorizationUseStatus(authorizationUseStatus); + return this; + } + @Override public ExpressRouteCircuitAuthorizationImpl withId(String id) { this.inner().withId(id); diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationInner.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationInner.java index bf55f5f641821..7840988b7a9e5 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationInner.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitAuthorizationInner.java @@ -22,14 +22,14 @@ public class ExpressRouteCircuitAuthorizationInner extends SubResource { /** * The authorization key. */ - @JsonProperty(value = "properties.authorizationKey", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.authorizationKey") private String authorizationKey; /** * The authorization use status. Possible values include: 'Available', * 'InUse'. */ - @JsonProperty(value = "properties.authorizationUseStatus", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.authorizationUseStatus") private AuthorizationUseStatus authorizationUseStatus; /** @@ -67,6 +67,17 @@ public String authorizationKey() { return this.authorizationKey; } + /** + * Set the authorization key. + * + * @param authorizationKey the authorizationKey value to set + * @return the ExpressRouteCircuitAuthorizationInner object itself. + */ + public ExpressRouteCircuitAuthorizationInner withAuthorizationKey(String authorizationKey) { + this.authorizationKey = authorizationKey; + return this; + } + /** * Get the authorization use status. Possible values include: 'Available', 'InUse'. * @@ -76,6 +87,17 @@ public AuthorizationUseStatus authorizationUseStatus() { return this.authorizationUseStatus; } + /** + * Set the authorization use status. Possible values include: 'Available', 'InUse'. + * + * @param authorizationUseStatus the authorizationUseStatus value to set + * @return the ExpressRouteCircuitAuthorizationInner object itself. + */ + public ExpressRouteCircuitAuthorizationInner withAuthorizationUseStatus(AuthorizationUseStatus authorizationUseStatus) { + this.authorizationUseStatus = authorizationUseStatus; + return this; + } + /** * Get the provisioning state of the authorization resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. * diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionImpl.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionImpl.java index f86354374a4ba..beeeee373ee45 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionImpl.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionImpl.java @@ -144,6 +144,12 @@ public ExpressRouteCircuitConnectionImpl withAuthorizationKey(String authorizati return this; } + @Override + public ExpressRouteCircuitConnectionImpl withCircuitConnectionStatus(CircuitConnectionStatus circuitConnectionStatus) { + this.inner().withCircuitConnectionStatus(circuitConnectionStatus); + return this; + } + @Override public ExpressRouteCircuitConnectionImpl withExpressRouteCircuitPeering(SubResource expressRouteCircuitPeering) { this.inner().withExpressRouteCircuitPeering(expressRouteCircuitPeering); diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionInner.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionInner.java index b0b4be083822b..d848ff62c95a7 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionInner.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitConnectionInner.java @@ -49,7 +49,7 @@ public class ExpressRouteCircuitConnectionInner extends SubResource { * Express Route Circuit connection state. Possible values include: * 'Connected', 'Connecting', 'Disconnected'. */ - @JsonProperty(value = "properties.circuitConnectionStatus", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.circuitConnectionStatus") private CircuitConnectionStatus circuitConnectionStatus; /** @@ -167,6 +167,17 @@ public CircuitConnectionStatus circuitConnectionStatus() { return this.circuitConnectionStatus; } + /** + * Set express Route Circuit connection state. Possible values include: 'Connected', 'Connecting', 'Disconnected'. + * + * @param circuitConnectionStatus the circuitConnectionStatus value to set + * @return the ExpressRouteCircuitConnectionInner object itself. + */ + public ExpressRouteCircuitConnectionInner withCircuitConnectionStatus(CircuitConnectionStatus circuitConnectionStatus) { + this.circuitConnectionStatus = circuitConnectionStatus; + return this; + } + /** * Get the provisioning state of the express route circuit connection resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. * diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitImpl.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitImpl.java index a6606ffc19ac2..120008a37f236 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitImpl.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitImpl.java @@ -162,6 +162,12 @@ public ExpressRouteCircuitImpl withBandwidthInGbps(Double bandwidthInGbps) { return this; } + @Override + public ExpressRouteCircuitImpl withCircuitProvisioningState(String circuitProvisioningState) { + this.inner().withCircuitProvisioningState(circuitProvisioningState); + return this; + } + @Override public ExpressRouteCircuitImpl withExpressRoutePort(SubResource expressRoutePort) { this.inner().withExpressRoutePort(expressRoutePort); @@ -174,12 +180,24 @@ public ExpressRouteCircuitImpl withGatewayManagerEtag(String gatewayManagerEtag) return this; } + @Override + public ExpressRouteCircuitImpl withGlobalReachEnabled(Boolean globalReachEnabled) { + this.inner().withGlobalReachEnabled(globalReachEnabled); + return this; + } + @Override public ExpressRouteCircuitImpl withPeerings(List peerings) { this.inner().withPeerings(peerings); return this; } + @Override + public ExpressRouteCircuitImpl withServiceKey(String serviceKey) { + this.inner().withServiceKey(serviceKey); + return this; + } + @Override public ExpressRouteCircuitImpl withServiceProviderNotes(String serviceProviderNotes) { this.inner().withServiceProviderNotes(serviceProviderNotes); @@ -192,6 +210,12 @@ public ExpressRouteCircuitImpl withServiceProviderProperties(ExpressRouteCircuit return this; } + @Override + public ExpressRouteCircuitImpl withServiceProviderProvisioningState(ServiceProviderProvisioningState serviceProviderProvisioningState) { + this.inner().withServiceProviderProvisioningState(serviceProviderProvisioningState); + return this; + } + @Override public ExpressRouteCircuitImpl withSku(ExpressRouteCircuitSku sku) { this.inner().withSku(sku); diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitInner.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitInner.java index d64458d3ee9c2..857c3a99aaddd 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitInner.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitInner.java @@ -40,7 +40,7 @@ public class ExpressRouteCircuitInner extends Resource { /** * The CircuitProvisioningState state of the resource. */ - @JsonProperty(value = "properties.circuitProvisioningState", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.circuitProvisioningState") private String circuitProvisioningState; /** @@ -48,7 +48,7 @@ public class ExpressRouteCircuitInner extends Resource { * values include: 'NotProvisioned', 'Provisioning', 'Provisioned', * 'Deprovisioning'. */ - @JsonProperty(value = "properties.serviceProviderProvisioningState", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.serviceProviderProvisioningState") private ServiceProviderProvisioningState serviceProviderProvisioningState; /** @@ -66,7 +66,7 @@ public class ExpressRouteCircuitInner extends Resource { /** * The ServiceKey. */ - @JsonProperty(value = "properties.serviceKey", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.serviceKey") private String serviceKey; /** @@ -117,7 +117,7 @@ public class ExpressRouteCircuitInner extends Resource { /** * Flag denoting Global reach status. */ - @JsonProperty(value = "properties.globalReachEnabled", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.globalReachEnabled") private Boolean globalReachEnabled; /** @@ -181,6 +181,17 @@ public String circuitProvisioningState() { return this.circuitProvisioningState; } + /** + * Set the CircuitProvisioningState state of the resource. + * + * @param circuitProvisioningState the circuitProvisioningState value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withCircuitProvisioningState(String circuitProvisioningState) { + this.circuitProvisioningState = circuitProvisioningState; + return this; + } + /** * Get the ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'. * @@ -190,6 +201,17 @@ public ServiceProviderProvisioningState serviceProviderProvisioningState() { return this.serviceProviderProvisioningState; } + /** + * Set the ServiceProviderProvisioningState state of the resource. Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning'. + * + * @param serviceProviderProvisioningState the serviceProviderProvisioningState value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withServiceProviderProvisioningState(ServiceProviderProvisioningState serviceProviderProvisioningState) { + this.serviceProviderProvisioningState = serviceProviderProvisioningState; + return this; + } + /** * Get the list of authorizations. * @@ -239,6 +261,17 @@ public String serviceKey() { return this.serviceKey; } + /** + * Set the ServiceKey. + * + * @param serviceKey the serviceKey value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withServiceKey(String serviceKey) { + this.serviceKey = serviceKey; + return this; + } + /** * Get the ServiceProviderNotes. * @@ -366,6 +399,17 @@ public Boolean globalReachEnabled() { return this.globalReachEnabled; } + /** + * Set flag denoting Global reach status. + * + * @param globalReachEnabled the globalReachEnabled value to set + * @return the ExpressRouteCircuitInner object itself. + */ + public ExpressRouteCircuitInner withGlobalReachEnabled(Boolean globalReachEnabled) { + this.globalReachEnabled = globalReachEnabled; + return this; + } + /** * Get a unique read-only string that changes whenever the resource is updated. * diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringImpl.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringImpl.java index b54dff592f5dd..53d6eec399947 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringImpl.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringImpl.java @@ -225,6 +225,18 @@ public ExpressRouteCircuitPeeringImpl withExistingExpressRouteCircuit(String res return this; } + @Override + public ExpressRouteCircuitPeeringImpl withAzureASN(Integer azureASN) { + this.inner().withAzureASN(azureASN); + return this; + } + + @Override + public ExpressRouteCircuitPeeringImpl withConnections(List connections) { + this.inner().withConnections(connections); + return this; + } + @Override public ExpressRouteCircuitPeeringImpl withExpressRouteConnection(ExpressRouteConnectionId expressRouteConnection) { this.inner().withExpressRouteConnection(expressRouteConnection); @@ -273,6 +285,12 @@ public ExpressRouteCircuitPeeringImpl withPeeringType(ExpressRoutePeeringType pe return this; } + @Override + public ExpressRouteCircuitPeeringImpl withPrimaryAzurePort(String primaryAzurePort) { + this.inner().withPrimaryAzurePort(primaryAzurePort); + return this; + } + @Override public ExpressRouteCircuitPeeringImpl withPrimaryPeerAddressPrefix(String primaryPeerAddressPrefix) { this.inner().withPrimaryPeerAddressPrefix(primaryPeerAddressPrefix); @@ -285,6 +303,12 @@ public ExpressRouteCircuitPeeringImpl withRouteFilter(SubResource routeFilter) { return this; } + @Override + public ExpressRouteCircuitPeeringImpl withSecondaryAzurePort(String secondaryAzurePort) { + this.inner().withSecondaryAzurePort(secondaryAzurePort); + return this; + } + @Override public ExpressRouteCircuitPeeringImpl withSecondaryPeerAddressPrefix(String secondaryPeerAddressPrefix) { this.inner().withSecondaryPeerAddressPrefix(secondaryPeerAddressPrefix); diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringInner.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringInner.java index e581d660bc367..b683c7e9447e8 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringInner.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCircuitPeeringInner.java @@ -40,7 +40,7 @@ public class ExpressRouteCircuitPeeringInner extends SubResource { /** * The Azure ASN. */ - @JsonProperty(value = "properties.azureASN", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.azureASN") private Integer azureASN; /** @@ -64,13 +64,13 @@ public class ExpressRouteCircuitPeeringInner extends SubResource { /** * The primary port. */ - @JsonProperty(value = "properties.primaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.primaryAzurePort") private String primaryAzurePort; /** * The secondary port. */ - @JsonProperty(value = "properties.secondaryAzurePort", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.secondaryAzurePort") private String secondaryAzurePort; /** @@ -138,7 +138,7 @@ public class ExpressRouteCircuitPeeringInner extends SubResource { * The list of circuit connections associated with Azure Private Peering * for this circuit. */ - @JsonProperty(value = "properties.connections", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "properties.connections") private List connections; /** @@ -216,6 +216,17 @@ public Integer azureASN() { return this.azureASN; } + /** + * Set the Azure ASN. + * + * @param azureASN the azureASN value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withAzureASN(Integer azureASN) { + this.azureASN = azureASN; + return this; + } + /** * Get the peer ASN. * @@ -285,6 +296,17 @@ public String primaryAzurePort() { return this.primaryAzurePort; } + /** + * Set the primary port. + * + * @param primaryAzurePort the primaryAzurePort value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withPrimaryAzurePort(String primaryAzurePort) { + this.primaryAzurePort = primaryAzurePort; + return this; + } + /** * Get the secondary port. * @@ -294,6 +316,17 @@ public String secondaryAzurePort() { return this.secondaryAzurePort; } + /** + * Set the secondary port. + * + * @param secondaryAzurePort the secondaryAzurePort value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withSecondaryAzurePort(String secondaryAzurePort) { + this.secondaryAzurePort = secondaryAzurePort; + return this; + } + /** * Get the shared key. * @@ -481,6 +514,17 @@ public List connections() { return this.connections; } + /** + * Set the list of circuit connections associated with Azure Private Peering for this circuit. + * + * @param connections the connections value to set + * @return the ExpressRouteCircuitPeeringInner object itself. + */ + public ExpressRouteCircuitPeeringInner withConnections(List connections) { + this.connections = connections; + return this; + } + /** * Get the list of peered circuit connections associated with Azure Private Peering for this circuit. * diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkManagementClientImpl.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkManagementClientImpl.java index 61d7f3af5f3e8..ed58bec540b39 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkManagementClientImpl.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/NetworkManagementClientImpl.java @@ -11,10 +11,16 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureClient; import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.LongRunningFinalState; import com.microsoft.azure.LongRunningOperationOptions; +import com.microsoft.azure.management.network.v2019_09_01.BastionShareableLinkListRequest; +import com.microsoft.azure.management.network.v2019_09_01.SessionIds; import com.microsoft.azure.management.network.v2019_09_01.VirtualWanVpnProfileParameters; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; import com.microsoft.rest.credentials.ServiceClientCredentials; import com.microsoft.rest.RestClient; import com.microsoft.rest.ServiceCallback; @@ -22,6 +28,7 @@ import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; import java.io.IOException; +import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; @@ -30,6 +37,7 @@ import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.Query; +import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; @@ -1445,6 +1453,38 @@ private void initializeService() { * used by Retrofit to perform actually REST calls. */ interface NetworkManagementClientService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkManagementClient putBastionShareableLink" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks") + Observable> putBastionShareableLink(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BastionShareableLinkListRequest bslRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkManagementClient beginPutBastionShareableLink" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks") + Observable> beginPutBastionShareableLink(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BastionShareableLinkListRequest bslRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkManagementClient deleteBastionShareableLink" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks") + Observable> deleteBastionShareableLink(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BastionShareableLinkListRequest bslRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkManagementClient beginDeleteBastionShareableLink" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks") + Observable> beginDeleteBastionShareableLink(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BastionShareableLinkListRequest bslRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkManagementClient getBastionShareableLink" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks") + Observable> getBastionShareableLink(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body BastionShareableLinkListRequest bslRequest, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkManagementClient getActiveSessions" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions") + Observable> getActiveSessions(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @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_09_01.NetworkManagementClient beginGetActiveSessions" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions") + Observable> beginGetActiveSessions(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @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_09_01.NetworkManagementClient disconnectActiveSessions" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions") + Observable> disconnectActiveSessions(@Path("resourceGroupName") String resourceGroupName, @Path("bastionHostName") String bastionHostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body SessionIds sessionIds, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.NetworkManagementClient checkDnsNameAvailability" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability") Observable> checkDnsNameAvailability(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("domainNameLabel") String domainNameLabel, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -1461,78 +1501,142 @@ interface NetworkManagementClientService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile") Observable> beginGeneratevirtualwanvpnserverconfigurationvpnprofile(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("virtualWANName") String virtualWANName, @Body VirtualWanVpnProfileParameters vpnClientParams, @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_09_01.NetworkManagementClient putBastionShareableLinkNext" }) + @GET + Observable> putBastionShareableLinkNext(@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_09_01.NetworkManagementClient beginPutBastionShareableLinkNext" }) + @GET + Observable> beginPutBastionShareableLinkNext(@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_09_01.NetworkManagementClient getBastionShareableLinkNext" }) + @GET + Observable> getBastionShareableLinkNext(@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_09_01.NetworkManagementClient getActiveSessionsNext" }) + @GET + Observable> getActiveSessionsNext(@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_09_01.NetworkManagementClient beginGetActiveSessionsNext" }) + @GET + Observable> beginGetActiveSessionsNext(@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_09_01.NetworkManagementClient disconnectActiveSessionsNext" }) + @GET + Observable> disconnectActiveSessionsNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** - * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param location The location of the domain name. - * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the DnsNameAvailabilityResultInner object if successful. + * @return the PagedList<BastionShareableLinkInner> object if successful. */ - public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location, String domainNameLabel) { - return checkDnsNameAvailabilityWithServiceResponseAsync(location, domainNameLabel).toBlocking().single().body(); + public PagedList putBastionShareableLink(final String resourceGroupName, final String bastionHostName) { + ServiceResponse> response = putBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return putBastionShareableLinkNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param location The location of the domain name. - * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture checkDnsNameAvailabilityAsync(String location, String domainNameLabel, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkDnsNameAvailabilityWithServiceResponseAsync(location, domainNameLabel), serviceCallback); + public ServiceFuture> putBastionShareableLinkAsync(final String resourceGroupName, final String bastionHostName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + putBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return putBastionShareableLinkNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param location The location of the domain name. - * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DnsNameAvailabilityResultInner object + * @return the observable to the PagedList<BastionShareableLinkInner> object */ - public Observable checkDnsNameAvailabilityAsync(String location, String domainNameLabel) { - return checkDnsNameAvailabilityWithServiceResponseAsync(location, domainNameLabel).map(new Func1, DnsNameAvailabilityResultInner>() { - @Override - public DnsNameAvailabilityResultInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> putBastionShareableLinkAsync(final String resourceGroupName, final String bastionHostName) { + return putBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param location The location of the domain name. - * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the DnsNameAvailabilityResultInner object + * @return the observable to the PagedList<BastionShareableLinkInner> object */ - public Observable> checkDnsNameAvailabilityWithServiceResponseAsync(String location, String domainNameLabel) { - if (location == null) { - throw new IllegalArgumentException("Parameter location is required and cannot be null."); + public Observable>> putBastionShareableLinkWithServiceResponseAsync(final String resourceGroupName, final String bastionHostName) { + return putBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(putBastionShareableLinkNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionShareableLinkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> putBastionShareableLinkSinglePageAsync(final String resourceGroupName, final String bastionHostName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); } if (this.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); } - if (domainNameLabel == null) { - throw new IllegalArgumentException("Parameter domainNameLabel is required and cannot be null."); - } final String apiVersion = "2019-09-01"; - return service.checkDnsNameAvailability(location, this.subscriptionId(), domainNameLabel, apiVersion, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { + final List vms = null; + BastionShareableLinkListRequest bslRequest = new BastionShareableLinkListRequest(); + bslRequest.withVms(null); + return service.putBastionShareableLink(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), bslRequest, this.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = checkDnsNameAvailabilityDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = putBastionShareableLinkDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1540,83 +1644,121 @@ public Observable> call(Response }); } - private ServiceResponse checkDnsNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** - * Gives the supported security providers for the virtual wan. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VirtualWanSecurityProvidersInner object if successful. + * @return the PagedList<BastionShareableLinkInner> object if successful. */ - public VirtualWanSecurityProvidersInner supportedSecurityProviders(String resourceGroupName, String virtualWANName) { - return supportedSecurityProvidersWithServiceResponseAsync(resourceGroupName, virtualWANName).toBlocking().single().body(); + public PagedList putBastionShareableLink(final String resourceGroupName, final String bastionHostName, final List vms) { + ServiceResponse> response = putBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName, vms).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return putBastionShareableLinkNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Gives the supported security providers for the virtual wan. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture supportedSecurityProvidersAsync(String resourceGroupName, String virtualWANName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(supportedSecurityProvidersWithServiceResponseAsync(resourceGroupName, virtualWANName), serviceCallback); + public ServiceFuture> putBastionShareableLinkAsync(final String resourceGroupName, final String bastionHostName, final List vms, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + putBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName, vms), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return putBastionShareableLinkNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Gives the supported security providers for the virtual wan. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualWanSecurityProvidersInner object + * @return the observable to the PagedList<BastionShareableLinkInner> object */ - public Observable supportedSecurityProvidersAsync(String resourceGroupName, String virtualWANName) { - return supportedSecurityProvidersWithServiceResponseAsync(resourceGroupName, virtualWANName).map(new Func1, VirtualWanSecurityProvidersInner>() { - @Override - public VirtualWanSecurityProvidersInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> putBastionShareableLinkAsync(final String resourceGroupName, final String bastionHostName, final List vms) { + return putBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName, vms) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Gives the supported security providers for the virtual wan. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VirtualWanSecurityProvidersInner object + * @return the observable to the PagedList<BastionShareableLinkInner> object */ - public Observable> supportedSecurityProvidersWithServiceResponseAsync(String resourceGroupName, String virtualWANName) { - if (this.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); - } + public Observable>> putBastionShareableLinkWithServiceResponseAsync(final String resourceGroupName, final String bastionHostName, final List vms) { + return putBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName, vms) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(putBastionShareableLinkNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param bastionHostName The name of the Bastion Host. + ServiceResponse> * @param vms List of VM references. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionShareableLinkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> putBastionShareableLinkSinglePageAsync(final String resourceGroupName, final String bastionHostName, final List vms) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - if (virtualWANName == null) { - throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); } + Validator.validate(vms); final String apiVersion = "2019-09-01"; - return service.supportedSecurityProviders(this.subscriptionId(), resourceGroupName, virtualWANName, apiVersion, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { + BastionShareableLinkListRequest bslRequest = new BastionShareableLinkListRequest(); + bslRequest.withVms(vms); + return service.putBastionShareableLink(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), bslRequest, this.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = supportedSecurityProvidersDelegate(response); - return Observable.just(clientResponse); + ServiceResponse> result = putBastionShareableLinkDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } @@ -1624,165 +1766,473 @@ public Observable> call(Respon }); } - private ServiceResponse supportedSecurityProvidersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> putBastionShareableLinkDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VpnProfileResponseInner object if successful. + * @return the PagedList<BastionShareableLinkInner> object if successful. */ - public VpnProfileResponseInner generatevirtualwanvpnserverconfigurationvpnprofile(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { - return generatevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams).toBlocking().last().body(); + public PagedList beginPutBastionShareableLink(final String resourceGroupName, final String bastionHostName) { + ServiceResponse> response = beginPutBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return beginPutBastionShareableLinkNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture generatevirtualwanvpnserverconfigurationvpnprofileAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(generatevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams), serviceCallback); + public ServiceFuture> beginPutBastionShareableLinkAsync(final String resourceGroupName, final String bastionHostName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginPutBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginPutBastionShareableLinkNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the PagedList<BastionShareableLinkInner> object */ - public Observable generatevirtualwanvpnserverconfigurationvpnprofileAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { - return generatevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams).map(new Func1, VpnProfileResponseInner>() { - @Override - public VpnProfileResponseInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> beginPutBastionShareableLinkAsync(final String resourceGroupName, final String bastionHostName) { + return beginPutBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request + * @return the observable to the PagedList<BastionShareableLinkInner> object */ - public Observable> generatevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { - if (this.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); - } + public Observable>> beginPutBastionShareableLinkWithServiceResponseAsync(final String resourceGroupName, final String bastionHostName) { + return beginPutBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(beginPutBastionShareableLinkNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionShareableLinkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> beginPutBastionShareableLinkSinglePageAsync(final String resourceGroupName, final String bastionHostName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - if (virtualWANName == null) { - throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); } - if (vpnClientParams == null) { - throw new IllegalArgumentException("Parameter vpnClientParams is required and cannot be null."); + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); } - Validator.validate(vpnClientParams); final String apiVersion = "2019-09-01"; - Observable> observable = service.generatevirtualwanvpnserverconfigurationvpnprofile(this.subscriptionId(), resourceGroupName, virtualWANName, vpnClientParams, apiVersion, this.acceptLanguage(), this.userAgent()); - return getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + final List vms = null; + BastionShareableLinkListRequest bslRequest = new BastionShareableLinkListRequest(); + bslRequest.withVms(null); + return service.beginPutBastionShareableLink(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), bslRequest, this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = beginPutBastionShareableLinkDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); } /** - * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the VpnProfileResponseInner object if successful. + * @return the PagedList<BastionShareableLinkInner> object if successful. */ - public VpnProfileResponseInner beginGeneratevirtualwanvpnserverconfigurationvpnprofile(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { - return beginGeneratevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams).toBlocking().single().body(); + public PagedList beginPutBastionShareableLink(final String resourceGroupName, final String bastionHostName, final List vms) { + ServiceResponse> response = beginPutBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName, vms).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return beginPutBastionShareableLinkNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; } /** - * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginGeneratevirtualwanvpnserverconfigurationvpnprofileAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGeneratevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams), serviceCallback); + public ServiceFuture> beginPutBastionShareableLinkAsync(final String resourceGroupName, final String bastionHostName, final List vms, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginPutBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName, vms), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginPutBastionShareableLinkNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); } /** - * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VpnProfileResponseInner object + * @return the observable to the PagedList<BastionShareableLinkInner> object */ - public Observable beginGeneratevirtualwanvpnserverconfigurationvpnprofileAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { - return beginGeneratevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams).map(new Func1, VpnProfileResponseInner>() { - @Override - public VpnProfileResponseInner call(ServiceResponse response) { - return response.body(); - } - }); + public Observable> beginPutBastionShareableLinkAsync(final String resourceGroupName, final String bastionHostName, final List vms) { + return beginPutBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName, vms) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); } /** - * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * Creates a Bastion Shareable Links for all the VMs specified in the request. * - * @param resourceGroupName The resource group name. - * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. - * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the VpnProfileResponseInner object + * @return the observable to the PagedList<BastionShareableLinkInner> object */ - public Observable> beginGeneratevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { - if (this.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); - } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (virtualWANName == null) { - throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); - } - if (vpnClientParams == null) { - throw new IllegalArgumentException("Parameter vpnClientParams is required and cannot be null."); - } - Validator.validate(vpnClientParams); + public Observable>> beginPutBastionShareableLinkWithServiceResponseAsync(final String resourceGroupName, final String bastionHostName, final List vms) { + return beginPutBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName, vms) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(beginPutBastionShareableLinkNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param bastionHostName The name of the Bastion Host. + ServiceResponse> * @param vms List of VM references. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionShareableLinkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> beginPutBastionShareableLinkSinglePageAsync(final String resourceGroupName, final String bastionHostName, final List vms) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + Validator.validate(vms); final String apiVersion = "2019-09-01"; - return service.beginGeneratevirtualwanvpnserverconfigurationvpnprofile(this.subscriptionId(), resourceGroupName, virtualWANName, vpnClientParams, apiVersion, this.acceptLanguage(), this.userAgent()) - .flatMap(new Func1, Observable>>() { + BastionShareableLinkListRequest bslRequest = new BastionShareableLinkListRequest(); + bslRequest.withVms(vms); + return service.beginPutBastionShareableLink(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), bslRequest, this.userAgent()) + .flatMap(new Func1, Observable>>>() { @Override - public Observable> call(Response response) { + public Observable>> call(Response response) { try { - ServiceResponse clientResponse = beginGeneratevirtualwanvpnserverconfigurationvpnprofileDelegate(response); + ServiceResponse> result = beginPutBastionShareableLinkDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginPutBastionShareableLinkDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 deleteBastionShareableLink(String resourceGroupName, String bastionHostName) { + deleteBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName).toBlocking().last().body(); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteBastionShareableLinkAsync(String resourceGroupName, String bastionHostName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName), serviceCallback); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteBastionShareableLinkAsync(String resourceGroupName, String bastionHostName) { + return deleteBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteBastionShareableLinkWithServiceResponseAsync(String resourceGroupName, String bastionHostName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String vmsConverted = null; + BastionShareableLinkListRequest bslRequest = new BastionShareableLinkListRequest(); + bslRequest.withVms(null); + Observable> observable = service.deleteBastionShareableLink(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), bslRequest, this.userAgent()); + return getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 deleteBastionShareableLink(String resourceGroupName, String bastionHostName, List vms) { + deleteBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName, vms).toBlocking().last().body(); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteBastionShareableLinkAsync(String resourceGroupName, String bastionHostName, List vms, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName, vms), serviceCallback); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteBastionShareableLinkAsync(String resourceGroupName, String bastionHostName, List vms) { + return deleteBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName, vms).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteBastionShareableLinkWithServiceResponseAsync(String resourceGroupName, String bastionHostName, List vms) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + Validator.validate(vms); + final String apiVersion = "2019-09-01"; + BastionShareableLinkListRequest bslRequest = new BastionShareableLinkListRequest(); + bslRequest.withVms(vms); + Observable> observable = service.deleteBastionShareableLink(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), bslRequest, this.userAgent()); + return getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginDeleteBastionShareableLink(String resourceGroupName, String bastionHostName) { + beginDeleteBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName).toBlocking().single().body(); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteBastionShareableLinkAsync(String resourceGroupName, String bastionHostName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName), serviceCallback); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteBastionShareableLinkAsync(String resourceGroupName, String bastionHostName) { + return beginDeleteBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteBastionShareableLinkWithServiceResponseAsync(String resourceGroupName, String bastionHostName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final List vms = null; + BastionShareableLinkListRequest bslRequest = new BastionShareableLinkListRequest(); + bslRequest.withVms(null); + return service.beginDeleteBastionShareableLink(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), bslRequest, this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteBastionShareableLinkDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1791,12 +2241,1837 @@ public Observable> call(Response beginGeneratevirtualwanvpnserverconfigurationvpnprofileDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @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 beginDeleteBastionShareableLink(String resourceGroupName, String bastionHostName, List vms) { + beginDeleteBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName, vms).toBlocking().single().body(); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteBastionShareableLinkAsync(String resourceGroupName, String bastionHostName, List vms, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName, vms), serviceCallback); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteBastionShareableLinkAsync(String resourceGroupName, String bastionHostName, List vms) { + return beginDeleteBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName, vms).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteBastionShareableLinkWithServiceResponseAsync(String resourceGroupName, String bastionHostName, List vms) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + Validator.validate(vms); + final String apiVersion = "2019-09-01"; + BastionShareableLinkListRequest bslRequest = new BastionShareableLinkListRequest(); + bslRequest.withVms(vms); + return service.beginDeleteBastionShareableLink(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), bslRequest, this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteBastionShareableLinkDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteBastionShareableLinkDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BastionShareableLinkInner> object if successful. + */ + public PagedList getBastionShareableLink(final String resourceGroupName, final String bastionHostName) { + ServiceResponse> response = getBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getBastionShareableLinkNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getBastionShareableLinkAsync(final String resourceGroupName, final String bastionHostName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getBastionShareableLinkNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionShareableLinkInner> object + */ + public Observable> getBastionShareableLinkAsync(final String resourceGroupName, final String bastionHostName) { + return getBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionShareableLinkInner> object + */ + public Observable>> getBastionShareableLinkWithServiceResponseAsync(final String resourceGroupName, final String bastionHostName) { + return getBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getBastionShareableLinkNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionShareableLinkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getBastionShareableLinkSinglePageAsync(final String resourceGroupName, final String bastionHostName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final List vms = null; + BastionShareableLinkListRequest bslRequest = new BastionShareableLinkListRequest(); + bslRequest.withVms(null); + return service.getBastionShareableLink(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), bslRequest, this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getBastionShareableLinkDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BastionShareableLinkInner> object if successful. + */ + public PagedList getBastionShareableLink(final String resourceGroupName, final String bastionHostName, final List vms) { + ServiceResponse> response = getBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName, vms).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getBastionShareableLinkNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getBastionShareableLinkAsync(final String resourceGroupName, final String bastionHostName, final List vms, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName, vms), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getBastionShareableLinkNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionShareableLinkInner> object + */ + public Observable> getBastionShareableLinkAsync(final String resourceGroupName, final String bastionHostName, final List vms) { + return getBastionShareableLinkWithServiceResponseAsync(resourceGroupName, bastionHostName, vms) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param vms List of VM references. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionShareableLinkInner> object + */ + public Observable>> getBastionShareableLinkWithServiceResponseAsync(final String resourceGroupName, final String bastionHostName, final List vms) { + return getBastionShareableLinkSinglePageAsync(resourceGroupName, bastionHostName, vms) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getBastionShareableLinkNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param bastionHostName The name of the Bastion Host. + ServiceResponse> * @param vms List of VM references. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionShareableLinkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getBastionShareableLinkSinglePageAsync(final String resourceGroupName, final String bastionHostName, final List vms) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + Validator.validate(vms); + final String apiVersion = "2019-09-01"; + BastionShareableLinkListRequest bslRequest = new BastionShareableLinkListRequest(); + bslRequest.withVms(vms); + return service.getBastionShareableLink(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), bslRequest, this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getBastionShareableLinkDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getBastionShareableLinkDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BastionActiveSessionInner> object if successful. + */ + public PagedList getActiveSessions(final String resourceGroupName, final String bastionHostName) { + ServiceResponse> response = getActiveSessionsSinglePageAsync(resourceGroupName, bastionHostName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getActiveSessionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getActiveSessionsAsync(final String resourceGroupName, final String bastionHostName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getActiveSessionsSinglePageAsync(resourceGroupName, bastionHostName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getActiveSessionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionActiveSessionInner> object + */ + public Observable> getActiveSessionsAsync(final String resourceGroupName, final String bastionHostName) { + return getActiveSessionsWithServiceResponseAsync(resourceGroupName, bastionHostName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionActiveSessionInner> object + */ + public Observable>> getActiveSessionsWithServiceResponseAsync(final String resourceGroupName, final String bastionHostName) { + return getActiveSessionsSinglePageAsync(resourceGroupName, bastionHostName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getActiveSessionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionActiveSessionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getActiveSessionsSinglePageAsync(final String resourceGroupName, final String bastionHostName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.getActiveSessions(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getActiveSessionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getActiveSessionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BastionActiveSessionInner> object if successful. + */ + public PagedList beginGetActiveSessions(final String resourceGroupName, final String bastionHostName) { + ServiceResponse> response = beginGetActiveSessionsSinglePageAsync(resourceGroupName, bastionHostName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return beginGetActiveSessionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> beginGetActiveSessionsAsync(final String resourceGroupName, final String bastionHostName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginGetActiveSessionsSinglePageAsync(resourceGroupName, bastionHostName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginGetActiveSessionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionActiveSessionInner> object + */ + public Observable> beginGetActiveSessionsAsync(final String resourceGroupName, final String bastionHostName) { + return beginGetActiveSessionsWithServiceResponseAsync(resourceGroupName, bastionHostName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionActiveSessionInner> object + */ + public Observable>> beginGetActiveSessionsWithServiceResponseAsync(final String resourceGroupName, final String bastionHostName) { + return beginGetActiveSessionsSinglePageAsync(resourceGroupName, bastionHostName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(beginGetActiveSessionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionActiveSessionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> beginGetActiveSessionsSinglePageAsync(final String resourceGroupName, final String bastionHostName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.beginGetActiveSessions(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = beginGetActiveSessionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginGetActiveSessionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BastionSessionStateInner> object if successful. + */ + public PagedList disconnectActiveSessions(final String resourceGroupName, final String bastionHostName) { + ServiceResponse> response = disconnectActiveSessionsSinglePageAsync(resourceGroupName, bastionHostName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return disconnectActiveSessionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> disconnectActiveSessionsAsync(final String resourceGroupName, final String bastionHostName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + disconnectActiveSessionsSinglePageAsync(resourceGroupName, bastionHostName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return disconnectActiveSessionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionSessionStateInner> object + */ + public Observable> disconnectActiveSessionsAsync(final String resourceGroupName, final String bastionHostName) { + return disconnectActiveSessionsWithServiceResponseAsync(resourceGroupName, bastionHostName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionSessionStateInner> object + */ + public Observable>> disconnectActiveSessionsWithServiceResponseAsync(final String resourceGroupName, final String bastionHostName) { + return disconnectActiveSessionsSinglePageAsync(resourceGroupName, bastionHostName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(disconnectActiveSessionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionSessionStateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> disconnectActiveSessionsSinglePageAsync(final String resourceGroupName, final String bastionHostName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final List sessionIds = null; + SessionIds sessionIds1 = new SessionIds(); + sessionIds1.withSessionIds(null); + return service.disconnectActiveSessions(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), sessionIds1, this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = disconnectActiveSessionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param sessionIds List of session ids + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BastionSessionStateInner> object if successful. + */ + public PagedList disconnectActiveSessions(final String resourceGroupName, final String bastionHostName, final List sessionIds) { + ServiceResponse> response = disconnectActiveSessionsSinglePageAsync(resourceGroupName, bastionHostName, sessionIds).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return disconnectActiveSessionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param sessionIds List of session ids + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> disconnectActiveSessionsAsync(final String resourceGroupName, final String bastionHostName, final List sessionIds, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + disconnectActiveSessionsSinglePageAsync(resourceGroupName, bastionHostName, sessionIds), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return disconnectActiveSessionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param sessionIds List of session ids + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionSessionStateInner> object + */ + public Observable> disconnectActiveSessionsAsync(final String resourceGroupName, final String bastionHostName, final List sessionIds) { + return disconnectActiveSessionsWithServiceResponseAsync(resourceGroupName, bastionHostName, sessionIds) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param resourceGroupName The name of the resource group. + * @param bastionHostName The name of the Bastion Host. + * @param sessionIds List of session ids + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionSessionStateInner> object + */ + public Observable>> disconnectActiveSessionsWithServiceResponseAsync(final String resourceGroupName, final String bastionHostName, final List sessionIds) { + return disconnectActiveSessionsSinglePageAsync(resourceGroupName, bastionHostName, sessionIds) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(disconnectActiveSessionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param bastionHostName The name of the Bastion Host. + ServiceResponse> * @param sessionIds List of session ids + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionSessionStateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> disconnectActiveSessionsSinglePageAsync(final String resourceGroupName, final String bastionHostName, final List sessionIds) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (bastionHostName == null) { + throw new IllegalArgumentException("Parameter bastionHostName is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + Validator.validate(sessionIds); + final String apiVersion = "2019-09-01"; + SessionIds sessionIds1 = new SessionIds(); + sessionIds1.withSessionIds(sessionIds); + return service.disconnectActiveSessions(resourceGroupName, bastionHostName, this.subscriptionId(), apiVersion, this.acceptLanguage(), sessionIds1, this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = disconnectActiveSessionsDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> disconnectActiveSessionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * + * @param location The location of the domain name. + * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DnsNameAvailabilityResultInner object if successful. + */ + public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location, String domainNameLabel) { + return checkDnsNameAvailabilityWithServiceResponseAsync(location, domainNameLabel).toBlocking().single().body(); + } + + /** + * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * + * @param location The location of the domain name. + * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkDnsNameAvailabilityAsync(String location, String domainNameLabel, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkDnsNameAvailabilityWithServiceResponseAsync(location, domainNameLabel), serviceCallback); + } + + /** + * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * + * @param location The location of the domain name. + * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DnsNameAvailabilityResultInner object + */ + public Observable checkDnsNameAvailabilityAsync(String location, String domainNameLabel) { + return checkDnsNameAvailabilityWithServiceResponseAsync(location, domainNameLabel).map(new Func1, DnsNameAvailabilityResultInner>() { + @Override + public DnsNameAvailabilityResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether a domain name in the cloudapp.azure.com zone is available for use. + * + * @param location The location of the domain name. + * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DnsNameAvailabilityResultInner object + */ + public Observable> checkDnsNameAvailabilityWithServiceResponseAsync(String location, String domainNameLabel) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (domainNameLabel == null) { + throw new IllegalArgumentException("Parameter domainNameLabel is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.checkDnsNameAvailability(location, this.subscriptionId(), domainNameLabel, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = checkDnsNameAvailabilityDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse checkDnsNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gives the supported security providers for the virtual wan. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VirtualWanSecurityProvidersInner object if successful. + */ + public VirtualWanSecurityProvidersInner supportedSecurityProviders(String resourceGroupName, String virtualWANName) { + return supportedSecurityProvidersWithServiceResponseAsync(resourceGroupName, virtualWANName).toBlocking().single().body(); + } + + /** + * Gives the supported security providers for the virtual wan. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture supportedSecurityProvidersAsync(String resourceGroupName, String virtualWANName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(supportedSecurityProvidersWithServiceResponseAsync(resourceGroupName, virtualWANName), serviceCallback); + } + + /** + * Gives the supported security providers for the virtual wan. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualWanSecurityProvidersInner object + */ + public Observable supportedSecurityProvidersAsync(String resourceGroupName, String virtualWANName) { + return supportedSecurityProvidersWithServiceResponseAsync(resourceGroupName, virtualWANName).map(new Func1, VirtualWanSecurityProvidersInner>() { + @Override + public VirtualWanSecurityProvidersInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gives the supported security providers for the virtual wan. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN for which supported security providers are needed. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VirtualWanSecurityProvidersInner object + */ + public Observable> supportedSecurityProvidersWithServiceResponseAsync(String resourceGroupName, String virtualWANName) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + return service.supportedSecurityProviders(this.subscriptionId(), resourceGroupName, virtualWANName, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = supportedSecurityProvidersDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse supportedSecurityProvidersDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation 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 VpnProfileResponseInner object if successful. + */ + public VpnProfileResponseInner generatevirtualwanvpnserverconfigurationvpnprofile(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { + return generatevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams).toBlocking().last().body(); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation 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 generatevirtualwanvpnserverconfigurationvpnprofileAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(generatevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams), serviceCallback); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable generatevirtualwanvpnserverconfigurationvpnprofileAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { + return generatevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams).map(new Func1, VpnProfileResponseInner>() { + @Override + public VpnProfileResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> generatevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + if (vpnClientParams == null) { + throw new IllegalArgumentException("Parameter vpnClientParams is required and cannot be null."); + } + Validator.validate(vpnClientParams); + final String apiVersion = "2019-09-01"; + Observable> observable = service.generatevirtualwanvpnserverconfigurationvpnprofile(this.subscriptionId(), resourceGroupName, virtualWANName, vpnClientParams, apiVersion, this.acceptLanguage(), this.userAgent()); + return getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation 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 VpnProfileResponseInner object if successful. + */ + public VpnProfileResponseInner beginGeneratevirtualwanvpnserverconfigurationvpnprofile(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { + return beginGeneratevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams).toBlocking().single().body(); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation 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 beginGeneratevirtualwanvpnserverconfigurationvpnprofileAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGeneratevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams), serviceCallback); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnProfileResponseInner object + */ + public Observable beginGeneratevirtualwanvpnserverconfigurationvpnprofileAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { + return beginGeneratevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(resourceGroupName, virtualWANName, vpnClientParams).map(new Func1, VpnProfileResponseInner>() { + @Override + public VpnProfileResponseInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Generates a unique VPN profile for P2S clients for VirtualWan and associated VpnServerConfiguration combination in the specified resource group. + * + * @param resourceGroupName The resource group name. + * @param virtualWANName The name of the VirtualWAN whose associated VpnServerConfigurations is needed. + * @param vpnClientParams Parameters supplied to the generate VirtualWan VPN profile generation operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VpnProfileResponseInner object + */ + public Observable> beginGeneratevirtualwanvpnserverconfigurationvpnprofileWithServiceResponseAsync(String resourceGroupName, String virtualWANName, VirtualWanVpnProfileParameters vpnClientParams) { + if (this.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (virtualWANName == null) { + throw new IllegalArgumentException("Parameter virtualWANName is required and cannot be null."); + } + if (vpnClientParams == null) { + throw new IllegalArgumentException("Parameter vpnClientParams is required and cannot be null."); + } + Validator.validate(vpnClientParams); + final String apiVersion = "2019-09-01"; + return service.beginGeneratevirtualwanvpnserverconfigurationvpnprofile(this.subscriptionId(), resourceGroupName, virtualWANName, vpnClientParams, apiVersion, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginGeneratevirtualwanvpnserverconfigurationvpnprofileDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginGeneratevirtualwanvpnserverconfigurationvpnprofileDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory().newInstance(this.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BastionShareableLinkInner> object if successful. + */ + public PagedList putBastionShareableLinkNext(final String nextPageLink) { + ServiceResponse> response = putBastionShareableLinkNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return putBastionShareableLinkNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> putBastionShareableLinkNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + putBastionShareableLinkNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return putBastionShareableLinkNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionShareableLinkInner> object + */ + public Observable> putBastionShareableLinkNextAsync(final String nextPageLink) { + return putBastionShareableLinkNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionShareableLinkInner> object + */ + public Observable>> putBastionShareableLinkNextWithServiceResponseAsync(final String nextPageLink) { + return putBastionShareableLinkNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(putBastionShareableLinkNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionShareableLinkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> putBastionShareableLinkNextSinglePageAsync(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.putBastionShareableLinkNext(nextUrl, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = putBastionShareableLinkNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> putBastionShareableLinkNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BastionShareableLinkInner> object if successful. + */ + public PagedList beginPutBastionShareableLinkNext(final String nextPageLink) { + ServiceResponse> response = beginPutBastionShareableLinkNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return beginPutBastionShareableLinkNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> beginPutBastionShareableLinkNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginPutBastionShareableLinkNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginPutBastionShareableLinkNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionShareableLinkInner> object + */ + public Observable> beginPutBastionShareableLinkNextAsync(final String nextPageLink) { + return beginPutBastionShareableLinkNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionShareableLinkInner> object + */ + public Observable>> beginPutBastionShareableLinkNextWithServiceResponseAsync(final String nextPageLink) { + return beginPutBastionShareableLinkNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(beginPutBastionShareableLinkNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Creates a Bastion Shareable Links for all the VMs specified in the request. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionShareableLinkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> beginPutBastionShareableLinkNextSinglePageAsync(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.beginPutBastionShareableLinkNext(nextUrl, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = beginPutBastionShareableLinkNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginPutBastionShareableLinkNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BastionShareableLinkInner> object if successful. + */ + public PagedList getBastionShareableLinkNext(final String nextPageLink) { + ServiceResponse> response = getBastionShareableLinkNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getBastionShareableLinkNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getBastionShareableLinkNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getBastionShareableLinkNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getBastionShareableLinkNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionShareableLinkInner> object + */ + public Observable> getBastionShareableLinkNextAsync(final String nextPageLink) { + return getBastionShareableLinkNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionShareableLinkInner> object + */ + public Observable>> getBastionShareableLinkNextWithServiceResponseAsync(final String nextPageLink) { + return getBastionShareableLinkNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getBastionShareableLinkNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Return the Bastion Shareable Links for all the VMs specified in the request. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionShareableLinkInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getBastionShareableLinkNextSinglePageAsync(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.getBastionShareableLinkNext(nextUrl, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getBastionShareableLinkNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getBastionShareableLinkNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BastionActiveSessionInner> object if successful. + */ + public PagedList getActiveSessionsNext(final String nextPageLink) { + ServiceResponse> response = getActiveSessionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getActiveSessionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getActiveSessionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getActiveSessionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getActiveSessionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionActiveSessionInner> object + */ + public Observable> getActiveSessionsNextAsync(final String nextPageLink) { + return getActiveSessionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionActiveSessionInner> object + */ + public Observable>> getActiveSessionsNextWithServiceResponseAsync(final String nextPageLink) { + return getActiveSessionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getActiveSessionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionActiveSessionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getActiveSessionsNextSinglePageAsync(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.getActiveSessionsNext(nextUrl, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getActiveSessionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getActiveSessionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BastionActiveSessionInner> object if successful. + */ + public PagedList beginGetActiveSessionsNext(final String nextPageLink) { + ServiceResponse> response = beginGetActiveSessionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return beginGetActiveSessionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> beginGetActiveSessionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + beginGetActiveSessionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return beginGetActiveSessionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionActiveSessionInner> object + */ + public Observable> beginGetActiveSessionsNextAsync(final String nextPageLink) { + return beginGetActiveSessionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionActiveSessionInner> object + */ + public Observable>> beginGetActiveSessionsNextWithServiceResponseAsync(final String nextPageLink) { + return beginGetActiveSessionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(beginGetActiveSessionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionActiveSessionInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> beginGetActiveSessionsNextSinglePageAsync(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.beginGetActiveSessionsNext(nextUrl, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = beginGetActiveSessionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> beginGetActiveSessionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<BastionSessionStateInner> object if successful. + */ + public PagedList disconnectActiveSessionsNext(final String nextPageLink) { + ServiceResponse> response = disconnectActiveSessionsNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return disconnectActiveSessionsNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> disconnectActiveSessionsNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + disconnectActiveSessionsNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return disconnectActiveSessionsNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionSessionStateInner> object + */ + public Observable> disconnectActiveSessionsNextAsync(final String nextPageLink) { + return disconnectActiveSessionsNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<BastionSessionStateInner> object + */ + public Observable>> disconnectActiveSessionsNextWithServiceResponseAsync(final String nextPageLink) { + return disconnectActiveSessionsNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(disconnectActiveSessionsNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns the list of currently active sessions on the Bastion. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<BastionSessionStateInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> disconnectActiveSessionsNextSinglePageAsync(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.disconnectActiveSessionsNext(nextUrl, this.acceptLanguage(), this.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = disconnectActiveSessionsNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> disconnectActiveSessionsNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.restClient().responseBuilderFactory()., CloudException>newInstance(this.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesInner.java b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesInner.java index ca84c6a74a977..c44acd85a1d97 100644 --- a/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesInner.java +++ b/sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/PrivateLinkServicesInner.java @@ -40,6 +40,8 @@ import retrofit2.Response; import rx.functions.Func1; import rx.Observable; +import com.microsoft.azure.LongRunningFinalState; +import com.microsoft.azure.LongRunningOperationOptions; /** * An instance of this class provides access to all the operations defined @@ -119,10 +121,18 @@ interface PrivateLinkServicesService { @POST("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") Observable> checkPrivateLinkServiceVisibility(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckPrivateLinkServiceVisibilityRequest parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices beginCheckPrivateLinkServiceVisibility" }) + @POST("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") + Observable> beginCheckPrivateLinkServiceVisibility(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckPrivateLinkServiceVisibilityRequest parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices checkPrivateLinkServiceVisibilityByResourceGroup" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") Observable> checkPrivateLinkServiceVisibilityByResourceGroup(@Path("location") String location, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckPrivateLinkServiceVisibilityRequest parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices beginCheckPrivateLinkServiceVisibilityByResourceGroup" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility") + Observable> beginCheckPrivateLinkServiceVisibilityByResourceGroup(@Path("location") String location, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body CheckPrivateLinkServiceVisibilityRequest parameters, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.network.v2019_09_01.PrivateLinkServices listAutoApprovedPrivateLinkServices" }) @GET("subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices") Observable> listAutoApprovedPrivateLinkServices(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -1431,7 +1441,7 @@ private ServiceResponse> listPrivateEnd * @return the PrivateLinkServiceVisibilityInner object if successful. */ public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(String location) { - return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).toBlocking().single().body(); + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).toBlocking().last().body(); } /** @@ -1451,7 +1461,7 @@ public ServiceFuture checkPrivateLinkServiceV * * @param location The location of the domain name. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PrivateLinkServiceVisibilityInner object + * @return the observable for the request */ public Observable checkPrivateLinkServiceVisibilityAsync(String location) { return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location).map(new Func1, PrivateLinkServiceVisibilityInner>() { @@ -1467,7 +1477,7 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(String location) { if (location == null) { @@ -1480,12 +1490,140 @@ public Observable> checkPriva final String privateLinkServiceAlias = null; CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); parameters.withPrivateLinkServiceAlias(null); - return service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + Observable> observable = service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateLinkServiceVisibilityInner object if successful. + */ + public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(String location, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).toBlocking().last().body(); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param privateLinkServiceAlias The alias of the private link service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias), serviceCallback); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { + @Override + public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(String location, String privateLinkServiceAlias) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); + parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); + Observable> observable = service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateLinkServiceVisibilityInner object if successful. + */ + public PrivateLinkServiceVisibilityInner beginCheckPrivateLinkServiceVisibility(String location) { + return beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location).toBlocking().single().body(); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCheckPrivateLinkServiceVisibilityAsync(String location, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location), serviceCallback); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable beginCheckPrivateLinkServiceVisibilityAsync(String location) { + return beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location).map(new Func1, PrivateLinkServiceVisibilityInner>() { + @Override + public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether the subscription is visible to private link service. + * + * @param location The location of the domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable> beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(String location) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String privateLinkServiceAlias = null; + CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); + parameters.withPrivateLinkServiceAlias(null); + return service.beginCheckPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityDelegate(response); + ServiceResponse clientResponse = beginCheckPrivateLinkServiceVisibilityDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1504,8 +1642,8 @@ public Observable> call(Respo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PrivateLinkServiceVisibilityInner object if successful. */ - public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(String location, String privateLinkServiceAlias) { - return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).toBlocking().single().body(); + public PrivateLinkServiceVisibilityInner beginCheckPrivateLinkServiceVisibility(String location, String privateLinkServiceAlias) { + return beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).toBlocking().single().body(); } /** @@ -1517,8 +1655,8 @@ public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibility(Strin * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias), serviceCallback); + public ServiceFuture beginCheckPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias), serviceCallback); } /** @@ -1529,8 +1667,8 @@ public ServiceFuture checkPrivateLinkServiceV * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PrivateLinkServiceVisibilityInner object */ - public Observable checkPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias) { - return checkPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { + public Observable beginCheckPrivateLinkServiceVisibilityAsync(String location, String privateLinkServiceAlias) { + return beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(location, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { @Override public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { return response.body(); @@ -1546,7 +1684,7 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> checkPrivateLinkServiceVisibilityWithServiceResponseAsync(String location, String privateLinkServiceAlias) { + public Observable> beginCheckPrivateLinkServiceVisibilityWithServiceResponseAsync(String location, String privateLinkServiceAlias) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -1556,12 +1694,12 @@ public Observable> checkPriva final String apiVersion = "2019-09-01"; CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); - return service.checkPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.beginCheckPrivateLinkServiceVisibility(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityDelegate(response); + ServiceResponse clientResponse = beginCheckPrivateLinkServiceVisibilityDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1570,9 +1708,10 @@ public Observable> call(Respo }); } - private ServiceResponse checkPrivateLinkServiceVisibilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginCheckPrivateLinkServiceVisibilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1588,7 +1727,7 @@ private ServiceResponse checkPrivateLinkServi * @return the PrivateLinkServiceVisibilityInner object if successful. */ public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName) { - return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).toBlocking().single().body(); + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).toBlocking().last().body(); } /** @@ -1610,7 +1749,7 @@ public ServiceFuture checkPrivateLinkServiceV * @param location The location of the domain name. * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PrivateLinkServiceVisibilityInner object + * @return the observable for the request */ public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName) { return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).map(new Func1, PrivateLinkServiceVisibilityInner>() { @@ -1627,7 +1766,7 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName) { if (location == null) { @@ -1643,12 +1782,154 @@ public Observable> checkPriva final String privateLinkServiceAlias = null; CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); parameters.withPrivateLinkServiceAlias(null); - return service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + Observable> observable = service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateLinkServiceVisibilityInner object if successful. + */ + public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).toBlocking().last().body(); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param privateLinkServiceAlias The alias of the private link service. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias), serviceCallback); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { + return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { + @Override + public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param privateLinkServiceAlias The alias of the private link service. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); + parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); + Observable> observable = service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.LOCATION), new TypeToken() { }.getType()); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateLinkServiceVisibilityInner object if successful. + */ + public PrivateLinkServiceVisibilityInner beginCheckPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName) { + return beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).toBlocking().single().body(); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName), serviceCallback); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable beginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName) { + return beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName).map(new Func1, PrivateLinkServiceVisibilityInner>() { + @Override + public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Checks whether the subscription is visible to private link service in the specified resource group. + * + * @param location The location of the domain name. + * @param resourceGroupName The name of the resource group. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkServiceVisibilityInner object + */ + public Observable> beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName) { + if (location == null) { + throw new IllegalArgumentException("Parameter location is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2019-09-01"; + final String privateLinkServiceAlias = null; + CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); + parameters.withPrivateLinkServiceAlias(null); + return service.beginCheckPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityByResourceGroupDelegate(response); + ServiceResponse clientResponse = beginCheckPrivateLinkServiceVisibilityByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1668,8 +1949,8 @@ public Observable> call(Respo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PrivateLinkServiceVisibilityInner object if successful. */ - public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName, String privateLinkServiceAlias) { - return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).toBlocking().single().body(); + public PrivateLinkServiceVisibilityInner beginCheckPrivateLinkServiceVisibilityByResourceGroup(String location, String resourceGroupName, String privateLinkServiceAlias) { + return beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).toBlocking().single().body(); } /** @@ -1682,8 +1963,8 @@ public PrivateLinkServiceVisibilityInner checkPrivateLinkServiceVisibilityByReso * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias), serviceCallback); + public ServiceFuture beginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias), serviceCallback); } /** @@ -1695,8 +1976,8 @@ public ServiceFuture checkPrivateLinkServiceV * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PrivateLinkServiceVisibilityInner object */ - public Observable checkPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { - return checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { + public Observable beginCheckPrivateLinkServiceVisibilityByResourceGroupAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { + return beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(location, resourceGroupName, privateLinkServiceAlias).map(new Func1, PrivateLinkServiceVisibilityInner>() { @Override public PrivateLinkServiceVisibilityInner call(ServiceResponse response) { return response.body(); @@ -1713,7 +1994,7 @@ public PrivateLinkServiceVisibilityInner call(ServiceResponse> checkPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { + public Observable> beginCheckPrivateLinkServiceVisibilityByResourceGroupWithServiceResponseAsync(String location, String resourceGroupName, String privateLinkServiceAlias) { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -1726,12 +2007,12 @@ public Observable> checkPriva final String apiVersion = "2019-09-01"; CheckPrivateLinkServiceVisibilityRequest parameters = new CheckPrivateLinkServiceVisibilityRequest(); parameters.withPrivateLinkServiceAlias(privateLinkServiceAlias); - return service.checkPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) + return service.beginCheckPrivateLinkServiceVisibilityByResourceGroup(location, resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { try { - ServiceResponse clientResponse = checkPrivateLinkServiceVisibilityByResourceGroupDelegate(response); + ServiceResponse clientResponse = beginCheckPrivateLinkServiceVisibilityByResourceGroupDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -1740,9 +2021,10 @@ public Observable> call(Respo }); } - private ServiceResponse checkPrivateLinkServiceVisibilityByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginCheckPrivateLinkServiceVisibilityByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); }