Skip to content

Commit

Permalink
Mgmt generate (Azure#14001)
Browse files Browse the repository at this point in the history
* update api specs

* generate hybridcompute

* add ci and pom

* generate cosmos

* update pom

* fix compile
  • Loading branch information
ChenTanyi authored Aug 12, 2020
1 parent 27474b7 commit 7c1c8f3
Show file tree
Hide file tree
Showing 90 changed files with 13,272 additions and 968 deletions.
4 changes: 4 additions & 0 deletions eng/mgmt/api-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@
"source": "specification/hdinsight/resource-manager/readme.md",
"args": "--multiapi --fluent"
},
"hybridcompute/resource-manager": {
"source": "specification/hybridcompute/resource-manager/readme.md",
"args": "--multiapi --fluent"
},
"iotcentral/resource-manager": {
"source": "specification/iotcentral/resource-manager/readme.md",
"args": "--multiapi --fluent",
Expand Down
4 changes: 2 additions & 2 deletions sdk/cosmos/mgmt-v2020_04_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.3.1</version>
<version>1.3.2</version>
<relativePath>../../parents/azure-arm-parent/pom.xml</relativePath>
</parent>
<artifactId>azure-mgmt-cosmosdb</artifactId>
<version>1.0.0-beta</version>
<version>1.0.0-beta-1</version>
<packaging>jar</packaging>
<name>Microsoft Azure SDK for CosmosDB Management</name>
<description>This package contains Microsoft CosmosDB Management SDK.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,28 @@ public interface CassandraResources {
*/
Observable<ThroughputSettingsGetResults> updateCassandraKeyspaceThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, ThroughputSettingsUpdateParameters updateThroughputParameters);

/**
* Migrate an Azure Cosmos DB Cassandra Keyspace from manual throughput to autoscale.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ThroughputSettingsGetResults> migrateCassandraKeyspaceToAutoscaleAsync(String resourceGroupName, String accountName, String keyspaceName);

/**
* Migrate an Azure Cosmos DB Cassandra Keyspace from autoscale to manual throughput.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ThroughputSettingsGetResults> migrateCassandraKeyspaceToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName);

/**
* Gets the RUs per second of the Cassandra table under an existing Azure Cosmos DB database account with the provided name.
*
Expand All @@ -111,6 +133,30 @@ public interface CassandraResources {
*/
Observable<ThroughputSettingsGetResults> updateCassandraTableThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName, ThroughputSettingsUpdateParameters updateThroughputParameters);

