diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/collection.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/collection.go index 7354bacfc144..4f08d9a32e7e 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/collection.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/collection.go @@ -126,7 +126,6 @@ func (client CollectionClient) ListMetricDefinitionsSender(req *http.Request) (* func (client CollectionClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionsListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -222,7 +221,6 @@ func (client CollectionClient) ListMetricsSender(req *http.Request) (*http.Respo func (client CollectionClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -319,7 +317,6 @@ func (client CollectionClient) ListUsagesSender(req *http.Request) (*http.Respon func (client CollectionClient) ListUsagesResponder(resp *http.Response) (result UsagesResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartition.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartition.go index 0b2c457948b9..2ddb441640ac 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartition.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartition.go @@ -131,7 +131,6 @@ func (client CollectionPartitionClient) ListMetricsSender(req *http.Request) (*h func (client CollectionPartitionClient) ListMetricsResponder(resp *http.Response) (result PartitionMetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -228,7 +227,6 @@ func (client CollectionPartitionClient) ListUsagesSender(req *http.Request) (*ht func (client CollectionPartitionClient) ListUsagesResponder(resp *http.Response) (result PartitionUsagesResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartitionregion.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartitionregion.go index 9525d8c7d22a..9af8bdc250d2 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartitionregion.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartitionregion.go @@ -134,7 +134,6 @@ func (client CollectionPartitionRegionClient) ListMetricsSender(req *http.Reques func (client CollectionPartitionRegionClient) ListMetricsResponder(resp *http.Response) (result PartitionMetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionregion.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionregion.go index cfc82d8fdb70..23b9ce067fc2 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionregion.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionregion.go @@ -134,7 +134,6 @@ func (client CollectionRegionClient) ListMetricsSender(req *http.Request) (*http func (client CollectionRegionClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/database.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/database.go index 88c841ab3dd4..1c13d9726e8e 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/database.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/database.go @@ -124,7 +124,6 @@ func (client DatabaseClient) ListMetricDefinitionsSender(req *http.Request) (*ht func (client DatabaseClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionsListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -218,7 +217,6 @@ func (client DatabaseClient) ListMetricsSender(req *http.Request) (*http.Respons func (client DatabaseClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -313,7 +311,6 @@ func (client DatabaseClient) ListUsagesSender(req *http.Request) (*http.Response func (client DatabaseClient) ListUsagesResponder(resp *http.Response) (result UsagesResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccountregion.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccountregion.go index cfa5f348d4f1..e4f89751d70c 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccountregion.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccountregion.go @@ -129,7 +129,6 @@ func (client DatabaseAccountRegionClient) ListMetricsSender(req *http.Request) ( func (client DatabaseAccountRegionClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go index 43dc259e5795..cf1d031b070e 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go @@ -117,7 +117,6 @@ func (client DatabaseAccountsClient) CheckNameExistsSender(req *http.Request) (* func (client DatabaseAccountsClient) CheckNameExistsResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByClosing()) result.Response = resp @@ -222,7 +221,6 @@ func (client DatabaseAccountsClient) CreateOrUpdateSender(req *http.Request) (fu func (client DatabaseAccountsClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseAccount, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -321,7 +319,6 @@ func (client DatabaseAccountsClient) CreateUpdateCassandraKeyspaceSender(req *ht func (client DatabaseAccountsClient) CreateUpdateCassandraKeyspaceResponder(resp *http.Response) (result CassandraKeyspace, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -422,7 +419,6 @@ func (client DatabaseAccountsClient) CreateUpdateCassandraTableSender(req *http. func (client DatabaseAccountsClient) CreateUpdateCassandraTableResponder(resp *http.Response) (result CassandraTable, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -521,7 +517,6 @@ func (client DatabaseAccountsClient) CreateUpdateGremlinDatabaseSender(req *http func (client DatabaseAccountsClient) CreateUpdateGremlinDatabaseResponder(resp *http.Response) (result GremlinDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -622,7 +617,6 @@ func (client DatabaseAccountsClient) CreateUpdateGremlinGraphSender(req *http.Re func (client DatabaseAccountsClient) CreateUpdateGremlinGraphResponder(resp *http.Response) (result GremlinGraph, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -723,7 +717,6 @@ func (client DatabaseAccountsClient) CreateUpdateMongoDBCollectionSender(req *ht func (client DatabaseAccountsClient) CreateUpdateMongoDBCollectionResponder(resp *http.Response) (result MongoDBCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -822,7 +815,6 @@ func (client DatabaseAccountsClient) CreateUpdateMongoDBDatabaseSender(req *http func (client DatabaseAccountsClient) CreateUpdateMongoDBDatabaseResponder(resp *http.Response) (result MongoDBDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -923,7 +915,6 @@ func (client DatabaseAccountsClient) CreateUpdateSQLContainerSender(req *http.Re func (client DatabaseAccountsClient) CreateUpdateSQLContainerResponder(resp *http.Response) (result SQLContainer, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1022,7 +1013,6 @@ func (client DatabaseAccountsClient) CreateUpdateSQLDatabaseSender(req *http.Req func (client DatabaseAccountsClient) CreateUpdateSQLDatabaseResponder(resp *http.Response) (result SQLDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1121,7 +1111,6 @@ func (client DatabaseAccountsClient) CreateUpdateTableSender(req *http.Request) func (client DatabaseAccountsClient) CreateUpdateTableResponder(resp *http.Response) (result Table, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -1209,7 +1198,6 @@ func (client DatabaseAccountsClient) DeleteSender(req *http.Request) (future Dat func (client DatabaseAccountsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1298,7 +1286,6 @@ func (client DatabaseAccountsClient) DeleteCassandraKeyspaceSender(req *http.Req func (client DatabaseAccountsClient) DeleteCassandraKeyspaceResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1389,7 +1376,6 @@ func (client DatabaseAccountsClient) DeleteCassandraTableSender(req *http.Reques func (client DatabaseAccountsClient) DeleteCassandraTableResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1478,7 +1464,6 @@ func (client DatabaseAccountsClient) DeleteGremlinDatabaseSender(req *http.Reque func (client DatabaseAccountsClient) DeleteGremlinDatabaseResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1569,7 +1554,6 @@ func (client DatabaseAccountsClient) DeleteGremlinGraphSender(req *http.Request) func (client DatabaseAccountsClient) DeleteGremlinGraphResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1660,7 +1644,6 @@ func (client DatabaseAccountsClient) DeleteMongoDBCollectionSender(req *http.Req func (client DatabaseAccountsClient) DeleteMongoDBCollectionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1749,7 +1732,6 @@ func (client DatabaseAccountsClient) DeleteMongoDBDatabaseSender(req *http.Reque func (client DatabaseAccountsClient) DeleteMongoDBDatabaseResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1840,7 +1822,6 @@ func (client DatabaseAccountsClient) DeleteSQLContainerSender(req *http.Request) func (client DatabaseAccountsClient) DeleteSQLContainerResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -1929,7 +1910,6 @@ func (client DatabaseAccountsClient) DeleteSQLDatabaseSender(req *http.Request) func (client DatabaseAccountsClient) DeleteSQLDatabaseResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -2018,7 +1998,6 @@ func (client DatabaseAccountsClient) DeleteTableSender(req *http.Request) (futur func (client DatabaseAccountsClient) DeleteTableResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -2112,7 +2091,6 @@ func (client DatabaseAccountsClient) FailoverPriorityChangeSender(req *http.Requ func (client DatabaseAccountsClient) FailoverPriorityChangeResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp @@ -2199,7 +2177,6 @@ func (client DatabaseAccountsClient) GetSender(req *http.Request) (*http.Respons func (client DatabaseAccountsClient) GetResponder(resp *http.Response) (result DatabaseAccount, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2290,7 +2267,6 @@ func (client DatabaseAccountsClient) GetCassandraKeyspaceSender(req *http.Reques func (client DatabaseAccountsClient) GetCassandraKeyspaceResponder(resp *http.Response) (result CassandraKeyspace, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2381,7 +2357,6 @@ func (client DatabaseAccountsClient) GetCassandraKeyspaceThroughputSender(req *h func (client DatabaseAccountsClient) GetCassandraKeyspaceThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2473,7 +2448,6 @@ func (client DatabaseAccountsClient) GetCassandraTableSender(req *http.Request) func (client DatabaseAccountsClient) GetCassandraTableResponder(resp *http.Response) (result CassandraTable, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2566,7 +2540,6 @@ func (client DatabaseAccountsClient) GetCassandraTableThroughputSender(req *http func (client DatabaseAccountsClient) GetCassandraTableThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2657,7 +2630,6 @@ func (client DatabaseAccountsClient) GetGremlinDatabaseSender(req *http.Request) func (client DatabaseAccountsClient) GetGremlinDatabaseResponder(resp *http.Response) (result GremlinDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2748,7 +2720,6 @@ func (client DatabaseAccountsClient) GetGremlinDatabaseThroughputSender(req *htt func (client DatabaseAccountsClient) GetGremlinDatabaseThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2840,7 +2811,6 @@ func (client DatabaseAccountsClient) GetGremlinGraphSender(req *http.Request) (* func (client DatabaseAccountsClient) GetGremlinGraphResponder(resp *http.Response) (result GremlinGraph, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -2933,7 +2903,6 @@ func (client DatabaseAccountsClient) GetGremlinGraphThroughputSender(req *http.R func (client DatabaseAccountsClient) GetGremlinGraphThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3025,7 +2994,6 @@ func (client DatabaseAccountsClient) GetMongoDBCollectionSender(req *http.Reques func (client DatabaseAccountsClient) GetMongoDBCollectionResponder(resp *http.Response) (result MongoDBCollection, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3118,7 +3086,6 @@ func (client DatabaseAccountsClient) GetMongoDBCollectionThroughputSender(req *h func (client DatabaseAccountsClient) GetMongoDBCollectionThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3209,7 +3176,6 @@ func (client DatabaseAccountsClient) GetMongoDBDatabaseSender(req *http.Request) func (client DatabaseAccountsClient) GetMongoDBDatabaseResponder(resp *http.Response) (result MongoDBDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3300,7 +3266,6 @@ func (client DatabaseAccountsClient) GetMongoDBDatabaseThroughputSender(req *htt func (client DatabaseAccountsClient) GetMongoDBDatabaseThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3388,7 +3353,6 @@ func (client DatabaseAccountsClient) GetReadOnlyKeysSender(req *http.Request) (* func (client DatabaseAccountsClient) GetReadOnlyKeysResponder(resp *http.Response) (result DatabaseAccountListReadOnlyKeysResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3480,7 +3444,6 @@ func (client DatabaseAccountsClient) GetSQLContainerSender(req *http.Request) (* func (client DatabaseAccountsClient) GetSQLContainerResponder(resp *http.Response) (result SQLContainer, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3573,7 +3536,6 @@ func (client DatabaseAccountsClient) GetSQLContainerThroughputSender(req *http.R func (client DatabaseAccountsClient) GetSQLContainerThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3663,7 +3625,6 @@ func (client DatabaseAccountsClient) GetSQLDatabaseSender(req *http.Request) (*h func (client DatabaseAccountsClient) GetSQLDatabaseResponder(resp *http.Response) (result SQLDatabase, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3754,7 +3715,6 @@ func (client DatabaseAccountsClient) GetSQLDatabaseThroughputSender(req *http.Re func (client DatabaseAccountsClient) GetSQLDatabaseThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3844,7 +3804,6 @@ func (client DatabaseAccountsClient) GetTableSender(req *http.Request) (*http.Re func (client DatabaseAccountsClient) GetTableResponder(resp *http.Response) (result Table, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -3935,7 +3894,6 @@ func (client DatabaseAccountsClient) GetTableThroughputSender(req *http.Request) func (client DatabaseAccountsClient) GetTableThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -4006,7 +3964,6 @@ func (client DatabaseAccountsClient) ListSender(req *http.Request) (*http.Respon func (client DatabaseAccountsClient) ListResponder(resp *http.Response) (result DatabaseAccountsListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -4088,7 +4045,6 @@ func (client DatabaseAccountsClient) ListByResourceGroupSender(req *http.Request func (client DatabaseAccountsClient) ListByResourceGroupResponder(resp *http.Response) (result DatabaseAccountsListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -4176,7 +4132,6 @@ func (client DatabaseAccountsClient) ListCassandraKeyspacesSender(req *http.Requ func (client DatabaseAccountsClient) ListCassandraKeyspacesResponder(resp *http.Response) (result CassandraKeyspaceListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -4266,7 +4221,6 @@ func (client DatabaseAccountsClient) ListCassandraTablesSender(req *http.Request func (client DatabaseAccountsClient) ListCassandraTablesResponder(resp *http.Response) (result CassandraTableListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -4354,7 +4308,6 @@ func (client DatabaseAccountsClient) ListConnectionStringsSender(req *http.Reque func (client DatabaseAccountsClient) ListConnectionStringsResponder(resp *http.Response) (result DatabaseAccountListConnectionStringsResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -4442,7 +4395,6 @@ func (client DatabaseAccountsClient) ListGremlinDatabasesSender(req *http.Reques func (client DatabaseAccountsClient) ListGremlinDatabasesResponder(resp *http.Response) (result GremlinDatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -4532,7 +4484,6 @@ func (client DatabaseAccountsClient) ListGremlinGraphsSender(req *http.Request) func (client DatabaseAccountsClient) ListGremlinGraphsResponder(resp *http.Response) (result GremlinGraphListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -4620,7 +4571,6 @@ func (client DatabaseAccountsClient) ListKeysSender(req *http.Request) (*http.Re func (client DatabaseAccountsClient) ListKeysResponder(resp *http.Response) (result DatabaseAccountListKeysResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -4708,7 +4658,6 @@ func (client DatabaseAccountsClient) ListMetricDefinitionsSender(req *http.Reque func (client DatabaseAccountsClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionsListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -4800,7 +4749,6 @@ func (client DatabaseAccountsClient) ListMetricsSender(req *http.Request) (*http func (client DatabaseAccountsClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -4890,7 +4838,6 @@ func (client DatabaseAccountsClient) ListMongoDBCollectionsSender(req *http.Requ func (client DatabaseAccountsClient) ListMongoDBCollectionsResponder(resp *http.Response) (result MongoDBCollectionListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -4978,7 +4925,6 @@ func (client DatabaseAccountsClient) ListMongoDBDatabasesSender(req *http.Reques func (client DatabaseAccountsClient) ListMongoDBDatabasesResponder(resp *http.Response) (result MongoDBDatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -5066,7 +5012,6 @@ func (client DatabaseAccountsClient) ListReadOnlyKeysSender(req *http.Request) ( func (client DatabaseAccountsClient) ListReadOnlyKeysResponder(resp *http.Response) (result DatabaseAccountListReadOnlyKeysResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -5156,7 +5101,6 @@ func (client DatabaseAccountsClient) ListSQLContainersSender(req *http.Request) func (client DatabaseAccountsClient) ListSQLContainersResponder(resp *http.Response) (result SQLContainerListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -5244,7 +5188,6 @@ func (client DatabaseAccountsClient) ListSQLDatabasesSender(req *http.Request) ( func (client DatabaseAccountsClient) ListSQLDatabasesResponder(resp *http.Response) (result SQLDatabaseListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -5332,7 +5275,6 @@ func (client DatabaseAccountsClient) ListTablesSender(req *http.Request) (*http. func (client DatabaseAccountsClient) ListTablesResponder(resp *http.Response) (result TableListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -5425,7 +5367,6 @@ func (client DatabaseAccountsClient) ListUsagesSender(req *http.Request) (*http. func (client DatabaseAccountsClient) ListUsagesResponder(resp *http.Response) (result UsagesResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -5518,7 +5459,6 @@ func (client DatabaseAccountsClient) OfflineRegionSender(req *http.Request) (fut func (client DatabaseAccountsClient) OfflineRegionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByClosing()) result.Response = resp @@ -5610,7 +5550,6 @@ func (client DatabaseAccountsClient) OnlineRegionSender(req *http.Request) (futu func (client DatabaseAccountsClient) OnlineRegionResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByClosing()) result.Response = resp @@ -5700,7 +5639,6 @@ func (client DatabaseAccountsClient) PatchSender(req *http.Request) (future Data func (client DatabaseAccountsClient) PatchResponder(resp *http.Response) (result DatabaseAccount, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -5791,7 +5729,6 @@ func (client DatabaseAccountsClient) RegenerateKeySender(req *http.Request) (fut func (client DatabaseAccountsClient) RegenerateKeyResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByClosing()) result.Response = resp @@ -5889,7 +5826,6 @@ func (client DatabaseAccountsClient) UpdateCassandraKeyspaceThroughputSender(req func (client DatabaseAccountsClient) UpdateCassandraKeyspaceThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -5990,7 +5926,6 @@ func (client DatabaseAccountsClient) UpdateCassandraTableThroughputSender(req *h func (client DatabaseAccountsClient) UpdateCassandraTableThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -6089,7 +6024,6 @@ func (client DatabaseAccountsClient) UpdateGremlinDatabaseThroughputSender(req * func (client DatabaseAccountsClient) UpdateGremlinDatabaseThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -6189,7 +6123,6 @@ func (client DatabaseAccountsClient) UpdateGremlinGraphThroughputSender(req *htt func (client DatabaseAccountsClient) UpdateGremlinGraphThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -6290,7 +6223,6 @@ func (client DatabaseAccountsClient) UpdateMongoDBCollectionThroughputSender(req func (client DatabaseAccountsClient) UpdateMongoDBCollectionThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -6389,7 +6321,6 @@ func (client DatabaseAccountsClient) UpdateMongoDBDatabaseThroughputSender(req * func (client DatabaseAccountsClient) UpdateMongoDBDatabaseThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -6489,7 +6420,6 @@ func (client DatabaseAccountsClient) UpdateSQLContainerThroughputSender(req *htt func (client DatabaseAccountsClient) UpdateSQLContainerThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -6587,7 +6517,6 @@ func (client DatabaseAccountsClient) UpdateSQLDatabaseThroughputSender(req *http func (client DatabaseAccountsClient) UpdateSQLDatabaseThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) @@ -6685,7 +6614,6 @@ func (client DatabaseAccountsClient) UpdateTableThroughputSender(req *http.Reque func (client DatabaseAccountsClient) UpdateTableThroughputResponder(resp *http.Response) (result Throughput, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/enums.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/enums.go new file mode 100644 index 000000000000..07eb3ff5d57e --- /dev/null +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/enums.go @@ -0,0 +1,236 @@ +package documentdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// ConflictResolutionMode enumerates the values for conflict resolution mode. +type ConflictResolutionMode string + +const ( + // Custom ... + Custom ConflictResolutionMode = "Custom" + // LastWriterWins ... + LastWriterWins ConflictResolutionMode = "LastWriterWins" +) + +// PossibleConflictResolutionModeValues returns an array of possible values for the ConflictResolutionMode const type. +func PossibleConflictResolutionModeValues() []ConflictResolutionMode { + return []ConflictResolutionMode{Custom, LastWriterWins} +} + +// ConnectorOffer enumerates the values for connector offer. +type ConnectorOffer string + +const ( + // Small ... + Small ConnectorOffer = "Small" +) + +// PossibleConnectorOfferValues returns an array of possible values for the ConnectorOffer const type. +func PossibleConnectorOfferValues() []ConnectorOffer { + return []ConnectorOffer{Small} +} + +// DatabaseAccountKind enumerates the values for database account kind. +type DatabaseAccountKind string + +const ( + // GlobalDocumentDB ... + GlobalDocumentDB DatabaseAccountKind = "GlobalDocumentDB" + // MongoDB ... + MongoDB DatabaseAccountKind = "MongoDB" + // Parse ... + Parse DatabaseAccountKind = "Parse" +) + +// PossibleDatabaseAccountKindValues returns an array of possible values for the DatabaseAccountKind const type. +func PossibleDatabaseAccountKindValues() []DatabaseAccountKind { + return []DatabaseAccountKind{GlobalDocumentDB, MongoDB, Parse} +} + +// DatabaseAccountOfferType enumerates the values for database account offer type. +type DatabaseAccountOfferType string + +const ( + // Standard ... + Standard DatabaseAccountOfferType = "Standard" +) + +// PossibleDatabaseAccountOfferTypeValues returns an array of possible values for the DatabaseAccountOfferType const type. +func PossibleDatabaseAccountOfferTypeValues() []DatabaseAccountOfferType { + return []DatabaseAccountOfferType{Standard} +} + +// DataType enumerates the values for data type. +type DataType string + +const ( + // LineString ... + LineString DataType = "LineString" + // MultiPolygon ... + MultiPolygon DataType = "MultiPolygon" + // Number ... + Number DataType = "Number" + // Point ... + Point DataType = "Point" + // Polygon ... + Polygon DataType = "Polygon" + // String ... + String DataType = "String" +) + +// PossibleDataTypeValues returns an array of possible values for the DataType const type. +func PossibleDataTypeValues() []DataType { + return []DataType{LineString, MultiPolygon, Number, Point, Polygon, String} +} + +// DefaultConsistencyLevel enumerates the values for default consistency level. +type DefaultConsistencyLevel string + +const ( + // BoundedStaleness ... + BoundedStaleness DefaultConsistencyLevel = "BoundedStaleness" + // ConsistentPrefix ... + ConsistentPrefix DefaultConsistencyLevel = "ConsistentPrefix" + // Eventual ... + Eventual DefaultConsistencyLevel = "Eventual" + // Session ... + Session DefaultConsistencyLevel = "Session" + // Strong ... + Strong DefaultConsistencyLevel = "Strong" +) + +// PossibleDefaultConsistencyLevelValues returns an array of possible values for the DefaultConsistencyLevel const type. +func PossibleDefaultConsistencyLevelValues() []DefaultConsistencyLevel { + return []DefaultConsistencyLevel{BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong} +} + +// IndexingMode enumerates the values for indexing mode. +type IndexingMode string + +const ( + // Consistent ... + Consistent IndexingMode = "Consistent" + // Lazy ... + Lazy IndexingMode = "Lazy" + // None ... + None IndexingMode = "None" +) + +// PossibleIndexingModeValues returns an array of possible values for the IndexingMode const type. +func PossibleIndexingModeValues() []IndexingMode { + return []IndexingMode{Consistent, Lazy, None} +} + +// IndexKind enumerates the values for index kind. +type IndexKind string + +const ( + // Hash ... + Hash IndexKind = "Hash" + // Range ... + Range IndexKind = "Range" + // Spatial ... + Spatial IndexKind = "Spatial" +) + +// PossibleIndexKindValues returns an array of possible values for the IndexKind const type. +func PossibleIndexKindValues() []IndexKind { + return []IndexKind{Hash, Range, Spatial} +} + +// KeyKind enumerates the values for key kind. +type KeyKind string + +const ( + // Primary ... + Primary KeyKind = "primary" + // PrimaryReadonly ... + PrimaryReadonly KeyKind = "primaryReadonly" + // Secondary ... + Secondary KeyKind = "secondary" + // SecondaryReadonly ... + SecondaryReadonly KeyKind = "secondaryReadonly" +) + +// PossibleKeyKindValues returns an array of possible values for the KeyKind const type. +func PossibleKeyKindValues() []KeyKind { + return []KeyKind{Primary, PrimaryReadonly, Secondary, SecondaryReadonly} +} + +// PartitionKind enumerates the values for partition kind. +type PartitionKind string + +const ( + // PartitionKindHash ... + PartitionKindHash PartitionKind = "Hash" + // PartitionKindRange ... + PartitionKindRange PartitionKind = "Range" +) + +// PossiblePartitionKindValues returns an array of possible values for the PartitionKind const type. +func PossiblePartitionKindValues() []PartitionKind { + return []PartitionKind{PartitionKindHash, PartitionKindRange} +} + +// PrimaryAggregationType enumerates the values for primary aggregation type. +type PrimaryAggregationType string + +const ( + // PrimaryAggregationTypeAverage ... + PrimaryAggregationTypeAverage PrimaryAggregationType = "Average" + // PrimaryAggregationTypeLast ... + PrimaryAggregationTypeLast PrimaryAggregationType = "Last" + // PrimaryAggregationTypeMaximum ... + PrimaryAggregationTypeMaximum PrimaryAggregationType = "Maximum" + // PrimaryAggregationTypeMinimum ... + PrimaryAggregationTypeMinimum PrimaryAggregationType = "Minimum" + // PrimaryAggregationTypeNone ... + PrimaryAggregationTypeNone PrimaryAggregationType = "None" + // PrimaryAggregationTypeTotal ... + PrimaryAggregationTypeTotal PrimaryAggregationType = "Total" +) + +// PossiblePrimaryAggregationTypeValues returns an array of possible values for the PrimaryAggregationType const type. +func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { + return []PrimaryAggregationType{PrimaryAggregationTypeAverage, PrimaryAggregationTypeLast, PrimaryAggregationTypeMaximum, PrimaryAggregationTypeMinimum, PrimaryAggregationTypeNone, PrimaryAggregationTypeTotal} +} + +// UnitType enumerates the values for unit type. +type UnitType string + +const ( + // Bytes ... + Bytes UnitType = "Bytes" + // BytesPerSecond ... + BytesPerSecond UnitType = "BytesPerSecond" + // Count ... + Count UnitType = "Count" + // CountPerSecond ... + CountPerSecond UnitType = "CountPerSecond" + // Milliseconds ... + Milliseconds UnitType = "Milliseconds" + // Percent ... + Percent UnitType = "Percent" + // Seconds ... + Seconds UnitType = "Seconds" +) + +// PossibleUnitTypeValues returns an array of possible values for the UnitType const type. +func PossibleUnitTypeValues() []UnitType { + return []UnitType{Bytes, BytesPerSecond, Count, CountPerSecond, Milliseconds, Percent, Seconds} +} diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/models.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/models.go index 16b7c393ebe4..76cfcf9db46c 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/models.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/models.go @@ -31,224 +31,6 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb" -// ConflictResolutionMode enumerates the values for conflict resolution mode. -type ConflictResolutionMode string - -const ( - // Custom ... - Custom ConflictResolutionMode = "Custom" - // LastWriterWins ... - LastWriterWins ConflictResolutionMode = "LastWriterWins" -) - -// PossibleConflictResolutionModeValues returns an array of possible values for the ConflictResolutionMode const type. -func PossibleConflictResolutionModeValues() []ConflictResolutionMode { - return []ConflictResolutionMode{Custom, LastWriterWins} -} - -// ConnectorOffer enumerates the values for connector offer. -type ConnectorOffer string - -const ( - // Small ... - Small ConnectorOffer = "Small" -) - -// PossibleConnectorOfferValues returns an array of possible values for the ConnectorOffer const type. -func PossibleConnectorOfferValues() []ConnectorOffer { - return []ConnectorOffer{Small} -} - -// DatabaseAccountKind enumerates the values for database account kind. -type DatabaseAccountKind string - -const ( - // GlobalDocumentDB ... - GlobalDocumentDB DatabaseAccountKind = "GlobalDocumentDB" - // MongoDB ... - MongoDB DatabaseAccountKind = "MongoDB" - // Parse ... - Parse DatabaseAccountKind = "Parse" -) - -// PossibleDatabaseAccountKindValues returns an array of possible values for the DatabaseAccountKind const type. -func PossibleDatabaseAccountKindValues() []DatabaseAccountKind { - return []DatabaseAccountKind{GlobalDocumentDB, MongoDB, Parse} -} - -// DatabaseAccountOfferType enumerates the values for database account offer type. -type DatabaseAccountOfferType string - -const ( - // Standard ... - Standard DatabaseAccountOfferType = "Standard" -) - -// PossibleDatabaseAccountOfferTypeValues returns an array of possible values for the DatabaseAccountOfferType const type. -func PossibleDatabaseAccountOfferTypeValues() []DatabaseAccountOfferType { - return []DatabaseAccountOfferType{Standard} -} - -// DataType enumerates the values for data type. -type DataType string - -const ( - // LineString ... - LineString DataType = "LineString" - // MultiPolygon ... - MultiPolygon DataType = "MultiPolygon" - // Number ... - Number DataType = "Number" - // Point ... - Point DataType = "Point" - // Polygon ... - Polygon DataType = "Polygon" - // String ... - String DataType = "String" -) - -// PossibleDataTypeValues returns an array of possible values for the DataType const type. -func PossibleDataTypeValues() []DataType { - return []DataType{LineString, MultiPolygon, Number, Point, Polygon, String} -} - -// DefaultConsistencyLevel enumerates the values for default consistency level. -type DefaultConsistencyLevel string - -const ( - // BoundedStaleness ... - BoundedStaleness DefaultConsistencyLevel = "BoundedStaleness" - // ConsistentPrefix ... - ConsistentPrefix DefaultConsistencyLevel = "ConsistentPrefix" - // Eventual ... - Eventual DefaultConsistencyLevel = "Eventual" - // Session ... - Session DefaultConsistencyLevel = "Session" - // Strong ... - Strong DefaultConsistencyLevel = "Strong" -) - -// PossibleDefaultConsistencyLevelValues returns an array of possible values for the DefaultConsistencyLevel const type. -func PossibleDefaultConsistencyLevelValues() []DefaultConsistencyLevel { - return []DefaultConsistencyLevel{BoundedStaleness, ConsistentPrefix, Eventual, Session, Strong} -} - -// IndexingMode enumerates the values for indexing mode. -type IndexingMode string - -const ( - // Consistent ... - Consistent IndexingMode = "Consistent" - // Lazy ... - Lazy IndexingMode = "Lazy" - // None ... - None IndexingMode = "None" -) - -// PossibleIndexingModeValues returns an array of possible values for the IndexingMode const type. -func PossibleIndexingModeValues() []IndexingMode { - return []IndexingMode{Consistent, Lazy, None} -} - -// IndexKind enumerates the values for index kind. -type IndexKind string - -const ( - // Hash ... - Hash IndexKind = "Hash" - // Range ... - Range IndexKind = "Range" - // Spatial ... - Spatial IndexKind = "Spatial" -) - -// PossibleIndexKindValues returns an array of possible values for the IndexKind const type. -func PossibleIndexKindValues() []IndexKind { - return []IndexKind{Hash, Range, Spatial} -} - -// KeyKind enumerates the values for key kind. -type KeyKind string - -const ( - // Primary ... - Primary KeyKind = "primary" - // PrimaryReadonly ... - PrimaryReadonly KeyKind = "primaryReadonly" - // Secondary ... - Secondary KeyKind = "secondary" - // SecondaryReadonly ... - SecondaryReadonly KeyKind = "secondaryReadonly" -) - -// PossibleKeyKindValues returns an array of possible values for the KeyKind const type. -func PossibleKeyKindValues() []KeyKind { - return []KeyKind{Primary, PrimaryReadonly, Secondary, SecondaryReadonly} -} - -// PartitionKind enumerates the values for partition kind. -type PartitionKind string - -const ( - // PartitionKindHash ... - PartitionKindHash PartitionKind = "Hash" - // PartitionKindRange ... - PartitionKindRange PartitionKind = "Range" -) - -// PossiblePartitionKindValues returns an array of possible values for the PartitionKind const type. -func PossiblePartitionKindValues() []PartitionKind { - return []PartitionKind{PartitionKindHash, PartitionKindRange} -} - -// PrimaryAggregationType enumerates the values for primary aggregation type. -type PrimaryAggregationType string - -const ( - // PrimaryAggregationTypeAverage ... - PrimaryAggregationTypeAverage PrimaryAggregationType = "Average" - // PrimaryAggregationTypeLast ... - PrimaryAggregationTypeLast PrimaryAggregationType = "Last" - // PrimaryAggregationTypeMaximum ... - PrimaryAggregationTypeMaximum PrimaryAggregationType = "Maximum" - // PrimaryAggregationTypeMinimum ... - PrimaryAggregationTypeMinimum PrimaryAggregationType = "Minimum" - // PrimaryAggregationTypeNone ... - PrimaryAggregationTypeNone PrimaryAggregationType = "None" - // PrimaryAggregationTypeTotal ... - PrimaryAggregationTypeTotal PrimaryAggregationType = "Total" -) - -// PossiblePrimaryAggregationTypeValues returns an array of possible values for the PrimaryAggregationType const type. -func PossiblePrimaryAggregationTypeValues() []PrimaryAggregationType { - return []PrimaryAggregationType{PrimaryAggregationTypeAverage, PrimaryAggregationTypeLast, PrimaryAggregationTypeMaximum, PrimaryAggregationTypeMinimum, PrimaryAggregationTypeNone, PrimaryAggregationTypeTotal} -} - -// UnitType enumerates the values for unit type. -type UnitType string - -const ( - // Bytes ... - Bytes UnitType = "Bytes" - // BytesPerSecond ... - BytesPerSecond UnitType = "BytesPerSecond" - // Count ... - Count UnitType = "Count" - // CountPerSecond ... - CountPerSecond UnitType = "CountPerSecond" - // Milliseconds ... - Milliseconds UnitType = "Milliseconds" - // Percent ... - Percent UnitType = "Percent" - // Seconds ... - Seconds UnitType = "Seconds" -) - -// PossibleUnitTypeValues returns an array of possible values for the UnitType const type. -func PossibleUnitTypeValues() []UnitType { - return []UnitType{Bytes, BytesPerSecond, Count, CountPerSecond, Milliseconds, Percent, Seconds} -} - // Capability cosmos DB capability object type Capability struct { // Name - Name of the Cosmos DB capability. For example, "name": "EnableCassandra". Current values also include "EnableTable" and "EnableGremlin". @@ -394,8 +176,7 @@ func (ckcup *CassandraKeyspaceCreateUpdateParameters) UnmarshalJSON(body []byte) return nil } -// CassandraKeyspaceCreateUpdateProperties properties to create and update Azure Cosmos DB Cassandra -// keyspace. +// CassandraKeyspaceCreateUpdateProperties properties to create and update Azure Cosmos DB Cassandra keyspace. type CassandraKeyspaceCreateUpdateProperties struct { // Resource - The standard JSON format of a Cassandra keyspace Resource *CassandraKeyspaceResource `json:"resource,omitempty"` @@ -674,8 +455,8 @@ type ConsistencyPolicy struct { MaxIntervalInSeconds *int32 `json:"maxIntervalInSeconds,omitempty"` } -// ContainerPartitionKey the configuration of the partition key to be used for partitioning data into -// multiple partitions +// ContainerPartitionKey the configuration of the partition key to be used for partitioning data into multiple +// partitions type ContainerPartitionKey struct { // Paths - List of paths using which data within the container can be partitioned Paths *[]string `json:"paths,omitempty"` @@ -1061,6 +842,42 @@ type DatabaseAccountProperties struct { ConnectorOffer ConnectorOffer `json:"connectorOffer,omitempty"` } +// MarshalJSON is the custom marshaler for DatabaseAccountProperties. +func (dap DatabaseAccountProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if dap.ProvisioningState != nil { + objectMap["provisioningState"] = dap.ProvisioningState + } + if dap.IPRangeFilter != nil { + objectMap["ipRangeFilter"] = dap.IPRangeFilter + } + if dap.IsVirtualNetworkFilterEnabled != nil { + objectMap["isVirtualNetworkFilterEnabled"] = dap.IsVirtualNetworkFilterEnabled + } + if dap.EnableAutomaticFailover != nil { + objectMap["enableAutomaticFailover"] = dap.EnableAutomaticFailover + } + if dap.ConsistencyPolicy != nil { + objectMap["consistencyPolicy"] = dap.ConsistencyPolicy + } + if dap.Capabilities != nil { + objectMap["capabilities"] = dap.Capabilities + } + if dap.VirtualNetworkRules != nil { + objectMap["virtualNetworkRules"] = dap.VirtualNetworkRules + } + if dap.EnableMultipleWriteLocations != nil { + objectMap["enableMultipleWriteLocations"] = dap.EnableMultipleWriteLocations + } + if dap.EnableCassandraConnector != nil { + objectMap["enableCassandraConnector"] = dap.EnableCassandraConnector + } + if dap.ConnectorOffer != "" { + objectMap["connectorOffer"] = dap.ConnectorOffer + } + return json.Marshal(objectMap) +} + // DatabaseAccountRegenerateKeyParameters parameters to regenerate the keys within the database account. type DatabaseAccountRegenerateKeyParameters struct { // KeyKind - The access key to regenerate. Possible values include: 'Primary', 'Secondary', 'PrimaryReadonly', 'SecondaryReadonly' @@ -1096,8 +913,8 @@ func (future *DatabaseAccountsCreateOrUpdateFuture) Result(client DatabaseAccoun return } -// DatabaseAccountsCreateUpdateCassandraKeyspaceFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. +// DatabaseAccountsCreateUpdateCassandraKeyspaceFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type DatabaseAccountsCreateUpdateCassandraKeyspaceFuture struct { azure.Future } @@ -1125,8 +942,8 @@ func (future *DatabaseAccountsCreateUpdateCassandraKeyspaceFuture) Result(client return } -// DatabaseAccountsCreateUpdateCassandraTableFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. +// DatabaseAccountsCreateUpdateCassandraTableFuture an abstraction for monitoring and retrieving the results of +// a long-running operation. type DatabaseAccountsCreateUpdateCassandraTableFuture struct { azure.Future } @@ -1154,8 +971,8 @@ func (future *DatabaseAccountsCreateUpdateCassandraTableFuture) Result(client Da return } -// DatabaseAccountsCreateUpdateGremlinDatabaseFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. +// DatabaseAccountsCreateUpdateGremlinDatabaseFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type DatabaseAccountsCreateUpdateGremlinDatabaseFuture struct { azure.Future } @@ -1183,8 +1000,8 @@ func (future *DatabaseAccountsCreateUpdateGremlinDatabaseFuture) Result(client D return } -// DatabaseAccountsCreateUpdateGremlinGraphFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. +// DatabaseAccountsCreateUpdateGremlinGraphFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type DatabaseAccountsCreateUpdateGremlinGraphFuture struct { azure.Future } @@ -1212,8 +1029,8 @@ func (future *DatabaseAccountsCreateUpdateGremlinGraphFuture) Result(client Data return } -// DatabaseAccountsCreateUpdateMongoDBCollectionFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. +// DatabaseAccountsCreateUpdateMongoDBCollectionFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type DatabaseAccountsCreateUpdateMongoDBCollectionFuture struct { azure.Future } @@ -1241,8 +1058,8 @@ func (future *DatabaseAccountsCreateUpdateMongoDBCollectionFuture) Result(client return } -// DatabaseAccountsCreateUpdateMongoDBDatabaseFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. +// DatabaseAccountsCreateUpdateMongoDBDatabaseFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type DatabaseAccountsCreateUpdateMongoDBDatabaseFuture struct { azure.Future } @@ -1270,8 +1087,8 @@ func (future *DatabaseAccountsCreateUpdateMongoDBDatabaseFuture) Result(client D return } -// DatabaseAccountsCreateUpdateSQLContainerFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. +// DatabaseAccountsCreateUpdateSQLContainerFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type DatabaseAccountsCreateUpdateSQLContainerFuture struct { azure.Future } @@ -1299,8 +1116,8 @@ func (future *DatabaseAccountsCreateUpdateSQLContainerFuture) Result(client Data return } -// DatabaseAccountsCreateUpdateSQLDatabaseFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. +// DatabaseAccountsCreateUpdateSQLDatabaseFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type DatabaseAccountsCreateUpdateSQLDatabaseFuture struct { azure.Future } @@ -1357,8 +1174,8 @@ func (future *DatabaseAccountsCreateUpdateTableFuture) Result(client DatabaseAcc return } -// DatabaseAccountsDeleteCassandraKeyspaceFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. +// DatabaseAccountsDeleteCassandraKeyspaceFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type DatabaseAccountsDeleteCassandraKeyspaceFuture struct { azure.Future } @@ -1426,8 +1243,8 @@ func (future *DatabaseAccountsDeleteFuture) Result(client DatabaseAccountsClient return } -// DatabaseAccountsDeleteGremlinDatabaseFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. +// DatabaseAccountsDeleteGremlinDatabaseFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type DatabaseAccountsDeleteGremlinDatabaseFuture struct { azure.Future } @@ -1472,8 +1289,8 @@ func (future *DatabaseAccountsDeleteGremlinGraphFuture) Result(client DatabaseAc return } -// DatabaseAccountsDeleteMongoDBCollectionFuture an abstraction for monitoring and retrieving the results -// of a long-running operation. +// DatabaseAccountsDeleteMongoDBCollectionFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type DatabaseAccountsDeleteMongoDBCollectionFuture struct { azure.Future } @@ -1495,8 +1312,8 @@ func (future *DatabaseAccountsDeleteMongoDBCollectionFuture) Result(client Datab return } -// DatabaseAccountsDeleteMongoDBDatabaseFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. +// DatabaseAccountsDeleteMongoDBDatabaseFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type DatabaseAccountsDeleteMongoDBDatabaseFuture struct { azure.Future } @@ -1564,8 +1381,8 @@ func (future *DatabaseAccountsDeleteSQLDatabaseFuture) Result(client DatabaseAcc return } -// DatabaseAccountsDeleteTableFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. +// DatabaseAccountsDeleteTableFuture an abstraction for monitoring and retrieving the results of a long-running +// operation. type DatabaseAccountsDeleteTableFuture struct { azure.Future } @@ -1587,8 +1404,8 @@ func (future *DatabaseAccountsDeleteTableFuture) Result(client DatabaseAccountsC return } -// DatabaseAccountsFailoverPriorityChangeFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. +// DatabaseAccountsFailoverPriorityChangeFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type DatabaseAccountsFailoverPriorityChangeFuture struct { azure.Future } @@ -1803,8 +1620,8 @@ func (future *DatabaseAccountsUpdateGremlinDatabaseThroughputFuture) Result(clie return } -// DatabaseAccountsUpdateGremlinGraphThroughputFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. +// DatabaseAccountsUpdateGremlinGraphThroughputFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type DatabaseAccountsUpdateGremlinGraphThroughputFuture struct { azure.Future } @@ -1890,8 +1707,8 @@ func (future *DatabaseAccountsUpdateMongoDBDatabaseThroughputFuture) Result(clie return } -// DatabaseAccountsUpdateSQLContainerThroughputFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. +// DatabaseAccountsUpdateSQLContainerThroughputFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type DatabaseAccountsUpdateSQLContainerThroughputFuture struct { azure.Future } @@ -1919,8 +1736,8 @@ func (future *DatabaseAccountsUpdateSQLContainerThroughputFuture) Result(client return } -// DatabaseAccountsUpdateSQLDatabaseThroughputFuture an abstraction for monitoring and retrieving the -// results of a long-running operation. +// DatabaseAccountsUpdateSQLDatabaseThroughputFuture an abstraction for monitoring and retrieving the results +// of a long-running operation. type DatabaseAccountsUpdateSQLDatabaseThroughputFuture struct { azure.Future } @@ -1948,8 +1765,8 @@ func (future *DatabaseAccountsUpdateSQLDatabaseThroughputFuture) Result(client D return } -// DatabaseAccountsUpdateTableThroughputFuture an abstraction for monitoring and retrieving the results of -// a long-running operation. +// DatabaseAccountsUpdateTableThroughputFuture an abstraction for monitoring and retrieving the results of a +// long-running operation. type DatabaseAccountsUpdateTableThroughputFuture struct { azure.Future } @@ -1991,8 +1808,8 @@ type ExcludedPath struct { Path *string `json:"path,omitempty"` } -// ExtendedResourceProperties the system generated resource properties associated with SQL databases and -// SQL containers. +// ExtendedResourceProperties the system generated resource properties associated with SQL databases and SQL +// containers. type ExtendedResourceProperties struct { // Rid - A system generated property. A unique identifier. Rid *string `json:"_rid,omitempty"` @@ -2018,6 +1835,18 @@ type FailoverPolicy struct { FailoverPriority *int32 `json:"failoverPriority,omitempty"` } +// MarshalJSON is the custom marshaler for FailoverPolicy. +func (fp FailoverPolicy) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if fp.LocationName != nil { + objectMap["locationName"] = fp.LocationName + } + if fp.FailoverPriority != nil { + objectMap["failoverPriority"] = fp.FailoverPriority + } + return json.Marshal(objectMap) +} + // GremlinDatabase an Azure Cosmos DB Gremlin database. type GremlinDatabase struct { autorest.Response `json:"-"` @@ -2452,6 +2281,24 @@ type Location struct { IsZoneRedundant *bool `json:"isZoneRedundant,omitempty"` } +// MarshalJSON is the custom marshaler for Location. +func (l Location) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if l.LocationName != nil { + objectMap["locationName"] = l.LocationName + } + if l.ProvisioningState != nil { + objectMap["provisioningState"] = l.ProvisioningState + } + if l.FailoverPriority != nil { + objectMap["failoverPriority"] = l.FailoverPriority + } + if l.IsZoneRedundant != nil { + objectMap["isZoneRedundant"] = l.IsZoneRedundant + } + return json.Marshal(objectMap) +} + // Metric metric data type Metric struct { // StartTime - READ-ONLY; The start time for the metric (ISO-8601 format). @@ -2468,6 +2315,15 @@ type Metric struct { MetricValues *[]MetricValue `json:"metricValues,omitempty"` } +// MarshalJSON is the custom marshaler for Metric. +func (mVar Metric) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if mVar.Unit != "" { + objectMap["unit"] = mVar.Unit + } + return json.Marshal(objectMap) +} + // MetricAvailability the availability of the metric. type MetricAvailability struct { // TimeGrain - READ-ONLY; The time grain to be used to summarize the metric values. @@ -2490,6 +2346,15 @@ type MetricDefinition struct { Name *MetricName `json:"name,omitempty"` } +// MarshalJSON is the custom marshaler for MetricDefinition. +func (md MetricDefinition) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if md.Unit != "" { + objectMap["unit"] = md.Unit + } + return json.Marshal(objectMap) +} + // MetricDefinitionsListResult the response to a list metric definitions request. type MetricDefinitionsListResult struct { autorest.Response `json:"-"` @@ -2667,8 +2532,7 @@ func (mdccup *MongoDBCollectionCreateUpdateParameters) UnmarshalJSON(body []byte return nil } -// MongoDBCollectionCreateUpdateProperties properties to create and update Azure Cosmos DB MongoDB -// collection. +// MongoDBCollectionCreateUpdateProperties properties to create and update Azure Cosmos DB MongoDB collection. type MongoDBCollectionCreateUpdateProperties struct { // Resource - The standard JSON format of a MongoDB collection Resource *MongoDBCollectionResource `json:"resource,omitempty"` @@ -3045,10 +2909,15 @@ func (olr OperationListResult) IsEmpty() bool { return olr.Value == nil || len(*olr.Value) == 0 } +// hasNextLink returns true if the NextLink is not empty. +func (olr OperationListResult) hasNextLink() bool { + return olr.NextLink != nil && len(*olr.NextLink) != 0 +} + // operationListResultPreparer prepares a request to retrieve the next set of results. // It returns nil if no more results exist. func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) { - if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 { + if !olr.hasNextLink() { return nil, nil } return autorest.Prepare((&http.Request{}).WithContext(ctx), @@ -3076,11 +2945,16 @@ func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err e tracing.EndSpan(ctx, sc, err) }() } - next, err := page.fn(ctx, page.olr) - if err != nil { - return err + for { + next, err := page.fn(ctx, page.olr) + if err != nil { + return err + } + page.olr = next + if !next.hasNextLink() || !next.IsEmpty() { + break + } } - page.olr = next return nil } @@ -3134,6 +3008,15 @@ type PartitionMetric struct { MetricValues *[]MetricValue `json:"metricValues,omitempty"` } +// MarshalJSON is the custom marshaler for PartitionMetric. +func (pm PartitionMetric) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pm.Unit != "" { + objectMap["unit"] = pm.Unit + } + return json.Marshal(objectMap) +} + // PartitionMetricListResult the response to a list partition metrics request. type PartitionMetricListResult struct { autorest.Response `json:"-"` @@ -3159,6 +3042,15 @@ type PartitionUsage struct { CurrentValue *int64 `json:"currentValue,omitempty"` } +// MarshalJSON is the custom marshaler for PartitionUsage. +func (pu PartitionUsage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pu.Unit != "" { + objectMap["unit"] = pu.Unit + } + return json.Marshal(objectMap) +} + // PartitionUsagesResult the response to a list partition level usage request. type PartitionUsagesResult struct { autorest.Response `json:"-"` @@ -3182,6 +3074,15 @@ type PercentileMetric struct { MetricValues *[]PercentileMetricValue `json:"metricValues,omitempty"` } +// MarshalJSON is the custom marshaler for PercentileMetric. +func (pm PercentileMetric) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if pm.Unit != "" { + objectMap["unit"] = pm.Unit + } + return json.Marshal(objectMap) +} + // PercentileMetricListResult the response to a list percentile metrics request. type PercentileMetricListResult struct { autorest.Response `json:"-"` @@ -3977,15 +3878,15 @@ type ThroughputUpdateProperties struct { Resource *ThroughputResource `json:"resource,omitempty"` } -// UniqueKey the unique key on that enforces uniqueness constraint on documents in the collection in the -// Azure Cosmos DB service. +// UniqueKey the unique key on that enforces uniqueness constraint on documents in the collection in the Azure +// Cosmos DB service. type UniqueKey struct { // Paths - List of paths must be unique for each document in the Azure Cosmos DB service Paths *[]string `json:"paths,omitempty"` } -// UniqueKeyPolicy the unique key policy configuration for specifying uniqueness constraints on documents -// in the collection in the Azure Cosmos DB service. +// UniqueKeyPolicy the unique key policy configuration for specifying uniqueness constraints on documents in +// the collection in the Azure Cosmos DB service. type UniqueKeyPolicy struct { // UniqueKeys - List of unique keys on that enforces uniqueness constraint on documents in the collection in the Azure Cosmos DB service. UniqueKeys *[]UniqueKey `json:"uniqueKeys,omitempty"` @@ -4005,6 +3906,15 @@ type Usage struct { CurrentValue *int64 `json:"currentValue,omitempty"` } +// MarshalJSON is the custom marshaler for Usage. +func (u Usage) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if u.Unit != "" { + objectMap["unit"] = u.Unit + } + return json.Marshal(objectMap) +} + // UsagesResult the response to a list usage request. type UsagesResult struct { autorest.Response `json:"-"` diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/operations.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/operations.go index ed085fb9562d..100ac3ac63f2 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/operations.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/operations.go @@ -71,6 +71,9 @@ func (client OperationsClient) List(ctx context.Context) (result OperationListRe if err != nil { err = autorest.NewErrorWithError(err, "documentdb.OperationsClient", "List", resp, "Failure responding to request") } + if result.olr.hasNextLink() && result.olr.IsEmpty() { + err = result.NextWithContext(ctx) + } return } @@ -101,7 +104,6 @@ func (client OperationsClient) ListSender(req *http.Request) (*http.Response, er func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeid.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeid.go index 6ef843932c2c..9ec50bc1e9cd 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeid.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeid.go @@ -133,7 +133,6 @@ func (client PartitionKeyRangeIDClient) ListMetricsSender(req *http.Request) (*h func (client PartitionKeyRangeIDClient) ListMetricsResponder(resp *http.Response) (result PartitionMetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeidregion.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeidregion.go index 176586068b5f..c8513d6fc029 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeidregion.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeidregion.go @@ -135,7 +135,6 @@ func (client PartitionKeyRangeIDRegionClient) ListMetricsSender(req *http.Reques func (client PartitionKeyRangeIDRegionClient) ListMetricsResponder(resp *http.Response) (result PartitionMetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/percentile.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/percentile.go index 34f9b3942879..bcb69da25baa 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/percentile.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/percentile.go @@ -127,7 +127,6 @@ func (client PercentileClient) ListMetricsSender(req *http.Request) (*http.Respo func (client PercentileClient) ListMetricsResponder(resp *http.Response) (result PercentileMetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/percentilesourcetarget.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/percentilesourcetarget.go index 5f0edad13a9c..00a9038df32e 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/percentilesourcetarget.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/percentilesourcetarget.go @@ -134,7 +134,6 @@ func (client PercentileSourceTargetClient) ListMetricsSender(req *http.Request) func (client PercentileSourceTargetClient) ListMetricsResponder(resp *http.Response) (result PercentileMetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/percentiletarget.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/percentiletarget.go index 036dfaeb4ede..066d3b5c061a 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/percentiletarget.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/percentiletarget.go @@ -131,7 +131,6 @@ func (client PercentileTargetClient) ListMetricsSender(req *http.Request) (*http func (client PercentileTargetClient) ListMetricsResponder(resp *http.Response) (result PercentileMetricListResult, err error) { err = autorest.Respond( resp, - client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) diff --git a/services/cosmos-db/mgmt/2015-04-08/documentdb/version.go b/services/cosmos-db/mgmt/2015-04-08/documentdb/version.go index 6fd89db64306..fe4c03bff99f 100644 --- a/services/cosmos-db/mgmt/2015-04-08/documentdb/version.go +++ b/services/cosmos-db/mgmt/2015-04-08/documentdb/version.go @@ -21,7 +21,7 @@ import "github.com/Azure/azure-sdk-for-go/version" // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/" + version.Number + " documentdb/2015-04-08" + return "Azure-SDK-For-Go/" + Version() + " documentdb/2015-04-08" } // Version returns the semantic version (see http://semver.org) of the client.