Skip to content

Commit 0448b96

Browse files
author
SDKAuto
committed
CodeGen from PR 11921 in Azure/azure-rest-api-specs
Merge a469ccf8f847744de6a173bac75df05ac9014e2a into b5702b7d62e824b5cabd4b507dc794e81c873642
1 parent 33362b5 commit 0448b96

File tree

12 files changed

+734
-2
lines changed

12 files changed

+734
-2
lines changed

sdk/resources/mgmt-v2019_06_01/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<parent>
1212
<groupId>com.microsoft.azure</groupId>
1313
<artifactId>azure-arm-parent</artifactId>
14-
<version>1.2.0</version>
15-
<relativePath>../../parents/azure-arm-parent</relativePath>
14+
<version>1.1.0</version>
15+
<relativePath>../../../pom.management.xml</relativePath>
1616
</parent>
1717
<artifactId>azure-mgmt-resources</artifactId>
1818
<version>1.0.0-beta</version>
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
*/
8+
9+
package com.microsoft.azure.management.resources.v2019_06_01;
10+
11+
import com.fasterxml.jackson.annotation.JsonProperty;
12+
13+
/**
14+
* Error description and code explaining why resource name is invalid.
15+
*/
16+
public class ErrorDefinition {
17+
/**
18+
* Description of the error.
19+
*/
20+
@JsonProperty(value = "message")
21+
private String message;
22+
23+
/**
24+
* Code of the error.
25+
*/
26+
@JsonProperty(value = "code")
27+
private String code;
28+
29+
/**
30+
* Get description of the error.
31+
*
32+
* @return the message value
33+
*/
34+
public String message() {
35+
return this.message;
36+
}
37+
38+
/**
39+
* Set description of the error.
40+
*
41+
* @param message the message value to set
42+
* @return the ErrorDefinition object itself.
43+
*/
44+
public ErrorDefinition withMessage(String message) {
45+
this.message = message;
46+
return this;
47+
}
48+
49+
/**
50+
* Get code of the error.
51+
*
52+
* @return the code value
53+
*/
54+
public String code() {
55+
return this.code;
56+
}
57+
58+
/**
59+
* Set code of the error.
60+
*
61+
* @param code the code value to set
62+
* @return the ErrorDefinition object itself.
63+
*/
64+
public ErrorDefinition withCode(String code) {
65+
this.code = code;
66+
return this;
67+
}
68+
69+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
*/
8+
9+
package com.microsoft.azure.management.resources.v2019_06_01;
10+
11+
import com.fasterxml.jackson.annotation.JsonProperty;
12+
13+
/**
14+
* Error response.
15+
*/
16+
public class ErrorResponse {
17+
/**
18+
* The error details.
19+
*/
20+
@JsonProperty(value = "error")
21+
private ErrorDefinition error;
22+
23+
/**
24+
* Get the error details.
25+
*
26+
* @return the error value
27+
*/
28+
public ErrorDefinition error() {
29+
return this.error;
30+
}
31+
32+
/**
33+
* Set the error details.
34+
*
35+
* @param error the error value to set
36+
* @return the ErrorResponse object itself.
37+
*/
38+
public ErrorResponse withError(ErrorDefinition error) {
39+
this.error = error;
40+
return this;
41+
}
42+
43+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
*/
8+
9+
package com.microsoft.azure.management.resources.v2019_06_01;
10+
11+
import com.microsoft.rest.RestException;
12+
import okhttp3.ResponseBody;
13+
import retrofit2.Response;
14+
15+
/**
16+
* Exception thrown for an invalid response with ErrorResponse information.
17+
*/
18+
public class ErrorResponseException extends RestException {
19+
/**
20+
* Initializes a new instance of the ErrorResponseException class.
21+
*
22+
* @param message the exception message or the response content if a message is not available
23+
* @param response the HTTP response
24+
*/
25+
public ErrorResponseException(final String message, final Response<ResponseBody> response) {
26+
super(message, response);
27+
}
28+
29+
/**
30+
* Initializes a new instance of the ErrorResponseException class.
31+
*
32+
* @param message the exception message or the response content if a message is not available
33+
* @param response the HTTP response
34+
* @param body the deserialized response body
35+
*/
36+
public ErrorResponseException(final String message, final Response<ResponseBody> response, final ErrorResponse body) {
37+
super(message, response, body);
38+
}
39+
40+
@Override
41+
public ErrorResponse body() {
42+
return (ErrorResponse) super.body();
43+
}
44+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
*/
8+
9+
package com.microsoft.azure.management.resources.v2019_06_01;
10+
11+
import com.fasterxml.jackson.annotation.JsonProperty;
12+
13+
/**
14+
* Name and Type of the Resource.
15+
*/
16+
public class ResourceName {
17+
/**
18+
* Name of the resource.
19+
*/
20+
@JsonProperty(value = "name", required = true)
21+
private String name;
22+
23+
/**
24+
* The type of the resource.
25+
*/
26+
@JsonProperty(value = "type", required = true)
27+
private String type;
28+
29+
/**
30+
* Get name of the resource.
31+
*
32+
* @return the name value
33+
*/
34+
public String name() {
35+
return this.name;
36+
}
37+
38+
/**
39+
* Set name of the resource.
40+
*
41+
* @param name the name value to set
42+
* @return the ResourceName object itself.
43+
*/
44+
public ResourceName withName(String name) {
45+
this.name = name;
46+
return this;
47+
}
48+
49+
/**
50+
* Get the type of the resource.
51+
*
52+
* @return the type value
53+
*/
54+
public String type() {
55+
return this.type;
56+
}
57+
58+
/**
59+
* Set the type of the resource.
60+
*
61+
* @param type the type value to set
62+
* @return the ResourceName object itself.
63+
*/
64+
public ResourceName withType(String type) {
65+
this.type = type;
66+
return this;
67+
}
68+
69+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
*/
8+
9+
package com.microsoft.azure.management.resources.v2019_06_01;
10+
11+
import java.util.Collection;
12+
import com.fasterxml.jackson.annotation.JsonCreator;
13+
import com.microsoft.rest.ExpandableStringEnum;
14+
15+
/**
16+
* Defines values for ResourceNameStatus.
17+
*/
18+
public final class ResourceNameStatus extends ExpandableStringEnum<ResourceNameStatus> {
19+
/** Static value Allowed for ResourceNameStatus. */
20+
public static final ResourceNameStatus ALLOWED = fromString("Allowed");
21+
22+
/** Static value Reserved for ResourceNameStatus. */
23+
public static final ResourceNameStatus RESERVED = fromString("Reserved");
24+
25+
/**
26+
* Creates or finds a ResourceNameStatus from its string representation.
27+
* @param name a name to look for
28+
* @return the corresponding ResourceNameStatus
29+
*/
30+
@JsonCreator
31+
public static ResourceNameStatus fromString(String name) {
32+
return fromString(name, ResourceNameStatus.class);
33+
}
34+
35+
/**
36+
* @return known ResourceNameStatus values
37+
*/
38+
public static Collection<ResourceNameStatus> values() {
39+
return values(ResourceNameStatus.class);
40+
}
41+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
*/
8+
9+
package com.microsoft.azure.management.resources.v2019_06_01;
10+
11+
import com.fasterxml.jackson.annotation.JsonCreator;
12+
import com.fasterxml.jackson.annotation.JsonValue;
13+
14+
/**
15+
* Defines values for TenantCategory.
16+
*/
17+
public enum TenantCategory {
18+
/** Enum value Home. */
19+
HOME("Home"),
20+
21+
/** Enum value ProjectedBy. */
22+
PROJECTED_BY("ProjectedBy"),
23+
24+
/** Enum value ManagedBy. */
25+
MANAGED_BY("ManagedBy");
26+
27+
/** The actual serialized value for a TenantCategory instance. */
28+
private String value;
29+
30+
TenantCategory(String value) {
31+
this.value = value;
32+
}
33+
34+
/**
35+
* Parses a serialized value to a TenantCategory instance.
36+
*
37+
* @param value the serialized value to parse.
38+
* @return the parsed TenantCategory object, or null if unable to parse.
39+
*/
40+
@JsonCreator
41+
public static TenantCategory fromString(String value) {
42+
TenantCategory[] items = TenantCategory.values();
43+
for (TenantCategory item : items) {
44+
if (item.toString().equalsIgnoreCase(value)) {
45+
return item;
46+
}
47+
}
48+
return null;
49+
}
50+
51+
@JsonValue
52+
@Override
53+
public String toString() {
54+
return this.value;
55+
}
56+
}

sdk/resources/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/resources/v2019_06_01/TenantIdDescription.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,42 @@
1212
import com.microsoft.azure.arm.resources.models.HasManager;
1313
import com.microsoft.azure.management.resources.v2019_06_01.implementation.ResourcesManager;
1414
import com.microsoft.azure.management.resources.v2019_06_01.implementation.TenantIdDescriptionInner;
15+
import java.util.List;
1516

1617
/**
1718
* Type representing TenantIdDescription.
1819
*/
1920
public interface TenantIdDescription extends HasInner<TenantIdDescriptionInner>, HasManager<ResourcesManager> {
21+
/**
22+
* @return the country value.
23+
*/
24+
String country();
25+
26+
/**
27+
* @return the countryCode value.
28+
*/
29+
String countryCode();
30+
31+
/**
32+
* @return the displayName value.
33+
*/
34+
String displayName();
35+
36+
/**
37+
* @return the domains value.
38+
*/
39+
List<String> domains();
40+
2041
/**
2142
* @return the id value.
2243
*/
2344
String id();
2445

46+
/**
47+
* @return the tenantCategory value.
48+
*/
49+
TenantCategory tenantCategory();
50+
2551
/**
2652
* @return the tenantId value.
2753
*/

0 commit comments

Comments
 (0)