Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,30 @@ public interface VirtualMachineExtensionImagesOperations {
*/
ServiceCall listTypesAsync(String location, String publisherName, final ServiceCallback<List<VirtualMachineImageResource>> serviceCallback) throws IllegalArgumentException;

/**
* Gets a list of virtual machine extension image versions.
*
* @param location the String value
* @param publisherName the String value
* @param type the String value
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
* @return the List&lt;VirtualMachineImageResource&gt; object wrapped in {@link ServiceResponse} if successful.
*/
ServiceResponse<List<VirtualMachineImageResource>> listVersions(String location, String publisherName, String type) throws CloudException, IOException, IllegalArgumentException;

/**
* Gets a list of virtual machine extension image versions.
*
* @param location the String value
* @param publisherName the String value
* @param type the String value
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link ServiceCall} object
*/
ServiceCall listVersionsAsync(String location, String publisherName, String type, final ServiceCallback<List<VirtualMachineImageResource>> serviceCallback) throws IllegalArgumentException;
/**
* Gets a list of virtual machine extension image versions.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,92 @@ private ServiceResponse<List<VirtualMachineImageResource>> listTypesDelegate(Res
.build(response);
}

/**
* Gets a list of virtual machine extension image versions.
*
* @param location the String value
* @param publisherName the String value
* @param type the String value
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
* @return the List&lt;VirtualMachineImageResource&gt; object wrapped in {@link ServiceResponse} if successful.
*/
public ServiceResponse<List<VirtualMachineImageResource>> listVersions(String location, String publisherName, String type) throws CloudException, IOException, IllegalArgumentException {
if (location == null) {
throw new IllegalArgumentException("Parameter location is required and cannot be null.");
}
if (publisherName == null) {
throw new IllegalArgumentException("Parameter publisherName is required and cannot be null.");
}
if (type == null) {
throw new IllegalArgumentException("Parameter type is required and cannot be null.");
}
if (this.client.getSubscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.");
}
if (this.client.getApiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.");
}
VirtualMachineImageResource filter = null;
Integer top = null;
String orderby = null;
Call<ResponseBody> call = service.listVersions(location, publisherName, type, this.client.getSubscriptionId(), this.client.getMapperAdapter().serializeRaw(filter), top, orderby, this.client.getApiVersion(), this.client.getAcceptLanguage());
return listVersionsDelegate(call.execute());
}

/**
* Gets a list of virtual machine extension image versions.
*
* @param location the String value
* @param publisherName the String value
* @param type the String value
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link Call} object
*/
public ServiceCall listVersionsAsync(String location, String publisherName, String type, final ServiceCallback<List<VirtualMachineImageResource>> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
}
if (location == null) {
serviceCallback.failure(new IllegalArgumentException("Parameter location is required and cannot be null."));
return null;
}
if (publisherName == null) {
serviceCallback.failure(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
return null;
}
if (type == null) {
serviceCallback.failure(new IllegalArgumentException("Parameter type is required and cannot be null."));
return null;
}
if (this.client.getSubscriptionId() == null) {
serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));
return null;
}
if (this.client.getApiVersion() == null) {
serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."));
return null;
}
final VirtualMachineImageResource filter = null;
final Integer top = null;
final String orderby = null;
Call<ResponseBody> call = service.listVersions(location, publisherName, type, this.client.getSubscriptionId(), this.client.getMapperAdapter().serializeRaw(filter), top, orderby, this.client.getApiVersion(), this.client.getAcceptLanguage());
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback<List<VirtualMachineImageResource>>(serviceCallback) {
@Override
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
try {
serviceCallback.success(listVersionsDelegate(response));
} catch (CloudException | IOException exception) {
serviceCallback.failure(exception);
}
}
});
return serviceCall;
}

/**
* Gets a list of virtual machine extension image versions.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,30 @@ public interface VirtualMachineExtensionsOperations {
*/
ServiceCall beginDeleteAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;

