From 1a584a350ce0916b749b6a5edabd8eb35e3a05cc Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Thu, 22 Oct 2020 06:00:17 +0000 Subject: [PATCH] Generated from e0713c36960661579b09ab1e073456565f285931 --- sdk/cosmos/mgmt-v2019_08_01/pom.xml | 4 +- ...assandraKeyspaceGetPropertiesResource.java | 90 ++ .../CassandraKeyspaceGetResults.java | 25 +- .../CassandraTableGetPropertiesResource.java | 142 +++ .../v2019_08_01/CassandraTableGetResults.java | 29 +- .../cosmosdb/v2019_08_01/CompositePath.java | 71 ++ .../v2019_08_01/CompositePathSortOrder.java | 41 + .../GremlinDatabaseGetPropertiesResource.java | 90 ++ .../GremlinDatabaseGetResults.java | 25 +- .../GremlinGraphGetPropertiesResource.java | 224 ++++ .../v2019_08_01/GremlinGraphGetResults.java | 44 +- .../cosmosdb/v2019_08_01/IndexingPolicy.java | 52 + ...ongoDBCollectionGetPropertiesResource.java | 144 +++ .../MongoDBCollectionGetResults.java | 30 +- .../MongoDBDatabaseGetPropertiesResource.java | 90 ++ .../MongoDBDatabaseGetResults.java | 23 +- .../v2019_08_01/NotebookWorkspace.java | 98 ++ ...NotebookWorkspaceConnectionInfoResult.java | 30 + ...tebookWorkspaceCreateUpdateParameters.java | 16 + .../v2019_08_01/NotebookWorkspaces.java | 81 ++ .../cosmosdb/v2019_08_01/SpatialSpec.java | 71 ++ .../cosmosdb/v2019_08_01/SpatialType.java | 47 + .../SqlContainerGetPropertiesResource.java | 224 ++++ .../v2019_08_01/SqlContainerGetResults.java | 44 +- .../SqlDatabaseGetPropertiesResource.java | 144 +++ .../v2019_08_01/SqlDatabaseGetResults.java | 29 +- ...lStoredProcedureGetPropertiesResource.java | 116 ++ .../SqlStoredProcedureGetResults.java | 24 +- .../SqlTriggerGetPropertiesResource.java | 169 +++ .../v2019_08_01/SqlTriggerGetResults.java | 34 +- ...rDefinedFunctionGetPropertiesResource.java | 116 ++ .../SqlUserDefinedFunctionGetResults.java | 24 +- .../TableGetPropertiesResource.java | 90 ++ .../cosmosdb/v2019_08_01/TableGetResults.java | 19 +- ...roughputSettingsGetPropertiesResource.java | 120 +++ .../ThroughputSettingsGetResults.java | 14 +- .../CassandraKeyspaceGetResultsImpl.java | 26 +- .../CassandraKeyspaceGetResultsInner.java | 70 +- .../CassandraResourcesInner.java | 4 +- .../CassandraTableGetResultsImpl.java | 31 +- .../CassandraTableGetResultsInner.java | 123 +-- .../CollectionPartitionRegionsInner.java | 4 +- .../CollectionPartitionsInner.java | 4 +- .../CollectionRegionsInner.java | 4 +- .../implementation/CollectionsInner.java | 4 +- .../CosmosDBManagementClientImpl.java | 494 +++++++++ .../implementation/CosmosDBManager.java | 16 +- .../DatabaseAccountRegionsInner.java | 4 +- .../implementation/DatabaseAccountsInner.java | 4 +- .../implementation/DatabasesInner.java | 4 +- .../GremlinDatabaseGetResultsImpl.java | 26 +- .../GremlinDatabaseGetResultsInner.java | 70 +- .../GremlinGraphGetResultsImpl.java | 49 +- .../GremlinGraphGetResultsInner.java | 208 +--- .../implementation/GremlinResourcesInner.java | 4 +- .../MongoDBCollectionGetResultsImpl.java | 32 +- .../MongoDBCollectionGetResultsInner.java | 125 +-- .../MongoDBDatabaseGetResultsImpl.java | 24 +- .../MongoDBDatabaseGetResultsInner.java | 70 +- .../implementation/MongoDBResourcesInner.java | 4 +- ...bookWorkspaceConnectionInfoResultImpl.java | 36 + ...ookWorkspaceConnectionInfoResultInner.java | 48 + .../implementation/NotebookWorkspaceImpl.java | 102 ++ .../NotebookWorkspaceInner.java | 51 + .../NotebookWorkspacesImpl.java | 110 ++ .../NotebookWorkspacesInner.java | 997 ++++++++++++++++++ .../implementation/OperationsInner.java | 4 +- .../PartitionKeyRangeIdRegionsInner.java | 4 +- .../PartitionKeyRangeIdsInner.java | 4 +- .../PercentileSourceTargetsInner.java | 4 +- .../PercentileTargetsInner.java | 4 +- .../implementation/PercentilesInner.java | 4 +- .../SqlContainerGetResultsImpl.java | 49 +- .../SqlContainerGetResultsInner.java | 208 +--- .../SqlDatabaseGetResultsImpl.java | 30 +- .../SqlDatabaseGetResultsInner.java | 124 +-- .../implementation/SqlResourcesInner.java | 10 +- .../SqlStoredProcedureGetResultsImpl.java | 25 +- .../SqlStoredProcedureGetResultsInner.java | 96 +- .../SqlTriggerGetResultsImpl.java | 37 +- .../SqlTriggerGetResultsInner.java | 151 +-- .../SqlUserDefinedFunctionGetResultsImpl.java | 25 +- ...SqlUserDefinedFunctionGetResultsInner.java | 96 +- .../implementation/TableGetResultsImpl.java | 20 +- .../implementation/TableGetResultsInner.java | 70 +- .../implementation/TableResourcesInner.java | 4 +- .../ThroughputSettingsGetResultsImpl.java | 15 +- .../ThroughputSettingsGetResultsInner.java | 53 +- .../implementation/package-info.java | 2 +- .../cosmosdb/v2019_08_01/package-info.java | 2 +- 90 files changed, 4398 insertions(+), 2025 deletions(-) create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/CassandraKeyspaceGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/CassandraTableGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/CompositePath.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/CompositePathSortOrder.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/GremlinDatabaseGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/GremlinGraphGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBCollectionGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBDatabaseGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspace.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspaceConnectionInfoResult.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspaceCreateUpdateParameters.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspaces.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SpatialSpec.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SpatialType.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlContainerGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlDatabaseGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlStoredProcedureGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlTriggerGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlUserDefinedFunctionGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/TableGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/ThroughputSettingsGetPropertiesResource.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CosmosDBManagementClientImpl.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceConnectionInfoResultImpl.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceConnectionInfoResultInner.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceImpl.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceInner.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspacesImpl.java create mode 100644 sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspacesInner.java diff --git a/sdk/cosmos/mgmt-v2019_08_01/pom.xml b/sdk/cosmos/mgmt-v2019_08_01/pom.xml index b9b6a8b6f97ee..0816f86cd313c 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/pom.xml +++ b/sdk/cosmos/mgmt-v2019_08_01/pom.xml @@ -11,8 +11,8 @@ com.microsoft.azure azure-arm-parent - 1.2.0 - ../../parents/azure-arm-parent + 1.1.0 + ../../../pom.management.xml azure-mgmt-cosmosdb 1.0.0-beta diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/CassandraKeyspaceGetPropertiesResource.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/CassandraKeyspaceGetPropertiesResource.java new file mode 100644 index 0000000000000..20f749beaeef7 --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/CassandraKeyspaceGetPropertiesResource.java @@ -0,0 +1,90 @@ +/** + * 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.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The CassandraKeyspaceGetPropertiesResource model. + */ +public class CassandraKeyspaceGetPropertiesResource { + /** + * Name of the Cosmos DB Cassandra keyspace. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get name of the Cosmos DB Cassandra keyspace. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set name of the Cosmos DB Cassandra keyspace. + * + * @param id the id value to set + * @return the CassandraKeyspaceGetPropertiesResource object itself. + */ + public CassandraKeyspaceGetPropertiesResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/CassandraKeyspaceGetResults.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/CassandraKeyspaceGetResults.java index 27a5ea3861a52..b15c884832fe6 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/CassandraKeyspaceGetResults.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/CassandraKeyspaceGetResults.java @@ -23,26 +23,6 @@ * Type representing CassandraKeyspaceGetResults. */ public interface CassandraKeyspaceGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the cassandraKeyspaceGetResultsId value. - */ - String cassandraKeyspaceGetResultsId(); - /** * @return the id value. */ @@ -58,6 +38,11 @@ public interface CassandraKeyspaceGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the cassandraTableGetResultsId value. - */ - String cassandraTableGetResultsId(); - - /** - * @return the defaultTtl value. - */ - Integer defaultTtl(); - /** * @return the id value. */ @@ -64,9 +39,9 @@ public interface CassandraTableGetResults extends HasInner { + /** Static value Ascending for CompositePathSortOrder. */ + public static final CompositePathSortOrder ASCENDING = fromString("Ascending"); + + /** Static value Descending for CompositePathSortOrder. */ + public static final CompositePathSortOrder DESCENDING = fromString("Descending"); + + /** + * Creates or finds a CompositePathSortOrder from its string representation. + * @param name a name to look for + * @return the corresponding CompositePathSortOrder + */ + @JsonCreator + public static CompositePathSortOrder fromString(String name) { + return fromString(name, CompositePathSortOrder.class); + } + + /** + * @return known CompositePathSortOrder values + */ + public static Collection values() { + return values(CompositePathSortOrder.class); + } +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/GremlinDatabaseGetPropertiesResource.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/GremlinDatabaseGetPropertiesResource.java new file mode 100644 index 0000000000000..aafbbc40e2209 --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/GremlinDatabaseGetPropertiesResource.java @@ -0,0 +1,90 @@ +/** + * 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.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The GremlinDatabaseGetPropertiesResource model. + */ +public class GremlinDatabaseGetPropertiesResource { + /** + * Name of the Cosmos DB Gremlin database. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get name of the Cosmos DB Gremlin database. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set name of the Cosmos DB Gremlin database. + * + * @param id the id value to set + * @return the GremlinDatabaseGetPropertiesResource object itself. + */ + public GremlinDatabaseGetPropertiesResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/GremlinDatabaseGetResults.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/GremlinDatabaseGetResults.java index 5d98defbe3eb8..652c786ab0e05 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/GremlinDatabaseGetResults.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/GremlinDatabaseGetResults.java @@ -23,26 +23,6 @@ * Type representing GremlinDatabaseGetResults. */ public interface GremlinDatabaseGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the gremlinDatabaseGetResultsId value. - */ - String gremlinDatabaseGetResultsId(); - /** * @return the id value. */ @@ -58,6 +38,11 @@ public interface GremlinDatabaseGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the conflictResolutionPolicy value. - */ - ConflictResolutionPolicy conflictResolutionPolicy(); - - /** - * @return the defaultTtl value. - */ - Integer defaultTtl(); - - /** - * @return the gremlinGraphGetResultsId value. - */ - String gremlinGraphGetResultsId(); - /** * @return the id value. */ String id(); - /** - * @return the indexingPolicy value. - */ - IndexingPolicy indexingPolicy(); - /** * @return the location value. */ @@ -74,9 +39,9 @@ public interface GremlinGraphGetResults extends HasInner excludedPaths; + /** + * List of composite path list. + */ + @JsonProperty(value = "compositeIndexes") + private List> compositeIndexes; + + /** + * List of spatial specifics. + */ + @JsonProperty(value = "spatialIndexes") + private List spatialIndexes; + /** * Get indicates if the indexing policy is automatic. * @@ -120,4 +132,44 @@ public IndexingPolicy withExcludedPaths(List excludedPaths) { return this; } + /** + * Get list of composite path list. + * + * @return the compositeIndexes value + */ + public List> compositeIndexes() { + return this.compositeIndexes; + } + + /** + * Set list of composite path list. + * + * @param compositeIndexes the compositeIndexes value to set + * @return the IndexingPolicy object itself. + */ + public IndexingPolicy withCompositeIndexes(List> compositeIndexes) { + this.compositeIndexes = compositeIndexes; + return this; + } + + /** + * Get list of spatial specifics. + * + * @return the spatialIndexes value + */ + public List spatialIndexes() { + return this.spatialIndexes; + } + + /** + * Set list of spatial specifics. + * + * @param spatialIndexes the spatialIndexes value to set + * @return the IndexingPolicy object itself. + */ + public IndexingPolicy withSpatialIndexes(List spatialIndexes) { + this.spatialIndexes = spatialIndexes; + return this; + } + } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBCollectionGetPropertiesResource.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBCollectionGetPropertiesResource.java new file mode 100644 index 0000000000000..82ab438a05fc7 --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBCollectionGetPropertiesResource.java @@ -0,0 +1,144 @@ +/** + * 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.v2019_08_01; + +import java.util.Map; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The MongoDBCollectionGetPropertiesResource model. + */ +public class MongoDBCollectionGetPropertiesResource { + /** + * Name of the Cosmos DB MongoDB collection. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * A key-value pair of shard keys to be applied for the request. + */ + @JsonProperty(value = "shardKey") + private Map shardKey; + + /** + * List of index keys. + */ + @JsonProperty(value = "indexes") + private List indexes; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get name of the Cosmos DB MongoDB collection. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set name of the Cosmos DB MongoDB collection. + * + * @param id the id value to set + * @return the MongoDBCollectionGetPropertiesResource object itself. + */ + public MongoDBCollectionGetPropertiesResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get a key-value pair of shard keys to be applied for the request. + * + * @return the shardKey value + */ + public Map shardKey() { + return this.shardKey; + } + + /** + * Set a key-value pair of shard keys to be applied for the request. + * + * @param shardKey the shardKey value to set + * @return the MongoDBCollectionGetPropertiesResource object itself. + */ + public MongoDBCollectionGetPropertiesResource withShardKey(Map shardKey) { + this.shardKey = shardKey; + return this; + } + + /** + * Get list of index keys. + * + * @return the indexes value + */ + public List indexes() { + return this.indexes; + } + + /** + * Set list of index keys. + * + * @param indexes the indexes value to set + * @return the MongoDBCollectionGetPropertiesResource object itself. + */ + public MongoDBCollectionGetPropertiesResource withIndexes(List indexes) { + this.indexes = indexes; + return this; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBCollectionGetResults.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBCollectionGetResults.java index ce8b6e8eb273b..94c4814c5f0eb 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBCollectionGetResults.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBCollectionGetResults.java @@ -18,56 +18,30 @@ import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation.CosmosDBManager; import java.util.Map; -import java.util.List; /** * Type representing MongoDBCollectionGetResults. */ public interface MongoDBCollectionGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - /** * @return the id value. */ String id(); - /** - * @return the indexes value. - */ - List indexes(); - /** * @return the location value. */ String location(); - /** - * @return the mongoDBCollectionGetResultsId value. - */ - String mongoDBCollectionGetResultsId(); - /** * @return the name value. */ String name(); /** - * @return the shardKey value. + * @return the resource value. */ - Map shardKey(); + MongoDBCollectionGetPropertiesResource resource(); /** * @return the tags value. diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBDatabaseGetPropertiesResource.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBDatabaseGetPropertiesResource.java new file mode 100644 index 0000000000000..532b78f55a436 --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBDatabaseGetPropertiesResource.java @@ -0,0 +1,90 @@ +/** + * 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.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The MongoDBDatabaseGetPropertiesResource model. + */ +public class MongoDBDatabaseGetPropertiesResource { + /** + * Name of the Cosmos DB MongoDB database. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get name of the Cosmos DB MongoDB database. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set name of the Cosmos DB MongoDB database. + * + * @param id the id value to set + * @return the MongoDBDatabaseGetPropertiesResource object itself. + */ + public MongoDBDatabaseGetPropertiesResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBDatabaseGetResults.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBDatabaseGetResults.java index 33e0a6d6d1cd3..e4d1f35b8379a 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBDatabaseGetResults.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/MongoDBDatabaseGetResults.java @@ -23,21 +23,6 @@ * Type representing MongoDBDatabaseGetResults. */ public interface MongoDBDatabaseGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - /** * @return the id value. */ @@ -49,14 +34,14 @@ public interface MongoDBDatabaseGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the notebookServerEndpoint value. + */ + String notebookServerEndpoint(); + + /** + * @return the status value. + */ + String status(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the NotebookWorkspace definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDatabaseAccount, DefinitionStages.WithCreate { + } + + /** + * Grouping of NotebookWorkspace definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a NotebookWorkspace definition. + */ + interface Blank extends WithDatabaseAccount { + } + + /** + * The stage of the notebookworkspace definition allowing to specify DatabaseAccount. + */ + interface WithDatabaseAccount { + /** + * Specifies resourceGroupName, accountName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param accountName Cosmos DB database account name + * @return the next definition stage + */ + WithCreate withExistingDatabaseAccount(String resourceGroupName, String accountName); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable { + } + } + /** + * The template for a NotebookWorkspace update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable { + } + + /** + * Grouping of NotebookWorkspace update stages. + */ + interface UpdateStages { + } +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspaceConnectionInfoResult.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspaceConnectionInfoResult.java new file mode 100644 index 0000000000000..fc0ab50c8a5cc --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspaceConnectionInfoResult.java @@ -0,0 +1,30 @@ +/** + * 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.v2019_08_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation.CosmosDBManager; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation.NotebookWorkspaceConnectionInfoResultInner; + +/** + * Type representing NotebookWorkspaceConnectionInfoResult. + */ +public interface NotebookWorkspaceConnectionInfoResult extends HasInner, HasManager { + /** + * @return the authToken value. + */ + String authToken(); + + /** + * @return the notebookServerEndpoint value. + */ + String notebookServerEndpoint(); + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspaceCreateUpdateParameters.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspaceCreateUpdateParameters.java new file mode 100644 index 0000000000000..5aa503cbcf038 --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspaceCreateUpdateParameters.java @@ -0,0 +1,16 @@ +/** + * 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.v2019_08_01; + + +/** + * Parameters to create a notebook workspace resource. + */ +public class NotebookWorkspaceCreateUpdateParameters extends ARMProxyResource { +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspaces.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspaces.java new file mode 100644 index 0000000000000..6d85be287b5db --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/NotebookWorkspaces.java @@ -0,0 +1,81 @@ +/** + * 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.v2019_08_01; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Completable; +import rx.Observable; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation.NotebookWorkspacesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing NotebookWorkspaces. + */ +public interface NotebookWorkspaces extends SupportsCreating, HasInner { + /** + * Retrieves the connection info for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listConnectionInfoAsync(String resourceGroupName, String accountName); + + /** + * Regenerates the auth token for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable regenerateAuthTokenAsync(String resourceGroupName, String accountName); + + /** + * Starts the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable startAsync(String resourceGroupName, String accountName); + + /** + * Gets the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String accountName); + + /** + * Gets the notebook workspace resources of an existing Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listByDatabaseAccountAsync(String resourceGroupName, String accountName); + + /** + * Deletes the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Completable deleteAsync(String resourceGroupName, String accountName); + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SpatialSpec.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SpatialSpec.java new file mode 100644 index 0000000000000..fd270565709c5 --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SpatialSpec.java @@ -0,0 +1,71 @@ +/** + * 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.v2019_08_01; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SpatialSpec model. + */ +public class SpatialSpec { + /** + * The path for which the indexing behavior applies to. Index paths + * typically start with root and end with wildcard (/path/*). + */ + @JsonProperty(value = "path") + private String path; + + /** + * List of path's spatial type. + */ + @JsonProperty(value = "types") + private List types; + + /** + * Get the path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*). + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set the path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*). + * + * @param path the path value to set + * @return the SpatialSpec object itself. + */ + public SpatialSpec withPath(String path) { + this.path = path; + return this; + } + + /** + * Get list of path's spatial type. + * + * @return the types value + */ + public List types() { + return this.types; + } + + /** + * Set list of path's spatial type. + * + * @param types the types value to set + * @return the SpatialSpec object itself. + */ + public SpatialSpec withTypes(List types) { + this.types = types; + return this; + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SpatialType.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SpatialType.java new file mode 100644 index 0000000000000..67b9afdb0fc6e --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SpatialType.java @@ -0,0 +1,47 @@ +/** + * 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.v2019_08_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SpatialType. + */ +public final class SpatialType extends ExpandableStringEnum { + /** Static value Point for SpatialType. */ + public static final SpatialType POINT = fromString("Point"); + + /** Static value LineString for SpatialType. */ + public static final SpatialType LINE_STRING = fromString("LineString"); + + /** Static value Polygon for SpatialType. */ + public static final SpatialType POLYGON = fromString("Polygon"); + + /** Static value MultiPolygon for SpatialType. */ + public static final SpatialType MULTI_POLYGON = fromString("MultiPolygon"); + + /** + * Creates or finds a SpatialType from its string representation. + * @param name a name to look for + * @return the corresponding SpatialType + */ + @JsonCreator + public static SpatialType fromString(String name) { + return fromString(name, SpatialType.class); + } + + /** + * @return known SpatialType values + */ + public static Collection values() { + return values(SpatialType.class); + } +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlContainerGetPropertiesResource.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlContainerGetPropertiesResource.java new file mode 100644 index 0000000000000..73e063999ff3a --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlContainerGetPropertiesResource.java @@ -0,0 +1,224 @@ +/** + * 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.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SqlContainerGetPropertiesResource model. + */ +public class SqlContainerGetPropertiesResource { + /** + * Name of the Cosmos DB SQL container. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * The configuration of the indexing policy. By default, the indexing is + * automatic for all document paths within the container. + */ + @JsonProperty(value = "indexingPolicy") + private IndexingPolicy indexingPolicy; + + /** + * The configuration of the partition key to be used for partitioning data + * into multiple partitions. + */ + @JsonProperty(value = "partitionKey") + private ContainerPartitionKey partitionKey; + + /** + * Default time to live. + */ + @JsonProperty(value = "defaultTtl") + private Integer defaultTtl; + + /** + * The unique key policy configuration for specifying uniqueness + * constraints on documents in the collection in the Azure Cosmos DB + * service. + */ + @JsonProperty(value = "uniqueKeyPolicy") + private UniqueKeyPolicy uniqueKeyPolicy; + + /** + * The conflict resolution policy for the container. + */ + @JsonProperty(value = "conflictResolutionPolicy") + private ConflictResolutionPolicy conflictResolutionPolicy; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get name of the Cosmos DB SQL container. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set name of the Cosmos DB SQL container. + * + * @param id the id value to set + * @return the SqlContainerGetPropertiesResource object itself. + */ + public SqlContainerGetPropertiesResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. + * + * @return the indexingPolicy value + */ + public IndexingPolicy indexingPolicy() { + return this.indexingPolicy; + } + + /** + * Set the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. + * + * @param indexingPolicy the indexingPolicy value to set + * @return the SqlContainerGetPropertiesResource object itself. + */ + public SqlContainerGetPropertiesResource withIndexingPolicy(IndexingPolicy indexingPolicy) { + this.indexingPolicy = indexingPolicy; + return this; + } + + /** + * Get the configuration of the partition key to be used for partitioning data into multiple partitions. + * + * @return the partitionKey value + */ + public ContainerPartitionKey partitionKey() { + return this.partitionKey; + } + + /** + * Set the configuration of the partition key to be used for partitioning data into multiple partitions. + * + * @param partitionKey the partitionKey value to set + * @return the SqlContainerGetPropertiesResource object itself. + */ + public SqlContainerGetPropertiesResource withPartitionKey(ContainerPartitionKey partitionKey) { + this.partitionKey = partitionKey; + return this; + } + + /** + * Get default time to live. + * + * @return the defaultTtl value + */ + public Integer defaultTtl() { + return this.defaultTtl; + } + + /** + * Set default time to live. + * + * @param defaultTtl the defaultTtl value to set + * @return the SqlContainerGetPropertiesResource object itself. + */ + public SqlContainerGetPropertiesResource withDefaultTtl(Integer defaultTtl) { + this.defaultTtl = defaultTtl; + return this; + } + + /** + * Get the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. + * + * @return the uniqueKeyPolicy value + */ + public UniqueKeyPolicy uniqueKeyPolicy() { + return this.uniqueKeyPolicy; + } + + /** + * Set the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. + * + * @param uniqueKeyPolicy the uniqueKeyPolicy value to set + * @return the SqlContainerGetPropertiesResource object itself. + */ + public SqlContainerGetPropertiesResource withUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy) { + this.uniqueKeyPolicy = uniqueKeyPolicy; + return this; + } + + /** + * Get the conflict resolution policy for the container. + * + * @return the conflictResolutionPolicy value + */ + public ConflictResolutionPolicy conflictResolutionPolicy() { + return this.conflictResolutionPolicy; + } + + /** + * Set the conflict resolution policy for the container. + * + * @param conflictResolutionPolicy the conflictResolutionPolicy value to set + * @return the SqlContainerGetPropertiesResource object itself. + */ + public SqlContainerGetPropertiesResource withConflictResolutionPolicy(ConflictResolutionPolicy conflictResolutionPolicy) { + this.conflictResolutionPolicy = conflictResolutionPolicy; + return this; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlContainerGetResults.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlContainerGetResults.java index 7389bcc838793..48f5418423d5b 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlContainerGetResults.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlContainerGetResults.java @@ -23,41 +23,11 @@ * Type representing SqlContainerGetResults. */ public interface SqlContainerGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the conflictResolutionPolicy value. - */ - ConflictResolutionPolicy conflictResolutionPolicy(); - - /** - * @return the defaultTtl value. - */ - Integer defaultTtl(); - /** * @return the id value. */ String id(); - /** - * @return the indexingPolicy value. - */ - IndexingPolicy indexingPolicy(); - /** * @return the location value. */ @@ -69,14 +39,9 @@ public interface SqlContainerGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _colls value. - */ - String _colls(); - - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the _users value. - */ - String _users(); - /** * @return the id value. */ @@ -64,9 +39,9 @@ public interface SqlDatabaseGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the body value. - */ - String body(); - /** * @return the id value. */ @@ -59,9 +39,9 @@ public interface SqlStoredProcedureGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the body value. - */ - String body(); - /** * @return the id value. */ @@ -59,25 +39,15 @@ public interface SqlTriggerGetResults extends HasInner tags(); - /** - * @return the triggerOperation value. - */ - TriggerOperation triggerOperation(); - - /** - * @return the triggerType value. - */ - TriggerType triggerType(); - /** * @return the type value. */ diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlUserDefinedFunctionGetPropertiesResource.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlUserDefinedFunctionGetPropertiesResource.java new file mode 100644 index 0000000000000..134142dfdd3c9 --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlUserDefinedFunctionGetPropertiesResource.java @@ -0,0 +1,116 @@ +/** + * 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.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The SqlUserDefinedFunctionGetPropertiesResource model. + */ +public class SqlUserDefinedFunctionGetPropertiesResource { + /** + * Name of the Cosmos DB SQL userDefinedFunction. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /** + * Body of the User Defined Function. + */ + @JsonProperty(value = "body") + private String body; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get name of the Cosmos DB SQL userDefinedFunction. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Set name of the Cosmos DB SQL userDefinedFunction. + * + * @param id the id value to set + * @return the SqlUserDefinedFunctionGetPropertiesResource object itself. + */ + public SqlUserDefinedFunctionGetPropertiesResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get body of the User Defined Function. + * + * @return the body value + */ + public String body() { + return this.body; + } + + /** + * Set body of the User Defined Function. + * + * @param body the body value to set + * @return the SqlUserDefinedFunctionGetPropertiesResource object itself. + */ + public SqlUserDefinedFunctionGetPropertiesResource withBody(String body) { + this.body = body; + return this; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlUserDefinedFunctionGetResults.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlUserDefinedFunctionGetResults.java index 6dac2430ae088..42ae9a891794e 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlUserDefinedFunctionGetResults.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/SqlUserDefinedFunctionGetResults.java @@ -23,26 +23,6 @@ * Type representing SqlUserDefinedFunctionGetResults. */ public interface SqlUserDefinedFunctionGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - - /** - * @return the body value. - */ - String body(); - /** * @return the id value. */ @@ -59,9 +39,9 @@ public interface SqlUserDefinedFunctionGetResults extends HasInner, Indexable, Refreshable, Updatable, HasManager { - /** - * @return the _etag value. - */ - String _etag(); - - /** - * @return the _rid value. - */ - String _rid(); - - /** - * @return the _ts value. - */ - Object _ts(); - /** * @return the id value. */ @@ -55,9 +40,9 @@ public interface TableGetResults extends HasInner, Indexab String name(); /** - * @return the tableGetResultsId value. + * @return the resource value. */ - String tableGetResultsId(); + TableGetPropertiesResource resource(); /** * @return the tags value. diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/ThroughputSettingsGetPropertiesResource.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/ThroughputSettingsGetPropertiesResource.java new file mode 100644 index 0000000000000..00e08ffb2b295 --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/ThroughputSettingsGetPropertiesResource.java @@ -0,0 +1,120 @@ +/** + * 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.v2019_08_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ThroughputSettingsGetPropertiesResource model. + */ +public class ThroughputSettingsGetPropertiesResource { + /** + * Value of the Cosmos DB resource throughput. + */ + @JsonProperty(value = "throughput", required = true) + private int throughput; + + /** + * The minimum throughput of the resource. + */ + @JsonProperty(value = "minimumThroughput", access = JsonProperty.Access.WRITE_ONLY) + private String minimumThroughput; + + /** + * The throughput replace is pending. + */ + @JsonProperty(value = "offerReplacePending", access = JsonProperty.Access.WRITE_ONLY) + private String offerReplacePending; + + /** + * A system generated property. A unique identifier. + */ + @JsonProperty(value = "_rid", access = JsonProperty.Access.WRITE_ONLY) + private String _rid; + + /** + * A system generated property that denotes the last updated timestamp of + * the resource. + */ + @JsonProperty(value = "_ts", access = JsonProperty.Access.WRITE_ONLY) + private Object _ts; + + /** + * A system generated property representing the resource etag required for + * optimistic concurrency control. + */ + @JsonProperty(value = "_etag", access = JsonProperty.Access.WRITE_ONLY) + private String _etag; + + /** + * Get value of the Cosmos DB resource throughput. + * + * @return the throughput value + */ + public int throughput() { + return this.throughput; + } + + /** + * Set value of the Cosmos DB resource throughput. + * + * @param throughput the throughput value to set + * @return the ThroughputSettingsGetPropertiesResource object itself. + */ + public ThroughputSettingsGetPropertiesResource withThroughput(int throughput) { + this.throughput = throughput; + return this; + } + + /** + * Get the minimum throughput of the resource. + * + * @return the minimumThroughput value + */ + public String minimumThroughput() { + return this.minimumThroughput; + } + + /** + * Get the throughput replace is pending. + * + * @return the offerReplacePending value + */ + public String offerReplacePending() { + return this.offerReplacePending; + } + + /** + * Get a system generated property. A unique identifier. + * + * @return the _rid value + */ + public String _rid() { + return this._rid; + } + + /** + * Get a system generated property that denotes the last updated timestamp of the resource. + * + * @return the _ts value + */ + public Object _ts() { + return this._ts; + } + + /** + * Get a system generated property representing the resource etag required for optimistic concurrency control. + * + * @return the _etag value + */ + public String _etag() { + return this._etag; + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/ThroughputSettingsGetResults.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/ThroughputSettingsGetResults.java index 41df5e08e7ce0..da864a3e86f2e 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/ThroughputSettingsGetResults.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/ThroughputSettingsGetResults.java @@ -28,31 +28,21 @@ public interface ThroughputSettingsGetResults extends HasInner tags(); - /** - * @return the throughput value. - */ - int throughput(); - /** * @return the type value. */ diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraKeyspaceGetResultsImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraKeyspaceGetResultsImpl.java index 3ef1adcfa1456..fa727c0aa1a5b 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraKeyspaceGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraKeyspaceGetResultsImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01.CassandraKeyspaceCreateUpdateParameters; import java.util.Map; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.CassandraKeyspaceGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01.CassandraKeyspaceResource; import rx.functions.Func1; @@ -93,26 +94,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new CassandraKeyspaceCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public String cassandraKeyspaceGetResultsId() { - return this.inner().cassandraKeyspaceGetResultsId(); - } - @Override public String id() { return this.inner().id(); @@ -128,6 +109,11 @@ public String name() { return this.inner().name(); } + @Override + public CassandraKeyspaceGetPropertiesResource resource() { + return this.inner().resource(); + } + @Override public Map tags() { return this.inner().getTags(); diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraKeyspaceGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraKeyspaceGetResultsInner.java index e489f92bca3cf..0e45083c5aa18 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraKeyspaceGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraKeyspaceGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.CassandraKeyspaceGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -18,76 +19,29 @@ @JsonFlatten public class CassandraKeyspaceGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB Cassandra keyspace. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String cassandraKeyspaceGetResultsId; + @JsonProperty(value = "properties.resource") + private CassandraKeyspaceGetPropertiesResource resource; /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB Cassandra keyspace. + * Get the resource value. * - * @return the cassandraKeyspaceGetResultsId value + * @return the resource value */ - public String cassandraKeyspaceGetResultsId() { - return this.cassandraKeyspaceGetResultsId; + public CassandraKeyspaceGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB Cassandra keyspace. + * Set the resource value. * - * @param cassandraKeyspaceGetResultsId the cassandraKeyspaceGetResultsId value to set + * @param resource the resource value to set * @return the CassandraKeyspaceGetResultsInner object itself. */ - public CassandraKeyspaceGetResultsInner withCassandraKeyspaceGetResultsId(String cassandraKeyspaceGetResultsId) { - this.cassandraKeyspaceGetResultsId = cassandraKeyspaceGetResultsId; + public CassandraKeyspaceGetResultsInner withResource(CassandraKeyspaceGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraResourcesInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraResourcesInner.java index 9ab30a777f4e7..cab4aae1855b9 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraResourcesInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraResourcesInner.java @@ -41,7 +41,7 @@ public class CassandraResourcesInner { /** The Retrofit service to perform REST calls. */ private CassandraResourcesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of CassandraResourcesInner. @@ -49,7 +49,7 @@ public class CassandraResourcesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CassandraResourcesInner(Retrofit retrofit, CosmosDBImpl client) { + public CassandraResourcesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(CassandraResourcesService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraTableGetResultsImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraTableGetResultsImpl.java index d085eeada7e8c..8e3274bd4692b 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraTableGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraTableGetResultsImpl.java @@ -13,7 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01.CassandraTableCreateUpdateParameters; import java.util.Map; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.CassandraSchema; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.CassandraTableGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01.CassandraTableResource; import rx.functions.Func1; @@ -96,31 +96,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new CassandraTableCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public String cassandraTableGetResultsId() { - return this.inner().cassandraTableGetResultsId(); - } - - @Override - public Integer defaultTtl() { - return this.inner().defaultTtl(); - } - @Override public String id() { return this.inner().id(); @@ -137,8 +112,8 @@ public String name() { } @Override - public CassandraSchema schema() { - return this.inner().schema(); + public CassandraTableGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraTableGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraTableGetResultsInner.java index 6f354869ab576..14650045af858 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraTableGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CassandraTableGetResultsInner.java @@ -8,7 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.CassandraSchema; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.CassandraTableGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -19,128 +19,29 @@ @JsonFlatten public class CassandraTableGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB Cassandra table. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String cassandraTableGetResultsId; + @JsonProperty(value = "properties.resource") + private CassandraTableGetPropertiesResource resource; /** - * Time to live of the Cosmos DB Cassandra table. - */ - @JsonProperty(value = "properties.defaultTtl") - private Integer defaultTtl; - - /** - * Schema of the Cosmos DB Cassandra table. - */ - @JsonProperty(value = "properties.schema") - private CassandraSchema schema; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB Cassandra table. - * - * @return the cassandraTableGetResultsId value - */ - public String cassandraTableGetResultsId() { - return this.cassandraTableGetResultsId; - } - - /** - * Set name of the Cosmos DB Cassandra table. - * - * @param cassandraTableGetResultsId the cassandraTableGetResultsId value to set - * @return the CassandraTableGetResultsInner object itself. - */ - public CassandraTableGetResultsInner withCassandraTableGetResultsId(String cassandraTableGetResultsId) { - this.cassandraTableGetResultsId = cassandraTableGetResultsId; - return this; - } - - /** - * Get time to live of the Cosmos DB Cassandra table. + * Get the resource value. * - * @return the defaultTtl value + * @return the resource value */ - public Integer defaultTtl() { - return this.defaultTtl; + public CassandraTableGetPropertiesResource resource() { + return this.resource; } /** - * Set time to live of the Cosmos DB Cassandra table. + * Set the resource value. * - * @param defaultTtl the defaultTtl value to set + * @param resource the resource value to set * @return the CassandraTableGetResultsInner object itself. */ - public CassandraTableGetResultsInner withDefaultTtl(Integer defaultTtl) { - this.defaultTtl = defaultTtl; + public CassandraTableGetResultsInner withResource(CassandraTableGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get schema of the Cosmos DB Cassandra table. - * - * @return the schema value - */ - public CassandraSchema schema() { - return this.schema; - } - - /** - * Set schema of the Cosmos DB Cassandra table. - * - * @param schema the schema value to set - * @return the CassandraTableGetResultsInner object itself. - */ - public CassandraTableGetResultsInner withSchema(CassandraSchema schema) { - this.schema = schema; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionPartitionRegionsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionPartitionRegionsInner.java index 8345aa9b73c30..132b2a81dbb87 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionPartitionRegionsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionPartitionRegionsInner.java @@ -34,7 +34,7 @@ public class CollectionPartitionRegionsInner { /** The Retrofit service to perform REST calls. */ private CollectionPartitionRegionsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of CollectionPartitionRegionsInner. @@ -42,7 +42,7 @@ public class CollectionPartitionRegionsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CollectionPartitionRegionsInner(Retrofit retrofit, CosmosDBImpl client) { + public CollectionPartitionRegionsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(CollectionPartitionRegionsService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionPartitionsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionPartitionsInner.java index e561c1f5423a8..90ee1b8895d9f 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionPartitionsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionPartitionsInner.java @@ -34,7 +34,7 @@ public class CollectionPartitionsInner { /** The Retrofit service to perform REST calls. */ private CollectionPartitionsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of CollectionPartitionsInner. @@ -42,7 +42,7 @@ public class CollectionPartitionsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CollectionPartitionsInner(Retrofit retrofit, CosmosDBImpl client) { + public CollectionPartitionsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(CollectionPartitionsService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionRegionsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionRegionsInner.java index 72ffee68f346e..a0746c07a0397 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionRegionsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionRegionsInner.java @@ -34,7 +34,7 @@ public class CollectionRegionsInner { /** The Retrofit service to perform REST calls. */ private CollectionRegionsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of CollectionRegionsInner. @@ -42,7 +42,7 @@ public class CollectionRegionsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CollectionRegionsInner(Retrofit retrofit, CosmosDBImpl client) { + public CollectionRegionsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(CollectionRegionsService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionsInner.java index 59dc3902147aa..91dc0031da045 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CollectionsInner.java @@ -34,7 +34,7 @@ public class CollectionsInner { /** The Retrofit service to perform REST calls. */ private CollectionsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of CollectionsInner. @@ -42,7 +42,7 @@ public class CollectionsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public CollectionsInner(Retrofit retrofit, CosmosDBImpl client) { + public CollectionsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(CollectionsService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CosmosDBManagementClientImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CosmosDBManagementClientImpl.java new file mode 100644 index 0000000000000..ddb264dc342b1 --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CosmosDBManagementClientImpl.java @@ -0,0 +1,494 @@ +/** + * 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.v2019_08_01.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the CosmosDBManagementClientImpl class. + */ +public class CosmosDBManagementClientImpl extends AzureServiceClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** Azure subscription ID. */ + private String subscriptionId; + + /** + * Gets Azure subscription ID. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Azure subscription ID. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public CosmosDBManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** Version of the API to be used with the client request. The current version is 2019-08-01. */ + private String apiVersion; + + /** + * Gets Version of the API to be used with the client request. The current version is 2019-08-01. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The API version to use for this operation. */ + private String apiVersion1; + + /** + * Gets The API version to use for this operation. + * + * @return the apiVersion1 value. + */ + public String apiVersion1() { + return this.apiVersion1; + } + + /** + * Sets The API version to use for this operation. + * + * @param apiVersion1 the apiVersion1 value. + * @return the service client itself + */ + public CosmosDBManagementClientImpl withApiVersion1(String apiVersion1) { + this.apiVersion1 = apiVersion1; + return this; + } + + /** The ID of the target subscription. */ + private String subscriptionId1; + + /** + * Gets The ID of the target subscription. + * + * @return the subscriptionId1 value. + */ + public String subscriptionId1() { + return this.subscriptionId1; + } + + /** + * Sets The ID of the target subscription. + * + * @param subscriptionId1 the subscriptionId1 value. + * @return the service client itself + */ + public CosmosDBManagementClientImpl withSubscriptionId1(String subscriptionId1) { + this.subscriptionId1 = subscriptionId1; + return this; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public CosmosDBManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public CosmosDBManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public CosmosDBManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The DatabaseAccountsInner object to access its operations. + */ + private DatabaseAccountsInner databaseAccounts; + + /** + * Gets the DatabaseAccountsInner object to access its operations. + * @return the DatabaseAccountsInner object. + */ + public DatabaseAccountsInner databaseAccounts() { + return this.databaseAccounts; + } + + /** + * The OperationsInner object to access its operations. + */ + private OperationsInner operations; + + /** + * Gets the OperationsInner object to access its operations. + * @return the OperationsInner object. + */ + public OperationsInner operations() { + return this.operations; + } + + /** + * The DatabasesInner object to access its operations. + */ + private DatabasesInner databases; + + /** + * Gets the DatabasesInner object to access its operations. + * @return the DatabasesInner object. + */ + public DatabasesInner databases() { + return this.databases; + } + + /** + * The CollectionsInner object to access its operations. + */ + private CollectionsInner collections; + + /** + * Gets the CollectionsInner object to access its operations. + * @return the CollectionsInner object. + */ + public CollectionsInner collections() { + return this.collections; + } + + /** + * The CollectionRegionsInner object to access its operations. + */ + private CollectionRegionsInner collectionRegions; + + /** + * Gets the CollectionRegionsInner object to access its operations. + * @return the CollectionRegionsInner object. + */ + public CollectionRegionsInner collectionRegions() { + return this.collectionRegions; + } + + /** + * The DatabaseAccountRegionsInner object to access its operations. + */ + private DatabaseAccountRegionsInner databaseAccountRegions; + + /** + * Gets the DatabaseAccountRegionsInner object to access its operations. + * @return the DatabaseAccountRegionsInner object. + */ + public DatabaseAccountRegionsInner databaseAccountRegions() { + return this.databaseAccountRegions; + } + + /** + * The PercentileSourceTargetsInner object to access its operations. + */ + private PercentileSourceTargetsInner percentileSourceTargets; + + /** + * Gets the PercentileSourceTargetsInner object to access its operations. + * @return the PercentileSourceTargetsInner object. + */ + public PercentileSourceTargetsInner percentileSourceTargets() { + return this.percentileSourceTargets; + } + + /** + * The PercentileTargetsInner object to access its operations. + */ + private PercentileTargetsInner percentileTargets; + + /** + * Gets the PercentileTargetsInner object to access its operations. + * @return the PercentileTargetsInner object. + */ + public PercentileTargetsInner percentileTargets() { + return this.percentileTargets; + } + + /** + * The PercentilesInner object to access its operations. + */ + private PercentilesInner percentiles; + + /** + * Gets the PercentilesInner object to access its operations. + * @return the PercentilesInner object. + */ + public PercentilesInner percentiles() { + return this.percentiles; + } + + /** + * The CollectionPartitionRegionsInner object to access its operations. + */ + private CollectionPartitionRegionsInner collectionPartitionRegions; + + /** + * Gets the CollectionPartitionRegionsInner object to access its operations. + * @return the CollectionPartitionRegionsInner object. + */ + public CollectionPartitionRegionsInner collectionPartitionRegions() { + return this.collectionPartitionRegions; + } + + /** + * The CollectionPartitionsInner object to access its operations. + */ + private CollectionPartitionsInner collectionPartitions; + + /** + * Gets the CollectionPartitionsInner object to access its operations. + * @return the CollectionPartitionsInner object. + */ + public CollectionPartitionsInner collectionPartitions() { + return this.collectionPartitions; + } + + /** + * The PartitionKeyRangeIdsInner object to access its operations. + */ + private PartitionKeyRangeIdsInner partitionKeyRangeIds; + + /** + * Gets the PartitionKeyRangeIdsInner object to access its operations. + * @return the PartitionKeyRangeIdsInner object. + */ + public PartitionKeyRangeIdsInner partitionKeyRangeIds() { + return this.partitionKeyRangeIds; + } + + /** + * The PartitionKeyRangeIdRegionsInner object to access its operations. + */ + private PartitionKeyRangeIdRegionsInner partitionKeyRangeIdRegions; + + /** + * Gets the PartitionKeyRangeIdRegionsInner object to access its operations. + * @return the PartitionKeyRangeIdRegionsInner object. + */ + public PartitionKeyRangeIdRegionsInner partitionKeyRangeIdRegions() { + return this.partitionKeyRangeIdRegions; + } + + /** + * The SqlResourcesInner object to access its operations. + */ + private SqlResourcesInner sqlResources; + + /** + * Gets the SqlResourcesInner object to access its operations. + * @return the SqlResourcesInner object. + */ + public SqlResourcesInner sqlResources() { + return this.sqlResources; + } + + /** + * The MongoDBResourcesInner object to access its operations. + */ + private MongoDBResourcesInner mongoDBResources; + + /** + * Gets the MongoDBResourcesInner object to access its operations. + * @return the MongoDBResourcesInner object. + */ + public MongoDBResourcesInner mongoDBResources() { + return this.mongoDBResources; + } + + /** + * The TableResourcesInner object to access its operations. + */ + private TableResourcesInner tableResources; + + /** + * Gets the TableResourcesInner object to access its operations. + * @return the TableResourcesInner object. + */ + public TableResourcesInner tableResources() { + return this.tableResources; + } + + /** + * The CassandraResourcesInner object to access its operations. + */ + private CassandraResourcesInner cassandraResources; + + /** + * Gets the CassandraResourcesInner object to access its operations. + * @return the CassandraResourcesInner object. + */ + public CassandraResourcesInner cassandraResources() { + return this.cassandraResources; + } + + /** + * The GremlinResourcesInner object to access its operations. + */ + private GremlinResourcesInner gremlinResources; + + /** + * Gets the GremlinResourcesInner object to access its operations. + * @return the GremlinResourcesInner object. + */ + public GremlinResourcesInner gremlinResources() { + return this.gremlinResources; + } + + /** + * The NotebookWorkspacesInner object to access its operations. + */ + private NotebookWorkspacesInner notebookWorkspaces; + + /** + * Gets the NotebookWorkspacesInner object to access its operations. + * @return the NotebookWorkspacesInner object. + */ + public NotebookWorkspacesInner notebookWorkspaces() { + return this.notebookWorkspaces; + } + + /** + * Initializes an instance of CosmosDBManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public CosmosDBManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of CosmosDBManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public CosmosDBManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of CosmosDBManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public CosmosDBManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2019-08-01"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.databaseAccounts = new DatabaseAccountsInner(restClient().retrofit(), this); + this.operations = new OperationsInner(restClient().retrofit(), this); + this.databases = new DatabasesInner(restClient().retrofit(), this); + this.collections = new CollectionsInner(restClient().retrofit(), this); + this.collectionRegions = new CollectionRegionsInner(restClient().retrofit(), this); + this.databaseAccountRegions = new DatabaseAccountRegionsInner(restClient().retrofit(), this); + this.percentileSourceTargets = new PercentileSourceTargetsInner(restClient().retrofit(), this); + this.percentileTargets = new PercentileTargetsInner(restClient().retrofit(), this); + this.percentiles = new PercentilesInner(restClient().retrofit(), this); + this.collectionPartitionRegions = new CollectionPartitionRegionsInner(restClient().retrofit(), this); + this.collectionPartitions = new CollectionPartitionsInner(restClient().retrofit(), this); + this.partitionKeyRangeIds = new PartitionKeyRangeIdsInner(restClient().retrofit(), this); + this.partitionKeyRangeIdRegions = new PartitionKeyRangeIdRegionsInner(restClient().retrofit(), this); + this.sqlResources = new SqlResourcesInner(restClient().retrofit(), this); + this.mongoDBResources = new MongoDBResourcesInner(restClient().retrofit(), this); + this.tableResources = new TableResourcesInner(restClient().retrofit(), this); + this.cassandraResources = new CassandraResourcesInner(restClient().retrofit(), this); + this.gremlinResources = new GremlinResourcesInner(restClient().retrofit(), this); + this.notebookWorkspaces = new NotebookWorkspacesInner(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s, auto-generated)", super.userAgent(), "CosmosDBManagementClient", "2019-08-01"); + } +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CosmosDBManager.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CosmosDBManager.java index e1f9cc1894cf9..8cd540241a44a 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CosmosDBManager.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/CosmosDBManager.java @@ -34,13 +34,14 @@ import com.microsoft.azure.management.cosmosdb.v2019_08_01.TableResources; import com.microsoft.azure.management.cosmosdb.v2019_08_01.CassandraResources; import com.microsoft.azure.management.cosmosdb.v2019_08_01.GremlinResources; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces; import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; import com.microsoft.azure.arm.resources.implementation.ManagerCore; /** * Entry point to Azure CosmosDB resource management. */ -public final class CosmosDBManager extends ManagerCore { +public final class CosmosDBManager extends ManagerCore { private DatabaseAccounts databaseAccounts; private Operations operations; private Databases databases; @@ -59,6 +60,7 @@ public final class CosmosDBManager extends ManagerCore tags() { return this.inner().getTags(); diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinDatabaseGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinDatabaseGetResultsInner.java index 86d52661b4522..336b335091ba9 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinDatabaseGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinDatabaseGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.GremlinDatabaseGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -18,76 +19,29 @@ @JsonFlatten public class GremlinDatabaseGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB Gremlin database. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String gremlinDatabaseGetResultsId; + @JsonProperty(value = "properties.resource") + private GremlinDatabaseGetPropertiesResource resource; /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB Gremlin database. + * Get the resource value. * - * @return the gremlinDatabaseGetResultsId value + * @return the resource value */ - public String gremlinDatabaseGetResultsId() { - return this.gremlinDatabaseGetResultsId; + public GremlinDatabaseGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB Gremlin database. + * Set the resource value. * - * @param gremlinDatabaseGetResultsId the gremlinDatabaseGetResultsId value to set + * @param resource the resource value to set * @return the GremlinDatabaseGetResultsInner object itself. */ - public GremlinDatabaseGetResultsInner withGremlinDatabaseGetResultsId(String gremlinDatabaseGetResultsId) { - this.gremlinDatabaseGetResultsId = gremlinDatabaseGetResultsId; + public GremlinDatabaseGetResultsInner withResource(GremlinDatabaseGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinGraphGetResultsImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinGraphGetResultsImpl.java index 3228390594f5f..5a997a1dc687c 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinGraphGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinGraphGetResultsImpl.java @@ -13,10 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01.GremlinGraphCreateUpdateParameters; import java.util.Map; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.ConflictResolutionPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.IndexingPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.ContainerPartitionKey; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.UniqueKeyPolicy; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.GremlinGraphGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01.GremlinGraphResource; import rx.functions.Func1; @@ -99,46 +96,11 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new GremlinGraphCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public ConflictResolutionPolicy conflictResolutionPolicy() { - return this.inner().conflictResolutionPolicy(); - } - - @Override - public Integer defaultTtl() { - return this.inner().defaultTtl(); - } - - @Override - public String gremlinGraphGetResultsId() { - return this.inner().gremlinGraphGetResultsId(); - } - @Override public String id() { return this.inner().id(); } - @Override - public IndexingPolicy indexingPolicy() { - return this.inner().indexingPolicy(); - } - @Override public String location() { return this.inner().location(); @@ -150,8 +112,8 @@ public String name() { } @Override - public ContainerPartitionKey partitionKey() { - return this.inner().partitionKey(); + public GremlinGraphGetPropertiesResource resource() { + return this.inner().resource(); } @Override @@ -164,11 +126,6 @@ public String type() { return this.inner().type(); } - @Override - public UniqueKeyPolicy uniqueKeyPolicy() { - return this.inner().uniqueKeyPolicy(); - } - @Override public GremlinGraphGetResultsImpl withExistingGremlinDatabasis(String resourceGroupName, String accountName, String databaseName) { this.resourceGroupName = resourceGroupName; diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinGraphGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinGraphGetResultsInner.java index 695246e746e7c..27682b2694e74 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinGraphGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinGraphGetResultsInner.java @@ -8,10 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.IndexingPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.ContainerPartitionKey; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.UniqueKeyPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.ConflictResolutionPolicy; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.GremlinGraphGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -22,210 +19,29 @@ @JsonFlatten public class GremlinGraphGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB Gremlin graph. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String gremlinGraphGetResultsId; + @JsonProperty(value = "properties.resource") + private GremlinGraphGetPropertiesResource resource; /** - * The configuration of the indexing policy. By default, the indexing is - * automatic for all document paths within the graph. - */ - @JsonProperty(value = "properties.indexingPolicy") - private IndexingPolicy indexingPolicy; - - /** - * The configuration of the partition key to be used for partitioning data - * into multiple partitions. - */ - @JsonProperty(value = "properties.partitionKey") - private ContainerPartitionKey partitionKey; - - /** - * Default time to live. - */ - @JsonProperty(value = "properties.defaultTtl") - private Integer defaultTtl; - - /** - * The unique key policy configuration for specifying uniqueness - * constraints on documents in the collection in the Azure Cosmos DB - * service. - */ - @JsonProperty(value = "properties.uniqueKeyPolicy") - private UniqueKeyPolicy uniqueKeyPolicy; - - /** - * The conflict resolution policy for the graph. - */ - @JsonProperty(value = "properties.conflictResolutionPolicy") - private ConflictResolutionPolicy conflictResolutionPolicy; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB Gremlin graph. - * - * @return the gremlinGraphGetResultsId value - */ - public String gremlinGraphGetResultsId() { - return this.gremlinGraphGetResultsId; - } - - /** - * Set name of the Cosmos DB Gremlin graph. + * Get the resource value. * - * @param gremlinGraphGetResultsId the gremlinGraphGetResultsId value to set - * @return the GremlinGraphGetResultsInner object itself. + * @return the resource value */ - public GremlinGraphGetResultsInner withGremlinGraphGetResultsId(String gremlinGraphGetResultsId) { - this.gremlinGraphGetResultsId = gremlinGraphGetResultsId; - return this; + public GremlinGraphGetPropertiesResource resource() { + return this.resource; } /** - * Get the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph. + * Set the resource value. * - * @return the indexingPolicy value - */ - public IndexingPolicy indexingPolicy() { - return this.indexingPolicy; - } - - /** - * Set the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the graph. - * - * @param indexingPolicy the indexingPolicy value to set + * @param resource the resource value to set * @return the GremlinGraphGetResultsInner object itself. */ - public GremlinGraphGetResultsInner withIndexingPolicy(IndexingPolicy indexingPolicy) { - this.indexingPolicy = indexingPolicy; + public GremlinGraphGetResultsInner withResource(GremlinGraphGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get the configuration of the partition key to be used for partitioning data into multiple partitions. - * - * @return the partitionKey value - */ - public ContainerPartitionKey partitionKey() { - return this.partitionKey; - } - - /** - * Set the configuration of the partition key to be used for partitioning data into multiple partitions. - * - * @param partitionKey the partitionKey value to set - * @return the GremlinGraphGetResultsInner object itself. - */ - public GremlinGraphGetResultsInner withPartitionKey(ContainerPartitionKey partitionKey) { - this.partitionKey = partitionKey; - return this; - } - - /** - * Get default time to live. - * - * @return the defaultTtl value - */ - public Integer defaultTtl() { - return this.defaultTtl; - } - - /** - * Set default time to live. - * - * @param defaultTtl the defaultTtl value to set - * @return the GremlinGraphGetResultsInner object itself. - */ - public GremlinGraphGetResultsInner withDefaultTtl(Integer defaultTtl) { - this.defaultTtl = defaultTtl; - return this; - } - - /** - * Get the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. - * - * @return the uniqueKeyPolicy value - */ - public UniqueKeyPolicy uniqueKeyPolicy() { - return this.uniqueKeyPolicy; - } - - /** - * Set the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. - * - * @param uniqueKeyPolicy the uniqueKeyPolicy value to set - * @return the GremlinGraphGetResultsInner object itself. - */ - public GremlinGraphGetResultsInner withUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy) { - this.uniqueKeyPolicy = uniqueKeyPolicy; - return this; - } - - /** - * Get the conflict resolution policy for the graph. - * - * @return the conflictResolutionPolicy value - */ - public ConflictResolutionPolicy conflictResolutionPolicy() { - return this.conflictResolutionPolicy; - } - - /** - * Set the conflict resolution policy for the graph. - * - * @param conflictResolutionPolicy the conflictResolutionPolicy value to set - * @return the GremlinGraphGetResultsInner object itself. - */ - public GremlinGraphGetResultsInner withConflictResolutionPolicy(ConflictResolutionPolicy conflictResolutionPolicy) { - this.conflictResolutionPolicy = conflictResolutionPolicy; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinResourcesInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinResourcesInner.java index 0c6974a6a0b57..a97f510b73bb2 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinResourcesInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/GremlinResourcesInner.java @@ -41,7 +41,7 @@ public class GremlinResourcesInner { /** The Retrofit service to perform REST calls. */ private GremlinResourcesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of GremlinResourcesInner. @@ -49,7 +49,7 @@ public class GremlinResourcesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public GremlinResourcesInner(Retrofit retrofit, CosmosDBImpl client) { + public GremlinResourcesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(GremlinResourcesService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBCollectionGetResultsImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBCollectionGetResultsImpl.java index ec089b42dd7dc..2a105acec4818 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBCollectionGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBCollectionGetResultsImpl.java @@ -13,8 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01.MongoDBCollectionCreateUpdateParameters; import java.util.Map; -import java.util.List; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.MongoIndex; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.MongoDBCollectionGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01.MongoDBCollectionResource; import rx.functions.Func1; @@ -97,49 +96,24 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new MongoDBCollectionCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - @Override public String id() { return this.inner().id(); } - @Override - public List indexes() { - return this.inner().indexes(); - } - @Override public String location() { return this.inner().location(); } - @Override - public String mongoDBCollectionGetResultsId() { - return this.inner().mongoDBCollectionGetResultsId(); - } - @Override public String name() { return this.inner().name(); } @Override - public Map shardKey() { - return this.inner().shardKey(); + public MongoDBCollectionGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBCollectionGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBCollectionGetResultsInner.java index 1a4c72479c36f..8fb408966c21f 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBCollectionGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBCollectionGetResultsInner.java @@ -8,9 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; -import java.util.Map; -import java.util.List; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.MongoIndex; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.MongoDBCollectionGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -21,128 +19,29 @@ @JsonFlatten public class MongoDBCollectionGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB MongoDB collection. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String mongoDBCollectionGetResultsId; + @JsonProperty(value = "properties.resource") + private MongoDBCollectionGetPropertiesResource resource; /** - * A key-value pair of shard keys to be applied for the request. - */ - @JsonProperty(value = "properties.shardKey") - private Map shardKey; - - /** - * List of index keys. - */ - @JsonProperty(value = "properties.indexes") - private List indexes; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB MongoDB collection. - * - * @return the mongoDBCollectionGetResultsId value - */ - public String mongoDBCollectionGetResultsId() { - return this.mongoDBCollectionGetResultsId; - } - - /** - * Set name of the Cosmos DB MongoDB collection. - * - * @param mongoDBCollectionGetResultsId the mongoDBCollectionGetResultsId value to set - * @return the MongoDBCollectionGetResultsInner object itself. - */ - public MongoDBCollectionGetResultsInner withMongoDBCollectionGetResultsId(String mongoDBCollectionGetResultsId) { - this.mongoDBCollectionGetResultsId = mongoDBCollectionGetResultsId; - return this; - } - - /** - * Get a key-value pair of shard keys to be applied for the request. + * Get the resource value. * - * @return the shardKey value + * @return the resource value */ - public Map shardKey() { - return this.shardKey; + public MongoDBCollectionGetPropertiesResource resource() { + return this.resource; } /** - * Set a key-value pair of shard keys to be applied for the request. + * Set the resource value. * - * @param shardKey the shardKey value to set + * @param resource the resource value to set * @return the MongoDBCollectionGetResultsInner object itself. */ - public MongoDBCollectionGetResultsInner withShardKey(Map shardKey) { - this.shardKey = shardKey; + public MongoDBCollectionGetResultsInner withResource(MongoDBCollectionGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get list of index keys. - * - * @return the indexes value - */ - public List indexes() { - return this.indexes; - } - - /** - * Set list of index keys. - * - * @param indexes the indexes value to set - * @return the MongoDBCollectionGetResultsInner object itself. - */ - public MongoDBCollectionGetResultsInner withIndexes(List indexes) { - this.indexes = indexes; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBDatabaseGetResultsImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBDatabaseGetResultsImpl.java index ecc454f0a2bd3..5006c944be9b5 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBDatabaseGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBDatabaseGetResultsImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01.MongoDBDatabaseCreateUpdateParameters; import java.util.Map; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.MongoDBDatabaseGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01.MongoDBDatabaseResource; import rx.functions.Func1; @@ -93,21 +94,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new MongoDBDatabaseCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - @Override public String id() { return this.inner().id(); @@ -119,13 +105,13 @@ public String location() { } @Override - public String mongoDBDatabaseGetResultsId() { - return this.inner().mongoDBDatabaseGetResultsId(); + public String name() { + return this.inner().name(); } @Override - public String name() { - return this.inner().name(); + public MongoDBDatabaseGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBDatabaseGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBDatabaseGetResultsInner.java index 7a18cb57e9030..238c7b0215064 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBDatabaseGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBDatabaseGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.MongoDBDatabaseGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -18,76 +19,29 @@ @JsonFlatten public class MongoDBDatabaseGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB MongoDB database. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String mongoDBDatabaseGetResultsId; + @JsonProperty(value = "properties.resource") + private MongoDBDatabaseGetPropertiesResource resource; /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB MongoDB database. + * Get the resource value. * - * @return the mongoDBDatabaseGetResultsId value + * @return the resource value */ - public String mongoDBDatabaseGetResultsId() { - return this.mongoDBDatabaseGetResultsId; + public MongoDBDatabaseGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB MongoDB database. + * Set the resource value. * - * @param mongoDBDatabaseGetResultsId the mongoDBDatabaseGetResultsId value to set + * @param resource the resource value to set * @return the MongoDBDatabaseGetResultsInner object itself. */ - public MongoDBDatabaseGetResultsInner withMongoDBDatabaseGetResultsId(String mongoDBDatabaseGetResultsId) { - this.mongoDBDatabaseGetResultsId = mongoDBDatabaseGetResultsId; + public MongoDBDatabaseGetResultsInner withResource(MongoDBDatabaseGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBResourcesInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBResourcesInner.java index 533026d24512b..6d2882139a2b9 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBResourcesInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/MongoDBResourcesInner.java @@ -41,7 +41,7 @@ public class MongoDBResourcesInner { /** The Retrofit service to perform REST calls. */ private MongoDBResourcesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of MongoDBResourcesInner. @@ -49,7 +49,7 @@ public class MongoDBResourcesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public MongoDBResourcesInner(Retrofit retrofit, CosmosDBImpl client) { + public MongoDBResourcesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(MongoDBResourcesService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceConnectionInfoResultImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceConnectionInfoResultImpl.java new file mode 100644 index 0000000000000..cf6c832f9d015 --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceConnectionInfoResultImpl.java @@ -0,0 +1,36 @@ +/** + * 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.v2019_08_01.implementation; + +import com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaceConnectionInfoResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class NotebookWorkspaceConnectionInfoResultImpl extends WrapperImpl implements NotebookWorkspaceConnectionInfoResult { + private final CosmosDBManager manager; + NotebookWorkspaceConnectionInfoResultImpl(NotebookWorkspaceConnectionInfoResultInner inner, CosmosDBManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public CosmosDBManager manager() { + return this.manager; + } + + @Override + public String authToken() { + return this.inner().authToken(); + } + + @Override + public String notebookServerEndpoint() { + return this.inner().notebookServerEndpoint(); + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceConnectionInfoResultInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceConnectionInfoResultInner.java new file mode 100644 index 0000000000000..68d38550ba85c --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceConnectionInfoResultInner.java @@ -0,0 +1,48 @@ +/** + * 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.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The connection info for the given notebook workspace. + */ +public class NotebookWorkspaceConnectionInfoResultInner { + /** + * Specifies auth token used for connecting to Notebook server (uses + * token-based auth). + */ + @JsonProperty(value = "authToken", access = JsonProperty.Access.WRITE_ONLY) + private String authToken; + + /** + * Specifies the endpoint of Notebook server. + */ + @JsonProperty(value = "notebookServerEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String notebookServerEndpoint; + + /** + * Get specifies auth token used for connecting to Notebook server (uses token-based auth). + * + * @return the authToken value + */ + public String authToken() { + return this.authToken; + } + + /** + * Get specifies the endpoint of Notebook server. + * + * @return the notebookServerEndpoint value + */ + public String notebookServerEndpoint() { + return this.notebookServerEndpoint; + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceImpl.java new file mode 100644 index 0000000000000..bcda9d46a2c84 --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceImpl.java @@ -0,0 +1,102 @@ +/** + * 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.v2019_08_01.implementation; + +import com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspace; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; + +class NotebookWorkspaceImpl extends CreatableUpdatableImpl implements NotebookWorkspace, NotebookWorkspace.Definition, NotebookWorkspace.Update { + private final CosmosDBManager manager; + private String resourceGroupName; + private String accountName; + + NotebookWorkspaceImpl(String name, CosmosDBManager manager) { + super(name, new NotebookWorkspaceInner()); + this.manager = manager; + // Set resource name + this.accountName = name; + // + } + + NotebookWorkspaceImpl(NotebookWorkspaceInner inner, CosmosDBManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.accountName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "databaseAccounts"); + // + } + + @Override + public CosmosDBManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + NotebookWorkspacesInner client = this.manager().inner().notebookWorkspaces(); + return client.createOrUpdateAsync(this.resourceGroupName, this.accountName) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + NotebookWorkspacesInner client = this.manager().inner().notebookWorkspaces(); + return client.createOrUpdateAsync(this.resourceGroupName, this.accountName) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + NotebookWorkspacesInner client = this.manager().inner().notebookWorkspaces(); + return client.getAsync(this.resourceGroupName, this.accountName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String notebookServerEndpoint() { + return this.inner().notebookServerEndpoint(); + } + + @Override + public String status() { + return this.inner().status(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public NotebookWorkspaceImpl withExistingDatabaseAccount(String resourceGroupName, String accountName) { + this.resourceGroupName = resourceGroupName; + this.accountName = accountName; + return this; + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceInner.java new file mode 100644 index 0000000000000..1e7a71469402e --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspaceInner.java @@ -0,0 +1,51 @@ +/** + * 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.v2019_08_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMProxyResource; + +/** + * A notebook workspace resource. + */ +@JsonFlatten +public class NotebookWorkspaceInner extends ARMProxyResource { + /** + * Specifies the endpoint of Notebook server. + */ + @JsonProperty(value = "properties.notebookServerEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String notebookServerEndpoint; + + /** + * Status of the notebook workspace. Possible values are: Creating, Online, + * Deleting, Failed, Updating. + */ + @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY) + private String status; + + /** + * Get specifies the endpoint of Notebook server. + * + * @return the notebookServerEndpoint value + */ + public String notebookServerEndpoint() { + return this.notebookServerEndpoint; + } + + /** + * Get status of the notebook workspace. Possible values are: Creating, Online, Deleting, Failed, Updating. + * + * @return the status value + */ + public String status() { + return this.status; + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspacesImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspacesImpl.java new file mode 100644 index 0000000000000..248176426dd8f --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspacesImpl.java @@ -0,0 +1,110 @@ +/** + * 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.v2019_08_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces; +import rx.Completable; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaceConnectionInfoResult; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspace; + +class NotebookWorkspacesImpl extends WrapperImpl implements NotebookWorkspaces { + private final CosmosDBManager manager; + + NotebookWorkspacesImpl(CosmosDBManager manager) { + super(manager.inner().notebookWorkspaces()); + this.manager = manager; + } + + public CosmosDBManager manager() { + return this.manager; + } + + @Override + public NotebookWorkspaceImpl define(String name) { + return wrapModel(name); + } + + private NotebookWorkspaceImpl wrapModel(NotebookWorkspaceInner inner) { + return new NotebookWorkspaceImpl(inner, manager()); + } + + private NotebookWorkspaceImpl wrapModel(String name) { + return new NotebookWorkspaceImpl(name, this.manager()); + } + + @Override + public Observable listConnectionInfoAsync(String resourceGroupName, String accountName) { + NotebookWorkspacesInner client = this.inner(); + return client.listConnectionInfoAsync(resourceGroupName, accountName) + .map(new Func1() { + @Override + public NotebookWorkspaceConnectionInfoResult call(NotebookWorkspaceConnectionInfoResultInner inner) { + return new NotebookWorkspaceConnectionInfoResultImpl(inner, manager()); + } + }); + } + + @Override + public Completable regenerateAuthTokenAsync(String resourceGroupName, String accountName) { + NotebookWorkspacesInner client = this.inner(); + return client.regenerateAuthTokenAsync(resourceGroupName, accountName).toCompletable(); + } + + @Override + public Completable startAsync(String resourceGroupName, String accountName) { + NotebookWorkspacesInner client = this.inner(); + return client.startAsync(resourceGroupName, accountName).toCompletable(); + } + + @Override + public Observable listByDatabaseAccountAsync(String resourceGroupName, String accountName) { + NotebookWorkspacesInner client = this.inner(); + return client.listByDatabaseAccountAsync(resourceGroupName, accountName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public NotebookWorkspace call(NotebookWorkspaceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String accountName) { + NotebookWorkspacesInner client = this.inner(); + return client.getAsync(resourceGroupName, accountName) + .flatMap(new Func1>() { + @Override + public Observable call(NotebookWorkspaceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((NotebookWorkspace)wrapModel(inner)); + } + } + }); + } + + @Override + public Completable deleteAsync(String resourceGroupName, String accountName) { + NotebookWorkspacesInner client = this.inner(); + return client.deleteAsync(resourceGroupName, accountName).toCompletable(); + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspacesInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspacesInner.java new file mode 100644 index 0000000000000..84248cd436a65 --- /dev/null +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/NotebookWorkspacesInner.java @@ -0,0 +1,997 @@ +/** + * 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.v2019_08_01.implementation; + +import com.microsoft.azure.arm.collection.InnerSupportsDelete; +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.ErrorResponseException; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaceCreateUpdateParameters; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.POST; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in NotebookWorkspaces. + */ +public class NotebookWorkspacesInner implements InnerSupportsDelete { + /** The Retrofit service to perform REST calls. */ + private NotebookWorkspacesService service; + /** The service client containing this operation class. */ + private CosmosDBManagementClientImpl client; + + /** + * Initializes an instance of NotebookWorkspacesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public NotebookWorkspacesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { + this.service = retrofit.create(NotebookWorkspacesService.class); + this.client = client; + } + + /** + * The interface defining all the services for NotebookWorkspaces to be + * used by Retrofit to perform actually REST calls. + */ + interface NotebookWorkspacesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces listByDatabaseAccount" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces") + Observable> listByDatabaseAccount(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("notebookWorkspaceName") String notebookWorkspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("notebookWorkspaceName") String notebookWorkspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body NotebookWorkspaceCreateUpdateParameters notebookCreateUpdateParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces beginCreateOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}") + Observable> beginCreateOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("notebookWorkspaceName") String notebookWorkspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body NotebookWorkspaceCreateUpdateParameters notebookCreateUpdateParameters, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("notebookWorkspaceName") String notebookWorkspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces beginDelete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}", method = "DELETE", hasBody = true) + Observable> beginDelete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("notebookWorkspaceName") String notebookWorkspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces listConnectionInfo" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/listConnectionInfo") + Observable> listConnectionInfo(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("notebookWorkspaceName") String notebookWorkspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces regenerateAuthToken" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken") + Observable> regenerateAuthToken(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("notebookWorkspaceName") String notebookWorkspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces beginRegenerateAuthToken" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/regenerateAuthToken") + Observable> beginRegenerateAuthToken(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("notebookWorkspaceName") String notebookWorkspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces start" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start") + Observable> start(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("notebookWorkspaceName") String notebookWorkspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.NotebookWorkspaces beginStart" }) + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/notebookWorkspaces/{notebookWorkspaceName}/start") + Observable> beginStart(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("notebookWorkspaceName") String notebookWorkspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets the notebook workspace resources of an existing Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<NotebookWorkspaceInner> object if successful. + */ + public List listByDatabaseAccount(String resourceGroupName, String accountName) { + return listByDatabaseAccountWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets the notebook workspace resources of an existing Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByDatabaseAccountAsync(String resourceGroupName, String accountName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listByDatabaseAccountWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets the notebook workspace resources of an existing Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NotebookWorkspaceInner> object + */ + public Observable> listByDatabaseAccountAsync(String resourceGroupName, String accountName) { + return listByDatabaseAccountWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets the notebook workspace resources of an existing Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<NotebookWorkspaceInner> object + */ + public Observable>> listByDatabaseAccountWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByDatabaseAccount(this.client.subscriptionId(), resourceGroupName, accountName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByDatabaseAccountDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByDatabaseAccountDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Gets the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NotebookWorkspaceInner object if successful. + */ + public NotebookWorkspaceInner get(String resourceGroupName, String accountName) { + return getWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Gets the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Gets the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NotebookWorkspaceInner object + */ + public Observable getAsync(String resourceGroupName, String accountName) { + return getWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, NotebookWorkspaceInner>() { + @Override + public NotebookWorkspaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NotebookWorkspaceInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String notebookWorkspaceName = "default"; + return service.get(this.client.subscriptionId(), resourceGroupName, accountName, notebookWorkspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Creates the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NotebookWorkspaceInner object if successful. + */ + public NotebookWorkspaceInner createOrUpdate(String resourceGroupName, String accountName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); + } + + /** + * Creates the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Creates the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable createOrUpdateAsync(String resourceGroupName, String accountName) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, NotebookWorkspaceInner>() { + @Override + public NotebookWorkspaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String notebookWorkspaceName = "default"; + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, accountName, notebookWorkspaceName, this.client.apiVersion(), this.client.acceptLanguage(), notebookCreateUpdateParameters, this.client.userAgent()); + return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Creates the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NotebookWorkspaceInner object if successful. + */ + public NotebookWorkspaceInner beginCreateOrUpdate(String resourceGroupName, String accountName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Creates the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Creates the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NotebookWorkspaceInner object + */ + public Observable beginCreateOrUpdateAsync(String resourceGroupName, String accountName) { + return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, NotebookWorkspaceInner>() { + @Override + public NotebookWorkspaceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NotebookWorkspaceInner object + */ + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String notebookWorkspaceName = "default"; + return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, accountName, notebookWorkspaceName, this.client.apiVersion(), this.client.acceptLanguage(), notebookCreateUpdateParameters, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginCreateOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginCreateOrUpdateDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Deletes the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String accountName) { + deleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); + } + + /** + * Deletes the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Deletes the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable deleteAsync(String resourceGroupName, String accountName) { + return deleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String notebookWorkspaceName = "default"; + Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, accountName, notebookWorkspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Deletes the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginDelete(String resourceGroupName, String accountName) { + beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Deletes the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginDeleteAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Deletes the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginDeleteAsync(String resourceGroupName, String accountName) { + return beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the notebook workspace for a Cosmos DB account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginDeleteWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String notebookWorkspaceName = "default"; + return service.beginDelete(this.client.subscriptionId(), resourceGroupName, accountName, notebookWorkspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginDeleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginDeleteDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(202, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Retrieves the connection info for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the NotebookWorkspaceConnectionInfoResultInner object if successful. + */ + public NotebookWorkspaceConnectionInfoResultInner listConnectionInfo(String resourceGroupName, String accountName) { + return listConnectionInfoWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Retrieves the connection info for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture listConnectionInfoAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(listConnectionInfoWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Retrieves the connection info for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NotebookWorkspaceConnectionInfoResultInner object + */ + public Observable listConnectionInfoAsync(String resourceGroupName, String accountName) { + return listConnectionInfoWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, NotebookWorkspaceConnectionInfoResultInner>() { + @Override + public NotebookWorkspaceConnectionInfoResultInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Retrieves the connection info for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the NotebookWorkspaceConnectionInfoResultInner object + */ + public Observable> listConnectionInfoWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String notebookWorkspaceName = "default"; + return service.listConnectionInfo(this.client.subscriptionId(), resourceGroupName, accountName, notebookWorkspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = listConnectionInfoDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse listConnectionInfoDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Regenerates the auth token for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void regenerateAuthToken(String resourceGroupName, String accountName) { + regenerateAuthTokenWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); + } + + /** + * Regenerates the auth token for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture regenerateAuthTokenAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(regenerateAuthTokenWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Regenerates the auth token for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable regenerateAuthTokenAsync(String resourceGroupName, String accountName) { + return regenerateAuthTokenWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerates the auth token for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> regenerateAuthTokenWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String notebookWorkspaceName = "default"; + Observable> observable = service.regenerateAuthToken(this.client.subscriptionId(), resourceGroupName, accountName, notebookWorkspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Regenerates the auth token for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginRegenerateAuthToken(String resourceGroupName, String accountName) { + beginRegenerateAuthTokenWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Regenerates the auth token for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginRegenerateAuthTokenAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRegenerateAuthTokenWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Regenerates the auth token for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginRegenerateAuthTokenAsync(String resourceGroupName, String accountName) { + return beginRegenerateAuthTokenWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Regenerates the auth token for the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginRegenerateAuthTokenWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String notebookWorkspaceName = "default"; + return service.beginRegenerateAuthToken(this.client.subscriptionId(), resourceGroupName, accountName, notebookWorkspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginRegenerateAuthTokenDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginRegenerateAuthTokenDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + + /** + * Starts the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void start(String resourceGroupName, String accountName) { + startWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().last().body(); + } + + /** + * Starts the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture startAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(startWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Starts the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable startAsync(String resourceGroupName, String accountName) { + return startWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + public Observable> startWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String notebookWorkspaceName = "default"; + Observable> observable = service.start(this.client.subscriptionId(), resourceGroupName, accountName, notebookWorkspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()); + return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); + } + + /** + * Starts the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws ErrorResponseException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void beginStart(String resourceGroupName, String accountName) { + beginStartWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); + } + + /** + * Starts the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture beginStartAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginStartWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback); + } + + /** + * Starts the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable beginStartAsync(String resourceGroupName, String accountName) { + return beginStartWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Starts the notebook workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> beginStartWithServiceResponseAsync(String resourceGroupName, String accountName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (accountName == null) { + throw new IllegalArgumentException("Parameter accountName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String notebookWorkspaceName = "default"; + return service.beginStart(this.client.subscriptionId(), resourceGroupName, accountName, notebookWorkspaceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = beginStartDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse beginStartDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) + .registerError(ErrorResponseException.class) + .build(response); + } + +} diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/OperationsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/OperationsInner.java index d455a69b7693a..38a51ad8ba96b 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/OperationsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/OperationsInner.java @@ -37,7 +37,7 @@ public class OperationsInner { /** The Retrofit service to perform REST calls. */ private OperationsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of OperationsInner. @@ -45,7 +45,7 @@ public class OperationsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public OperationsInner(Retrofit retrofit, CosmosDBImpl client) { + public OperationsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(OperationsService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PartitionKeyRangeIdRegionsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PartitionKeyRangeIdRegionsInner.java index 56b6ab803af14..1f1d4b9968601 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PartitionKeyRangeIdRegionsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PartitionKeyRangeIdRegionsInner.java @@ -34,7 +34,7 @@ public class PartitionKeyRangeIdRegionsInner { /** The Retrofit service to perform REST calls. */ private PartitionKeyRangeIdRegionsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of PartitionKeyRangeIdRegionsInner. @@ -42,7 +42,7 @@ public class PartitionKeyRangeIdRegionsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PartitionKeyRangeIdRegionsInner(Retrofit retrofit, CosmosDBImpl client) { + public PartitionKeyRangeIdRegionsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(PartitionKeyRangeIdRegionsService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PartitionKeyRangeIdsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PartitionKeyRangeIdsInner.java index 9e5dcca70190d..5104320265a4a 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PartitionKeyRangeIdsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PartitionKeyRangeIdsInner.java @@ -34,7 +34,7 @@ public class PartitionKeyRangeIdsInner { /** The Retrofit service to perform REST calls. */ private PartitionKeyRangeIdsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of PartitionKeyRangeIdsInner. @@ -42,7 +42,7 @@ public class PartitionKeyRangeIdsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PartitionKeyRangeIdsInner(Retrofit retrofit, CosmosDBImpl client) { + public PartitionKeyRangeIdsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(PartitionKeyRangeIdsService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PercentileSourceTargetsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PercentileSourceTargetsInner.java index a7dcd51f6135e..b14b6574d30b2 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PercentileSourceTargetsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PercentileSourceTargetsInner.java @@ -34,7 +34,7 @@ public class PercentileSourceTargetsInner { /** The Retrofit service to perform REST calls. */ private PercentileSourceTargetsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of PercentileSourceTargetsInner. @@ -42,7 +42,7 @@ public class PercentileSourceTargetsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PercentileSourceTargetsInner(Retrofit retrofit, CosmosDBImpl client) { + public PercentileSourceTargetsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(PercentileSourceTargetsService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PercentileTargetsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PercentileTargetsInner.java index 0a486375b30c9..530fb626b2bd8 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PercentileTargetsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PercentileTargetsInner.java @@ -34,7 +34,7 @@ public class PercentileTargetsInner { /** The Retrofit service to perform REST calls. */ private PercentileTargetsService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of PercentileTargetsInner. @@ -42,7 +42,7 @@ public class PercentileTargetsInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PercentileTargetsInner(Retrofit retrofit, CosmosDBImpl client) { + public PercentileTargetsInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(PercentileTargetsService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PercentilesInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PercentilesInner.java index 9f26690576cb1..62d3eb400d060 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PercentilesInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/PercentilesInner.java @@ -34,7 +34,7 @@ public class PercentilesInner { /** The Retrofit service to perform REST calls. */ private PercentilesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of PercentilesInner. @@ -42,7 +42,7 @@ public class PercentilesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public PercentilesInner(Retrofit retrofit, CosmosDBImpl client) { + public PercentilesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(PercentilesService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlContainerGetResultsImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlContainerGetResultsImpl.java index 4b92621603fdc..64e5a67f100f4 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlContainerGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlContainerGetResultsImpl.java @@ -13,10 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlContainerCreateUpdateParameters; import java.util.Map; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.ConflictResolutionPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.IndexingPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.ContainerPartitionKey; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.UniqueKeyPolicy; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlContainerGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlContainerResource; import rx.functions.Func1; @@ -99,41 +96,11 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new SqlContainerCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public ConflictResolutionPolicy conflictResolutionPolicy() { - return this.inner().conflictResolutionPolicy(); - } - - @Override - public Integer defaultTtl() { - return this.inner().defaultTtl(); - } - @Override public String id() { return this.inner().id(); } - @Override - public IndexingPolicy indexingPolicy() { - return this.inner().indexingPolicy(); - } - @Override public String location() { return this.inner().location(); @@ -145,13 +112,8 @@ public String name() { } @Override - public ContainerPartitionKey partitionKey() { - return this.inner().partitionKey(); - } - - @Override - public String sqlContainerGetResultsId() { - return this.inner().sqlContainerGetResultsId(); + public SqlContainerGetPropertiesResource resource() { + return this.inner().resource(); } @Override @@ -164,11 +126,6 @@ public String type() { return this.inner().type(); } - @Override - public UniqueKeyPolicy uniqueKeyPolicy() { - return this.inner().uniqueKeyPolicy(); - } - @Override public SqlContainerGetResultsImpl withExistingSqlDatabasis(String resourceGroupName, String accountName, String databaseName) { this.resourceGroupName = resourceGroupName; diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlContainerGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlContainerGetResultsInner.java index 9ba93b2a6d3e0..21db0653748be 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlContainerGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlContainerGetResultsInner.java @@ -8,10 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.IndexingPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.ContainerPartitionKey; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.UniqueKeyPolicy; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.ConflictResolutionPolicy; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlContainerGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -22,210 +19,29 @@ @JsonFlatten public class SqlContainerGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB SQL container. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String sqlContainerGetResultsId; + @JsonProperty(value = "properties.resource") + private SqlContainerGetPropertiesResource resource; /** - * The configuration of the indexing policy. By default, the indexing is - * automatic for all document paths within the container. - */ - @JsonProperty(value = "properties.indexingPolicy") - private IndexingPolicy indexingPolicy; - - /** - * The configuration of the partition key to be used for partitioning data - * into multiple partitions. - */ - @JsonProperty(value = "properties.partitionKey") - private ContainerPartitionKey partitionKey; - - /** - * Default time to live. - */ - @JsonProperty(value = "properties.defaultTtl") - private Integer defaultTtl; - - /** - * The unique key policy configuration for specifying uniqueness - * constraints on documents in the collection in the Azure Cosmos DB - * service. - */ - @JsonProperty(value = "properties.uniqueKeyPolicy") - private UniqueKeyPolicy uniqueKeyPolicy; - - /** - * The conflict resolution policy for the container. - */ - @JsonProperty(value = "properties.conflictResolutionPolicy") - private ConflictResolutionPolicy conflictResolutionPolicy; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB SQL container. - * - * @return the sqlContainerGetResultsId value - */ - public String sqlContainerGetResultsId() { - return this.sqlContainerGetResultsId; - } - - /** - * Set name of the Cosmos DB SQL container. + * Get the resource value. * - * @param sqlContainerGetResultsId the sqlContainerGetResultsId value to set - * @return the SqlContainerGetResultsInner object itself. + * @return the resource value */ - public SqlContainerGetResultsInner withSqlContainerGetResultsId(String sqlContainerGetResultsId) { - this.sqlContainerGetResultsId = sqlContainerGetResultsId; - return this; + public SqlContainerGetPropertiesResource resource() { + return this.resource; } /** - * Get the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. + * Set the resource value. * - * @return the indexingPolicy value - */ - public IndexingPolicy indexingPolicy() { - return this.indexingPolicy; - } - - /** - * Set the configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container. - * - * @param indexingPolicy the indexingPolicy value to set + * @param resource the resource value to set * @return the SqlContainerGetResultsInner object itself. */ - public SqlContainerGetResultsInner withIndexingPolicy(IndexingPolicy indexingPolicy) { - this.indexingPolicy = indexingPolicy; + public SqlContainerGetResultsInner withResource(SqlContainerGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get the configuration of the partition key to be used for partitioning data into multiple partitions. - * - * @return the partitionKey value - */ - public ContainerPartitionKey partitionKey() { - return this.partitionKey; - } - - /** - * Set the configuration of the partition key to be used for partitioning data into multiple partitions. - * - * @param partitionKey the partitionKey value to set - * @return the SqlContainerGetResultsInner object itself. - */ - public SqlContainerGetResultsInner withPartitionKey(ContainerPartitionKey partitionKey) { - this.partitionKey = partitionKey; - return this; - } - - /** - * Get default time to live. - * - * @return the defaultTtl value - */ - public Integer defaultTtl() { - return this.defaultTtl; - } - - /** - * Set default time to live. - * - * @param defaultTtl the defaultTtl value to set - * @return the SqlContainerGetResultsInner object itself. - */ - public SqlContainerGetResultsInner withDefaultTtl(Integer defaultTtl) { - this.defaultTtl = defaultTtl; - return this; - } - - /** - * Get the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. - * - * @return the uniqueKeyPolicy value - */ - public UniqueKeyPolicy uniqueKeyPolicy() { - return this.uniqueKeyPolicy; - } - - /** - * Set the unique key policy configuration for specifying uniqueness constraints on documents in the collection in the Azure Cosmos DB service. - * - * @param uniqueKeyPolicy the uniqueKeyPolicy value to set - * @return the SqlContainerGetResultsInner object itself. - */ - public SqlContainerGetResultsInner withUniqueKeyPolicy(UniqueKeyPolicy uniqueKeyPolicy) { - this.uniqueKeyPolicy = uniqueKeyPolicy; - return this; - } - - /** - * Get the conflict resolution policy for the container. - * - * @return the conflictResolutionPolicy value - */ - public ConflictResolutionPolicy conflictResolutionPolicy() { - return this.conflictResolutionPolicy; - } - - /** - * Set the conflict resolution policy for the container. - * - * @param conflictResolutionPolicy the conflictResolutionPolicy value to set - * @return the SqlContainerGetResultsInner object itself. - */ - public SqlContainerGetResultsInner withConflictResolutionPolicy(ConflictResolutionPolicy conflictResolutionPolicy) { - this.conflictResolutionPolicy = conflictResolutionPolicy; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlDatabaseGetResultsImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlDatabaseGetResultsImpl.java index d186e73295d95..51fcdbb3486f2 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlDatabaseGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlDatabaseGetResultsImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlDatabaseCreateUpdateParameters; import java.util.Map; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlDatabaseGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlDatabaseResource; import rx.functions.Func1; @@ -93,31 +94,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new SqlDatabaseCreateUpdateParameters(); } - @Override - public String _colls() { - return this.inner()._colls(); - } - - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public String _users() { - return this.inner()._users(); - } - @Override public String id() { return this.inner().id(); @@ -134,8 +110,8 @@ public String name() { } @Override - public String sqlDatabaseGetResultsId() { - return this.inner().sqlDatabaseGetResultsId(); + public SqlDatabaseGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlDatabaseGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlDatabaseGetResultsInner.java index 61c1378b11603..7a5d8b0baa3fb 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlDatabaseGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlDatabaseGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlDatabaseGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -18,129 +19,28 @@ @JsonFlatten public class SqlDatabaseGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB SQL database. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String sqlDatabaseGetResultsId; + @JsonProperty(value = "properties.resource") + private SqlDatabaseGetPropertiesResource resource; /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * A system generated property that specified the addressable path of the - * collections resource. - */ - @JsonProperty(value = "properties._colls") - private String _colls; - - /** - * A system generated property that specifies the addressable path of the - * users resource. - */ - @JsonProperty(value = "properties._users") - private String _users; - - /** - * Get name of the Cosmos DB SQL database. - * - * @return the sqlDatabaseGetResultsId value - */ - public String sqlDatabaseGetResultsId() { - return this.sqlDatabaseGetResultsId; - } - - /** - * Set name of the Cosmos DB SQL database. - * - * @param sqlDatabaseGetResultsId the sqlDatabaseGetResultsId value to set - * @return the SqlDatabaseGetResultsInner object itself. - */ - public SqlDatabaseGetResultsInner withSqlDatabaseGetResultsId(String sqlDatabaseGetResultsId) { - this.sqlDatabaseGetResultsId = sqlDatabaseGetResultsId; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - - /** - * Get a system generated property that specified the addressable path of the collections resource. - * - * @return the _colls value - */ - public String _colls() { - return this._colls; - } - - /** - * Set a system generated property that specified the addressable path of the collections resource. - * - * @param _colls the _colls value to set - * @return the SqlDatabaseGetResultsInner object itself. - */ - public SqlDatabaseGetResultsInner with_colls(String _colls) { - this._colls = _colls; - return this; - } - - /** - * Get a system generated property that specifies the addressable path of the users resource. + * Get the resource value. * - * @return the _users value + * @return the resource value */ - public String _users() { - return this._users; + public SqlDatabaseGetPropertiesResource resource() { + return this.resource; } /** - * Set a system generated property that specifies the addressable path of the users resource. + * Set the resource value. * - * @param _users the _users value to set + * @param resource the resource value to set * @return the SqlDatabaseGetResultsInner object itself. */ - public SqlDatabaseGetResultsInner with_users(String _users) { - this._users = _users; + public SqlDatabaseGetResultsInner withResource(SqlDatabaseGetPropertiesResource resource) { + this.resource = resource; return this; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlResourcesInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlResourcesInner.java index 222055106b21f..daae6d6434b65 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlResourcesInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlResourcesInner.java @@ -44,7 +44,7 @@ public class SqlResourcesInner { /** The Retrofit service to perform REST calls. */ private SqlResourcesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of SqlResourcesInner. @@ -52,7 +52,7 @@ public class SqlResourcesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public SqlResourcesInner(Retrofit retrofit, CosmosDBImpl client) { + public SqlResourcesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(SqlResourcesService.class); this.client = client; } @@ -135,7 +135,7 @@ interface SqlResourcesService { Observable> beginUpdateSqlContainerThroughput(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("databaseName") String databaseName, @Path("containerName") String containerName, @Query("api-version") String apiVersion, @Body ThroughputSettingsUpdateParameters updateThroughputParameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlResources listSqlStoredProcedures" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures/") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures") Observable> listSqlStoredProcedures(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("databaseName") String databaseName, @Path("containerName") String containerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlResources getSqlStoredProcedure" }) @@ -159,7 +159,7 @@ interface SqlResourcesService { Observable> beginDeleteSqlStoredProcedure(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("databaseName") String databaseName, @Path("containerName") String containerName, @Path("storedProcedureName") String storedProcedureName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlResources listSqlUserDefinedFunctions" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions/") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/userDefinedFunctions") Observable> listSqlUserDefinedFunctions(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("databaseName") String databaseName, @Path("containerName") String containerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlResources getSqlUserDefinedFunction" }) @@ -183,7 +183,7 @@ interface SqlResourcesService { Observable> beginDeleteSqlUserDefinedFunction(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("databaseName") String databaseName, @Path("containerName") String containerName, @Path("userDefinedFunctionName") String userDefinedFunctionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlResources listSqlTriggers" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers/") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/triggers") Observable> listSqlTriggers(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("databaseName") String databaseName, @Path("containerName") String containerName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlResources getSqlTrigger" }) diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlStoredProcedureGetResultsImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlStoredProcedureGetResultsImpl.java index abe4aeefcc23b..51ce756dce7c4 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlStoredProcedureGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlStoredProcedureGetResultsImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlStoredProcedureCreateUpdateParameters; import java.util.Map; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlStoredProcedureGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlStoredProcedureResource; import rx.functions.Func1; @@ -97,26 +98,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new SqlStoredProcedureCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public String body() { - return this.inner().body(); - } - @Override public String id() { return this.inner().id(); @@ -133,8 +114,8 @@ public String name() { } @Override - public String sqlStoredProcedureGetResultsId() { - return this.inner().sqlStoredProcedureGetResultsId(); + public SqlStoredProcedureGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlStoredProcedureGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlStoredProcedureGetResultsInner.java index 94013375437e7..b2b65a829d7ca 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlStoredProcedureGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlStoredProcedureGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlStoredProcedureGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -18,102 +19,29 @@ @JsonFlatten public class SqlStoredProcedureGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB SQL storedProcedure. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String sqlStoredProcedureGetResultsId; + @JsonProperty(value = "properties.resource") + private SqlStoredProcedureGetPropertiesResource resource; /** - * Body of the Stored Procedure. - */ - @JsonProperty(value = "properties.body") - private String body; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB SQL storedProcedure. + * Get the resource value. * - * @return the sqlStoredProcedureGetResultsId value + * @return the resource value */ - public String sqlStoredProcedureGetResultsId() { - return this.sqlStoredProcedureGetResultsId; + public SqlStoredProcedureGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB SQL storedProcedure. + * Set the resource value. * - * @param sqlStoredProcedureGetResultsId the sqlStoredProcedureGetResultsId value to set + * @param resource the resource value to set * @return the SqlStoredProcedureGetResultsInner object itself. */ - public SqlStoredProcedureGetResultsInner withSqlStoredProcedureGetResultsId(String sqlStoredProcedureGetResultsId) { - this.sqlStoredProcedureGetResultsId = sqlStoredProcedureGetResultsId; + public SqlStoredProcedureGetResultsInner withResource(SqlStoredProcedureGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get body of the Stored Procedure. - * - * @return the body value - */ - public String body() { - return this.body; - } - - /** - * Set body of the Stored Procedure. - * - * @param body the body value to set - * @return the SqlStoredProcedureGetResultsInner object itself. - */ - public SqlStoredProcedureGetResultsInner withBody(String body) { - this.body = body; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlTriggerGetResultsImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlTriggerGetResultsImpl.java index 2ed7d896afa2a..76101a5d0b614 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlTriggerGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlTriggerGetResultsImpl.java @@ -13,8 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlTriggerCreateUpdateParameters; import java.util.Map; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.TriggerOperation; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.TriggerType; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlTriggerGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlTriggerResource; import rx.functions.Func1; @@ -99,26 +98,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new SqlTriggerCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public String body() { - return this.inner().body(); - } - @Override public String id() { return this.inner().id(); @@ -135,8 +114,8 @@ public String name() { } @Override - public String sqlTriggerGetResultsId() { - return this.inner().sqlTriggerGetResultsId(); + public SqlTriggerGetPropertiesResource resource() { + return this.inner().resource(); } @Override @@ -144,16 +123,6 @@ public Map tags() { return this.inner().getTags(); } - @Override - public TriggerOperation triggerOperation() { - return this.inner().triggerOperation(); - } - - @Override - public TriggerType triggerType() { - return this.inner().triggerType(); - } - @Override public String type() { return this.inner().type(); diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlTriggerGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlTriggerGetResultsInner.java index e12ce7df433c3..9c09069025574 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlTriggerGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlTriggerGetResultsInner.java @@ -8,8 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.TriggerType; -import com.microsoft.azure.management.cosmosdb.v2019_08_01.TriggerOperation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlTriggerGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -20,155 +19,29 @@ @JsonFlatten public class SqlTriggerGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB SQL trigger. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String sqlTriggerGetResultsId; + @JsonProperty(value = "properties.resource") + private SqlTriggerGetPropertiesResource resource; /** - * Body of the Trigger. - */ - @JsonProperty(value = "properties.body") - private String body; - - /** - * Type of the Trigger. Possible values include: 'Pre', 'Post'. - */ - @JsonProperty(value = "properties.triggerType") - private TriggerType triggerType; - - /** - * The operation the trigger is associated with. Possible values include: - * 'All', 'Create', 'Update', 'Delete', 'Replace'. - */ - @JsonProperty(value = "properties.triggerOperation") - private TriggerOperation triggerOperation; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB SQL trigger. + * Get the resource value. * - * @return the sqlTriggerGetResultsId value + * @return the resource value */ - public String sqlTriggerGetResultsId() { - return this.sqlTriggerGetResultsId; + public SqlTriggerGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB SQL trigger. + * Set the resource value. * - * @param sqlTriggerGetResultsId the sqlTriggerGetResultsId value to set + * @param resource the resource value to set * @return the SqlTriggerGetResultsInner object itself. */ - public SqlTriggerGetResultsInner withSqlTriggerGetResultsId(String sqlTriggerGetResultsId) { - this.sqlTriggerGetResultsId = sqlTriggerGetResultsId; + public SqlTriggerGetResultsInner withResource(SqlTriggerGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get body of the Trigger. - * - * @return the body value - */ - public String body() { - return this.body; - } - - /** - * Set body of the Trigger. - * - * @param body the body value to set - * @return the SqlTriggerGetResultsInner object itself. - */ - public SqlTriggerGetResultsInner withBody(String body) { - this.body = body; - return this; - } - - /** - * Get type of the Trigger. Possible values include: 'Pre', 'Post'. - * - * @return the triggerType value - */ - public TriggerType triggerType() { - return this.triggerType; - } - - /** - * Set type of the Trigger. Possible values include: 'Pre', 'Post'. - * - * @param triggerType the triggerType value to set - * @return the SqlTriggerGetResultsInner object itself. - */ - public SqlTriggerGetResultsInner withTriggerType(TriggerType triggerType) { - this.triggerType = triggerType; - return this; - } - - /** - * Get the operation the trigger is associated with. Possible values include: 'All', 'Create', 'Update', 'Delete', 'Replace'. - * - * @return the triggerOperation value - */ - public TriggerOperation triggerOperation() { - return this.triggerOperation; - } - - /** - * Set the operation the trigger is associated with. Possible values include: 'All', 'Create', 'Update', 'Delete', 'Replace'. - * - * @param triggerOperation the triggerOperation value to set - * @return the SqlTriggerGetResultsInner object itself. - */ - public SqlTriggerGetResultsInner withTriggerOperation(TriggerOperation triggerOperation) { - this.triggerOperation = triggerOperation; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlUserDefinedFunctionGetResultsImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlUserDefinedFunctionGetResultsImpl.java index bff94b37ab897..b5d60bbf51491 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlUserDefinedFunctionGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlUserDefinedFunctionGetResultsImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlUserDefinedFunctionCreateUpdateParameters; import java.util.Map; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlUserDefinedFunctionGetPropertiesResource; import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlUserDefinedFunctionResource; import rx.functions.Func1; @@ -97,26 +98,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new SqlUserDefinedFunctionCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - - @Override - public String body() { - return this.inner().body(); - } - @Override public String id() { return this.inner().id(); @@ -133,8 +114,8 @@ public String name() { } @Override - public String sqlUserDefinedFunctionGetResultsId() { - return this.inner().sqlUserDefinedFunctionGetResultsId(); + public SqlUserDefinedFunctionGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlUserDefinedFunctionGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlUserDefinedFunctionGetResultsInner.java index c60d8d5727f26..c41b50893b890 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlUserDefinedFunctionGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/SqlUserDefinedFunctionGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.SqlUserDefinedFunctionGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -18,102 +19,29 @@ @JsonFlatten public class SqlUserDefinedFunctionGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB SQL userDefinedFunction. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String sqlUserDefinedFunctionGetResultsId; + @JsonProperty(value = "properties.resource") + private SqlUserDefinedFunctionGetPropertiesResource resource; /** - * Body of the User Defined Function. - */ - @JsonProperty(value = "properties.body") - private String body; - - /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB SQL userDefinedFunction. + * Get the resource value. * - * @return the sqlUserDefinedFunctionGetResultsId value + * @return the resource value */ - public String sqlUserDefinedFunctionGetResultsId() { - return this.sqlUserDefinedFunctionGetResultsId; + public SqlUserDefinedFunctionGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB SQL userDefinedFunction. + * Set the resource value. * - * @param sqlUserDefinedFunctionGetResultsId the sqlUserDefinedFunctionGetResultsId value to set + * @param resource the resource value to set * @return the SqlUserDefinedFunctionGetResultsInner object itself. */ - public SqlUserDefinedFunctionGetResultsInner withSqlUserDefinedFunctionGetResultsId(String sqlUserDefinedFunctionGetResultsId) { - this.sqlUserDefinedFunctionGetResultsId = sqlUserDefinedFunctionGetResultsId; + public SqlUserDefinedFunctionGetResultsInner withResource(SqlUserDefinedFunctionGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get body of the User Defined Function. - * - * @return the body value - */ - public String body() { - return this.body; - } - - /** - * Set body of the User Defined Function. - * - * @param body the body value to set - * @return the SqlUserDefinedFunctionGetResultsInner object itself. - */ - public SqlUserDefinedFunctionGetResultsInner withBody(String body) { - this.body = body; - return this; - } - - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/TableGetResultsImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/TableGetResultsImpl.java index 771e55246abf6..2c34f9602bd75 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/TableGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/TableGetResultsImpl.java @@ -13,6 +13,7 @@ import rx.Observable; import com.microsoft.azure.management.cosmosdb.v2019_08_01.TableCreateUpdateParameters; import java.util.Map; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.TableGetPropertiesResource; import rx.functions.Func1; class TableGetResultsImpl extends CreatableUpdatableImpl implements TableGetResults, TableGetResults.Definition, TableGetResults.Update { @@ -92,21 +93,6 @@ private void resetCreateUpdateParameters() { this.createOrUpdateParameter = new TableCreateUpdateParameters(); } - @Override - public String _etag() { - return this.inner()._etag(); - } - - @Override - public String _rid() { - return this.inner()._rid(); - } - - @Override - public Object _ts() { - return this.inner()._ts(); - } - @Override public String id() { return this.inner().id(); @@ -123,8 +109,8 @@ public String name() { } @Override - public String tableGetResultsId() { - return this.inner().tableGetResultsId(); + public TableGetPropertiesResource resource() { + return this.inner().resource(); } @Override diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/TableGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/TableGetResultsInner.java index 59ca2578488c8..72f05046b3820 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/TableGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/TableGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.TableGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -18,76 +19,29 @@ @JsonFlatten public class TableGetResultsInner extends ARMResourceProperties { /** - * Name of the Cosmos DB table. + * The resource property. */ - @JsonProperty(value = "properties.id", required = true) - private String tableGetResultsId; + @JsonProperty(value = "properties.resource") + private TableGetPropertiesResource resource; /** - * A system generated property. A unique identifier. - */ - @JsonProperty(value = "properties._rid", access = JsonProperty.Access.WRITE_ONLY) - private String _rid; - - /** - * A system generated property that denotes the last updated timestamp of - * the resource. - */ - @JsonProperty(value = "properties._ts", access = JsonProperty.Access.WRITE_ONLY) - private Object _ts; - - /** - * A system generated property representing the resource etag required for - * optimistic concurrency control. - */ - @JsonProperty(value = "properties._etag", access = JsonProperty.Access.WRITE_ONLY) - private String _etag; - - /** - * Get name of the Cosmos DB table. + * Get the resource value. * - * @return the tableGetResultsId value + * @return the resource value */ - public String tableGetResultsId() { - return this.tableGetResultsId; + public TableGetPropertiesResource resource() { + return this.resource; } /** - * Set name of the Cosmos DB table. + * Set the resource value. * - * @param tableGetResultsId the tableGetResultsId value to set + * @param resource the resource value to set * @return the TableGetResultsInner object itself. */ - public TableGetResultsInner withTableGetResultsId(String tableGetResultsId) { - this.tableGetResultsId = tableGetResultsId; + public TableGetResultsInner withResource(TableGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get a system generated property. A unique identifier. - * - * @return the _rid value - */ - public String _rid() { - return this._rid; - } - - /** - * Get a system generated property that denotes the last updated timestamp of the resource. - * - * @return the _ts value - */ - public Object _ts() { - return this._ts; - } - - /** - * Get a system generated property representing the resource etag required for optimistic concurrency control. - * - * @return the _etag value - */ - public String _etag() { - return this._etag; - } - } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/TableResourcesInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/TableResourcesInner.java index 37d0045c85ced..fc9219504e438 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/TableResourcesInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/TableResourcesInner.java @@ -40,7 +40,7 @@ public class TableResourcesInner { /** The Retrofit service to perform REST calls. */ private TableResourcesService service; /** The service client containing this operation class. */ - private CosmosDBImpl client; + private CosmosDBManagementClientImpl client; /** * Initializes an instance of TableResourcesInner. @@ -48,7 +48,7 @@ public class TableResourcesInner { * @param retrofit the Retrofit instance built from a Retrofit Builder. * @param client the instance of the service client containing this operation class. */ - public TableResourcesInner(Retrofit retrofit, CosmosDBImpl client) { + public TableResourcesInner(Retrofit retrofit, CosmosDBManagementClientImpl client) { this.service = retrofit.create(TableResourcesService.class); this.client = client; } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/ThroughputSettingsGetResultsImpl.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/ThroughputSettingsGetResultsImpl.java index aad7f20eec202..0cb28fbff9b0b 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/ThroughputSettingsGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/ThroughputSettingsGetResultsImpl.java @@ -10,6 +10,7 @@ import com.microsoft.azure.management.cosmosdb.v2019_08_01.ThroughputSettingsGetResults; import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.ThroughputSettingsGetPropertiesResource; import java.util.Map; class ThroughputSettingsGetResultsImpl extends WrapperImpl implements ThroughputSettingsGetResults { @@ -34,19 +35,14 @@ public String location() { return this.inner().location(); } - @Override - public String minimumThroughput() { - return this.inner().minimumThroughput(); - } - @Override public String name() { return this.inner().name(); } @Override - public String offerReplacePending() { - return this.inner().offerReplacePending(); + public ThroughputSettingsGetPropertiesResource resource() { + return this.inner().resource(); } @Override @@ -54,11 +50,6 @@ public Map tags() { return this.inner().getTags(); } - @Override - public int throughput() { - return this.inner().throughput(); - } - @Override public String type() { return this.inner().type(); diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/ThroughputSettingsGetResultsInner.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/ThroughputSettingsGetResultsInner.java index de6d2ddad1419..e358b57008e3a 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/ThroughputSettingsGetResultsInner.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/ThroughputSettingsGetResultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; +import com.microsoft.azure.management.cosmosdb.v2019_08_01.ThroughputSettingsGetPropertiesResource; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.management.cosmosdb.v2019_08_01.ARMResourceProperties; @@ -18,59 +19,29 @@ @JsonFlatten public class ThroughputSettingsGetResultsInner extends ARMResourceProperties { /** - * Value of the Cosmos DB resource throughput. + * The resource property. */ - @JsonProperty(value = "properties.throughput", required = true) - private int throughput; + @JsonProperty(value = "properties.resource") + private ThroughputSettingsGetPropertiesResource resource; /** - * The minimum throughput of the resource. - */ - @JsonProperty(value = "properties.minimumThroughput", access = JsonProperty.Access.WRITE_ONLY) - private String minimumThroughput; - - /** - * The throughput replace is pending. - */ - @JsonProperty(value = "properties.offerReplacePending", access = JsonProperty.Access.WRITE_ONLY) - private String offerReplacePending; - - /** - * Get value of the Cosmos DB resource throughput. + * Get the resource value. * - * @return the throughput value + * @return the resource value */ - public int throughput() { - return this.throughput; + public ThroughputSettingsGetPropertiesResource resource() { + return this.resource; } /** - * Set value of the Cosmos DB resource throughput. + * Set the resource value. * - * @param throughput the throughput value to set + * @param resource the resource value to set * @return the ThroughputSettingsGetResultsInner object itself. */ - public ThroughputSettingsGetResultsInner withThroughput(int throughput) { - this.throughput = throughput; + public ThroughputSettingsGetResultsInner withResource(ThroughputSettingsGetPropertiesResource resource) { + this.resource = resource; return this; } - /** - * Get the minimum throughput of the resource. - * - * @return the minimumThroughput value - */ - public String minimumThroughput() { - return this.minimumThroughput; - } - - /** - * Get the throughput replace is pending. - * - * @return the offerReplacePending value - */ - public String offerReplacePending() { - return this.offerReplacePending; - } - } diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/package-info.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/package-info.java index eb8636730bfc6..afe7bbf4eb576 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/package-info.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/implementation/package-info.java @@ -5,7 +5,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * This package contains the implementation classes for CosmosDB. + * This package contains the implementation classes for CosmosDBManagementClient. * Azure Cosmos DB Database Service Resource Provider REST API. */ package com.microsoft.azure.management.cosmosdb.v2019_08_01.implementation; diff --git a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/package-info.java b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/package-info.java index 1036678cc7dd1..91cf1f40db046 100644 --- a/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/package-info.java +++ b/sdk/cosmos/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01/package-info.java @@ -5,7 +5,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * This package contains the classes for CosmosDB. + * This package contains the classes for CosmosDBManagementClient. * Azure Cosmos DB Database Service Resource Provider REST API. */ package com.microsoft.azure.management.cosmosdb.v2019_08_01;