forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 11712 in Azure/azure-rest-api-specs
Merge 1ea7d1bcb17d8cffb7ac2e3a4482847d579dc7d1 into b4373d4c6957f9c7e2c45ecce624e7e70a1598f3
- Loading branch information
SDKAuto
committed
Dec 2, 2020
1 parent
33362b5
commit 4ad80f6
Showing
12 changed files
with
734 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...1/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ErrorDefinition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
..._01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ErrorResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
...ain/java/com/microsoft/azure/management/resources/v2019_06_01/ErrorResponseException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
...6_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/ResourceName.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
...rc/main/java/com/microsoft/azure/management/resources/v2019_06_01/ResourceNameStatus.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
...01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/TenantCategory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.