/**
* The operation to get the extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine containing the extension.
* @param vmExtensionName The name of the virtual machine extension.
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
* @return the VirtualMachineExtension object wrapped in {@link ServiceResponse} if successful.
*/
ServiceResponse<VirtualMachineExtension> get(String resourceGroupName, String vmName, String vmExtensionName) throws CloudException, IOException, IllegalArgumentException;

/**
* The operation to get the extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine containing the extension.
* @param vmExtensionName The name of the virtual machine extension.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link ServiceCall} object
*/
ServiceCall getAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback<VirtualMachineExtension> serviceCallback) throws IllegalArgumentException;
/**
* The operation to get the extension.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,88 @@ private ServiceResponse<Void> beginDeleteDelegate(Response<ResponseBody> respons
.build(response);
}

/**
* The operation to get the extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine containing the extension.
* @param vmExtensionName The name of the virtual machine extension.
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
* @return the VirtualMachineExtension object wrapped in {@link ServiceResponse} if successful.
*/
public ServiceResponse<VirtualMachineExtension> get(String resourceGroupName, String vmName, String vmExtensionName) throws CloudException, IOException, IllegalArgumentException {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if (vmName == null) {
throw new IllegalArgumentException("Parameter vmName is required and cannot be null.");
}
if (vmExtensionName == null) {
throw new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null.");
}
if (this.client.getSubscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.");
}
if (this.client.getApiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.");
}
String expand = null;
Call<ResponseBody> call = service.get(resourceGroupName, vmName, vmExtensionName, this.client.getSubscriptionId(), expand, this.client.getApiVersion(), this.client.getAcceptLanguage());
return getDelegate(call.execute());
}

/**
* The operation to get the extension.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine containing the extension.
* @param vmExtensionName The name of the virtual machine extension.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link Call} object
*/
public ServiceCall getAsync(String resourceGroupName, String vmName, String vmExtensionName, final ServiceCallback<VirtualMachineExtension> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
}
if (resourceGroupName == null) {
serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
return null;
}
if (vmName == null) {
serviceCallback.failure(new IllegalArgumentException("Parameter vmName is required and cannot be null."));
return null;
}
if (vmExtensionName == null) {
serviceCallback.failure(new IllegalArgumentException("Parameter vmExtensionName is required and cannot be null."));
return null;
}
if (this.client.getSubscriptionId() == null) {
serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));
return null;
}
if (this.client.getApiVersion() == null) {
serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."));
return null;
}
final String expand = null;
Call<ResponseBody> call = service.get(resourceGroupName, vmName, vmExtensionName, this.client.getSubscriptionId(), expand, this.client.getApiVersion(), this.client.getAcceptLanguage());
final ServiceCall serviceCall = new ServiceCall(call);
call.enqueue(new ServiceResponseCallback<VirtualMachineExtension>(serviceCallback) {
@Override
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
try {
serviceCallback.success(getDelegate(response));
} catch (CloudException | IOException exception) {
serviceCallback.failure(exception);
}
}
});
return serviceCall;
}

/**
* The operation to get the extension.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,32 @@ public interface VirtualMachineImagesOperations {
*/
ServiceCall getAsync(String location, String publisherName, String offer, String skus, String version, final ServiceCallback<VirtualMachineImage> serviceCallback) throws IllegalArgumentException;

/**
* Gets a list of virtual machine images.
*
* @param location the String value
* @param publisherName the String value
* @param offer the String value
* @param skus the String value
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
* @return the List&lt;VirtualMachineImageResource&gt; object wrapped in {@link ServiceResponse} if successful.
*/
ServiceResponse<List<VirtualMachineImageResource>> list(String location, String publisherName, String offer, String skus) throws CloudException, IOException, IllegalArgumentException;

/**
* Gets a list of virtual machine images.
*
* @param location the String value
* @param publisherName the String value
* @param offer the String value
* @param skus the String value
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link ServiceCall} object
*/
ServiceCall listAsync(String location, String publisherName, String offer, String skus, final ServiceCallback<List<VirtualMachineImageResource>> serviceCallback) throws IllegalArgumentException;
/**
* Gets a list of virtual machine images.
*
Expand Down
Loading