public Observable<ServiceResponse<Void>> acquireWithServiceResponseAsync(String resourceGroupName, String serverName, String dnsAliasName, String oldServerDnsAliasId) {
        if (resourceGroupName == null) {
            throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
        }
        if (serverName == null) {
            throw new IllegalArgumentException("Parameter serverName is required and cannot be null.");
        }
        if (dnsAliasName == null) {
            throw new IllegalArgumentException("Parameter dnsAliasName 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 (this.client.apiVersion() == null) {
            throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
        }
        ServerDnsAliasAcquisition parameters = new ServerDnsAliasAcquisition();
        parameters.withOldServerDnsAliasId(oldServerDnsAliasId);
        Observable<Response<ResponseBody>> observable = service.acquire(resourceGroupName, serverName, dnsAliasName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent());
        return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<Void>() { }.getType());
    }
public Observable < ServiceResponse < Void > > acquireWithServiceResponseAsync ( String resourceGroupName , String serverName , String dnsAliasName , String oldServerDnsAliasId ) { if ( resourceGroupName == null ) { throw new IllegalArgumentException ( "Parameter resourceGroupName is required and cannot be null." ) ; } if ( serverName == null ) { throw new IllegalArgumentException ( "Parameter serverName is required and cannot be null." ) ; } if ( dnsAliasName == null ) { throw new IllegalArgumentException ( "Parameter dnsAliasName 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 ( this . client . apiVersion ( ) == null ) { throw new IllegalArgumentException ( "Parameter this.client.apiVersion() is required and cannot be null." ) ; } ServerDnsAliasAcquisition parameters = new ServerDnsAliasAcquisition ( ) ; parameters . withOldServerDnsAliasId ( oldServerDnsAliasId ) ; Observable < Response < ResponseBody > > observable = service . acquire ( resourceGroupName , serverName , dnsAliasName , this . client . subscriptionId ( ) , this . client . apiVersion ( ) , this . client . acceptLanguage ( ) , parameters , this . client . userAgent ( ) ) ; return client . getAzureClient ( ) . getPostOrDeleteResultAsync ( observable , new TypeToken < Void > ( ) { } . getType ( ) ) ; }
Acquires server DNS alias from another server.

@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of the server that the alias is pointing to.
@param dnsAliasName The name of the server dns alias.
@param oldServerDnsAliasId The id of the server alias that will be acquired to point to this server instead.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable for the request