/**
* Migrate an Azure Cosmos DB Cassandra table from manual throughput to autoscale.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param tableName Cosmos DB table name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ThroughputSettingsGetResults> migrateCassandraTableToAutoscaleAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName);

/**
* Migrate an Azure Cosmos DB Cassandra table from autoscale to manual throughput.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param keyspaceName Cosmos DB keyspace name.
* @param tableName Cosmos DB table name.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<ThroughputSettingsGetResults> migrateCassandraTableToManualThroughputAsync(String resourceGroupName, String accountName, String keyspaceName, String tableName);

/**
* Gets the Cassandra table under an existing Azure Cosmos DB database account.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
/**
* 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.cosmosdb.v2020_04_01;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The CORS policy for the Cosmos DB database account.
*/
public class CorsPolicy {
/**
* The origin domains that are permitted to make a request against the
* service via CORS.
*/
@JsonProperty(value = "allowedOrigins", required = true)
private String allowedOrigins;

/**
* The methods (HTTP request verbs) that the origin domain may use for a
* CORS request.
*/
@JsonProperty(value = "allowedMethods")
private String allowedMethods;

/**
* The request headers that the origin domain may specify on the CORS
* request.
*/
@JsonProperty(value = "allowedHeaders")
private String allowedHeaders;

/**
* The response headers that may be sent in the response to the CORS
* request and exposed by the browser to the request issuer.
*/
@JsonProperty(value = "exposedHeaders")
private String exposedHeaders;

/**
* The maximum amount time that a browser should cache the preflight
* OPTIONS request.
*/
@JsonProperty(value = "maxAgeInSeconds")
private Long maxAgeInSeconds;

/**
* Get the origin domains that are permitted to make a request against the service via CORS.
*
* @return the allowedOrigins value
*/
public String allowedOrigins() {
return this.allowedOrigins;
}

/**
* Set the origin domains that are permitted to make a request against the service via CORS.
*
* @param allowedOrigins the allowedOrigins value to set
* @return the CorsPolicy object itself.
*/
public CorsPolicy withAllowedOrigins(String allowedOrigins) {
this.allowedOrigins = allowedOrigins;
return this;
}

/**
* Get the methods (HTTP request verbs) that the origin domain may use for a CORS request.
*
* @return the allowedMethods value
*/
public String allowedMethods() {
return this.allowedMethods;
}

/**
* Set the methods (HTTP request verbs) that the origin domain may use for a CORS request.
*
* @param allowedMethods the allowedMethods value to set
* @return the CorsPolicy object itself.
*/
public CorsPolicy withAllowedMethods(String allowedMethods) {
this.allowedMethods = allowedMethods;
return this;
}

/**
* Get the request headers that the origin domain may specify on the CORS request.
*
* @return the allowedHeaders value
*/
public String allowedHeaders() {
return this.allowedHeaders;
}

/**
* Set the request headers that the origin domain may specify on the CORS request.
*
* @param allowedHeaders the allowedHeaders value to set
* @return the CorsPolicy object itself.
*/
public CorsPolicy withAllowedHeaders(String allowedHeaders) {
this.allowedHeaders = allowedHeaders;
return this;
}

/**
* Get the response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
*
* @return the exposedHeaders value
*/
public String exposedHeaders() {
return this.exposedHeaders;
}

/**
* Set the response headers that may be sent in the response to the CORS request and exposed by the browser to the request issuer.
*
* @param exposedHeaders the exposedHeaders value to set
* @return the CorsPolicy object itself.
*/
public CorsPolicy withExposedHeaders(String exposedHeaders) {
this.exposedHeaders = exposedHeaders;
return this;
}

/**
* Get the maximum amount time that a browser should cache the preflight OPTIONS request.
*
* @return the maxAgeInSeconds value
*/
public Long maxAgeInSeconds() {
return this.maxAgeInSeconds;
}

/**
* Set the maximum amount time that a browser should cache the preflight OPTIONS request.
*
* @param maxAgeInSeconds the maxAgeInSeconds value to set
* @return the CorsPolicy object itself.
*/
public CorsPolicy withMaxAgeInSeconds(Long maxAgeInSeconds) {
this.maxAgeInSeconds = maxAgeInSeconds;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ public class DatabaseAccountCreateUpdateParameters extends ARMResourceProperties
@JsonProperty(value = "properties.enableAnalyticalStorage")
private Boolean enableAnalyticalStorage;

/**
* The CORS policy for the Cosmos DB database account.
*/
@JsonProperty(value = "properties.cors")
private List<CorsPolicy> cors;

/**
* Creates an instance of DatabaseAccountCreateUpdateParameters class.
* @param locations an array that contains the georeplication locations enabled for the Cosmos DB account.
Expand Down Expand Up @@ -502,4 +508,24 @@ public DatabaseAccountCreateUpdateParameters withEnableAnalyticalStorage(Boolean
return this;
}

/**
* Get the CORS policy for the Cosmos DB database account.
*
* @return the cors value
*/
public List<CorsPolicy> cors() {
return this.cors;
}

/**
* Set the CORS policy for the Cosmos DB database account.
*
* @param cors the cors value to set
* @return the DatabaseAccountCreateUpdateParameters object itself.
*/
public DatabaseAccountCreateUpdateParameters withCors(List<CorsPolicy> cors) {
this.cors = cors;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public interface DatabaseAccountGetResults extends HasInner<DatabaseAccountGetRe
*/
ConsistencyPolicy consistencyPolicy();

/**
* @return the cors value.
*/
List<CorsPolicy> cors();

/**
* @return the databaseAccountOfferType value.
*/
Expand Down Expand Up @@ -239,6 +244,18 @@ interface WithConsistencyPolicy {
WithCreate withConsistencyPolicy(ConsistencyPolicy consistencyPolicy);
}

/**
* The stage of the databaseaccountgetresults definition allowing to specify Cors.
*/
interface WithCors {
/**
* Specifies cors.
* @param cors The CORS policy for the Cosmos DB database account
* @return the next definition stage
*/
WithCreate withCors(List<CorsPolicy> cors);
}

/**
* The stage of the databaseaccountgetresults definition allowing to specify DisableKeyBasedMetadataWriteAccess.
*/
Expand Down Expand Up @@ -388,13 +405,13 @@ interface WithVirtualNetworkRules {
* the resource to be created (via {@link WithCreate#create()}), but also allows
* for any other optional settings to be specified.
*/
interface WithCreate extends Creatable<DatabaseAccountGetResults>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithApiProperties, DefinitionStages.WithCapabilities, DefinitionStages.WithConnectorOffer, DefinitionStages.WithConsistencyPolicy, DefinitionStages.WithDisableKeyBasedMetadataWriteAccess, DefinitionStages.WithEnableAnalyticalStorage, DefinitionStages.WithEnableAutomaticFailover, DefinitionStages.WithEnableCassandraConnector, DefinitionStages.WithEnableFreeTier, DefinitionStages.WithEnableMultipleWriteLocations, DefinitionStages.WithIpRules, DefinitionStages.WithIsVirtualNetworkFilterEnabled, DefinitionStages.WithKeyVaultKeyUri, DefinitionStages.WithKind, DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithVirtualNetworkRules {
interface WithCreate extends Creatable<DatabaseAccountGetResults>, Resource.DefinitionWithTags<WithCreate>, DefinitionStages.WithApiProperties, DefinitionStages.WithCapabilities, DefinitionStages.WithConnectorOffer, DefinitionStages.WithConsistencyPolicy, DefinitionStages.WithCors, DefinitionStages.WithDisableKeyBasedMetadataWriteAccess, DefinitionStages.WithEnableAnalyticalStorage, DefinitionStages.WithEnableAutomaticFailover, DefinitionStages.WithEnableCassandraConnector, DefinitionStages.WithEnableFreeTier, DefinitionStages.WithEnableMultipleWriteLocations, DefinitionStages.WithIpRules, DefinitionStages.WithIsVirtualNetworkFilterEnabled, DefinitionStages.WithKeyVaultKeyUri, DefinitionStages.WithKind, DefinitionStages.WithPublicNetworkAccess, DefinitionStages.WithVirtualNetworkRules {
}
}
/**
* The template for a DatabaseAccountGetResults update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<DatabaseAccountGetResults>, Resource.UpdateWithTags<Update>, UpdateStages.WithApiProperties, UpdateStages.WithCapabilities, UpdateStages.WithConnectorOffer, UpdateStages.WithConsistencyPolicy, UpdateStages.WithDisableKeyBasedMetadataWriteAccess, UpdateStages.WithEnableAnalyticalStorage, UpdateStages.WithEnableAutomaticFailover, UpdateStages.WithEnableCassandraConnector, UpdateStages.WithEnableFreeTier, UpdateStages.WithEnableMultipleWriteLocations, UpdateStages.WithIpRules, UpdateStages.WithIsVirtualNetworkFilterEnabled, UpdateStages.WithKeyVaultKeyUri, UpdateStages.WithLocations, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithVirtualNetworkRules {
interface Update extends Appliable<DatabaseAccountGetResults>, Resource.UpdateWithTags<Update>, UpdateStages.WithApiProperties, UpdateStages.WithCapabilities, UpdateStages.WithConnectorOffer, UpdateStages.WithConsistencyPolicy, UpdateStages.WithCors, UpdateStages.WithDisableKeyBasedMetadataWriteAccess, UpdateStages.WithEnableAnalyticalStorage, UpdateStages.WithEnableAutomaticFailover, UpdateStages.WithEnableCassandraConnector, UpdateStages.WithEnableFreeTier, UpdateStages.WithEnableMultipleWriteLocations, UpdateStages.WithIpRules, UpdateStages.WithIsVirtualNetworkFilterEnabled, UpdateStages.WithKeyVaultKeyUri, UpdateStages.WithLocations, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithVirtualNetworkRules {
}

/**
Expand Down Expand Up @@ -449,6 +466,18 @@ interface WithConsistencyPolicy {
Update withConsistencyPolicy(ConsistencyPolicy consistencyPolicy);
}

/**
* The stage of the databaseaccountgetresults update allowing to specify Cors.
*/
interface WithCors {
/**
* Specifies cors.
* @param cors The CORS policy for the Cosmos DB database account
* @return the next update stage
*/
Update withCors(List<CorsPolicy> cors);
}

/**
* The stage of the databaseaccountgetresults update allowing to specify DisableKeyBasedMetadataWriteAccess.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ public class DatabaseAccountUpdateParameters {
@JsonProperty(value = "properties.enableAnalyticalStorage")
private Boolean enableAnalyticalStorage;

/**
* The CORS policy for the Cosmos DB database account.
*/
@JsonProperty(value = "properties.cors")
private List<CorsPolicy> cors;

/**
* Get the tags value.
*
Expand Down Expand Up @@ -493,4 +499,24 @@ public DatabaseAccountUpdateParameters withEnableAnalyticalStorage(Boolean enabl
return this;
}

/**
* Get the CORS policy for the Cosmos DB database account.
*
* @return the cors value
*/
public List<CorsPolicy> cors() {
return this.cors;
}

/**
* Set the CORS policy for the Cosmos DB database account.
*
* @param cors the cors value to set
* @return the DatabaseAccountUpdateParameters object itself.
*/
public DatabaseAccountUpdateParameters withCors(List<CorsPolicy> cors) {
this.cors = cors;
return this;
}

}
Loading

0 comments on commit 7c1c8f3

Please sign in to comment.