public Observable<ServiceResponse<VpnClientIPsecParametersInner>> beginSetVpnclientIpsecParametersWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, VpnClientIPsecParametersInner vpnclientIpsecParams) {
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (virtualNetworkGatewayName == null) {
            throw new IllegalArgumentException("Parameter virtualNetworkGatewayName is required and cannot be null.");
        }
        if (this.client.subscriptionId() == null) {
            throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
        }
        if (vpnclientIpsecParams == null) {
            throw new IllegalArgumentException("Parameter vpnclientIpsecParams is required and cannot be null.");
        }
        Validator.validate(vpnclientIpsecParams);
        final String apiVersion = "2018-08-01";
        return service.beginSetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), vpnclientIpsecParams, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VpnClientIPsecParametersInner>>>() {
                @Override
                public Observable<ServiceResponse<VpnClientIPsecParametersInner>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<VpnClientIPsecParametersInner> clientResponse = beginSetVpnclientIpsecParametersDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
public Observable < ServiceResponse < VpnClientIPsecParametersInner > > beginSetVpnclientIpsecParametersWithServiceResponseAsync ( String resourceGroupName , String virtualNetworkGatewayName , VpnClientIPsecParametersInner vpnclientIpsecParams ) { if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( virtualNetworkGatewayName == null ) { throw new IllegalArgumentException ( "Parameter virtualNetworkGatewayName is required and cannot be null." ) ; } if ( this . client . subscriptionId ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.subscriptionId() is required and cannot be null." ) ; } if ( vpnclientIpsecParams == null ) { throw new IllegalArgumentException ( "Parameter vpnclientIpsecParams is required and cannot be null." ) ; } Validator . validate ( vpnclientIpsecParams ) ; final String apiVersion = "2018-08-01" ; return service . beginSetVpnclientIpsecParameters ( resourceGroupName , virtualNetworkGatewayName , this . client . subscriptionId ( ) , vpnclientIpsecParams , apiVersion , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < VpnClientIPsecParametersInner > > > ( ) { @ Override public Observable < ServiceResponse < VpnClientIPsecParametersInner > > call ( Response < ResponseBody > response ) { try { ServiceResponse < VpnClientIPsecParametersInner > clientResponse = beginSetVpnclientIpsecParametersDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ; }
The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of virtual network gateway in the specified resource group through Network resource provider.

@param resourceGroupName The name of the resource group.
@param virtualNetworkGatewayName The name of the virtual network gateway.
@param vpnclientIpsecParams Parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network Gateway P2S client operation through Network resource provider.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the VpnClientIPsecParametersInner object