Skip to content

Commit cc658f4

Browse files
authored
Mgmt: generate network and cosmos (Azure#18587)
* generate network 2020 08 * fix compile error * generate cosmos 2020 06 preview * fix compile error * update version
1 parent be2a5ba commit cc658f4

File tree

1,294 files changed

+239567
-836
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,294 files changed

+239567
-836
lines changed

sdk/cosmos/mgmt-v2020_06_01_preview/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<relativePath>../../parents/azure-arm-parent/pom.xml</relativePath>
1616
</parent>
1717
<artifactId>azure-mgmt-cosmosdb</artifactId>
18-
<version>1.0.0-beta</version>
18+
<version>1.0.0-beta-1</version>
1919
<packaging>jar</packaging>
2020
<name>Microsoft Azure SDK for CosmosDB Management</name>
2121
<description>This package contains Microsoft CosmosDB Management SDK.</description>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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.cosmosdb.v2020_06_01_preview;
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 ApiType.
17+
*/
18+
public final class ApiType extends ExpandableStringEnum<ApiType> {
19+
/** Static value MongoDB for ApiType. */
20+
public static final ApiType MONGO_DB = fromString("MongoDB");
21+
22+
/** Static value Gremlin for ApiType. */
23+
public static final ApiType GREMLIN = fromString("Gremlin");
24+
25+
/** Static value Cassandra for ApiType. */
26+
public static final ApiType CASSANDRA = fromString("Cassandra");
27+
28+
/** Static value Table for ApiType. */
29+
public static final ApiType TABLE = fromString("Table");
30+
31+
/** Static value Sql for ApiType. */
32+
public static final ApiType SQL = fromString("Sql");
33+
34+
/** Static value GremlinV2 for ApiType. */
35+
public static final ApiType GREMLIN_V2 = fromString("GremlinV2");
36+
37+
/**
38+
* Creates or finds a ApiType from its string representation.
39+
* @param name a name to look for
40+
* @return the corresponding ApiType
41+
*/
42+
@JsonCreator
43+
public static ApiType fromString(String name) {
44+
return fromString(name, ApiType.class);
45+
}
46+
47+
/**
48+
* @return known ApiType values
49+
*/
50+
public static Collection<ApiType> values() {
51+
return values(ApiType.class);
52+
}
53+
}

sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/AzureEntityResource.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
import com.microsoft.azure.ProxyResource;
1313

1414
/**
15-
* The resource model definition for a Azure Resource Manager resource with an
15+
* Entity Resource.
16+
* The resource model definition for an Azure Resource Manager resource with an
1617
* etag.
1718
*/
1819
public class AzureEntityResource extends ProxyResource {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
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.cosmosdb.v2020_06_01_preview;
10+
11+
import com.fasterxml.jackson.annotation.JsonProperty;
12+
13+
/**
14+
* The CORS policy for the Cosmos DB database account.
15+
*/
16+
public class CorsPolicy {
17+
/**
18+
* The origin domains that are permitted to make a request against the
19+
* service via CORS.
20+
*/
21+
@JsonProperty(value = "allowedOrigins", required = true)
22+
private String allowedOrigins;
23+
24+
/**
25+
* The methods (HTTP request verbs) that the origin domain may use for a
26+
* CORS request.
27+
*/
28+
@JsonProperty(value = "allowedMethods")
29+
private String allowedMethods;
30+
31+
/**
32+
* The request headers that the origin domain may specify on the CORS
33+
* request.
34+
*/
35+
@JsonProperty(value = "allowedHeaders")
36+
private String allowedHeaders;
37+
38+
/**
39+
* The response headers that may be sent in the response to the CORS
40+
* request and exposed by the browser to the request issuer.
41+
*/
42+
@JsonProperty(value = "exposedHeaders")
43+
private String exposedHeaders;
44+
45+
/**
46+
* The maximum amount time that a browser should cache the preflight
47+
* OPTIONS request.
48+
*/
49+
@JsonProperty(value = "maxAgeInSeconds")
50+
private Long maxAgeInSeconds;
51+
52+
/**
53+
* Get the origin domains that are permitted to make a request against the service via CORS.
54+
*
55+
* @return the allowedOrigins value
56+
*/
57+
public String allowedOrigins() {
58+
return this.allowedOrigins;
59+
}
60+
61+
/**
62+
* Set the origin domains that are permitted to make a request against the service via CORS.
63+
*
64+
* @param allowedOrigins the allowedOrigins value to set
65+
* @return the CorsPolicy object itself.
66+
*/
67+
public CorsPolicy withAllowedOrigins(String allowedOrigins) {
68+
this.allowedOrigins = allowedOrigins;
69+
return this;
70+
}
71+
72+
/**
73+
* Get the methods (HTTP request verbs) that the origin domain may use for a CORS request.
74+
*
75+
* @return the allowedMethods value
76+
*/
77+
public String allowedMethods() {
78+
return this.allowedMethods;
79+
}
80+
81+
/**
82+
* Set the methods (HTTP request verbs) that the origin domain may use for a CORS request.
83+
*
84+
* @param allowedMethods the allowedMethods value to set
85+
* @return the CorsPolicy object itself.
86+
*/
87+
public CorsPolicy withAllowedMethods(String allowedMethods) {
88+
this.allowedMethods = allowedMethods;
89+
return this;
90+
}
91+
92+
/**
93+
* Get the request headers that the origin domain may specify on the CORS request.
94+
*
95+
* @return the allowedHeaders value
96+
*/
97+
public String allowedHeaders() {
98+
return this.allowedHeaders;
99+
}
100+
101+
/**
102+
* Set the request headers that the origin domain may specify on the CORS request.
103+
*
104+
* @param allowedHeaders the allowedHeaders value to set
105+
* @return the CorsPolicy object itself.
106+
*/
107+
public CorsPolicy withAllowedHeaders(String allowedHeaders) {
108+
this.allowedHeaders = allowedHeaders;
109+
return this;
110+
}
111+
112+
/**
113+
* Get the response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
114+
*
115+
* @return the exposedHeaders value
116+
*/
117+
public String exposedHeaders() {
118+
return this.exposedHeaders;
119+
}
120+
121+
/**
122+
* Set the response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
123+
*
124+
* @param exposedHeaders the exposedHeaders value to set
125+
* @return the CorsPolicy object itself.
126+
*/
127+
public CorsPolicy withExposedHeaders(String exposedHeaders) {
128+
this.exposedHeaders = exposedHeaders;
129+
return this;
130+
}
131+
132+
/**
133+
* Get the maximum amount time that a browser should cache the preflight OPTIONS request.
134+
*
135+
* @return the maxAgeInSeconds value
136+
*/
137+
public Long maxAgeInSeconds() {
138+
return this.maxAgeInSeconds;
139+
}
140+
141+
/**
142+
* Set the maximum amount time that a browser should cache the preflight OPTIONS request.
143+
*
144+
* @param maxAgeInSeconds the maxAgeInSeconds value to set
145+
* @return the CorsPolicy object itself.
146+
*/
147+
public CorsPolicy withMaxAgeInSeconds(Long maxAgeInSeconds) {
148+
this.maxAgeInSeconds = maxAgeInSeconds;
149+
return this;
150+
}
151+
152+
}

0 commit comments

Comments
 (0)