use of com.yahoo.vespa.clustercontroller.core.restapiv2.Response in project azure-sdk-for-java by Azure.
the class VirtualMachineScaleSetsInner method beginStartWithServiceResponseAsync.
/**
* Starts one or more virtual machines in a VM scale set.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the OperationStatusResponseInner object
*/
public Observable<ServiceResponse<OperationStatusResponseInner>> beginStartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName == null) {
throw new IllegalArgumentException("Parameter vmScaleSetName 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 = "2016-04-30-preview";
final List<String> instanceIds = null;
VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs();
vmInstanceIDs.withInstanceIds(null);
return service.beginStart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OperationStatusResponseInner>>>() {
@Override
public Observable<ServiceResponse<OperationStatusResponseInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<OperationStatusResponseInner> clientResponse = beginStartDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
use of com.yahoo.vespa.clustercontroller.core.restapiv2.Response in project azure-sdk-for-java by Azure.
the class VirtualMachineScaleSetsInner method beginRestartWithServiceResponseAsync.
/**
* Restarts one or more virtual machines in a VM scale set.
*
* @param resourceGroupName The name of the resource group.
* @param vmScaleSetName The name of the VM scale set.
* @param instanceIds The virtual machine scale set instance ids.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the OperationStatusResponseInner object
*/
public Observable<ServiceResponse<OperationStatusResponseInner>> beginRestartWithServiceResponseAsync(String resourceGroupName, String vmScaleSetName, List<String> instanceIds) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmScaleSetName == null) {
throw new IllegalArgumentException("Parameter vmScaleSetName 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(instanceIds);
final String apiVersion = "2016-04-30-preview";
VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null;
if (instanceIds != null) {
vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs();
vmInstanceIDs.withInstanceIds(instanceIds);
}
return service.beginRestart(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<OperationStatusResponseInner>>>() {
@Override
public Observable<ServiceResponse<OperationStatusResponseInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<OperationStatusResponseInner> clientResponse = beginRestartDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
use of com.yahoo.vespa.clustercontroller.core.restapiv2.Response in project azure-sdk-for-java by Azure.
the class NetworkWatchersInner method getFlowLogStatusWithServiceResponseAsync.
/**
* Queries status of flow log on a specified resource.
*
* @param resourceGroupName The name of the network watcher resource group.
* @param networkWatcherName The name of the network watcher resource.
* @param targetResourceId The target resource where getting the flow logging status.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
public Observable<ServiceResponse<FlowLogInformationInner>> getFlowLogStatusWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceId) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkWatcherName == null) {
throw new IllegalArgumentException("Parameter networkWatcherName 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 (targetResourceId == null) {
throw new IllegalArgumentException("Parameter targetResourceId is required and cannot be null.");
}
final String apiVersion = "2016-12-01";
FlowLogStatusParameters parameters = new FlowLogStatusParameters();
parameters.withTargetResourceId(targetResourceId);
Observable<Response<ResponseBody>> observable = service.getFlowLogStatus(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent());
return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken<FlowLogInformationInner>() {
}.getType());
}
use of com.yahoo.vespa.clustercontroller.core.restapiv2.Response in project azure-sdk-for-java by Azure.
the class VirtualNetworkGatewaysInner method generatevpnclientpackageWithServiceResponseAsync.
/**
* Generates VPN client package for P2S client of the virtual network gateway in the specified resource group.
*
* @param resourceGroupName The name of the resource group.
* @param virtualNetworkGatewayName The name of the virtual network gateway.
* @param processorArchitecture VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. Possible values include: 'Amd64', 'X86'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the String object
*/
public Observable<ServiceResponse<String>> generatevpnclientpackageWithServiceResponseAsync(String resourceGroupName, String virtualNetworkGatewayName, ProcessorArchitecture processorArchitecture) {
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 (processorArchitecture == null) {
throw new IllegalArgumentException("Parameter processorArchitecture is required and cannot be null.");
}
final String apiVersion = "2016-12-01";
VpnClientParameters parameters = new VpnClientParameters();
parameters.withProcessorArchitecture(processorArchitecture);
return service.generatevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<String>>>() {
@Override
public Observable<ServiceResponse<String>> call(Response<ResponseBody> response) {
try {
ServiceResponse<String> clientResponse = generatevpnclientpackageDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
use of com.yahoo.vespa.clustercontroller.core.restapiv2.Response in project azure-sdk-for-java by Azure.
the class NetworkWatchersInner method getTopologyWithServiceResponseAsync.
/**
* Gets the current network topology by resource group.
*
* @param resourceGroupName The name of the resource group.
* @param networkWatcherName The name of the network watcher.
* @param targetResourceGroupName The name of the target resource group to perform topology on.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the TopologyInner object
*/
public Observable<ServiceResponse<TopologyInner>> getTopologyWithServiceResponseAsync(String resourceGroupName, String networkWatcherName, String targetResourceGroupName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (networkWatcherName == null) {
throw new IllegalArgumentException("Parameter networkWatcherName 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 (targetResourceGroupName == null) {
throw new IllegalArgumentException("Parameter targetResourceGroupName is required and cannot be null.");
}
final String apiVersion = "2016-12-01";
TopologyParameters parameters = new TopologyParameters();
parameters.withTargetResourceGroupName(targetResourceGroupName);
return service.getTopology(resourceGroupName, networkWatcherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), parameters, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<TopologyInner>>>() {
@Override
public Observable<ServiceResponse<TopologyInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<TopologyInner> clientResponse = getTopologyDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}
Aggregations