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 resources/resource-manager] Add more enum values for Identity/type in generic resource swagger #246

Merged
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 @@ -320,8 +320,8 @@ public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {

private ServiceResponse<Void> deleteAtResourceGroupLevelDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter())
.register(204, new TypeToken<Void>() { }.getType())
.register(200, new TypeToken<Void>() { }.getType())
.register(204, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Expand Down Expand Up @@ -581,8 +581,8 @@ public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {

private ServiceResponse<Void> deleteByScopeDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter())
.register(204, new TypeToken<Void>() { }.getType())
.register(200, new TypeToken<Void>() { }.getType())
.register(204, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Expand Down Expand Up @@ -909,8 +909,8 @@ public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {

private ServiceResponse<Void> deleteAtResourceLevelDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter())
.register(204, new TypeToken<Void>() { }.getType())
.register(200, new TypeToken<Void>() { }.getType())
.register(204, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Expand Down Expand Up @@ -1115,8 +1115,8 @@ public Observable<ServiceResponse<ManagementLockObjectInner>> call(Response<Resp

private ServiceResponse<ManagementLockObjectInner> createOrUpdateAtSubscriptionLevelDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<ManagementLockObjectInner, CloudException>newInstance(this.client.serializerAdapter())
.register(201, new TypeToken<ManagementLockObjectInner>() { }.getType())
.register(200, new TypeToken<ManagementLockObjectInner>() { }.getType())
.register(201, new TypeToken<ManagementLockObjectInner>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Expand Down Expand Up @@ -1198,8 +1198,8 @@ public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {

private ServiceResponse<Void> deleteAtSubscriptionLevelDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<Void, CloudException>newInstance(this.client.serializerAdapter())
.register(204, new TypeToken<Void>() { }.getType())
.register(200, new TypeToken<Void>() { }.getType())
.register(204, new TypeToken<Void>() { }.getType())
.registerError(CloudException.class)
.build(response);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* HTTP message.
* The HttpMessage model.
*/
public class HttpMessage {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ public class Plan {
@JsonProperty(value = "promotionCode")
private String promotionCode;

/**
* The plan's version.
*/
@JsonProperty(value = "version")
private String version;

/**
* Get the name value.
*
Expand Down Expand Up @@ -124,24 +118,4 @@ public Plan withPromotionCode(String promotionCode) {
return this;
}

/**
* Get the version value.
*
* @return the version value
*/
public String version() {
return this.version;
}

/**
* Set the version value.
*
* @param version the version value to set
* @return the Plan object itself.
*/
public Plan withVersion(String version) {
this.version = version;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The detailed error message of resource management.
* The ResourceManagementErrorWithDetails model.
*/
public class ResourceManagementErrorWithDetails {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class PageImpl<T> implements Page<T> {
/**
* The link to the next page.
*/
@JsonProperty("nextLink")
@JsonProperty("")
private String nextPageLink;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@
package com.microsoft.azure.management.resources.implementation;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.azure.management.resources.PolicySku;
import com.microsoft.rest.serializer.JsonFlatten;

import java.util.List;

/**
* The policy assignment.
*/
Expand All @@ -37,54 +34,24 @@ public class PolicyAssignmentInner {
@JsonProperty(value = "properties.scope")
private String scope;

/**
* The policy's excluded scopes.
*/
@JsonProperty(value = "properties.notScopes")
private List<String> notScopes;

/**
* Required if a parameter is used in policy rule.
*/
@JsonProperty(value = "properties.parameters")
private Object parameters;

/**
* This message will be part of response in case of policy violation.
*/
@JsonProperty(value = "properties.description")
private String description;

/**
* The policy assignment metadata.
*/
@JsonProperty(value = "properties.metadata")
private Object metadata;

/**
* The ID of the policy assignment.
*/
@JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
@JsonProperty(value = "id")
private String id;

/**
* The type of the policy assignment.
*/
@JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
@JsonProperty(value = "type")
private String type;

/**
* The name of the policy assignment.
*/
@JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
@JsonProperty(value = "name")
private String name;

/**
* The policy sku.
*/
@JsonProperty(value = "sku")
private PolicySku sku;

/**
* Get the displayName value.
*
Expand Down Expand Up @@ -146,103 +113,45 @@ public PolicyAssignmentInner withScope(String scope) {
}

/**
* Get the notScopes value.
*
* @return the notScopes value
*/
public List<String> notScopes() {
return this.notScopes;
}

/**
* Set the notScopes value.
*
* @param notScopes the notScopes value to set
* @return the PolicyAssignmentInner object itself.
*/
public PolicyAssignmentInner withNotScopes(List<String> notScopes) {
this.notScopes = notScopes;
return this;
}

/**
* Get the parameters value.
*
* @return the parameters value
*/
public Object parameters() {
return this.parameters;
}

/**
* Set the parameters value.
*
* @param parameters the parameters value to set
* @return the PolicyAssignmentInner object itself.
*/
public PolicyAssignmentInner withParameters(Object parameters) {
this.parameters = parameters;
return this;
}

/**
* Get the description value.
* Get the id value.
*
* @return the description value
* @return the id value
*/
public String description() {
return this.description;
public String id() {
return this.id;
}

/**
* Set the description value.
* Set the id value.
*
* @param description the description value to set
* @param id the id value to set
* @return the PolicyAssignmentInner object itself.
*/
public PolicyAssignmentInner withDescription(String description) {
this.description = description;
public PolicyAssignmentInner withId(String id) {
this.id = id;
return this;
}

/**
* Get the metadata value.
* Get the type value.
*
* @return the metadata value
* @return the type value
*/
public Object metadata() {
return this.metadata;
public String type() {
return this.type;
}

/**
* Set the metadata value.
* Set the type value.
*
* @param metadata the metadata value to set
* @param type the type value to set
* @return the PolicyAssignmentInner object itself.
*/
public PolicyAssignmentInner withMetadata(Object metadata) {
this.metadata = metadata;
public PolicyAssignmentInner withType(String type) {
this.type = type;
return this;
}

/**
* Get the id value.
*
* @return the id value
*/
public String id() {
return this.id;
}

/**
* Get the type value.
*
* @return the type value
*/
public String type() {
return this.type;
}

/**
* Get the name value.
*
Expand All @@ -253,22 +162,13 @@ public String name() {
}

/**
* Get the sku value.
*
* @return the sku value
*/
public PolicySku sku() {
return this.sku;
}

/**
* Set the sku value.
* Set the name value.
*
* @param sku the sku value to set
* @param name the name value to set
* @return the PolicyAssignmentInner object itself.
*/
public PolicyAssignmentInner withSku(PolicySku sku) {
this.sku = sku;
public PolicyAssignmentInner withName(String name) {
this.name = name;
return this;
}

Expand Down
Loading