Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR compute/resource-manager] User identities in a new dictionary property #226

Open
wants to merge 1 commit into
base: restapi_auto_compute/resource-manager
Choose a base branch
from
Open
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 @@ -28,7 +28,7 @@ public class RollbackStatusInfo {
private Integer failedRolledbackInstanceCount;

/**
* Error Details if OS rollback failed.
* Error details if OS rollback failed.
*/
@JsonProperty(value = "rollbackError", access = JsonProperty.Access.WRITE_ONLY)
private ApiError rollbackError;
Expand All @@ -52,7 +52,7 @@ public Integer failedRolledbackInstanceCount() {
}

/**
* Get error Details if OS rollback failed.
* Get error details if OS rollback failed.
*
* @return the rollbackError value
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/**
* 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.compute;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Contains the IP tag associated with the public IP address.
*/
public class VirtualMachineScaleSetIpTag {
/**
* IP tag type. Example: FirstPartyUsage.
*/
@JsonProperty(value = "ipTagType")
private String ipTagType;

/**
* IP tag associated with the public IP. Example: SQL, Storage etc.
*/
@JsonProperty(value = "tag")
private String tag;

/**
* Get iP tag type. Example: FirstPartyUsage.
*
* @return the ipTagType value
*/
public String ipTagType() {
return this.ipTagType;
}

/**
* Set iP tag type. Example: FirstPartyUsage.
*
* @param ipTagType the ipTagType value to set
* @return the VirtualMachineScaleSetIpTag object itself.
*/
public VirtualMachineScaleSetIpTag withIpTagType(String ipTagType) {
this.ipTagType = ipTagType;
return this;
}

/**
* Get iP tag associated with the public IP. Example: SQL, Storage etc.
*
* @return the tag value
*/
public String tag() {
return this.tag;
}

/**
* Set iP tag associated with the public IP. Example: SQL, Storage etc.
*
* @param tag the tag value to set
* @return the VirtualMachineScaleSetIpTag object itself.
*/
public VirtualMachineScaleSetIpTag withTag(String tag) {
this.tag = tag;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

package com.microsoft.azure.management.compute;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

Expand Down Expand Up @@ -35,6 +36,12 @@ public class VirtualMachineScaleSetPublicIPAddressConfiguration {
@JsonProperty(value = "properties.dnsSettings")
private VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings dnsSettings;

/**
* The list of IP tags associated with the public IP address.
*/
@JsonProperty(value = "properties.ipTags")
private List<VirtualMachineScaleSetIpTag> ipTags;

/**
* Get the publicIP address configuration name.
*
Expand Down Expand Up @@ -95,4 +102,24 @@ public VirtualMachineScaleSetPublicIPAddressConfiguration withDnsSettings(Virtua
return this;
}

/**
* Get the list of IP tags associated with the public IP address.
*
* @return the ipTags value
*/
public List<VirtualMachineScaleSetIpTag> ipTags() {
return this.ipTags;
}

/**
* Set the list of IP tags associated with the public IP address.
*
* @param ipTags the ipTags value to set
* @return the VirtualMachineScaleSetPublicIPAddressConfiguration object itself.
*/
public VirtualMachineScaleSetPublicIPAddressConfiguration withIpTags(List<VirtualMachineScaleSetIpTag> ipTags) {
this.ipTags = ipTags;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,6 @@ public VirtualMachineExtensionsInner virtualMachineExtensions() {
return this.virtualMachineExtensions;
}

/**
* The VirtualMachinesInner object to access its operations.
*/
private VirtualMachinesInner virtualMachines;

/**
* Gets the VirtualMachinesInner object to access its operations.
* @return the VirtualMachinesInner object.
*/
public VirtualMachinesInner virtualMachines() {
return this.virtualMachines;
}

/**
* The VirtualMachineImagesInner object to access its operations.
*/
Expand Down Expand Up @@ -237,6 +224,19 @@ public ImagesInner images() {
return this.images;
}

/**
* The VirtualMachinesInner object to access its operations.
*/
private VirtualMachinesInner virtualMachines;

/**
* Gets the VirtualMachinesInner object to access its operations.
* @return the VirtualMachinesInner object.
*/
public VirtualMachinesInner virtualMachines() {
return this.virtualMachines;
}

/**
* The VirtualMachineScaleSetsInner object to access its operations.
*/
Expand Down Expand Up @@ -405,11 +405,11 @@ protected void initialize() {
this.availabilitySets = new AvailabilitySetsInner(restClient().retrofit(), this);
this.virtualMachineExtensionImages = new VirtualMachineExtensionImagesInner(restClient().retrofit(), this);
this.virtualMachineExtensions = new VirtualMachineExtensionsInner(restClient().retrofit(), this);
this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this);
this.virtualMachineImages = new VirtualMachineImagesInner(restClient().retrofit(), this);
this.usages = new UsagesInner(restClient().retrofit(), this);
this.virtualMachineSizes = new VirtualMachineSizesInner(restClient().retrofit(), this);
this.images = new ImagesInner(restClient().retrofit(), this);
this.virtualMachines = new VirtualMachinesInner(restClient().retrofit(), this);
this.virtualMachineScaleSets = new VirtualMachineScaleSetsInner(restClient().retrofit(), this);
this.virtualMachineScaleSetExtensions = new VirtualMachineScaleSetExtensionsInner(restClient().retrofit(), this);
this.virtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesInner(restClient().retrofit(), this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ interface VirtualMachineExtensionsService {
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{vmExtensionName}")
Observable<Response<ResponseBody>> get(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("vmExtensionName") String vmExtensionName, @Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @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.compute.VirtualMachineExtensions list" })
@GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions")
Observable<Response<ResponseBody>> list(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

}

/**
Expand Down Expand Up @@ -795,4 +799,170 @@ private ServiceResponse<VirtualMachineExtensionInner> getDelegate(Response<Respo
.build(response);
}

/**
* The operation to get all extensions of a Virtual Machine.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine containing the extension.
* @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 VirtualMachineExtensionsListResultInner object if successful.
*/
public VirtualMachineExtensionsListResultInner list(String resourceGroupName, String vmName) {
return listWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().body();
}

/**
* The operation to get all extensions of a Virtual Machine.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine containing the extension.
* @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<VirtualMachineExtensionsListResultInner> listAsync(String resourceGroupName, String vmName, final ServiceCallback<VirtualMachineExtensionsListResultInner> serviceCallback) {
return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, vmName), serviceCallback);
}

/**
* The operation to get all extensions of a Virtual Machine.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine containing the extension.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineExtensionsListResultInner object
*/
public Observable<VirtualMachineExtensionsListResultInner> listAsync(String resourceGroupName, String vmName) {
return listWithServiceResponseAsync(resourceGroupName, vmName).map(new Func1<ServiceResponse<VirtualMachineExtensionsListResultInner>, VirtualMachineExtensionsListResultInner>() {
@Override
public VirtualMachineExtensionsListResultInner call(ServiceResponse<VirtualMachineExtensionsListResultInner> response) {
return response.body();
}
});
}

/**
* The operation to get all extensions of a Virtual Machine.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine containing the extension.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineExtensionsListResultInner object
*/
public Observable<ServiceResponse<VirtualMachineExtensionsListResultInner>> listWithServiceResponseAsync(String resourceGroupName, String vmName) {
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 (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2018-04-01";
final String expand = null;
return service.list(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineExtensionsListResultInner>>>() {
@Override
public Observable<ServiceResponse<VirtualMachineExtensionsListResultInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<VirtualMachineExtensionsListResultInner> clientResponse = listDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}

/**
* The operation to get all extensions of a Virtual Machine.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine containing the extension.
* @param expand The expand expression to apply on the 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 VirtualMachineExtensionsListResultInner object if successful.
*/
public VirtualMachineExtensionsListResultInner list(String resourceGroupName, String vmName, String expand) {
return listWithServiceResponseAsync(resourceGroupName, vmName, expand).toBlocking().single().body();
}

/**
* The operation to get all extensions of a Virtual Machine.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine containing the extension.
* @param expand The expand expression to apply on the 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<VirtualMachineExtensionsListResultInner> listAsync(String resourceGroupName, String vmName, String expand, final ServiceCallback<VirtualMachineExtensionsListResultInner> serviceCallback) {
return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, vmName, expand), serviceCallback);
}

/**
* The operation to get all extensions of a Virtual Machine.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine containing the extension.
* @param expand The expand expression to apply on the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineExtensionsListResultInner object
*/
public Observable<VirtualMachineExtensionsListResultInner> listAsync(String resourceGroupName, String vmName, String expand) {
return listWithServiceResponseAsync(resourceGroupName, vmName, expand).map(new Func1<ServiceResponse<VirtualMachineExtensionsListResultInner>, VirtualMachineExtensionsListResultInner>() {
@Override
public VirtualMachineExtensionsListResultInner call(ServiceResponse<VirtualMachineExtensionsListResultInner> response) {
return response.body();
}
});
}

/**
* The operation to get all extensions of a Virtual Machine.
*
* @param resourceGroupName The name of the resource group.
* @param vmName The name of the virtual machine containing the extension.
* @param expand The expand expression to apply on the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the VirtualMachineExtensionsListResultInner object
*/
public Observable<ServiceResponse<VirtualMachineExtensionsListResultInner>> listWithServiceResponseAsync(String resourceGroupName, String vmName, String expand) {
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 (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
final String apiVersion = "2018-04-01";
return service.list(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<VirtualMachineExtensionsListResultInner>>>() {
@Override
public Observable<ServiceResponse<VirtualMachineExtensionsListResultInner>> call(Response<ResponseBody> response) {
try {
ServiceResponse<VirtualMachineExtensionsListResultInner> clientResponse = listDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}

private ServiceResponse<VirtualMachineExtensionsListResultInner> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<VirtualMachineExtensionsListResultInner, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<VirtualMachineExtensionsListResultInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}

}
Loading