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 mgmt-v2019_06_01] Microsoft.Authorization 2020-09-01 policy entity APIs #6196

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions sdk/resources/mgmt-v2019_06_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.2.0</version>
<relativePath>../../parents/azure-arm-parent</relativePath>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-resources</artifactId>
<version>1.0.0-beta</version>
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.resources.v2019_06_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Error description and code explaining why resource name is invalid.
*/
public class ErrorDefinition {
/**
* Description of the error.
*/
@JsonProperty(value = "message")
private String message;

/**
* Code of the error.
*/
@JsonProperty(value = "code")
private String code;

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

/**
* Set description of the error.
*
* @param message the message value to set
* @return the ErrorDefinition object itself.
*/
public ErrorDefinition withMessage(String message) {
this.message = message;
return this;
}

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

/**
* Set code of the error.
*
* @param code the code value to set
* @return the ErrorDefinition object itself.
*/
public ErrorDefinition withCode(String code) {
this.code = code;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/**
* 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.resources.v2019_06_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Error response.
*/
public class ErrorResponse {
/**
* The error details.
*/
@JsonProperty(value = "error")
private ErrorDefinition error;

/**
* Get the error details.
*
* @return the error value
*/
public ErrorDefinition error() {
return this.error;
}

/**
* Set the error details.
*
* @param error the error value to set
* @return the ErrorResponse object itself.
*/
public ErrorResponse withError(ErrorDefinition error) {
this.error = error;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* 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.resources.v2019_06_01;

import com.microsoft.rest.RestException;
import okhttp3.ResponseBody;
import retrofit2.Response;

/**
* Exception thrown for an invalid response with ErrorResponse information.
*/
public class ErrorResponseException extends RestException {
/**
* Initializes a new instance of the ErrorResponseException class.
*
* @param message the exception message or the response content if a message is not available
* @param response the HTTP response
*/
public ErrorResponseException(final String message, final Response<ResponseBody> response) {
super(message, response);
}

/**
* Initializes a new instance of the ErrorResponseException class.
*
* @param message the exception message or the response content if a message is not available
* @param response the HTTP response
* @param body the deserialized response body
*/
public ErrorResponseException(final String message, final Response<ResponseBody> response, final ErrorResponse body) {
super(message, response, body);
}

@Override
public ErrorResponse body() {
return (ErrorResponse) super.body();
}
}
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.resources.v2019_06_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Name and Type of the Resource.
*/
public class ResourceName {
/**
* Name of the resource.
*/
@JsonProperty(value = "name", required = true)
private String name;

/**
* The type of the resource.
*/
@JsonProperty(value = "type", required = true)
private String type;

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

/**
* Set name of the resource.
*
* @param name the name value to set
* @return the ResourceName object itself.
*/
public ResourceName withName(String name) {
this.name = name;
return this;
}

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

/**
* Set the type of the resource.
*
* @param type the type value to set
* @return the ResourceName object itself.
*/
public ResourceName withType(String type) {
this.type = type;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* 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.resources.v2019_06_01;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for ResourceNameStatus.
*/
public final class ResourceNameStatus extends ExpandableStringEnum<ResourceNameStatus> {
/** Static value Allowed for ResourceNameStatus. */
public static final ResourceNameStatus ALLOWED = fromString("Allowed");

/** Static value Reserved for ResourceNameStatus. */
public static final ResourceNameStatus RESERVED = fromString("Reserved");

/**
* Creates or finds a ResourceNameStatus from its string representation.
* @param name a name to look for
* @return the corresponding ResourceNameStatus
*/
@JsonCreator
public static ResourceNameStatus fromString(String name) {
return fromString(name, ResourceNameStatus.class);
}

/**
* @return known ResourceNameStatus values
*/
public static Collection<ResourceNameStatus> values() {
return values(ResourceNameStatus.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* 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.resources.v2019_06_01;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
* Defines values for TenantCategory.
*/
public enum TenantCategory {
/** Enum value Home. */
HOME("Home"),

/** Enum value ProjectedBy. */
PROJECTED_BY("ProjectedBy"),

/** Enum value ManagedBy. */
MANAGED_BY("ManagedBy");

/** The actual serialized value for a TenantCategory instance. */
private String value;

TenantCategory(String value) {
this.value = value;
}

/**
* Parses a serialized value to a TenantCategory instance.
*
* @param value the serialized value to parse.
* @return the parsed TenantCategory object, or null if unable to parse.
*/
@JsonCreator
public static TenantCategory fromString(String value) {
TenantCategory[] items = TenantCategory.values();
for (TenantCategory item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
}

@JsonValue
@Override
public String toString() {
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,42 @@
import com.microsoft.azure.arm.resources.models.HasManager;
import com.microsoft.azure.management.resources.v2019_06_01.implementation.ResourcesManager;
import com.microsoft.azure.management.resources.v2019_06_01.implementation.TenantIdDescriptionInner;
import java.util.List;

/**
* Type representing TenantIdDescription.
*/
public interface TenantIdDescription extends HasInner<TenantIdDescriptionInner>, HasManager<ResourcesManager> {
/**
* @return the country value.
*/
String country();

/**
* @return the countryCode value.
*/
String countryCode();

/**
* @return the displayName value.
*/
String displayName();

/**
* @return the domains value.
*/
List<String> domains();

/**
* @return the id value.
*/
String id();

/**
* @return the tenantCategory value.
*/
TenantCategory tenantCategory();

/**
* @return the tenantId value.
*/
Expand Down
Loading