From 9daf8bd4883932c21f932e45b70d3f5e98efa836 Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Wed, 27 May 2020 10:56:29 -0400 Subject: [PATCH 01/10] autogenerated swagger files and pom.xml --- sdk/cosmos/azure-cosmos-table/pom.xml | 17 + .../microsoft/azure/tables/AzureTable.java | 108 ++ .../azure/tables/AzureTableBuilder.java | 79 ++ .../com/microsoft/azure/tables/Services.java | 221 ++++ .../com/microsoft/azure/tables/Tables.java | 985 ++++++++++++++++++ .../azure/tables/models/AccessPolicy.java | 87 ++ .../azure/tables/models/CorsRule.java | 159 +++ .../azure/tables/models/GeoReplication.java | 76 ++ .../models/GeoReplicationStatusType.java | 33 + .../azure/tables/models/Logging.java | 138 +++ .../azure/tables/models/Metrics.java | 115 ++ .../tables/models/OdataMetadataFormat.java | 36 + .../azure/tables/models/QueryOptions.java | 116 +++ .../azure/tables/models/ResponseFormat.java | 30 + .../azure/tables/models/RetentionPolicy.java | 63 ++ .../models/ServicesGetPropertiesHeaders.java | 86 ++ .../models/ServicesGetPropertiesResponse.java | 33 + .../models/ServicesGetStatisticsHeaders.java | 121 +++ .../models/ServicesGetStatisticsResponse.java | 32 + .../models/ServicesSetPropertiesHeaders.java | 86 ++ .../models/ServicesSetPropertiesResponse.java | 26 + .../azure/tables/models/SignedIdentifier.java | 60 ++ .../models/TableEntityQueryResponse.java | 62 ++ .../azure/tables/models/TableProperties.java | 34 + .../tables/models/TableQueryResponse.java | 61 ++ .../azure/tables/models/TableResponse.java | 34 + .../models/TableResponseProperties.java | 112 ++ .../tables/models/TableServiceError.java | 34 + .../models/TableServiceErrorException.java | 33 + .../tables/models/TableServiceProperties.java | 115 ++ .../tables/models/TableServiceStats.java | 34 + .../tables/models/TablesCreateHeaders.java | 147 +++ .../tables/models/TablesCreateResponse.java | 32 + .../models/TablesDeleteEntityHeaders.java | 121 +++ .../models/TablesDeleteEntityResponse.java | 26 + .../tables/models/TablesDeleteHeaders.java | 121 +++ .../tables/models/TablesDeleteResponse.java | 22 + .../models/TablesGetAccessPolicyHeaders.java | 121 +++ .../models/TablesGetAccessPolicyResponse.java | 34 + .../models/TablesInsertEntityHeaders.java | 199 ++++ .../models/TablesInsertEntityResponse.java | 33 + .../models/TablesMergeEntityHeaders.java | 147 +++ .../models/TablesMergeEntityResponse.java | 22 + .../models/TablesQueryEntitiesHeaders.java | 173 +++ .../models/TablesQueryEntitiesResponse.java | 33 + ...EntitiesWithPartitionAndRowKeyHeaders.java | 201 ++++ ...ntitiesWithPartitionAndRowKeyResponse.java | 33 + .../tables/models/TablesQueryHeaders.java | 147 +++ .../tables/models/TablesQueryResponse.java | 32 + .../models/TablesSetAccessPolicyHeaders.java | 121 +++ .../models/TablesSetAccessPolicyResponse.java | 26 + .../models/TablesUpdateEntityHeaders.java | 147 +++ .../models/TablesUpdateEntityResponse.java | 26 + .../azure/tables/models/package-info.java | 2 + .../microsoft/azure/tables/package-info.java | 2 + 55 files changed, 5194 insertions(+) create mode 100644 sdk/cosmos/azure-cosmos-table/pom.xml create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTable.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTableBuilder.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Services.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Tables.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/AccessPolicy.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/CorsRule.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/GeoReplication.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/GeoReplicationStatusType.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/Logging.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/Metrics.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/OdataMetadataFormat.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/QueryOptions.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ResponseFormat.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/RetentionPolicy.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetPropertiesHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetPropertiesResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetStatisticsHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetStatisticsResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesSetPropertiesHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesSetPropertiesResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/SignedIdentifier.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableEntityQueryResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableProperties.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableQueryResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableResponseProperties.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceError.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceErrorException.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceProperties.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceStats.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesCreateHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesCreateResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteEntityHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteEntityResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesGetAccessPolicyHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesGetAccessPolicyResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesInsertEntityHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesInsertEntityResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesMergeEntityHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesMergeEntityResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesSetAccessPolicyHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesSetAccessPolicyResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesUpdateEntityHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesUpdateEntityResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/package-info.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/package-info.java diff --git a/sdk/cosmos/azure-cosmos-table/pom.xml b/sdk/cosmos/azure-cosmos-table/pom.xml new file mode 100644 index 000000000000..199db19b04d8 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/pom.xml @@ -0,0 +1,17 @@ + + 4.0.0 + + org.example + my-test-project + 1.0 + + + com.azure + azure-core + 1.5.0 + + + diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTable.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTable.java new file mode 100644 index 000000000000..40011a10b87a --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTable.java @@ -0,0 +1,108 @@ +package com.microsoft.azure.tables; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; + +/** Initializes a new instance of the AzureTable type. */ +public final class AzureTable { + /** The URL of the service account or table that is the targe of the desired operation. */ + private String url; + + /** + * Gets The URL of the service account or table that is the targe of the desired operation. + * + * @return the url value. + */ + public String getUrl() { + return this.url; + } + + /** + * Sets The URL of the service account or table that is the targe of the desired operation. + * + * @param url the url value. + * @return the service client itself. + */ + public AzureTable setUrl(String url) { + this.url = url; + return this; + } + + /** Specifies the version of the operation to use for this request. */ + private String version; + + /** + * Gets Specifies the version of the operation to use for this request. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Sets Specifies the version of the operation to use for this request. + * + * @param version the version value. + * @return the service client itself. + */ + public AzureTable setVersion(String version) { + this.version = version; + return this; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The Tables object to access its operations. */ + private final Tables tables; + + /** + * Gets the Tables object to access its operations. + * + * @return the Tables object. + */ + public Tables getTables() { + return this.tables; + } + + /** The Services object to access its operations. */ + private final Services services; + + /** + * Gets the Services object to access its operations. + * + * @return the Services object. + */ + public Services getServices() { + return this.services; + } + + /** Initializes an instance of AzureTable client. */ + public AzureTable() { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build()); + } + + /** + * Initializes an instance of AzureTable client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + */ + public AzureTable(HttpPipeline httpPipeline) { + this.httpPipeline = httpPipeline; + this.tables = new Tables(this); + this.services = new Services(this); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTableBuilder.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTableBuilder.java new file mode 100644 index 000000000000..32f47ad34ec5 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTableBuilder.java @@ -0,0 +1,79 @@ +package com.microsoft.azure.tables; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; + +/** A builder for creating a new instance of the AzureTable type. */ +@ServiceClientBuilder(serviceClients = {AzureTable.class}) +public final class AzureTableBuilder { + /* + * The URL of the service account or table that is the targe of the desired + * operation. + */ + private String url; + + /** + * Sets The URL of the service account or table that is the targe of the desired operation. + * + * @param url the url value. + * @return the AzureTableBuilder. + */ + public AzureTableBuilder url(String url) { + this.url = url; + return this; + } + + /* + * Specifies the version of the operation to use for this request. + */ + private String version; + + /** + * Sets Specifies the version of the operation to use for this request. + * + * @param version the version value. + * @return the AzureTableBuilder. + */ + public AzureTableBuilder version(String version) { + this.version = version; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the AzureTableBuilder. + */ + public AzureTableBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /** + * Builds an instance of AzureTable with the provided parameters. + * + * @return an instance of AzureTable. + */ + public AzureTable buildClient() { + if (pipeline == null) { + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); + } + AzureTable client = new AzureTable(pipeline); + client.setUrl(this.url); + client.setVersion(this.version); + return client; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Services.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Services.java new file mode 100644 index 000000000000..947c6bfb1cf3 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Services.java @@ -0,0 +1,221 @@ +package com.microsoft.azure.tables; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.RestProxy; +import com.microsoft.azure.tables.models.ServicesGetPropertiesResponse; +import com.microsoft.azure.tables.models.ServicesGetStatisticsResponse; +import com.microsoft.azure.tables.models.ServicesSetPropertiesResponse; +import com.microsoft.azure.tables.models.TableServiceErrorException; +import com.microsoft.azure.tables.models.TableServiceProperties; +import com.microsoft.azure.tables.models.TableServiceStats; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Services. */ +public final class Services { + /** The proxy service used to perform REST calls. */ + private final ServicesService service; + + /** The service client containing this operation class. */ + private final AzureTable client; + + /** + * Initializes an instance of Services. + * + * @param client the instance of the service client containing this operation class. + */ + Services(AzureTable client) { + this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * The interface defining all the services for AzureTableServices to be used by the proxy service to perform REST + * calls. + */ + @Host("{url}") + @ServiceInterface(name = "AzureTableServices") + private interface ServicesService { + @Put("/") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono setProperties( + @HostParam("url") String url, + @QueryParam("restype") String restype, + @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") TableServiceProperties tableServiceProperties); + + @Get("/") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono getProperties( + @HostParam("url") String url, + @QueryParam("restype") String restype, + @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId); + + @Get("/") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono getStatistics( + @HostParam("url") String url, + @QueryParam("restype") String restype, + @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId); + } + + /** + * Sets properties for an account's Table service endpoint, including properties for Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @param tableServiceProperties Table Service Properties. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setPropertiesWithResponseAsync( + TableServiceProperties tableServiceProperties, Integer timeout, String requestId) { + final String restype = "service"; + final String comp = "properties"; + return service.setProperties( + this.client.getUrl(), + restype, + comp, + timeout, + this.client.getVersion(), + requestId, + tableServiceProperties); + } + + /** + * Sets properties for an account's Table service endpoint, including properties for Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @param tableServiceProperties Table Service Properties. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setPropertiesAsync( + TableServiceProperties tableServiceProperties, Integer timeout, String requestId) { + return setPropertiesWithResponseAsync(tableServiceProperties, timeout, requestId) + .flatMap((ServicesSetPropertiesResponse res) -> Mono.empty()); + } + + /** + * Gets the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin + * Resource Sharing) rules. + * + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin + * Resource Sharing) rules. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPropertiesWithResponseAsync(Integer timeout, String requestId) { + final String restype = "service"; + final String comp = "properties"; + return service.getProperties(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId); + } + + /** + * Gets the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin + * Resource Sharing) rules. + * + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin + * Resource Sharing) rules. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPropertiesAsync(Integer timeout, String requestId) { + return getPropertiesWithResponseAsync(timeout, requestId) + .flatMap( + (ServicesGetPropertiesResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Retrieves statistics related to replication for the Table service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the account. + * + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return stats for the service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getStatisticsWithResponseAsync(Integer timeout, String requestId) { + final String restype = "service"; + final String comp = "stats"; + return service.getStatistics(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId); + } + + /** + * Retrieves statistics related to replication for the Table service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the account. + * + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return stats for the service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getStatisticsAsync(Integer timeout, String requestId) { + return getStatisticsWithResponseAsync(timeout, requestId) + .flatMap( + (ServicesGetStatisticsResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Tables.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Tables.java new file mode 100644 index 000000000000..4fb378fe8d86 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Tables.java @@ -0,0 +1,985 @@ +package com.microsoft.azure.tables; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.RestProxy; +import com.microsoft.azure.tables.models.OdataMetadataFormat; +import com.microsoft.azure.tables.models.QueryOptions; +import com.microsoft.azure.tables.models.ResponseFormat; +import com.microsoft.azure.tables.models.SignedIdentifier; +import com.microsoft.azure.tables.models.TableEntityQueryResponse; +import com.microsoft.azure.tables.models.TableProperties; +import com.microsoft.azure.tables.models.TableQueryResponse; +import com.microsoft.azure.tables.models.TableResponse; +import com.microsoft.azure.tables.models.TableServiceErrorException; +import com.microsoft.azure.tables.models.TablesCreateResponse; +import com.microsoft.azure.tables.models.TablesDeleteEntityResponse; +import com.microsoft.azure.tables.models.TablesDeleteResponse; +import com.microsoft.azure.tables.models.TablesGetAccessPolicyResponse; +import com.microsoft.azure.tables.models.TablesInsertEntityResponse; +import com.microsoft.azure.tables.models.TablesMergeEntityResponse; +import com.microsoft.azure.tables.models.TablesQueryEntitiesResponse; +import com.microsoft.azure.tables.models.TablesQueryEntitiesWithPartitionAndRowKeyResponse; +import com.microsoft.azure.tables.models.TablesQueryResponse; +import com.microsoft.azure.tables.models.TablesSetAccessPolicyResponse; +import com.microsoft.azure.tables.models.TablesUpdateEntityResponse; +import java.util.List; +import java.util.Map; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Tables. */ +public final class Tables { + /** The proxy service used to perform REST calls. */ + private final TablesService service; + + /** The service client containing this operation class. */ + private final AzureTable client; + + /** + * Initializes an instance of Tables. + * + * @param client the instance of the service client containing this operation class. + */ + Tables(AzureTable client) { + this.service = RestProxy.create(TablesService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * The interface defining all the services for AzureTableTables to be used by the proxy service to perform REST + * calls. + */ + @Host("{url}") + @ServiceInterface(name = "AzureTableTables") + private interface TablesService { + @Get("/Tables") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono query( + @HostParam("url") String url, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @QueryParam("$top") Integer top, + @QueryParam("$select") String select, + @QueryParam("$filter") String filter, + @QueryParam("NextTableName") String nextTableName); + + @Post("/Tables") + @ExpectedResponses({201, 204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono create( + @HostParam("url") String url, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @HeaderParam("Prefer") ResponseFormat responsePreference, + @BodyParam("application/json") TableProperties tableProperties); + + @Delete("/Tables('{table}')") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono delete( + @HostParam("url") String url, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @PathParam("table") String table); + + @Get("/{table}()") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono queryEntities( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @QueryParam("$top") Integer top, + @QueryParam("$select") String select, + @QueryParam("$filter") String filter, + @PathParam("table") String table, + @QueryParam("NextPartitionKey") String nextPartitionKey, + @QueryParam("NextRowKey") String nextRowKey); + + @Get("/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono queryEntitiesWithPartitionAndRowKey( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @QueryParam("$select") String select, + @QueryParam("$filter") String filter, + @PathParam("table") String table, + @PathParam("partitionKey") String partitionKey, + @PathParam("rowKey") String rowKey); + + @Put("/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono updateEntity( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @PathParam("table") String table, + @PathParam("partitionKey") String partitionKey, + @PathParam("rowKey") String rowKey, + @HeaderParam("If-Match") String ifMatch, + @BodyParam("application/json") Map tableEntityProperties); + + @Patch("/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono mergeEntity( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @PathParam("table") String table, + @PathParam("partitionKey") String partitionKey, + @PathParam("rowKey") String rowKey, + @HeaderParam("If-Match") String ifMatch, + @BodyParam("application/json") Map tableEntityProperties); + + @Delete("/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono deleteEntity( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @PathParam("table") String table, + @PathParam("partitionKey") String partitionKey, + @PathParam("rowKey") String rowKey, + @HeaderParam("If-Match") String ifMatch); + + @Post("/{table}") + @ExpectedResponses({201, 204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono insertEntity( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @PathParam("table") String table, + @HeaderParam("Prefer") ResponseFormat responsePreference, + @BodyParam("application/json") Map tableEntityProperties); + + @Get("/{table}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono getAccessPolicy( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @PathParam("table") String table, + @QueryParam("comp") String comp); + + @Put("/{table}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono setAccessPolicy( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @PathParam("table") String table, + @QueryParam("comp") String comp, + @BodyParam("application/xml") List tableAcl); + } + + /** + * Queries tables under the given account. + * + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param nextTableName A table query continuation token from a previous call. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties for the table query response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono queryWithResponseAsync( + String requestId, String nextTableName, QueryOptions queryOptions) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + Integer topInternal = null; + if (queryOptions != null) { + topInternal = queryOptions.getTop(); + } + Integer top = topInternal; + String selectInternal = null; + if (queryOptions != null) { + selectInternal = queryOptions.getSelect(); + } + String select = selectInternal; + String filterInternal = null; + if (queryOptions != null) { + filterInternal = queryOptions.getFilter(); + } + String filter = filterInternal; + return service.query( + this.client.getUrl(), + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + top, + select, + filter, + nextTableName); + } + + /** + * Queries tables under the given account. + * + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param nextTableName A table query continuation token from a previous call. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties for the table query response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono queryAsync(String requestId, String nextTableName, QueryOptions queryOptions) { + return queryWithResponseAsync(requestId, nextTableName, queryOptions) + .flatMap( + (TablesQueryResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Creates a new table under the given account. + * + * @param tableProperties The properties for creating a table. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param responsePreference Specifies whether the response should include the inserted entity in the payload. + * Possible values are return-no-content and return-content. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response for a single table. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createWithResponseAsync( + TableProperties tableProperties, + String requestId, + ResponseFormat responsePreference, + QueryOptions queryOptions) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + return service.create( + this.client.getUrl(), + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + responsePreference, + tableProperties); + } + + /** + * Creates a new table under the given account. + * + * @param tableProperties The properties for creating a table. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param responsePreference Specifies whether the response should include the inserted entity in the payload. + * Possible values are return-no-content and return-content. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response for a single table. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createAsync( + TableProperties tableProperties, + String requestId, + ResponseFormat responsePreference, + QueryOptions queryOptions) { + return createWithResponseAsync(tableProperties, requestId, responsePreference, queryOptions) + .flatMap( + (TablesCreateResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Operation permanently deletes the specified table. + * + * @param table The name of the table. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteWithResponseAsync(String table, String requestId) { + return service.delete(this.client.getUrl(), this.client.getVersion(), requestId, table); + } + + /** + * Operation permanently deletes the specified table. + * + * @param table The name of the table. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteAsync(String table, String requestId) { + return deleteWithResponseAsync(table, requestId).flatMap((TablesDeleteResponse res) -> Mono.empty()); + } + + /** + * Queries entities in a table. + * + * @param table The name of the table. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param nextPartitionKey An entity query continuation token from a previous call. + * @param nextRowKey An entity query continuation token from a previous call. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties for the table entity query response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono queryEntitiesWithResponseAsync( + String table, + Integer timeout, + String requestId, + String nextPartitionKey, + String nextRowKey, + QueryOptions queryOptions) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + Integer topInternal = null; + if (queryOptions != null) { + topInternal = queryOptions.getTop(); + } + Integer top = topInternal; + String selectInternal = null; + if (queryOptions != null) { + selectInternal = queryOptions.getSelect(); + } + String select = selectInternal; + String filterInternal = null; + if (queryOptions != null) { + filterInternal = queryOptions.getFilter(); + } + String filter = filterInternal; + return service.queryEntities( + this.client.getUrl(), + timeout, + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + top, + select, + filter, + table, + nextPartitionKey, + nextRowKey); + } + + /** + * Queries entities in a table. + * + * @param table The name of the table. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param nextPartitionKey An entity query continuation token from a previous call. + * @param nextRowKey An entity query continuation token from a previous call. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties for the table entity query response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono queryEntitiesAsync( + String table, + Integer timeout, + String requestId, + String nextPartitionKey, + String nextRowKey, + QueryOptions queryOptions) { + return queryEntitiesWithResponseAsync(table, timeout, requestId, nextPartitionKey, nextRowKey, queryOptions) + .flatMap( + (TablesQueryEntitiesResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Queries entities in a table. + * + * @param table The name of the table. + * @param partitionKey The partition key of the entity. + * @param rowKey The row key of the entity. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties for the table entity query response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono queryEntitiesWithPartitionAndRowKeyWithResponseAsync( + String table, + String partitionKey, + String rowKey, + Integer timeout, + String requestId, + QueryOptions queryOptions) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + String selectInternal = null; + if (queryOptions != null) { + selectInternal = queryOptions.getSelect(); + } + String select = selectInternal; + String filterInternal = null; + if (queryOptions != null) { + filterInternal = queryOptions.getFilter(); + } + String filter = filterInternal; + return service.queryEntitiesWithPartitionAndRowKey( + this.client.getUrl(), + timeout, + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + select, + filter, + table, + partitionKey, + rowKey); + } + + /** + * Queries entities in a table. + * + * @param table The name of the table. + * @param partitionKey The partition key of the entity. + * @param rowKey The row key of the entity. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties for the table entity query response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono queryEntitiesWithPartitionAndRowKeyAsync( + String table, + String partitionKey, + String rowKey, + Integer timeout, + String requestId, + QueryOptions queryOptions) { + return queryEntitiesWithPartitionAndRowKeyWithResponseAsync( + table, partitionKey, rowKey, timeout, requestId, queryOptions) + .flatMap( + (TablesQueryEntitiesWithPartitionAndRowKeyResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Update entity in a table. + * + * @param table The name of the table. + * @param partitionKey The partition key of the entity. + * @param rowKey The row key of the entity. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param ifMatch Match condition for an entity to be updated. If specified and a matching entity is not found, an + * error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, + * an insert will be performed when no existing entity is found to update and a replace will be performed if an + * existing entity is found. + * @param tableEntityProperties The other properties of the table entity. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateEntityWithResponseAsync( + String table, + String partitionKey, + String rowKey, + Integer timeout, + String requestId, + String ifMatch, + Map tableEntityProperties, + QueryOptions queryOptions) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + return service.updateEntity( + this.client.getUrl(), + timeout, + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + table, + partitionKey, + rowKey, + ifMatch, + tableEntityProperties); + } + + /** + * Update entity in a table. + * + * @param table The name of the table. + * @param partitionKey The partition key of the entity. + * @param rowKey The row key of the entity. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param ifMatch Match condition for an entity to be updated. If specified and a matching entity is not found, an + * error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, + * an insert will be performed when no existing entity is found to update and a replace will be performed if an + * existing entity is found. + * @param tableEntityProperties The other properties of the table entity. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateEntityAsync( + String table, + String partitionKey, + String rowKey, + Integer timeout, + String requestId, + String ifMatch, + Map tableEntityProperties, + QueryOptions queryOptions) { + return updateEntityWithResponseAsync( + table, partitionKey, rowKey, timeout, requestId, ifMatch, tableEntityProperties, queryOptions) + .flatMap((TablesUpdateEntityResponse res) -> Mono.empty()); + } + + /** + * Merge entity in a table. + * + * @param table The name of the table. + * @param partitionKey The partition key of the entity. + * @param rowKey The row key of the entity. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param ifMatch Match condition for an entity to be updated. If specified and a matching entity is not found, an + * error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, + * an insert will be performed when no existing entity is found to update and a merge will be performed if an + * existing entity is found. + * @param tableEntityProperties The other properties of the table entity. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono mergeEntityWithResponseAsync( + String table, + String partitionKey, + String rowKey, + Integer timeout, + String requestId, + String ifMatch, + Map tableEntityProperties, + QueryOptions queryOptions) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + return service.mergeEntity( + this.client.getUrl(), + timeout, + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + table, + partitionKey, + rowKey, + ifMatch, + tableEntityProperties); + } + + /** + * Merge entity in a table. + * + * @param table The name of the table. + * @param partitionKey The partition key of the entity. + * @param rowKey The row key of the entity. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param ifMatch Match condition for an entity to be updated. If specified and a matching entity is not found, an + * error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, + * an insert will be performed when no existing entity is found to update and a merge will be performed if an + * existing entity is found. + * @param tableEntityProperties The other properties of the table entity. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono mergeEntityAsync( + String table, + String partitionKey, + String rowKey, + Integer timeout, + String requestId, + String ifMatch, + Map tableEntityProperties, + QueryOptions queryOptions) { + return mergeEntityWithResponseAsync( + table, partitionKey, rowKey, timeout, requestId, ifMatch, tableEntityProperties, queryOptions) + .flatMap((TablesMergeEntityResponse res) -> Mono.empty()); + } + + /** + * Deletes the specified entity in a table. + * + * @param table The name of the table. + * @param partitionKey The partition key of the entity. + * @param rowKey The row key of the entity. + * @param ifMatch Match condition for an entity to be deleted. If specified and a matching entity is not found, an + * error will be raised. To force an unconditional delete, set to the wildcard character (*). + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteEntityWithResponseAsync( + String table, + String partitionKey, + String rowKey, + String ifMatch, + Integer timeout, + String requestId, + QueryOptions queryOptions) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + return service.deleteEntity( + this.client.getUrl(), + timeout, + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + table, + partitionKey, + rowKey, + ifMatch); + } + + /** + * Deletes the specified entity in a table. + * + * @param table The name of the table. + * @param partitionKey The partition key of the entity. + * @param rowKey The row key of the entity. + * @param ifMatch Match condition for an entity to be deleted. If specified and a matching entity is not found, an + * error will be raised. To force an unconditional delete, set to the wildcard character (*). + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteEntityAsync( + String table, + String partitionKey, + String rowKey, + String ifMatch, + Integer timeout, + String requestId, + QueryOptions queryOptions) { + return deleteEntityWithResponseAsync(table, partitionKey, rowKey, ifMatch, timeout, requestId, queryOptions) + .flatMap((TablesDeleteEntityResponse res) -> Mono.empty()); + } + + /** + * Insert entity in a table. + * + * @param table The name of the table. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param responsePreference Specifies whether the response should include the inserted entity in the payload. + * Possible values are return-no-content and return-content. + * @param tableEntityProperties The other properties of the table entity. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the other properties of the table entity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono insertEntityWithResponseAsync( + String table, + Integer timeout, + String requestId, + ResponseFormat responsePreference, + Map tableEntityProperties, + QueryOptions queryOptions) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + return service.insertEntity( + this.client.getUrl(), + timeout, + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + table, + responsePreference, + tableEntityProperties); + } + + /** + * Insert entity in a table. + * + * @param table The name of the table. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param responsePreference Specifies whether the response should include the inserted entity in the payload. + * Possible values are return-no-content and return-content. + * @param tableEntityProperties The other properties of the table entity. + * @param queryOptions Parameter group. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the other properties of the table entity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> insertEntityAsync( + String table, + Integer timeout, + String requestId, + ResponseFormat responsePreference, + Map tableEntityProperties, + QueryOptions queryOptions) { + return insertEntityWithResponseAsync( + table, timeout, requestId, responsePreference, tableEntityProperties, queryOptions) + .flatMap( + (TablesInsertEntityResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Retrieves details about any stored access policies specified on the table that may be used with Shared Access + * Signatures. + * + * @param table The name of the table. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of signed identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccessPolicyWithResponseAsync( + String table, Integer timeout, String requestId) { + final String comp = "acl"; + return service.getAccessPolicy(this.client.getUrl(), timeout, this.client.getVersion(), requestId, table, comp); + } + + /** + * Retrieves details about any stored access policies specified on the table that may be used with Shared Access + * Signatures. + * + * @param table The name of the table. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of signed identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAccessPolicyAsync(String table, Integer timeout, String requestId) { + return getAccessPolicyWithResponseAsync(table, timeout, requestId) + .flatMap( + (TablesGetAccessPolicyResponse res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Sets stored access policies for the table that may be used with Shared Access Signatures. + * + * @param table The name of the table. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param tableAcl A collection of signed identifiers. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setAccessPolicyWithResponseAsync( + String table, Integer timeout, String requestId, List tableAcl) { + final String comp = "acl"; + return service.setAccessPolicy( + this.client.getUrl(), timeout, this.client.getVersion(), requestId, table, comp, tableAcl); + } + + /** + * Sets stored access policies for the table that may be used with Shared Access Signatures. + * + * @param table The name of the table. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param tableAcl A collection of signed identifiers. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setAccessPolicyAsync( + String table, Integer timeout, String requestId, List tableAcl) { + return setAccessPolicyWithResponseAsync(table, timeout, requestId, tableAcl) + .flatMap((TablesSetAccessPolicyResponse res) -> Mono.empty()); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/AccessPolicy.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/AccessPolicy.java new file mode 100644 index 000000000000..0ead9f890a54 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/AccessPolicy.java @@ -0,0 +1,87 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The AccessPolicy model. */ +@Fluent +public final class AccessPolicy { + /* + * The start datetime from which the policy is active. + */ + @JsonProperty(value = "Start", required = true) + private OffsetDateTime start; + + /* + * The datetime that the policy expires. + */ + @JsonProperty(value = "Expiry", required = true) + private OffsetDateTime expiry; + + /* + * The permissions for the acl policy. + */ + @JsonProperty(value = "Permission", required = true) + private String permission; + + /** + * Get the start property: The start datetime from which the policy is active. + * + * @return the start value. + */ + public OffsetDateTime getStart() { + return this.start; + } + + /** + * Set the start property: The start datetime from which the policy is active. + * + * @param start the start value to set. + * @return the AccessPolicy object itself. + */ + public AccessPolicy setStart(OffsetDateTime start) { + this.start = start; + return this; + } + + /** + * Get the expiry property: The datetime that the policy expires. + * + * @return the expiry value. + */ + public OffsetDateTime getExpiry() { + return this.expiry; + } + + /** + * Set the expiry property: The datetime that the policy expires. + * + * @param expiry the expiry value to set. + * @return the AccessPolicy object itself. + */ + public AccessPolicy setExpiry(OffsetDateTime expiry) { + this.expiry = expiry; + return this; + } + + /** + * Get the permission property: The permissions for the acl policy. + * + * @return the permission value. + */ + public String getPermission() { + return this.permission; + } + + /** + * Set the permission property: The permissions for the acl policy. + * + * @param permission the permission value to set. + * @return the AccessPolicy object itself. + */ + public AccessPolicy setPermission(String permission) { + this.permission = permission; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/CorsRule.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/CorsRule.java new file mode 100644 index 000000000000..cb76c026b53c --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/CorsRule.java @@ -0,0 +1,159 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The CorsRule model. */ +@Fluent +public final class CorsRule { + /* + * The origin domains that are permitted to make a request against the + * service via CORS. The origin domain is the domain from which the request + * originates. Note that the origin must be an exact case-sensitive match + * with the origin that the user age sends to the service. You can also use + * the wildcard character '*' to allow all origin domains to make requests + * via CORS. + */ + @JsonProperty(value = "AllowedOrigins", required = true) + private String allowedOrigins; + + /* + * The methods (HTTP request verbs) that the origin domain may use for a + * CORS request. (comma separated) + */ + @JsonProperty(value = "AllowedMethods", required = true) + private String allowedMethods; + + /* + * The request headers that the origin domain may specify on the CORS + * request. + */ + @JsonProperty(value = "AllowedHeaders", required = true) + private String allowedHeaders; + + /* + * The response headers that may be sent in the response to the CORS + * request and exposed by the browser to the request issuer. + */ + @JsonProperty(value = "ExposedHeaders", required = true) + private String exposedHeaders; + + /* + * The maximum amount time that a browser should cache the preflight + * OPTIONS request. + */ + @JsonProperty(value = "MaxAgeInSeconds", required = true) + private int maxAgeInSeconds; + + /** + * Get the allowedOrigins property: The origin domains that are permitted to make a request against the service via + * CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact + * case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard + * character '*' to allow all origin domains to make requests via CORS. + * + * @return the allowedOrigins value. + */ + public String getAllowedOrigins() { + return this.allowedOrigins; + } + + /** + * Set the allowedOrigins property: The origin domains that are permitted to make a request against the service via + * CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact + * case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard + * character '*' to allow all origin domains to make requests via CORS. + * + * @param allowedOrigins the allowedOrigins value to set. + * @return the CorsRule object itself. + */ + public CorsRule setAllowedOrigins(String allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + + /** + * Get the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS + * request. (comma separated). + * + * @return the allowedMethods value. + */ + public String getAllowedMethods() { + return this.allowedMethods; + } + + /** + * Set the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS + * request. (comma separated). + * + * @param allowedMethods the allowedMethods value to set. + * @return the CorsRule object itself. + */ + public CorsRule setAllowedMethods(String allowedMethods) { + this.allowedMethods = allowedMethods; + return this; + } + + /** + * Get the allowedHeaders property: The request headers that the origin domain may specify on the CORS request. + * + * @return the allowedHeaders value. + */ + public String getAllowedHeaders() { + return this.allowedHeaders; + } + + /** + * Set the allowedHeaders property: The request headers that the origin domain may specify on the CORS request. + * + * @param allowedHeaders the allowedHeaders value to set. + * @return the CorsRule object itself. + */ + public CorsRule setAllowedHeaders(String allowedHeaders) { + this.allowedHeaders = allowedHeaders; + return this; + } + + /** + * Get the exposedHeaders property: The response headers that may be sent in the response to the CORS request and + * exposed by the browser to the request issuer. + * + * @return the exposedHeaders value. + */ + public String getExposedHeaders() { + return this.exposedHeaders; + } + + /** + * Set the exposedHeaders property: The response headers that may be sent in the response to the CORS request and + * exposed by the browser to the request issuer. + * + * @param exposedHeaders the exposedHeaders value to set. + * @return the CorsRule object itself. + */ + public CorsRule setExposedHeaders(String exposedHeaders) { + this.exposedHeaders = exposedHeaders; + return this; + } + + /** + * Get the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS + * request. + * + * @return the maxAgeInSeconds value. + */ + public int getMaxAgeInSeconds() { + return this.maxAgeInSeconds; + } + + /** + * Set the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS + * request. + * + * @param maxAgeInSeconds the maxAgeInSeconds value to set. + * @return the CorsRule object itself. + */ + public CorsRule setMaxAgeInSeconds(int maxAgeInSeconds) { + this.maxAgeInSeconds = maxAgeInSeconds; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/GeoReplication.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/GeoReplication.java new file mode 100644 index 000000000000..898205099ec3 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/GeoReplication.java @@ -0,0 +1,76 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The GeoReplication model. */ +@Fluent +public final class GeoReplication { + /* + * The status of the secondary location. + */ + @JsonProperty(value = "Status", required = true) + private GeoReplicationStatusType status; + + /* + * A GMT date/time value, to the second. All primary writes preceding this + * value are guaranteed to be available for read operations at the + * secondary. Primary writes after this point in time may or may not be + * available for reads. + */ + @JsonProperty(value = "LastSyncTime", required = true) + private DateTimeRfc1123 lastSyncTime; + + /** + * Get the status property: The status of the secondary location. + * + * @return the status value. + */ + public GeoReplicationStatusType getStatus() { + return this.status; + } + + /** + * Set the status property: The status of the secondary location. + * + * @param status the status value to set. + * @return the GeoReplication object itself. + */ + public GeoReplication setStatus(GeoReplicationStatusType status) { + this.status = status; + return this; + } + + /** + * Get the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are + * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or + * may not be available for reads. + * + * @return the lastSyncTime value. + */ + public OffsetDateTime getLastSyncTime() { + if (this.lastSyncTime == null) { + return null; + } + return this.lastSyncTime.getDateTime(); + } + + /** + * Set the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are + * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or + * may not be available for reads. + * + * @param lastSyncTime the lastSyncTime value to set. + * @return the GeoReplication object itself. + */ + public GeoReplication setLastSyncTime(OffsetDateTime lastSyncTime) { + if (lastSyncTime == null) { + this.lastSyncTime = null; + } else { + this.lastSyncTime = new DateTimeRfc1123(lastSyncTime); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/GeoReplicationStatusType.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/GeoReplicationStatusType.java new file mode 100644 index 000000000000..75fe301dd0ae --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/GeoReplicationStatusType.java @@ -0,0 +1,33 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for GeoReplicationStatusType. */ +public final class GeoReplicationStatusType extends ExpandableStringEnum { + /** Static value live for GeoReplicationStatusType. */ + public static final GeoReplicationStatusType LIVE = fromString("live"); + + /** Static value bootstrap for GeoReplicationStatusType. */ + public static final GeoReplicationStatusType BOOTSTRAP = fromString("bootstrap"); + + /** Static value unavailable for GeoReplicationStatusType. */ + public static final GeoReplicationStatusType UNAVAILABLE = fromString("unavailable"); + + /** + * Creates or finds a GeoReplicationStatusType from its string representation. + * + * @param name a name to look for. + * @return the corresponding GeoReplicationStatusType. + */ + @JsonCreator + public static GeoReplicationStatusType fromString(String name) { + return fromString(name, GeoReplicationStatusType.class); + } + + /** @return known GeoReplicationStatusType values. */ + public static Collection values() { + return values(GeoReplicationStatusType.class); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/Logging.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/Logging.java new file mode 100644 index 000000000000..5faa96450c43 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/Logging.java @@ -0,0 +1,138 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Logging model. */ +@Fluent +public final class Logging { + /* + * The version of Analytics to configure. + */ + @JsonProperty(value = "Version", required = true) + private String version; + + /* + * Indicates whether all delete requests should be logged. + */ + @JsonProperty(value = "Delete", required = true) + private boolean delete; + + /* + * Indicates whether all read requests should be logged. + */ + @JsonProperty(value = "Read", required = true) + private boolean read; + + /* + * Indicates whether all write requests should be logged. + */ + @JsonProperty(value = "Write", required = true) + private boolean write; + + /* + * The retention policy. + */ + @JsonProperty(value = "RetentionPolicy", required = true) + private RetentionPolicy retentionPolicy; + + /** + * Get the version property: The version of Analytics to configure. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of Analytics to configure. + * + * @param version the version value to set. + * @return the Logging object itself. + */ + public Logging setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the delete property: Indicates whether all delete requests should be logged. + * + * @return the delete value. + */ + public boolean isDelete() { + return this.delete; + } + + /** + * Set the delete property: Indicates whether all delete requests should be logged. + * + * @param delete the delete value to set. + * @return the Logging object itself. + */ + public Logging setDelete(boolean delete) { + this.delete = delete; + return this; + } + + /** + * Get the read property: Indicates whether all read requests should be logged. + * + * @return the read value. + */ + public boolean isRead() { + return this.read; + } + + /** + * Set the read property: Indicates whether all read requests should be logged. + * + * @param read the read value to set. + * @return the Logging object itself. + */ + public Logging setRead(boolean read) { + this.read = read; + return this; + } + + /** + * Get the write property: Indicates whether all write requests should be logged. + * + * @return the write value. + */ + public boolean isWrite() { + return this.write; + } + + /** + * Set the write property: Indicates whether all write requests should be logged. + * + * @param write the write value to set. + * @return the Logging object itself. + */ + public Logging setWrite(boolean write) { + this.write = write; + return this; + } + + /** + * Get the retentionPolicy property: The retention policy. + * + * @return the retentionPolicy value. + */ + public RetentionPolicy getRetentionPolicy() { + return this.retentionPolicy; + } + + /** + * Set the retentionPolicy property: The retention policy. + * + * @param retentionPolicy the retentionPolicy value to set. + * @return the Logging object itself. + */ + public Logging setRetentionPolicy(RetentionPolicy retentionPolicy) { + this.retentionPolicy = retentionPolicy; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/Metrics.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/Metrics.java new file mode 100644 index 000000000000..d5caedd7e0f4 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/Metrics.java @@ -0,0 +1,115 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Metrics model. */ +@Fluent +public final class Metrics { + /* + * The version of Analytics to configure. + */ + @JsonProperty(value = "Version") + private String version; + + /* + * Indicates whether metrics are enabled for the Table service. + */ + @JsonProperty(value = "Enabled", required = true) + private boolean enabled; + + /* + * Indicates whether metrics should generate summary statistics for called + * API operations. + */ + @JsonProperty(value = "IncludeAPIs") + private Boolean includeAPIs; + + /* + * The retention policy. + */ + @JsonProperty(value = "RetentionPolicy") + private RetentionPolicy retentionPolicy; + + /** + * Get the version property: The version of Analytics to configure. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of Analytics to configure. + * + * @param version the version value to set. + * @return the Metrics object itself. + */ + public Metrics setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the enabled property: Indicates whether metrics are enabled for the Table service. + * + * @return the enabled value. + */ + public boolean isEnabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether metrics are enabled for the Table service. + * + * @param enabled the enabled value to set. + * @return the Metrics object itself. + */ + public Metrics setEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the includeAPIs property: Indicates whether metrics should generate summary statistics for called API + * operations. + * + * @return the includeAPIs value. + */ + public Boolean isIncludeAPIs() { + return this.includeAPIs; + } + + /** + * Set the includeAPIs property: Indicates whether metrics should generate summary statistics for called API + * operations. + * + * @param includeAPIs the includeAPIs value to set. + * @return the Metrics object itself. + */ + public Metrics setIncludeAPIs(Boolean includeAPIs) { + this.includeAPIs = includeAPIs; + return this; + } + + /** + * Get the retentionPolicy property: The retention policy. + * + * @return the retentionPolicy value. + */ + public RetentionPolicy getRetentionPolicy() { + return this.retentionPolicy; + } + + /** + * Set the retentionPolicy property: The retention policy. + * + * @param retentionPolicy the retentionPolicy value to set. + * @return the Metrics object itself. + */ + public Metrics setRetentionPolicy(RetentionPolicy retentionPolicy) { + this.retentionPolicy = retentionPolicy; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/OdataMetadataFormat.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/OdataMetadataFormat.java new file mode 100644 index 000000000000..2bd8755466e7 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/OdataMetadataFormat.java @@ -0,0 +1,36 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for OdataMetadataFormat. */ +public final class OdataMetadataFormat extends ExpandableStringEnum { + /** Static value application/json;odata=nometadata for OdataMetadataFormat. */ + public static final OdataMetadataFormat APPLICATION_JSON_ODATA_NOMETADATA = + fromString("application/json;odata=nometadata"); + + /** Static value application/json;odata=minimalmetadata for OdataMetadataFormat. */ + public static final OdataMetadataFormat APPLICATION_JSON_ODATA_MINIMALMETADATA = + fromString("application/json;odata=minimalmetadata"); + + /** Static value application/json;odata=fullmetadata for OdataMetadataFormat. */ + public static final OdataMetadataFormat APPLICATION_JSON_ODATA_FULLMETADATA = + fromString("application/json;odata=fullmetadata"); + + /** + * Creates or finds a OdataMetadataFormat from its string representation. + * + * @param name a name to look for. + * @return the corresponding OdataMetadataFormat. + */ + @JsonCreator + public static OdataMetadataFormat fromString(String name) { + return fromString(name, OdataMetadataFormat.class); + } + + /** @return known OdataMetadataFormat values. */ + public static Collection values() { + return values(OdataMetadataFormat.class); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/QueryOptions.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/QueryOptions.java new file mode 100644 index 000000000000..c061fc938747 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/QueryOptions.java @@ -0,0 +1,116 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The QueryOptions model. */ +@Fluent +public final class QueryOptions { + /* + * Specifies the media type for the response. + */ + @JsonProperty(value = "Format") + private OdataMetadataFormat format; + + /* + * Maximum number of records to return. + */ + @JsonProperty(value = "Top") + private Integer top; + + /* + * Select expression using OData notation. Limits the columns on each + * record to just those requested, e.g. "$select=PolicyAssignmentId, + * ResourceId". + */ + @JsonProperty(value = "Select") + private String select; + + /* + * OData filter expression. + */ + @JsonProperty(value = "Filter") + private String filter; + + /** + * Get the format property: Specifies the media type for the response. + * + * @return the format value. + */ + public OdataMetadataFormat getFormat() { + return this.format; + } + + /** + * Set the format property: Specifies the media type for the response. + * + * @param format the format value to set. + * @return the QueryOptions object itself. + */ + public QueryOptions setFormat(OdataMetadataFormat format) { + this.format = format; + return this; + } + + /** + * Get the top property: Maximum number of records to return. + * + * @return the top value. + */ + public Integer getTop() { + return this.top; + } + + /** + * Set the top property: Maximum number of records to return. + * + * @param top the top value to set. + * @return the QueryOptions object itself. + */ + public QueryOptions setTop(Integer top) { + this.top = top; + return this; + } + + /** + * Get the select property: Select expression using OData notation. Limits the columns on each record to just those + * requested, e.g. "$select=PolicyAssignmentId, ResourceId". + * + * @return the select value. + */ + public String getSelect() { + return this.select; + } + + /** + * Set the select property: Select expression using OData notation. Limits the columns on each record to just those + * requested, e.g. "$select=PolicyAssignmentId, ResourceId". + * + * @param select the select value to set. + * @return the QueryOptions object itself. + */ + public QueryOptions setSelect(String select) { + this.select = select; + return this; + } + + /** + * Get the filter property: OData filter expression. + * + * @return the filter value. + */ + public String getFilter() { + return this.filter; + } + + /** + * Set the filter property: OData filter expression. + * + * @param filter the filter value to set. + * @return the QueryOptions object itself. + */ + public QueryOptions setFilter(String filter) { + this.filter = filter; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ResponseFormat.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ResponseFormat.java new file mode 100644 index 000000000000..4112e5819719 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ResponseFormat.java @@ -0,0 +1,30 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ResponseFormat. */ +public final class ResponseFormat extends ExpandableStringEnum { + /** Static value return-no-content for ResponseFormat. */ + public static final ResponseFormat RETURN_NO_CONTENT = fromString("return-no-content"); + + /** Static value return-content for ResponseFormat. */ + public static final ResponseFormat RETURN_CONTENT = fromString("return-content"); + + /** + * Creates or finds a ResponseFormat from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResponseFormat. + */ + @JsonCreator + public static ResponseFormat fromString(String name) { + return fromString(name, ResponseFormat.class); + } + + /** @return known ResponseFormat values. */ + public static Collection values() { + return values(ResponseFormat.class); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/RetentionPolicy.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/RetentionPolicy.java new file mode 100644 index 000000000000..759ba72c1d68 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/RetentionPolicy.java @@ -0,0 +1,63 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The RetentionPolicy model. */ +@Fluent +public final class RetentionPolicy { + /* + * Indicates whether a retention policy is enabled for the service. + */ + @JsonProperty(value = "Enabled", required = true) + private boolean enabled; + + /* + * Indicates the number of days that metrics or logging or soft-deleted + * data should be retained. All data older than this value will be deleted. + */ + @JsonProperty(value = "Days") + private Integer days; + + /** + * Get the enabled property: Indicates whether a retention policy is enabled for the service. + * + * @return the enabled value. + */ + public boolean isEnabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether a retention policy is enabled for the service. + * + * @param enabled the enabled value to set. + * @return the RetentionPolicy object itself. + */ + public RetentionPolicy setEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be + * retained. All data older than this value will be deleted. + * + * @return the days value. + */ + public Integer getDays() { + return this.days; + } + + /** + * Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be + * retained. All data older than this value will be deleted. + * + * @param days the days value to set. + * @return the RetentionPolicy object itself. + */ + public RetentionPolicy setDays(Integer days) { + this.days = days; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetPropertiesHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetPropertiesHeaders.java new file mode 100644 index 000000000000..47fb32a56bd8 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetPropertiesHeaders.java @@ -0,0 +1,86 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ServicesGetPropertiesHeaders model. */ +@Fluent +public final class ServicesGetPropertiesHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the ServicesGetPropertiesHeaders object itself. + */ + public ServicesGetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the ServicesGetPropertiesHeaders object itself. + */ + public ServicesGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the ServicesGetPropertiesHeaders object itself. + */ + public ServicesGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetPropertiesResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetPropertiesResponse.java new file mode 100644 index 000000000000..4a1cdda12bb7 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetPropertiesResponse.java @@ -0,0 +1,33 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the getProperties operation. */ +public final class ServicesGetPropertiesResponse + extends ResponseBase { + /** + * Creates an instance of ServicesGetPropertiesResponse. + * + * @param request the request which resulted in this ServicesGetPropertiesResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ServicesGetPropertiesResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + TableServiceProperties value, + ServicesGetPropertiesHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public TableServiceProperties getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetStatisticsHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetStatisticsHeaders.java new file mode 100644 index 000000000000..6dd1f9558753 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetStatisticsHeaders.java @@ -0,0 +1,121 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The ServicesGetStatisticsHeaders model. */ +@Fluent +public final class ServicesGetStatisticsHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the ServicesGetStatisticsHeaders object itself. + */ + public ServicesGetStatisticsHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the ServicesGetStatisticsHeaders object itself. + */ + public ServicesGetStatisticsHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the ServicesGetStatisticsHeaders object itself. + */ + public ServicesGetStatisticsHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the ServicesGetStatisticsHeaders object itself. + */ + public ServicesGetStatisticsHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetStatisticsResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetStatisticsResponse.java new file mode 100644 index 000000000000..f1ddd4228649 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetStatisticsResponse.java @@ -0,0 +1,32 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the getStatistics operation. */ +public final class ServicesGetStatisticsResponse extends ResponseBase { + /** + * Creates an instance of ServicesGetStatisticsResponse. + * + * @param request the request which resulted in this ServicesGetStatisticsResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ServicesGetStatisticsResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + TableServiceStats value, + ServicesGetStatisticsHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public TableServiceStats getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesSetPropertiesHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesSetPropertiesHeaders.java new file mode 100644 index 000000000000..f51ee7255721 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesSetPropertiesHeaders.java @@ -0,0 +1,86 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ServicesSetPropertiesHeaders model. */ +@Fluent +public final class ServicesSetPropertiesHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the ServicesSetPropertiesHeaders object itself. + */ + public ServicesSetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the ServicesSetPropertiesHeaders object itself. + */ + public ServicesSetPropertiesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the ServicesSetPropertiesHeaders object itself. + */ + public ServicesSetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesSetPropertiesResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesSetPropertiesResponse.java new file mode 100644 index 000000000000..44b6b629e428 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesSetPropertiesResponse.java @@ -0,0 +1,26 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the setProperties operation. */ +public final class ServicesSetPropertiesResponse extends ResponseBase { + /** + * Creates an instance of ServicesSetPropertiesResponse. + * + * @param request the request which resulted in this ServicesSetPropertiesResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ServicesSetPropertiesResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + ServicesSetPropertiesHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/SignedIdentifier.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/SignedIdentifier.java new file mode 100644 index 000000000000..d031ac00aace --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/SignedIdentifier.java @@ -0,0 +1,60 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SignedIdentifier model. */ +@Fluent +public final class SignedIdentifier { + /* + * A unique id. + */ + @JsonProperty(value = "Id", required = true) + private String id; + + /* + * The access policy. + */ + @JsonProperty(value = "AccessPolicy", required = true) + private AccessPolicy accessPolicy; + + /** + * Get the id property: A unique id. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: A unique id. + * + * @param id the id value to set. + * @return the SignedIdentifier object itself. + */ + public SignedIdentifier setId(String id) { + this.id = id; + return this; + } + + /** + * Get the accessPolicy property: The access policy. + * + * @return the accessPolicy value. + */ + public AccessPolicy getAccessPolicy() { + return this.accessPolicy; + } + + /** + * Set the accessPolicy property: The access policy. + * + * @param accessPolicy the accessPolicy value to set. + * @return the SignedIdentifier object itself. + */ + public SignedIdentifier setAccessPolicy(AccessPolicy accessPolicy) { + this.accessPolicy = accessPolicy; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableEntityQueryResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableEntityQueryResponse.java new file mode 100644 index 000000000000..af621f2f7b51 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableEntityQueryResponse.java @@ -0,0 +1,62 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The TableEntityQueryResponse model. */ +@Fluent +public final class TableEntityQueryResponse { + /* + * The metadata response of the table. + */ + @JsonProperty(value = "odata.metadata") + private String odataMetadata; + + /* + * List of table entities. + */ + @JsonProperty(value = "value") + private List> value; + + /** + * Get the odataMetadata property: The metadata response of the table. + * + * @return the odataMetadata value. + */ + public String getOdataMetadata() { + return this.odataMetadata; + } + + /** + * Set the odataMetadata property: The metadata response of the table. + * + * @param odataMetadata the odataMetadata value to set. + * @return the TableEntityQueryResponse object itself. + */ + public TableEntityQueryResponse setOdataMetadata(String odataMetadata) { + this.odataMetadata = odataMetadata; + return this; + } + + /** + * Get the value property: List of table entities. + * + * @return the value value. + */ + public List> getValue() { + return this.value; + } + + /** + * Set the value property: List of table entities. + * + * @param value the value value to set. + * @return the TableEntityQueryResponse object itself. + */ + public TableEntityQueryResponse setValue(List> value) { + this.value = value; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableProperties.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableProperties.java new file mode 100644 index 000000000000..8c2f7a4e3b4a --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableProperties.java @@ -0,0 +1,34 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TableProperties model. */ +@Fluent +public final class TableProperties { + /* + * The name of the table to create. + */ + @JsonProperty(value = "TableName") + private String tableName; + + /** + * Get the tableName property: The name of the table to create. + * + * @return the tableName value. + */ + public String getTableName() { + return this.tableName; + } + + /** + * Set the tableName property: The name of the table to create. + * + * @param tableName the tableName value to set. + * @return the TableProperties object itself. + */ + public TableProperties setTableName(String tableName) { + this.tableName = tableName; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableQueryResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableQueryResponse.java new file mode 100644 index 000000000000..e0da9b83114b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableQueryResponse.java @@ -0,0 +1,61 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The TableQueryResponse model. */ +@Fluent +public final class TableQueryResponse { + /* + * The metadata response of the table. + */ + @JsonProperty(value = "odata.metadata") + private String odataMetadata; + + /* + * List of tables. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the odataMetadata property: The metadata response of the table. + * + * @return the odataMetadata value. + */ + public String getOdataMetadata() { + return this.odataMetadata; + } + + /** + * Set the odataMetadata property: The metadata response of the table. + * + * @param odataMetadata the odataMetadata value to set. + * @return the TableQueryResponse object itself. + */ + public TableQueryResponse setOdataMetadata(String odataMetadata) { + this.odataMetadata = odataMetadata; + return this; + } + + /** + * Get the value property: List of tables. + * + * @return the value value. + */ + public List getValue() { + return this.value; + } + + /** + * Set the value property: List of tables. + * + * @param value the value value to set. + * @return the TableQueryResponse object itself. + */ + public TableQueryResponse setValue(List value) { + this.value = value; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableResponse.java new file mode 100644 index 000000000000..08b9aa187880 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableResponse.java @@ -0,0 +1,34 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TableResponse model. */ +@Fluent +public final class TableResponse extends TableResponseProperties { + /* + * The metadata response of the table. + */ + @JsonProperty(value = "odata.metadata") + private String odataMetadata; + + /** + * Get the odataMetadata property: The metadata response of the table. + * + * @return the odataMetadata value. + */ + public String getOdataMetadata() { + return this.odataMetadata; + } + + /** + * Set the odataMetadata property: The metadata response of the table. + * + * @param odataMetadata the odataMetadata value to set. + * @return the TableResponse object itself. + */ + public TableResponse setOdataMetadata(String odataMetadata) { + this.odataMetadata = odataMetadata; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableResponseProperties.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableResponseProperties.java new file mode 100644 index 000000000000..a3877f02b94f --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableResponseProperties.java @@ -0,0 +1,112 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TableResponseProperties model. */ +@Fluent +public class TableResponseProperties { + /* + * The name of the table. + */ + @JsonProperty(value = "TableName") + private String tableName; + + /* + * The odata type of the table. + */ + @JsonProperty(value = "odata.type") + private String odataType; + + /* + * The id of the table. + */ + @JsonProperty(value = "odata.id") + private String odataId; + + /* + * The edit link of the table. + */ + @JsonProperty(value = "odata.editLink") + private String odataEditLink; + + /** + * Get the tableName property: The name of the table. + * + * @return the tableName value. + */ + public String getTableName() { + return this.tableName; + } + + /** + * Set the tableName property: The name of the table. + * + * @param tableName the tableName value to set. + * @return the TableResponseProperties object itself. + */ + public TableResponseProperties setTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the odataType property: The odata type of the table. + * + * @return the odataType value. + */ + public String getOdataType() { + return this.odataType; + } + + /** + * Set the odataType property: The odata type of the table. + * + * @param odataType the odataType value to set. + * @return the TableResponseProperties object itself. + */ + public TableResponseProperties setOdataType(String odataType) { + this.odataType = odataType; + return this; + } + + /** + * Get the odataId property: The id of the table. + * + * @return the odataId value. + */ + public String getOdataId() { + return this.odataId; + } + + /** + * Set the odataId property: The id of the table. + * + * @param odataId the odataId value to set. + * @return the TableResponseProperties object itself. + */ + public TableResponseProperties setOdataId(String odataId) { + this.odataId = odataId; + return this; + } + + /** + * Get the odataEditLink property: The edit link of the table. + * + * @return the odataEditLink value. + */ + public String getOdataEditLink() { + return this.odataEditLink; + } + + /** + * Set the odataEditLink property: The edit link of the table. + * + * @param odataEditLink the odataEditLink value to set. + * @return the TableResponseProperties object itself. + */ + public TableResponseProperties setOdataEditLink(String odataEditLink) { + this.odataEditLink = odataEditLink; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceError.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceError.java new file mode 100644 index 000000000000..c43fef3dc88e --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceError.java @@ -0,0 +1,34 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TableServiceError model. */ +@Fluent +public final class TableServiceError { + /* + * The error message. + */ + @JsonProperty(value = "Message") + private String message; + + /** + * Get the message property: The error message. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Set the message property: The error message. + * + * @param message the message value to set. + * @return the TableServiceError object itself. + */ + public TableServiceError setMessage(String message) { + this.message = message; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceErrorException.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceErrorException.java new file mode 100644 index 000000000000..193c6cc8fb3e --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceErrorException.java @@ -0,0 +1,33 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpResponse; + +/** Exception thrown for an invalid response with TableServiceError information. */ +public final class TableServiceErrorException extends HttpResponseException { + /** + * Initializes a new instance of the TableServiceErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + public TableServiceErrorException(String message, HttpResponse response) { + super(message, response); + } + + /** + * Initializes a new instance of the TableServiceErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + public TableServiceErrorException(String message, HttpResponse response, TableServiceError value) { + super(message, response, value); + } + + @Override + public TableServiceError getValue() { + return (TableServiceError) super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceProperties.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceProperties.java new file mode 100644 index 000000000000..e1b9aecab791 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceProperties.java @@ -0,0 +1,115 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The TableServiceProperties model. */ +@Fluent +public final class TableServiceProperties { + /* + * Azure Analytics Logging settings. + */ + @JsonProperty(value = "Logging") + private Logging logging; + + /* + * A summary of request statistics grouped by API in hourly aggregates for + * tables. + */ + @JsonProperty(value = "HourMetrics") + private Metrics hourMetrics; + + /* + * A summary of request statistics grouped by API in minute aggregates for + * tables. + */ + @JsonProperty(value = "MinuteMetrics") + private Metrics minuteMetrics; + + /* + * The set of CORS rules. + */ + @JsonProperty(value = "Cors") + private List cors; + + /** + * Get the logging property: Azure Analytics Logging settings. + * + * @return the logging value. + */ + public Logging getLogging() { + return this.logging; + } + + /** + * Set the logging property: Azure Analytics Logging settings. + * + * @param logging the logging value to set. + * @return the TableServiceProperties object itself. + */ + public TableServiceProperties setLogging(Logging logging) { + this.logging = logging; + return this; + } + + /** + * Get the hourMetrics property: A summary of request statistics grouped by API in hourly aggregates for tables. + * + * @return the hourMetrics value. + */ + public Metrics getHourMetrics() { + return this.hourMetrics; + } + + /** + * Set the hourMetrics property: A summary of request statistics grouped by API in hourly aggregates for tables. + * + * @param hourMetrics the hourMetrics value to set. + * @return the TableServiceProperties object itself. + */ + public TableServiceProperties setHourMetrics(Metrics hourMetrics) { + this.hourMetrics = hourMetrics; + return this; + } + + /** + * Get the minuteMetrics property: A summary of request statistics grouped by API in minute aggregates for tables. + * + * @return the minuteMetrics value. + */ + public Metrics getMinuteMetrics() { + return this.minuteMetrics; + } + + /** + * Set the minuteMetrics property: A summary of request statistics grouped by API in minute aggregates for tables. + * + * @param minuteMetrics the minuteMetrics value to set. + * @return the TableServiceProperties object itself. + */ + public TableServiceProperties setMinuteMetrics(Metrics minuteMetrics) { + this.minuteMetrics = minuteMetrics; + return this; + } + + /** + * Get the cors property: The set of CORS rules. + * + * @return the cors value. + */ + public List getCors() { + return this.cors; + } + + /** + * Set the cors property: The set of CORS rules. + * + * @param cors the cors value to set. + * @return the TableServiceProperties object itself. + */ + public TableServiceProperties setCors(List cors) { + this.cors = cors; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceStats.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceStats.java new file mode 100644 index 000000000000..aaccd93f4bba --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceStats.java @@ -0,0 +1,34 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TableServiceStats model. */ +@Fluent +public final class TableServiceStats { + /* + * Geo-Replication information for the Secondary Storage Service. + */ + @JsonProperty(value = "GeoReplication") + private GeoReplication geoReplication; + + /** + * Get the geoReplication property: Geo-Replication information for the Secondary Storage Service. + * + * @return the geoReplication value. + */ + public GeoReplication getGeoReplication() { + return this.geoReplication; + } + + /** + * Set the geoReplication property: Geo-Replication information for the Secondary Storage Service. + * + * @param geoReplication the geoReplication value to set. + * @return the TableServiceStats object itself. + */ + public TableServiceStats setGeoReplication(GeoReplication geoReplication) { + this.geoReplication = geoReplication; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesCreateHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesCreateHeaders.java new file mode 100644 index 000000000000..dc3978b2f1c7 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesCreateHeaders.java @@ -0,0 +1,147 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesCreateHeaders model. */ +@Fluent +public final class TablesCreateHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /* + * The Preference-Applied property. + */ + @JsonProperty(value = "Preference-Applied") + private String preferenceApplied; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesCreateHeaders object itself. + */ + public TablesCreateHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesCreateHeaders object itself. + */ + public TablesCreateHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesCreateHeaders object itself. + */ + public TablesCreateHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesCreateHeaders object itself. + */ + public TablesCreateHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } + + /** + * Get the preferenceApplied property: The Preference-Applied property. + * + * @return the preferenceApplied value. + */ + public String getPreferenceApplied() { + return this.preferenceApplied; + } + + /** + * Set the preferenceApplied property: The Preference-Applied property. + * + * @param preferenceApplied the preferenceApplied value to set. + * @return the TablesCreateHeaders object itself. + */ + public TablesCreateHeaders setPreferenceApplied(String preferenceApplied) { + this.preferenceApplied = preferenceApplied; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesCreateResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesCreateResponse.java new file mode 100644 index 000000000000..b68b50207427 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesCreateResponse.java @@ -0,0 +1,32 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the create operation. */ +public final class TablesCreateResponse extends ResponseBase { + /** + * Creates an instance of TablesCreateResponse. + * + * @param request the request which resulted in this TablesCreateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesCreateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + TableResponse value, + TablesCreateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public TableResponse getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteEntityHeaders.java new file mode 100644 index 000000000000..39b37fc2744d --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteEntityHeaders.java @@ -0,0 +1,121 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesDeleteEntityHeaders model. */ +@Fluent +public final class TablesDeleteEntityHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesDeleteEntityHeaders object itself. + */ + public TablesDeleteEntityHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesDeleteEntityHeaders object itself. + */ + public TablesDeleteEntityHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesDeleteEntityHeaders object itself. + */ + public TablesDeleteEntityHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesDeleteEntityHeaders object itself. + */ + public TablesDeleteEntityHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteEntityResponse.java new file mode 100644 index 000000000000..9f4a425c50bf --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteEntityResponse.java @@ -0,0 +1,26 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the deleteEntity operation. */ +public final class TablesDeleteEntityResponse extends ResponseBase { + /** + * Creates an instance of TablesDeleteEntityResponse. + * + * @param request the request which resulted in this TablesDeleteEntityResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesDeleteEntityResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + TablesDeleteEntityHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteHeaders.java new file mode 100644 index 000000000000..b99d3367d644 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteHeaders.java @@ -0,0 +1,121 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesDeleteHeaders model. */ +@Fluent +public final class TablesDeleteHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesDeleteHeaders object itself. + */ + public TablesDeleteHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesDeleteHeaders object itself. + */ + public TablesDeleteHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesDeleteHeaders object itself. + */ + public TablesDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesDeleteHeaders object itself. + */ + public TablesDeleteHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteResponse.java new file mode 100644 index 000000000000..866b81fb901c --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteResponse.java @@ -0,0 +1,22 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the delete operation. */ +public final class TablesDeleteResponse extends ResponseBase { + /** + * Creates an instance of TablesDeleteResponse. + * + * @param request the request which resulted in this TablesDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesDeleteResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, TablesDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesGetAccessPolicyHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesGetAccessPolicyHeaders.java new file mode 100644 index 000000000000..e9c82e54893c --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesGetAccessPolicyHeaders.java @@ -0,0 +1,121 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesGetAccessPolicyHeaders model. */ +@Fluent +public final class TablesGetAccessPolicyHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesGetAccessPolicyHeaders object itself. + */ + public TablesGetAccessPolicyHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesGetAccessPolicyHeaders object itself. + */ + public TablesGetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesGetAccessPolicyHeaders object itself. + */ + public TablesGetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesGetAccessPolicyHeaders object itself. + */ + public TablesGetAccessPolicyHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesGetAccessPolicyResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesGetAccessPolicyResponse.java new file mode 100644 index 000000000000..14398cc689b7 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesGetAccessPolicyResponse.java @@ -0,0 +1,34 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import java.util.List; + +/** Contains all response data for the getAccessPolicy operation. */ +public final class TablesGetAccessPolicyResponse + extends ResponseBase> { + /** + * Creates an instance of TablesGetAccessPolicyResponse. + * + * @param request the request which resulted in this TablesGetAccessPolicyResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesGetAccessPolicyResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + List value, + TablesGetAccessPolicyHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public List getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesInsertEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesInsertEntityHeaders.java new file mode 100644 index 000000000000..f7320993c189 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesInsertEntityHeaders.java @@ -0,0 +1,199 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesInsertEntityHeaders model. */ +@Fluent +public final class TablesInsertEntityHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The ETag property. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /* + * The Preference-Applied property. + */ + @JsonProperty(value = "Preference-Applied") + private String preferenceApplied; + + /* + * The Content-Type property. + */ + @JsonProperty(value = "Content-Type") + private String contentType; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag property. + * + * @param eTag the eTag value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } + + /** + * Get the preferenceApplied property: The Preference-Applied property. + * + * @return the preferenceApplied value. + */ + public String getPreferenceApplied() { + return this.preferenceApplied; + } + + /** + * Set the preferenceApplied property: The Preference-Applied property. + * + * @param preferenceApplied the preferenceApplied value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setPreferenceApplied(String preferenceApplied) { + this.preferenceApplied = preferenceApplied; + return this; + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The Content-Type property. + * + * @param contentType the contentType value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesInsertEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesInsertEntityResponse.java new file mode 100644 index 000000000000..3ed2ca7a164d --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesInsertEntityResponse.java @@ -0,0 +1,33 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import java.util.Map; + +/** Contains all response data for the insertEntity operation. */ +public final class TablesInsertEntityResponse extends ResponseBase> { + /** + * Creates an instance of TablesInsertEntityResponse. + * + * @param request the request which resulted in this TablesInsertEntityResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesInsertEntityResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Map value, + TablesInsertEntityHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public Map getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesMergeEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesMergeEntityHeaders.java new file mode 100644 index 000000000000..60d79131d644 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesMergeEntityHeaders.java @@ -0,0 +1,147 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesMergeEntityHeaders model. */ +@Fluent +public final class TablesMergeEntityHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The ETag property. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesMergeEntityHeaders object itself. + */ + public TablesMergeEntityHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag property. + * + * @param eTag the eTag value to set. + * @return the TablesMergeEntityHeaders object itself. + */ + public TablesMergeEntityHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesMergeEntityHeaders object itself. + */ + public TablesMergeEntityHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesMergeEntityHeaders object itself. + */ + public TablesMergeEntityHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesMergeEntityHeaders object itself. + */ + public TablesMergeEntityHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesMergeEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesMergeEntityResponse.java new file mode 100644 index 000000000000..0d5eaa69b7fc --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesMergeEntityResponse.java @@ -0,0 +1,22 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the mergeEntity operation. */ +public final class TablesMergeEntityResponse extends ResponseBase { + /** + * Creates an instance of TablesMergeEntityResponse. + * + * @param request the request which resulted in this TablesMergeEntityResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesMergeEntityResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, TablesMergeEntityHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesHeaders.java new file mode 100644 index 000000000000..7ed751bb9e4b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesHeaders.java @@ -0,0 +1,173 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesQueryEntitiesHeaders model. */ +@Fluent +public final class TablesQueryEntitiesHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-continuation-NextPartitionKey property. + */ + @JsonProperty(value = "x-ms-continuation-NextPartitionKey") + private String xMsContinuationNextPartitionKey; + + /* + * The x-ms-continuation-NextRowKey property. + */ + @JsonProperty(value = "x-ms-continuation-NextRowKey") + private String xMsContinuationNextRowKey; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesQueryEntitiesHeaders object itself. + */ + public TablesQueryEntitiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsContinuationNextPartitionKey property: The x-ms-continuation-NextPartitionKey property. + * + * @return the xMsContinuationNextPartitionKey value. + */ + public String getXMsContinuationNextPartitionKey() { + return this.xMsContinuationNextPartitionKey; + } + + /** + * Set the xMsContinuationNextPartitionKey property: The x-ms-continuation-NextPartitionKey property. + * + * @param xMsContinuationNextPartitionKey the xMsContinuationNextPartitionKey value to set. + * @return the TablesQueryEntitiesHeaders object itself. + */ + public TablesQueryEntitiesHeaders setXMsContinuationNextPartitionKey(String xMsContinuationNextPartitionKey) { + this.xMsContinuationNextPartitionKey = xMsContinuationNextPartitionKey; + return this; + } + + /** + * Get the xMsContinuationNextRowKey property: The x-ms-continuation-NextRowKey property. + * + * @return the xMsContinuationNextRowKey value. + */ + public String getXMsContinuationNextRowKey() { + return this.xMsContinuationNextRowKey; + } + + /** + * Set the xMsContinuationNextRowKey property: The x-ms-continuation-NextRowKey property. + * + * @param xMsContinuationNextRowKey the xMsContinuationNextRowKey value to set. + * @return the TablesQueryEntitiesHeaders object itself. + */ + public TablesQueryEntitiesHeaders setXMsContinuationNextRowKey(String xMsContinuationNextRowKey) { + this.xMsContinuationNextRowKey = xMsContinuationNextRowKey; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesQueryEntitiesHeaders object itself. + */ + public TablesQueryEntitiesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesQueryEntitiesHeaders object itself. + */ + public TablesQueryEntitiesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesQueryEntitiesHeaders object itself. + */ + public TablesQueryEntitiesHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesResponse.java new file mode 100644 index 000000000000..790840815f5b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesResponse.java @@ -0,0 +1,33 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the queryEntities operation. */ +public final class TablesQueryEntitiesResponse + extends ResponseBase { + /** + * Creates an instance of TablesQueryEntitiesResponse. + * + * @param request the request which resulted in this TablesQueryEntitiesResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesQueryEntitiesResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + TableEntityQueryResponse value, + TablesQueryEntitiesHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public TableEntityQueryResponse getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java new file mode 100644 index 000000000000..5f7351a3acde --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java @@ -0,0 +1,201 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesQueryEntitiesWithPartitionAndRowKeyHeaders model. */ +@Fluent +public final class TablesQueryEntitiesWithPartitionAndRowKeyHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-continuation-NextPartitionKey property. + */ + @JsonProperty(value = "x-ms-continuation-NextPartitionKey") + private String xMsContinuationNextPartitionKey; + + /* + * The ETag property. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The x-ms-continuation-NextRowKey property. + */ + @JsonProperty(value = "x-ms-continuation-NextRowKey") + private String xMsContinuationNextRowKey; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsContinuationNextPartitionKey property: The x-ms-continuation-NextPartitionKey property. + * + * @return the xMsContinuationNextPartitionKey value. + */ + public String getXMsContinuationNextPartitionKey() { + return this.xMsContinuationNextPartitionKey; + } + + /** + * Set the xMsContinuationNextPartitionKey property: The x-ms-continuation-NextPartitionKey property. + * + * @param xMsContinuationNextPartitionKey the xMsContinuationNextPartitionKey value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsContinuationNextPartitionKey( + String xMsContinuationNextPartitionKey) { + this.xMsContinuationNextPartitionKey = xMsContinuationNextPartitionKey; + return this; + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag property. + * + * @param eTag the eTag value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsContinuationNextRowKey property: The x-ms-continuation-NextRowKey property. + * + * @return the xMsContinuationNextRowKey value. + */ + public String getXMsContinuationNextRowKey() { + return this.xMsContinuationNextRowKey; + } + + /** + * Set the xMsContinuationNextRowKey property: The x-ms-continuation-NextRowKey property. + * + * @param xMsContinuationNextRowKey the xMsContinuationNextRowKey value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsContinuationNextRowKey( + String xMsContinuationNextRowKey) { + this.xMsContinuationNextRowKey = xMsContinuationNextRowKey; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java new file mode 100644 index 000000000000..cfe781baca9c --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java @@ -0,0 +1,33 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the queryEntitiesWithPartitionAndRowKey operation. */ +public final class TablesQueryEntitiesWithPartitionAndRowKeyResponse + extends ResponseBase { + /** + * Creates an instance of TablesQueryEntitiesWithPartitionAndRowKeyResponse. + * + * @param request the request which resulted in this TablesQueryEntitiesWithPartitionAndRowKeyResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + TableEntityQueryResponse value, + TablesQueryEntitiesWithPartitionAndRowKeyHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public TableEntityQueryResponse getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryHeaders.java new file mode 100644 index 000000000000..d40619444afa --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryHeaders.java @@ -0,0 +1,147 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesQueryHeaders model. */ +@Fluent +public final class TablesQueryHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /* + * The x-ms-continuation-NextTableName property. + */ + @JsonProperty(value = "x-ms-continuation-NextTableName") + private String xMsContinuationNextTableName; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesQueryHeaders object itself. + */ + public TablesQueryHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesQueryHeaders object itself. + */ + public TablesQueryHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesQueryHeaders object itself. + */ + public TablesQueryHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesQueryHeaders object itself. + */ + public TablesQueryHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } + + /** + * Get the xMsContinuationNextTableName property: The x-ms-continuation-NextTableName property. + * + * @return the xMsContinuationNextTableName value. + */ + public String getXMsContinuationNextTableName() { + return this.xMsContinuationNextTableName; + } + + /** + * Set the xMsContinuationNextTableName property: The x-ms-continuation-NextTableName property. + * + * @param xMsContinuationNextTableName the xMsContinuationNextTableName value to set. + * @return the TablesQueryHeaders object itself. + */ + public TablesQueryHeaders setXMsContinuationNextTableName(String xMsContinuationNextTableName) { + this.xMsContinuationNextTableName = xMsContinuationNextTableName; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryResponse.java new file mode 100644 index 000000000000..bb6f47e75844 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryResponse.java @@ -0,0 +1,32 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the query operation. */ +public final class TablesQueryResponse extends ResponseBase { + /** + * Creates an instance of TablesQueryResponse. + * + * @param request the request which resulted in this TablesQueryResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesQueryResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + TableQueryResponse value, + TablesQueryHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public TableQueryResponse getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesSetAccessPolicyHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesSetAccessPolicyHeaders.java new file mode 100644 index 000000000000..8295982bcab6 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesSetAccessPolicyHeaders.java @@ -0,0 +1,121 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesSetAccessPolicyHeaders model. */ +@Fluent +public final class TablesSetAccessPolicyHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesSetAccessPolicyHeaders object itself. + */ + public TablesSetAccessPolicyHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesSetAccessPolicyHeaders object itself. + */ + public TablesSetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesSetAccessPolicyHeaders object itself. + */ + public TablesSetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesSetAccessPolicyHeaders object itself. + */ + public TablesSetAccessPolicyHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesSetAccessPolicyResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesSetAccessPolicyResponse.java new file mode 100644 index 000000000000..31ed8b9c882f --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesSetAccessPolicyResponse.java @@ -0,0 +1,26 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the setAccessPolicy operation. */ +public final class TablesSetAccessPolicyResponse extends ResponseBase { + /** + * Creates an instance of TablesSetAccessPolicyResponse. + * + * @param request the request which resulted in this TablesSetAccessPolicyResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesSetAccessPolicyResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + TablesSetAccessPolicyHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesUpdateEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesUpdateEntityHeaders.java new file mode 100644 index 000000000000..4b4eeeb2f81b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesUpdateEntityHeaders.java @@ -0,0 +1,147 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesUpdateEntityHeaders model. */ +@Fluent +public final class TablesUpdateEntityHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The ETag property. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesUpdateEntityHeaders object itself. + */ + public TablesUpdateEntityHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag property. + * + * @param eTag the eTag value to set. + * @return the TablesUpdateEntityHeaders object itself. + */ + public TablesUpdateEntityHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesUpdateEntityHeaders object itself. + */ + public TablesUpdateEntityHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesUpdateEntityHeaders object itself. + */ + public TablesUpdateEntityHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesUpdateEntityHeaders object itself. + */ + public TablesUpdateEntityHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesUpdateEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesUpdateEntityResponse.java new file mode 100644 index 000000000000..ddc53d628427 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesUpdateEntityResponse.java @@ -0,0 +1,26 @@ +package com.microsoft.azure.tables.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the updateEntity operation. */ +public final class TablesUpdateEntityResponse extends ResponseBase { + /** + * Creates an instance of TablesUpdateEntityResponse. + * + * @param request the request which resulted in this TablesUpdateEntityResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesUpdateEntityResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + TablesUpdateEntityHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/package-info.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/package-info.java new file mode 100644 index 000000000000..835095a3e1a1 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/package-info.java @@ -0,0 +1,2 @@ +/** Package containing the data models for AzureTable. null. */ +package com.microsoft.azure.tables.models; diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/package-info.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/package-info.java new file mode 100644 index 000000000000..529c78d568a5 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/package-info.java @@ -0,0 +1,2 @@ +/** Package containing the classes for AzureTable. null. */ +package com.microsoft.azure.tables; From df5a939d09455c02ebae4b3bd8b7ae85081fa2f4 Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Wed, 27 May 2020 11:52:57 -0400 Subject: [PATCH 02/10] adding readme file --- sdk/cosmos/azure-cosmos-table/README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sdk/cosmos/azure-cosmos-table/README.md diff --git a/sdk/cosmos/azure-cosmos-table/README.md b/sdk/cosmos/azure-cosmos-table/README.md new file mode 100644 index 000000000000..e69de29bb2d1 From a5ef2e54f1dc41be4d1fbfa1f525d1a8cae95c06 Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Wed, 27 May 2020 14:41:05 -0400 Subject: [PATCH 03/10] changing README and pom file to be based on template --- sdk/cosmos/azure-cosmos-table/README.md | 26 +++++++++++++++++++++++++ sdk/cosmos/azure-cosmos-table/pom.xml | 26 +++++++++++++++---------- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-table/README.md b/sdk/cosmos/azure-cosmos-table/README.md index e69de29bb2d1..619707848b61 100644 --- a/sdk/cosmos/azure-cosmos-table/README.md +++ b/sdk/cosmos/azure-cosmos-table/README.md @@ -0,0 +1,26 @@ +# Azure Tables client library for Java +Azure Tables is a managed service helps developers harness Azure Cloud storage. +Tables storage gives developers flexibility and scalability with all the best parts of Azure cloud. + +Use the client library for Tables to create and manage data as well as storage configuration. + + +## Getting started + +### Prerequisites + +- Java Development Kit (JDK) with version 8 or above +- [Azure Subscription][azure_subscription] + + +### Include the Package + +[//]: # ({x-version-update-start;com.azure:cosmos:azure-cosmos-table;current}) +```xml + + com.azure + azure-cosmos-table + 1.0.0 + +``` +[//]: # ({x-version-update-end}) diff --git a/sdk/cosmos/azure-cosmos-table/pom.xml b/sdk/cosmos/azure-cosmos-table/pom.xml index 199db19b04d8..833418d8bbae 100644 --- a/sdk/cosmos/azure-cosmos-table/pom.xml +++ b/sdk/cosmos/azure-cosmos-table/pom.xml @@ -1,17 +1,23 @@ + + + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + com.azure + azure-cosmos-table + pom + 1.0.0 + + azure-cosmos-table + - org.example - my-test-project - 1.0 - - com.azure - azure-core - 1.5.0 - + + com.azure + azure-core + 1.5.0 + From 85ee9be99583ddf7b320212076c82fb96d6dee35 Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Wed, 27 May 2020 15:43:57 -0400 Subject: [PATCH 04/10] fixing with naming, version and things connie suggested --- eng/versioning/version_client.txt | 1 + sdk/cosmos/azure-cosmos-table/README.md | 11 +++--- .../azure/{tables => table}/AzureTable.java | 2 +- .../{tables => table}/AzureTableBuilder.java | 2 +- .../azure/{tables => table}/Services.java | 2 +- .../azure/{tables => table}/Tables.java | 2 +- .../models/AccessPolicy.java | 0 .../{tables => table}/models/CorsRule.java | 0 .../models/GeoReplication.java | 0 .../models/GeoReplicationStatusType.java | 0 .../{tables => table}/models/Logging.java | 0 .../{tables => table}/models/Metrics.java | 0 .../models/OdataMetadataFormat.java | 0 .../models/QueryOptions.java | 0 .../models/ResponseFormat.java | 0 .../models/RetentionPolicy.java | 0 .../models/ServicesGetPropertiesHeaders.java | 0 .../models/ServicesGetPropertiesResponse.java | 0 .../models/ServicesGetStatisticsHeaders.java | 0 .../models/ServicesGetStatisticsResponse.java | 0 .../models/ServicesSetPropertiesHeaders.java | 0 .../models/ServicesSetPropertiesResponse.java | 0 .../models/SignedIdentifier.java | 0 .../models/TableEntityQueryResponse.java | 0 .../models/TableProperties.java | 0 .../models/TableQueryResponse.java | 0 .../models/TableResponse.java | 0 .../models/TableResponseProperties.java | 0 .../models/TableServiceError.java | 0 .../models/TableServiceErrorException.java | 0 .../models/TableServiceProperties.java | 0 .../models/TableServiceStats.java | 0 .../models/TablesCreateHeaders.java | 0 .../models/TablesCreateResponse.java | 0 .../models/TablesDeleteEntityHeaders.java | 0 .../models/TablesDeleteEntityResponse.java | 0 .../models/TablesDeleteHeaders.java | 0 .../models/TablesDeleteResponse.java | 0 .../models/TablesGetAccessPolicyHeaders.java | 0 .../models/TablesGetAccessPolicyResponse.java | 0 .../models/TablesInsertEntityHeaders.java | 0 .../models/TablesInsertEntityResponse.java | 0 .../models/TablesMergeEntityHeaders.java | 0 .../models/TablesMergeEntityResponse.java | 0 .../models/TablesQueryEntitiesHeaders.java | 0 .../models/TablesQueryEntitiesResponse.java | 0 ...EntitiesWithPartitionAndRowKeyHeaders.java | 0 ...ntitiesWithPartitionAndRowKeyResponse.java | 0 .../models/TablesQueryHeaders.java | 0 .../models/TablesQueryResponse.java | 0 .../models/TablesSetAccessPolicyHeaders.java | 0 .../models/TablesSetAccessPolicyResponse.java | 0 .../models/TablesUpdateEntityHeaders.java | 0 .../models/TablesUpdateEntityResponse.java | 0 .../models/package-info.java | 0 .../azure/{tables => table}/package-info.java | 2 +- .../azure-cosmos-table/swagger/README.md | 35 +++++++++++++++++++ 57 files changed, 47 insertions(+), 10 deletions(-) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/AzureTable.java (98%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/AzureTableBuilder.java (98%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/Services.java (99%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/Tables.java (99%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/AccessPolicy.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/CorsRule.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/GeoReplication.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/GeoReplicationStatusType.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/Logging.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/Metrics.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/OdataMetadataFormat.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/QueryOptions.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/ResponseFormat.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/RetentionPolicy.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/ServicesGetPropertiesHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/ServicesGetPropertiesResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/ServicesGetStatisticsHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/ServicesGetStatisticsResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/ServicesSetPropertiesHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/ServicesSetPropertiesResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/SignedIdentifier.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TableEntityQueryResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TableProperties.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TableQueryResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TableResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TableResponseProperties.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TableServiceError.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TableServiceErrorException.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TableServiceProperties.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TableServiceStats.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesCreateHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesCreateResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesDeleteEntityHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesDeleteEntityResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesDeleteHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesDeleteResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesGetAccessPolicyHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesGetAccessPolicyResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesInsertEntityHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesInsertEntityResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesMergeEntityHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesMergeEntityResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesQueryEntitiesHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesQueryEntitiesResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesQueryHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesQueryResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesSetAccessPolicyHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesSetAccessPolicyResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesUpdateEntityHeaders.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/TablesUpdateEntityResponse.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/models/package-info.java (100%) rename sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/{tables => table}/package-info.java (62%) create mode 100644 sdk/cosmos/azure-cosmos-table/swagger/README.md diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 596a0cd63d10..8bd523e0c6c0 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -19,6 +19,7 @@ com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.4;1.0.0-beta.5 com.azure:azure-cosmos;4.0.1-beta.3;4.0.1-beta.4 com.azure:azure-cosmos-examples;4.0.1-beta.1;4.0.1-beta.1 com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1 +com.azure:azure-cosmos-table;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-data-appconfiguration;1.1.1;1.2.0-beta.1 com.azure:azure-e2e;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-identity;1.0.6;1.1.0-beta.5 diff --git a/sdk/cosmos/azure-cosmos-table/README.md b/sdk/cosmos/azure-cosmos-table/README.md index 619707848b61..a718e8961f8a 100644 --- a/sdk/cosmos/azure-cosmos-table/README.md +++ b/sdk/cosmos/azure-cosmos-table/README.md @@ -1,9 +1,10 @@ -# Azure Tables client library for Java -Azure Tables is a managed service helps developers harness Azure Cloud storage. +# Azure Table client library for Java +Azure Tables Azure Table storage is a service that stores structured NoSQL data in the cloud, providing a key/attribute store with a schemaless design. Tables storage gives developers flexibility and scalability with all the best parts of Azure cloud. -Use the client library for Tables to create and manage data as well as storage configuration. - +Use the client library for Tables to: +- manages tables +- edit and access table contents ## Getting started @@ -20,7 +21,7 @@ Use the client library for Tables to create and manage data as well as storage c com.azure azure-cosmos-table - 1.0.0 + 1.0.0-beta ``` [//]: # ({x-version-update-end}) diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTable.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTable.java similarity index 98% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTable.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTable.java index 40011a10b87a..e51b03bf5746 100644 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTable.java +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTable.java @@ -1,4 +1,4 @@ -package com.microsoft.azure.tables; +package com.microsoft.azure.table; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTableBuilder.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTableBuilder.java similarity index 98% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTableBuilder.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTableBuilder.java index 32f47ad34ec5..d38eb1cb39db 100644 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/AzureTableBuilder.java +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTableBuilder.java @@ -1,4 +1,4 @@ -package com.microsoft.azure.tables; +package com.microsoft.azure.table; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Services.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Services.java similarity index 99% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Services.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Services.java index 947c6bfb1cf3..f73043ae8c07 100644 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Services.java +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Services.java @@ -1,4 +1,4 @@ -package com.microsoft.azure.tables; +package com.microsoft.azure.table; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Tables.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Tables.java similarity index 99% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Tables.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Tables.java index 4fb378fe8d86..8947da3fca72 100644 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/Tables.java +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Tables.java @@ -1,4 +1,4 @@ -package com.microsoft.azure.tables; +package com.microsoft.azure.table; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.Delete; diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/AccessPolicy.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/AccessPolicy.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/AccessPolicy.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/AccessPolicy.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/CorsRule.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/CorsRule.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/CorsRule.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/CorsRule.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/GeoReplication.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/GeoReplication.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/GeoReplication.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/GeoReplication.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/GeoReplicationStatusType.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/GeoReplicationStatusType.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/GeoReplicationStatusType.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/GeoReplicationStatusType.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/Logging.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/Logging.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/Logging.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/Logging.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/Metrics.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/Metrics.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/Metrics.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/Metrics.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/OdataMetadataFormat.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/OdataMetadataFormat.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/OdataMetadataFormat.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/OdataMetadataFormat.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/QueryOptions.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/QueryOptions.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/QueryOptions.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/QueryOptions.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ResponseFormat.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ResponseFormat.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ResponseFormat.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ResponseFormat.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/RetentionPolicy.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/RetentionPolicy.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/RetentionPolicy.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/RetentionPolicy.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetPropertiesHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetPropertiesHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetPropertiesHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetPropertiesHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetPropertiesResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetPropertiesResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetPropertiesResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetPropertiesResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetStatisticsHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetStatisticsHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetStatisticsHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetStatisticsHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetStatisticsResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetStatisticsResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesGetStatisticsResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetStatisticsResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesSetPropertiesHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesSetPropertiesHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesSetPropertiesHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesSetPropertiesHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesSetPropertiesResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesSetPropertiesResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/ServicesSetPropertiesResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesSetPropertiesResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/SignedIdentifier.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/SignedIdentifier.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/SignedIdentifier.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/SignedIdentifier.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableEntityQueryResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableEntityQueryResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableEntityQueryResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableEntityQueryResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableProperties.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableProperties.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableProperties.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableProperties.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableQueryResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableQueryResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableQueryResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableQueryResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableResponseProperties.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableResponseProperties.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableResponseProperties.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableResponseProperties.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceError.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceError.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceError.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceError.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceErrorException.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceErrorException.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceErrorException.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceErrorException.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceProperties.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceProperties.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceProperties.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceProperties.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceStats.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceStats.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TableServiceStats.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceStats.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesCreateHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesCreateHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesCreateHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesCreateHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesCreateResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesCreateResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesCreateResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesCreateResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteEntityHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteEntityHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteEntityHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteEntityResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteEntityResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteEntityResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesDeleteResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesGetAccessPolicyHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesGetAccessPolicyHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesGetAccessPolicyHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesGetAccessPolicyHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesGetAccessPolicyResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesGetAccessPolicyResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesGetAccessPolicyResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesGetAccessPolicyResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesInsertEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesInsertEntityHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesInsertEntityHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesInsertEntityHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesInsertEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesInsertEntityResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesInsertEntityResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesInsertEntityResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesMergeEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesMergeEntityHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesMergeEntityHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesMergeEntityHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesMergeEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesMergeEntityResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesMergeEntityResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesMergeEntityResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesQueryResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesSetAccessPolicyHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesSetAccessPolicyHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesSetAccessPolicyHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesSetAccessPolicyHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesSetAccessPolicyResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesSetAccessPolicyResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesSetAccessPolicyResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesSetAccessPolicyResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesUpdateEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesUpdateEntityHeaders.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesUpdateEntityHeaders.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesUpdateEntityHeaders.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesUpdateEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesUpdateEntityResponse.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/TablesUpdateEntityResponse.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesUpdateEntityResponse.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/package-info.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/package-info.java similarity index 100% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/models/package-info.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/package-info.java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/package-info.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/package-info.java similarity index 62% rename from sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/package-info.java rename to sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/package-info.java index 529c78d568a5..3e193265e751 100644 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/tables/package-info.java +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/package-info.java @@ -1,2 +1,2 @@ /** Package containing the classes for AzureTable. null. */ -package com.microsoft.azure.tables; +package com.microsoft.azure.table; diff --git a/sdk/cosmos/azure-cosmos-table/swagger/README.md b/sdk/cosmos/azure-cosmos-table/swagger/README.md new file mode 100644 index 000000000000..e3306633f4a8 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/swagger/README.md @@ -0,0 +1,35 @@ +# Azure Cognitive Service - Text Analytics for Java + +> see https://aka.ms/autorest + +### Setup +```ps +Fork and clone https://github.com/Azure/autorest.java +git checkout v4 +git submodule update --init --recursive +mvn package -Dlocal +npm install +npm install -g autorest +``` + +### Generation +```ps +cd +autorest --java --use=C:/work/autorest.java +``` + +### Code generation settings +``` yaml +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cosmos-db/data-plane/Microsoft.Tables/preview/2019-02-02/table.json +java: true +output-folder: ..\ +generate-client-as-impl: true +namespace: com.azure.cosmos.table +generate-client-interfaces: false +sync-methods: none +license-header: MICROSOFT_MIT_SMALL +add-context-parameter: true +models-subpackage: implementation.models +custom-types-subpackage: models +context-client-method-parameter: true +``` From cac5002235f65179250ef56b12cc94d2e6b13f28 Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Thu, 28 May 2020 12:59:42 -0400 Subject: [PATCH 05/10] Fixed pom and some version issues which were in Jim's comments --- eng/jacoco-test-coverage/pom.xml | 5 + sdk/cosmos/azure-cosmos-table/README.md | 13 ++- sdk/cosmos/azure-cosmos-table/pom.xml | 116 ++++++++++++++++++++---- sdk/cosmos/ci.yml | 5 +- sdk/cosmos/pom.xml | 1 + 5 files changed, 122 insertions(+), 18 deletions(-) diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index ddcc79376672..3c926f9781e5 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -182,6 +182,11 @@ azure-cosmos 4.0.1-beta.4 + + com.azure + azure-cosmos-table + 1.0.0-beta.1 + com.azure azure-sdk-template diff --git a/sdk/cosmos/azure-cosmos-table/README.md b/sdk/cosmos/azure-cosmos-table/README.md index a718e8961f8a..a7606da21a80 100644 --- a/sdk/cosmos/azure-cosmos-table/README.md +++ b/sdk/cosmos/azure-cosmos-table/README.md @@ -2,6 +2,7 @@ Azure Tables Azure Table storage is a service that stores structured NoSQL data in the cloud, providing a key/attribute store with a schemaless design. Tables storage gives developers flexibility and scalability with all the best parts of Azure cloud. +## Examples Use the client library for Tables to: - manages tables - edit and access table contents @@ -21,7 +22,17 @@ Use the client library for Tables to: com.azure azure-cosmos-table - 1.0.0-beta + 1.0.0-beta.1 ``` [//]: # ({x-version-update-end}) + +## Key concepts + +## Troubleshooting + +## Next steps + +## Contribution and Feedback + +## License diff --git a/sdk/cosmos/azure-cosmos-table/pom.xml b/sdk/cosmos/azure-cosmos-table/pom.xml index 833418d8bbae..201454224c46 100644 --- a/sdk/cosmos/azure-cosmos-table/pom.xml +++ b/sdk/cosmos/azure-cosmos-table/pom.xml @@ -1,23 +1,107 @@ - - - + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.0.0-beta.1 + ../../parents/azure-client-sdk-parent + + com.azure azure-cosmos-table - pom - 1.0.0 - - azure-cosmos-table - + 1.0.0-beta.1 + Microsoft Azure SDK for Azure Table + This Package contains Microsoft Azure Cosmos Table + jar + https://github.com/Azure/azure-sdk-for-java + + + + azure-java-build-docs + ${site.url}/site/${project.artifactId} + + + + + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + + 0.0 + 0.0 + - - com.azure - azure-core - 1.5.0 - + + com.azure + azure-core + 1.5.0 + + + io.netty + * + + + com.fasterxml.jackson.core + * + + + + + + + + + + org.revapi + revapi-maven-plugin + 0.11.2 + + true + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M3 + + unit + + %regex[.*] + + + + surefire.testng.verbose + 2 + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + + + com.azure:* + + + + + + + + diff --git a/sdk/cosmos/ci.yml b/sdk/cosmos/ci.yml index db2aff913559..62ec6d4494d1 100644 --- a/sdk/cosmos/ci.yml +++ b/sdk/cosmos/ci.yml @@ -10,7 +10,7 @@ resources: type: github name: Azure/azure-sdk-tools endpoint: azure - + trigger: branches: include: @@ -53,6 +53,9 @@ stages: - name: azure-cosmos groupId: com.azure safeName: azurecosmos + - name: azure-cosmos-table + groupId: com.azure + safeName: azurecosmostable AdditionalModules: - name: azure-cosmos-examples groupId: com.azure diff --git a/sdk/cosmos/pom.xml b/sdk/cosmos/pom.xml index 28d36830a6da..70aff6959faa 100644 --- a/sdk/cosmos/pom.xml +++ b/sdk/cosmos/pom.xml @@ -12,6 +12,7 @@ azure-cosmos azure-cosmos-benchmark azure-cosmos-examples + azure-cosmos-table From ebde35e9ceb99d7dca9b915a259b94b4829ff3cb Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Fri, 29 May 2020 11:18:35 -0400 Subject: [PATCH 06/10] pom file changes --- sdk/cosmos/azure-cosmos-table/pom.xml | 40 +-------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/sdk/cosmos/azure-cosmos-table/pom.xml b/sdk/cosmos/azure-cosmos-table/pom.xml index 201454224c46..3b610d05b385 100644 --- a/sdk/cosmos/azure-cosmos-table/pom.xml +++ b/sdk/cosmos/azure-cosmos-table/pom.xml @@ -32,7 +32,7 @@ Licensed under the MIT License. HEAD - + 0.0 0.0 @@ -43,49 +43,11 @@ Licensed under the MIT License. com.azure azure-core 1.5.0 - - - io.netty - * - - - com.fasterxml.jackson.core - * - - - - - - org.revapi - revapi-maven-plugin - 0.11.2 - - true - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M3 - - unit - - %regex[.*] - - - - surefire.testng.verbose - 2 - - - - org.apache.maven.plugins From 1439b8471efc88c9487d3a2a317ab3021b47d36f Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Fri, 29 May 2020 13:26:00 -0400 Subject: [PATCH 07/10] fix swagger location and pom mistake --- sdk/cosmos/azure-cosmos-table/pom.xml | 4 +- .../com/microsoft/azure/table/AzureTable.java | 108 -- .../azure/table/AzureTableBuilder.java | 79 -- .../com/microsoft/azure/table/Services.java | 221 ---- .../com/microsoft/azure/table/Tables.java | 985 ------------------ .../azure/table/models/AccessPolicy.java | 87 -- .../azure/table/models/CorsRule.java | 159 --- .../azure/table/models/GeoReplication.java | 76 -- .../models/GeoReplicationStatusType.java | 33 - .../microsoft/azure/table/models/Logging.java | 138 --- .../microsoft/azure/table/models/Metrics.java | 115 -- .../table/models/OdataMetadataFormat.java | 36 - .../azure/table/models/QueryOptions.java | 116 --- .../azure/table/models/ResponseFormat.java | 30 - .../azure/table/models/RetentionPolicy.java | 63 -- .../models/ServicesGetPropertiesHeaders.java | 86 -- .../models/ServicesGetPropertiesResponse.java | 33 - .../models/ServicesGetStatisticsHeaders.java | 121 --- .../models/ServicesGetStatisticsResponse.java | 32 - .../models/ServicesSetPropertiesHeaders.java | 86 -- .../models/ServicesSetPropertiesResponse.java | 26 - .../azure/table/models/SignedIdentifier.java | 60 -- .../models/TableEntityQueryResponse.java | 62 -- .../azure/table/models/TableProperties.java | 34 - .../table/models/TableQueryResponse.java | 61 -- .../azure/table/models/TableResponse.java | 34 - .../table/models/TableResponseProperties.java | 112 -- .../azure/table/models/TableServiceError.java | 34 - .../models/TableServiceErrorException.java | 33 - .../table/models/TableServiceProperties.java | 115 -- .../azure/table/models/TableServiceStats.java | 34 - .../table/models/TablesCreateHeaders.java | 147 --- .../table/models/TablesCreateResponse.java | 32 - .../models/TablesDeleteEntityHeaders.java | 121 --- .../models/TablesDeleteEntityResponse.java | 26 - .../table/models/TablesDeleteHeaders.java | 121 --- .../table/models/TablesDeleteResponse.java | 22 - .../models/TablesGetAccessPolicyHeaders.java | 121 --- .../models/TablesGetAccessPolicyResponse.java | 34 - .../models/TablesInsertEntityHeaders.java | 199 ---- .../models/TablesInsertEntityResponse.java | 33 - .../models/TablesMergeEntityHeaders.java | 147 --- .../models/TablesMergeEntityResponse.java | 22 - .../models/TablesQueryEntitiesHeaders.java | 173 --- .../models/TablesQueryEntitiesResponse.java | 33 - ...EntitiesWithPartitionAndRowKeyHeaders.java | 201 ---- ...ntitiesWithPartitionAndRowKeyResponse.java | 33 - .../table/models/TablesQueryHeaders.java | 147 --- .../table/models/TablesQueryResponse.java | 32 - .../models/TablesSetAccessPolicyHeaders.java | 121 --- .../models/TablesSetAccessPolicyResponse.java | 26 - .../models/TablesUpdateEntityHeaders.java | 147 --- .../models/TablesUpdateEntityResponse.java | 26 - .../azure/table/models/package-info.java | 2 - .../microsoft/azure/table/package-info.java | 2 - .../azure-cosmos-table/swagger/README.md | 2 +- 56 files changed, 3 insertions(+), 5180 deletions(-) delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTable.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTableBuilder.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Services.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Tables.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/AccessPolicy.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/CorsRule.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/GeoReplication.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/GeoReplicationStatusType.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/Logging.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/Metrics.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/OdataMetadataFormat.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/QueryOptions.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ResponseFormat.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/RetentionPolicy.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetPropertiesHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetPropertiesResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetStatisticsHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetStatisticsResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesSetPropertiesHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesSetPropertiesResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/SignedIdentifier.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableEntityQueryResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableProperties.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableQueryResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableResponseProperties.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceError.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceErrorException.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceProperties.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceStats.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesCreateHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesCreateResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteEntityHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteEntityResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesGetAccessPolicyHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesGetAccessPolicyResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesInsertEntityHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesInsertEntityResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesMergeEntityHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesMergeEntityResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesSetAccessPolicyHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesSetAccessPolicyResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesUpdateEntityHeaders.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesUpdateEntityResponse.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/package-info.java delete mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/package-info.java diff --git a/sdk/cosmos/azure-cosmos-table/pom.xml b/sdk/cosmos/azure-cosmos-table/pom.xml index 3b610d05b385..e895fc51755d 100644 --- a/sdk/cosmos/azure-cosmos-table/pom.xml +++ b/sdk/cosmos/azure-cosmos-table/pom.xml @@ -7,7 +7,7 @@ Licensed under the MIT License. com.azure azure-client-sdk-parent - 1.0.0-beta.1 + 1.7.0 ../../parents/azure-client-sdk-parent @@ -15,7 +15,7 @@ Licensed under the MIT License. azure-cosmos-table 1.0.0-beta.1 Microsoft Azure SDK for Azure Table - This Package contains Microsoft Azure Cosmos Table + This package contains the Microsoft Azure Cosmos Table client library. jar https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTable.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTable.java deleted file mode 100644 index e51b03bf5746..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTable.java +++ /dev/null @@ -1,108 +0,0 @@ -package com.microsoft.azure.table; - -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; - -/** Initializes a new instance of the AzureTable type. */ -public final class AzureTable { - /** The URL of the service account or table that is the targe of the desired operation. */ - private String url; - - /** - * Gets The URL of the service account or table that is the targe of the desired operation. - * - * @return the url value. - */ - public String getUrl() { - return this.url; - } - - /** - * Sets The URL of the service account or table that is the targe of the desired operation. - * - * @param url the url value. - * @return the service client itself. - */ - public AzureTable setUrl(String url) { - this.url = url; - return this; - } - - /** Specifies the version of the operation to use for this request. */ - private String version; - - /** - * Gets Specifies the version of the operation to use for this request. - * - * @return the version value. - */ - public String getVersion() { - return this.version; - } - - /** - * Sets Specifies the version of the operation to use for this request. - * - * @param version the version value. - * @return the service client itself. - */ - public AzureTable setVersion(String version) { - this.version = version; - return this; - } - - /** The HTTP pipeline to send requests through. */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** The Tables object to access its operations. */ - private final Tables tables; - - /** - * Gets the Tables object to access its operations. - * - * @return the Tables object. - */ - public Tables getTables() { - return this.tables; - } - - /** The Services object to access its operations. */ - private final Services services; - - /** - * Gets the Services object to access its operations. - * - * @return the Services object. - */ - public Services getServices() { - return this.services; - } - - /** Initializes an instance of AzureTable client. */ - public AzureTable() { - this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build()); - } - - /** - * Initializes an instance of AzureTable client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - */ - public AzureTable(HttpPipeline httpPipeline) { - this.httpPipeline = httpPipeline; - this.tables = new Tables(this); - this.services = new Services(this); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTableBuilder.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTableBuilder.java deleted file mode 100644 index d38eb1cb39db..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/AzureTableBuilder.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.microsoft.azure.table; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; - -/** A builder for creating a new instance of the AzureTable type. */ -@ServiceClientBuilder(serviceClients = {AzureTable.class}) -public final class AzureTableBuilder { - /* - * The URL of the service account or table that is the targe of the desired - * operation. - */ - private String url; - - /** - * Sets The URL of the service account or table that is the targe of the desired operation. - * - * @param url the url value. - * @return the AzureTableBuilder. - */ - public AzureTableBuilder url(String url) { - this.url = url; - return this; - } - - /* - * Specifies the version of the operation to use for this request. - */ - private String version; - - /** - * Sets Specifies the version of the operation to use for this request. - * - * @param version the version value. - * @return the AzureTableBuilder. - */ - public AzureTableBuilder version(String version) { - this.version = version; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the AzureTableBuilder. - */ - public AzureTableBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /** - * Builds an instance of AzureTable with the provided parameters. - * - * @return an instance of AzureTable. - */ - public AzureTable buildClient() { - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - AzureTable client = new AzureTable(pipeline); - client.setUrl(this.url); - client.setVersion(this.version); - return client; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Services.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Services.java deleted file mode 100644 index f73043ae8c07..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Services.java +++ /dev/null @@ -1,221 +0,0 @@ -package com.microsoft.azure.table; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.RestProxy; -import com.microsoft.azure.tables.models.ServicesGetPropertiesResponse; -import com.microsoft.azure.tables.models.ServicesGetStatisticsResponse; -import com.microsoft.azure.tables.models.ServicesSetPropertiesResponse; -import com.microsoft.azure.tables.models.TableServiceErrorException; -import com.microsoft.azure.tables.models.TableServiceProperties; -import com.microsoft.azure.tables.models.TableServiceStats; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in Services. */ -public final class Services { - /** The proxy service used to perform REST calls. */ - private final ServicesService service; - - /** The service client containing this operation class. */ - private final AzureTable client; - - /** - * Initializes an instance of Services. - * - * @param client the instance of the service client containing this operation class. - */ - Services(AzureTable client) { - this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline()); - this.client = client; - } - - /** - * The interface defining all the services for AzureTableServices to be used by the proxy service to perform REST - * calls. - */ - @Host("{url}") - @ServiceInterface(name = "AzureTableServices") - private interface ServicesService { - @Put("/") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono setProperties( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @BodyParam("application/xml") TableServiceProperties tableServiceProperties); - - @Get("/") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono getProperties( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId); - - @Get("/") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono getStatistics( - @HostParam("url") String url, - @QueryParam("restype") String restype, - @QueryParam("comp") String comp, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId); - } - - /** - * Sets properties for an account's Table service endpoint, including properties for Analytics and CORS - * (Cross-Origin Resource Sharing) rules. - * - * @param tableServiceProperties Table Service Properties. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setPropertiesWithResponseAsync( - TableServiceProperties tableServiceProperties, Integer timeout, String requestId) { - final String restype = "service"; - final String comp = "properties"; - return service.setProperties( - this.client.getUrl(), - restype, - comp, - timeout, - this.client.getVersion(), - requestId, - tableServiceProperties); - } - - /** - * Sets properties for an account's Table service endpoint, including properties for Analytics and CORS - * (Cross-Origin Resource Sharing) rules. - * - * @param tableServiceProperties Table Service Properties. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setPropertiesAsync( - TableServiceProperties tableServiceProperties, Integer timeout, String requestId) { - return setPropertiesWithResponseAsync(tableServiceProperties, timeout, requestId) - .flatMap((ServicesSetPropertiesResponse res) -> Mono.empty()); - } - - /** - * Gets the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin - * Resource Sharing) rules. - * - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin - * Resource Sharing) rules. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesWithResponseAsync(Integer timeout, String requestId) { - final String restype = "service"; - final String comp = "properties"; - return service.getProperties(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId); - } - - /** - * Gets the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin - * Resource Sharing) rules. - * - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin - * Resource Sharing) rules. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getPropertiesAsync(Integer timeout, String requestId) { - return getPropertiesWithResponseAsync(timeout, requestId) - .flatMap( - (ServicesGetPropertiesResponse res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Retrieves statistics related to replication for the Table service. It is only available on the secondary location - * endpoint when read-access geo-redundant replication is enabled for the account. - * - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stats for the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getStatisticsWithResponseAsync(Integer timeout, String requestId) { - final String restype = "service"; - final String comp = "stats"; - return service.getStatistics(this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId); - } - - /** - * Retrieves statistics related to replication for the Table service. It is only available on the secondary location - * endpoint when read-access geo-redundant replication is enabled for the account. - * - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return stats for the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getStatisticsAsync(Integer timeout, String requestId) { - return getStatisticsWithResponseAsync(timeout, requestId) - .flatMap( - (ServicesGetStatisticsResponse res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Tables.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Tables.java deleted file mode 100644 index 8947da3fca72..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/Tables.java +++ /dev/null @@ -1,985 +0,0 @@ -package com.microsoft.azure.table; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.http.rest.RestProxy; -import com.microsoft.azure.tables.models.OdataMetadataFormat; -import com.microsoft.azure.tables.models.QueryOptions; -import com.microsoft.azure.tables.models.ResponseFormat; -import com.microsoft.azure.tables.models.SignedIdentifier; -import com.microsoft.azure.tables.models.TableEntityQueryResponse; -import com.microsoft.azure.tables.models.TableProperties; -import com.microsoft.azure.tables.models.TableQueryResponse; -import com.microsoft.azure.tables.models.TableResponse; -import com.microsoft.azure.tables.models.TableServiceErrorException; -import com.microsoft.azure.tables.models.TablesCreateResponse; -import com.microsoft.azure.tables.models.TablesDeleteEntityResponse; -import com.microsoft.azure.tables.models.TablesDeleteResponse; -import com.microsoft.azure.tables.models.TablesGetAccessPolicyResponse; -import com.microsoft.azure.tables.models.TablesInsertEntityResponse; -import com.microsoft.azure.tables.models.TablesMergeEntityResponse; -import com.microsoft.azure.tables.models.TablesQueryEntitiesResponse; -import com.microsoft.azure.tables.models.TablesQueryEntitiesWithPartitionAndRowKeyResponse; -import com.microsoft.azure.tables.models.TablesQueryResponse; -import com.microsoft.azure.tables.models.TablesSetAccessPolicyResponse; -import com.microsoft.azure.tables.models.TablesUpdateEntityResponse; -import java.util.List; -import java.util.Map; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in Tables. */ -public final class Tables { - /** The proxy service used to perform REST calls. */ - private final TablesService service; - - /** The service client containing this operation class. */ - private final AzureTable client; - - /** - * Initializes an instance of Tables. - * - * @param client the instance of the service client containing this operation class. - */ - Tables(AzureTable client) { - this.service = RestProxy.create(TablesService.class, client.getHttpPipeline()); - this.client = client; - } - - /** - * The interface defining all the services for AzureTableTables to be used by the proxy service to perform REST - * calls. - */ - @Host("{url}") - @ServiceInterface(name = "AzureTableTables") - private interface TablesService { - @Get("/Tables") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono query( - @HostParam("url") String url, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("DataServiceVersion") String dataServiceVersion, - @QueryParam("$format") OdataMetadataFormat format, - @QueryParam("$top") Integer top, - @QueryParam("$select") String select, - @QueryParam("$filter") String filter, - @QueryParam("NextTableName") String nextTableName); - - @Post("/Tables") - @ExpectedResponses({201, 204}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono create( - @HostParam("url") String url, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("DataServiceVersion") String dataServiceVersion, - @QueryParam("$format") OdataMetadataFormat format, - @HeaderParam("Prefer") ResponseFormat responsePreference, - @BodyParam("application/json") TableProperties tableProperties); - - @Delete("/Tables('{table}')") - @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono delete( - @HostParam("url") String url, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @PathParam("table") String table); - - @Get("/{table}()") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono queryEntities( - @HostParam("url") String url, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("DataServiceVersion") String dataServiceVersion, - @QueryParam("$format") OdataMetadataFormat format, - @QueryParam("$top") Integer top, - @QueryParam("$select") String select, - @QueryParam("$filter") String filter, - @PathParam("table") String table, - @QueryParam("NextPartitionKey") String nextPartitionKey, - @QueryParam("NextRowKey") String nextRowKey); - - @Get("/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono queryEntitiesWithPartitionAndRowKey( - @HostParam("url") String url, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("DataServiceVersion") String dataServiceVersion, - @QueryParam("$format") OdataMetadataFormat format, - @QueryParam("$select") String select, - @QueryParam("$filter") String filter, - @PathParam("table") String table, - @PathParam("partitionKey") String partitionKey, - @PathParam("rowKey") String rowKey); - - @Put("/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')") - @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono updateEntity( - @HostParam("url") String url, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("DataServiceVersion") String dataServiceVersion, - @QueryParam("$format") OdataMetadataFormat format, - @PathParam("table") String table, - @PathParam("partitionKey") String partitionKey, - @PathParam("rowKey") String rowKey, - @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") Map tableEntityProperties); - - @Patch("/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')") - @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono mergeEntity( - @HostParam("url") String url, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("DataServiceVersion") String dataServiceVersion, - @QueryParam("$format") OdataMetadataFormat format, - @PathParam("table") String table, - @PathParam("partitionKey") String partitionKey, - @PathParam("rowKey") String rowKey, - @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") Map tableEntityProperties); - - @Delete("/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')") - @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono deleteEntity( - @HostParam("url") String url, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("DataServiceVersion") String dataServiceVersion, - @QueryParam("$format") OdataMetadataFormat format, - @PathParam("table") String table, - @PathParam("partitionKey") String partitionKey, - @PathParam("rowKey") String rowKey, - @HeaderParam("If-Match") String ifMatch); - - @Post("/{table}") - @ExpectedResponses({201, 204}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono insertEntity( - @HostParam("url") String url, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @HeaderParam("DataServiceVersion") String dataServiceVersion, - @QueryParam("$format") OdataMetadataFormat format, - @PathParam("table") String table, - @HeaderParam("Prefer") ResponseFormat responsePreference, - @BodyParam("application/json") Map tableEntityProperties); - - @Get("/{table}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono getAccessPolicy( - @HostParam("url") String url, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @PathParam("table") String table, - @QueryParam("comp") String comp); - - @Put("/{table}") - @ExpectedResponses({204}) - @UnexpectedResponseExceptionType(TableServiceErrorException.class) - Mono setAccessPolicy( - @HostParam("url") String url, - @QueryParam("timeout") Integer timeout, - @HeaderParam("x-ms-version") String version, - @HeaderParam("x-ms-client-request-id") String requestId, - @PathParam("table") String table, - @QueryParam("comp") String comp, - @BodyParam("application/xml") List tableAcl); - } - - /** - * Queries tables under the given account. - * - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param nextTableName A table query continuation token from a previous call. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties for the table query response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono queryWithResponseAsync( - String requestId, String nextTableName, QueryOptions queryOptions) { - final String dataServiceVersion = "3.0"; - OdataMetadataFormat formatInternal = null; - if (queryOptions != null) { - formatInternal = queryOptions.getFormat(); - } - OdataMetadataFormat format = formatInternal; - Integer topInternal = null; - if (queryOptions != null) { - topInternal = queryOptions.getTop(); - } - Integer top = topInternal; - String selectInternal = null; - if (queryOptions != null) { - selectInternal = queryOptions.getSelect(); - } - String select = selectInternal; - String filterInternal = null; - if (queryOptions != null) { - filterInternal = queryOptions.getFilter(); - } - String filter = filterInternal; - return service.query( - this.client.getUrl(), - this.client.getVersion(), - requestId, - dataServiceVersion, - format, - top, - select, - filter, - nextTableName); - } - - /** - * Queries tables under the given account. - * - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param nextTableName A table query continuation token from a previous call. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties for the table query response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono queryAsync(String requestId, String nextTableName, QueryOptions queryOptions) { - return queryWithResponseAsync(requestId, nextTableName, queryOptions) - .flatMap( - (TablesQueryResponse res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Creates a new table under the given account. - * - * @param tableProperties The properties for creating a table. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param responsePreference Specifies whether the response should include the inserted entity in the payload. - * Possible values are return-no-content and return-content. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response for a single table. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createWithResponseAsync( - TableProperties tableProperties, - String requestId, - ResponseFormat responsePreference, - QueryOptions queryOptions) { - final String dataServiceVersion = "3.0"; - OdataMetadataFormat formatInternal = null; - if (queryOptions != null) { - formatInternal = queryOptions.getFormat(); - } - OdataMetadataFormat format = formatInternal; - return service.create( - this.client.getUrl(), - this.client.getVersion(), - requestId, - dataServiceVersion, - format, - responsePreference, - tableProperties); - } - - /** - * Creates a new table under the given account. - * - * @param tableProperties The properties for creating a table. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param responsePreference Specifies whether the response should include the inserted entity in the payload. - * Possible values are return-no-content and return-content. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response for a single table. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( - TableProperties tableProperties, - String requestId, - ResponseFormat responsePreference, - QueryOptions queryOptions) { - return createWithResponseAsync(tableProperties, requestId, responsePreference, queryOptions) - .flatMap( - (TablesCreateResponse res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Operation permanently deletes the specified table. - * - * @param table The name of the table. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteWithResponseAsync(String table, String requestId) { - return service.delete(this.client.getUrl(), this.client.getVersion(), requestId, table); - } - - /** - * Operation permanently deletes the specified table. - * - * @param table The name of the table. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteAsync(String table, String requestId) { - return deleteWithResponseAsync(table, requestId).flatMap((TablesDeleteResponse res) -> Mono.empty()); - } - - /** - * Queries entities in a table. - * - * @param table The name of the table. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param nextPartitionKey An entity query continuation token from a previous call. - * @param nextRowKey An entity query continuation token from a previous call. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties for the table entity query response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono queryEntitiesWithResponseAsync( - String table, - Integer timeout, - String requestId, - String nextPartitionKey, - String nextRowKey, - QueryOptions queryOptions) { - final String dataServiceVersion = "3.0"; - OdataMetadataFormat formatInternal = null; - if (queryOptions != null) { - formatInternal = queryOptions.getFormat(); - } - OdataMetadataFormat format = formatInternal; - Integer topInternal = null; - if (queryOptions != null) { - topInternal = queryOptions.getTop(); - } - Integer top = topInternal; - String selectInternal = null; - if (queryOptions != null) { - selectInternal = queryOptions.getSelect(); - } - String select = selectInternal; - String filterInternal = null; - if (queryOptions != null) { - filterInternal = queryOptions.getFilter(); - } - String filter = filterInternal; - return service.queryEntities( - this.client.getUrl(), - timeout, - this.client.getVersion(), - requestId, - dataServiceVersion, - format, - top, - select, - filter, - table, - nextPartitionKey, - nextRowKey); - } - - /** - * Queries entities in a table. - * - * @param table The name of the table. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param nextPartitionKey An entity query continuation token from a previous call. - * @param nextRowKey An entity query continuation token from a previous call. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties for the table entity query response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono queryEntitiesAsync( - String table, - Integer timeout, - String requestId, - String nextPartitionKey, - String nextRowKey, - QueryOptions queryOptions) { - return queryEntitiesWithResponseAsync(table, timeout, requestId, nextPartitionKey, nextRowKey, queryOptions) - .flatMap( - (TablesQueryEntitiesResponse res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Queries entities in a table. - * - * @param table The name of the table. - * @param partitionKey The partition key of the entity. - * @param rowKey The row key of the entity. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties for the table entity query response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono queryEntitiesWithPartitionAndRowKeyWithResponseAsync( - String table, - String partitionKey, - String rowKey, - Integer timeout, - String requestId, - QueryOptions queryOptions) { - final String dataServiceVersion = "3.0"; - OdataMetadataFormat formatInternal = null; - if (queryOptions != null) { - formatInternal = queryOptions.getFormat(); - } - OdataMetadataFormat format = formatInternal; - String selectInternal = null; - if (queryOptions != null) { - selectInternal = queryOptions.getSelect(); - } - String select = selectInternal; - String filterInternal = null; - if (queryOptions != null) { - filterInternal = queryOptions.getFilter(); - } - String filter = filterInternal; - return service.queryEntitiesWithPartitionAndRowKey( - this.client.getUrl(), - timeout, - this.client.getVersion(), - requestId, - dataServiceVersion, - format, - select, - filter, - table, - partitionKey, - rowKey); - } - - /** - * Queries entities in a table. - * - * @param table The name of the table. - * @param partitionKey The partition key of the entity. - * @param rowKey The row key of the entity. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties for the table entity query response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono queryEntitiesWithPartitionAndRowKeyAsync( - String table, - String partitionKey, - String rowKey, - Integer timeout, - String requestId, - QueryOptions queryOptions) { - return queryEntitiesWithPartitionAndRowKeyWithResponseAsync( - table, partitionKey, rowKey, timeout, requestId, queryOptions) - .flatMap( - (TablesQueryEntitiesWithPartitionAndRowKeyResponse res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Update entity in a table. - * - * @param table The name of the table. - * @param partitionKey The partition key of the entity. - * @param rowKey The row key of the entity. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param ifMatch Match condition for an entity to be updated. If specified and a matching entity is not found, an - * error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, - * an insert will be performed when no existing entity is found to update and a replace will be performed if an - * existing entity is found. - * @param tableEntityProperties The other properties of the table entity. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateEntityWithResponseAsync( - String table, - String partitionKey, - String rowKey, - Integer timeout, - String requestId, - String ifMatch, - Map tableEntityProperties, - QueryOptions queryOptions) { - final String dataServiceVersion = "3.0"; - OdataMetadataFormat formatInternal = null; - if (queryOptions != null) { - formatInternal = queryOptions.getFormat(); - } - OdataMetadataFormat format = formatInternal; - return service.updateEntity( - this.client.getUrl(), - timeout, - this.client.getVersion(), - requestId, - dataServiceVersion, - format, - table, - partitionKey, - rowKey, - ifMatch, - tableEntityProperties); - } - - /** - * Update entity in a table. - * - * @param table The name of the table. - * @param partitionKey The partition key of the entity. - * @param rowKey The row key of the entity. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param ifMatch Match condition for an entity to be updated. If specified and a matching entity is not found, an - * error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, - * an insert will be performed when no existing entity is found to update and a replace will be performed if an - * existing entity is found. - * @param tableEntityProperties The other properties of the table entity. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateEntityAsync( - String table, - String partitionKey, - String rowKey, - Integer timeout, - String requestId, - String ifMatch, - Map tableEntityProperties, - QueryOptions queryOptions) { - return updateEntityWithResponseAsync( - table, partitionKey, rowKey, timeout, requestId, ifMatch, tableEntityProperties, queryOptions) - .flatMap((TablesUpdateEntityResponse res) -> Mono.empty()); - } - - /** - * Merge entity in a table. - * - * @param table The name of the table. - * @param partitionKey The partition key of the entity. - * @param rowKey The row key of the entity. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param ifMatch Match condition for an entity to be updated. If specified and a matching entity is not found, an - * error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, - * an insert will be performed when no existing entity is found to update and a merge will be performed if an - * existing entity is found. - * @param tableEntityProperties The other properties of the table entity. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono mergeEntityWithResponseAsync( - String table, - String partitionKey, - String rowKey, - Integer timeout, - String requestId, - String ifMatch, - Map tableEntityProperties, - QueryOptions queryOptions) { - final String dataServiceVersion = "3.0"; - OdataMetadataFormat formatInternal = null; - if (queryOptions != null) { - formatInternal = queryOptions.getFormat(); - } - OdataMetadataFormat format = formatInternal; - return service.mergeEntity( - this.client.getUrl(), - timeout, - this.client.getVersion(), - requestId, - dataServiceVersion, - format, - table, - partitionKey, - rowKey, - ifMatch, - tableEntityProperties); - } - - /** - * Merge entity in a table. - * - * @param table The name of the table. - * @param partitionKey The partition key of the entity. - * @param rowKey The row key of the entity. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param ifMatch Match condition for an entity to be updated. If specified and a matching entity is not found, an - * error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, - * an insert will be performed when no existing entity is found to update and a merge will be performed if an - * existing entity is found. - * @param tableEntityProperties The other properties of the table entity. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono mergeEntityAsync( - String table, - String partitionKey, - String rowKey, - Integer timeout, - String requestId, - String ifMatch, - Map tableEntityProperties, - QueryOptions queryOptions) { - return mergeEntityWithResponseAsync( - table, partitionKey, rowKey, timeout, requestId, ifMatch, tableEntityProperties, queryOptions) - .flatMap((TablesMergeEntityResponse res) -> Mono.empty()); - } - - /** - * Deletes the specified entity in a table. - * - * @param table The name of the table. - * @param partitionKey The partition key of the entity. - * @param rowKey The row key of the entity. - * @param ifMatch Match condition for an entity to be deleted. If specified and a matching entity is not found, an - * error will be raised. To force an unconditional delete, set to the wildcard character (*). - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteEntityWithResponseAsync( - String table, - String partitionKey, - String rowKey, - String ifMatch, - Integer timeout, - String requestId, - QueryOptions queryOptions) { - final String dataServiceVersion = "3.0"; - OdataMetadataFormat formatInternal = null; - if (queryOptions != null) { - formatInternal = queryOptions.getFormat(); - } - OdataMetadataFormat format = formatInternal; - return service.deleteEntity( - this.client.getUrl(), - timeout, - this.client.getVersion(), - requestId, - dataServiceVersion, - format, - table, - partitionKey, - rowKey, - ifMatch); - } - - /** - * Deletes the specified entity in a table. - * - * @param table The name of the table. - * @param partitionKey The partition key of the entity. - * @param rowKey The row key of the entity. - * @param ifMatch Match condition for an entity to be deleted. If specified and a matching entity is not found, an - * error will be raised. To force an unconditional delete, set to the wildcard character (*). - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteEntityAsync( - String table, - String partitionKey, - String rowKey, - String ifMatch, - Integer timeout, - String requestId, - QueryOptions queryOptions) { - return deleteEntityWithResponseAsync(table, partitionKey, rowKey, ifMatch, timeout, requestId, queryOptions) - .flatMap((TablesDeleteEntityResponse res) -> Mono.empty()); - } - - /** - * Insert entity in a table. - * - * @param table The name of the table. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param responsePreference Specifies whether the response should include the inserted entity in the payload. - * Possible values are return-no-content and return-content. - * @param tableEntityProperties The other properties of the table entity. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the other properties of the table entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono insertEntityWithResponseAsync( - String table, - Integer timeout, - String requestId, - ResponseFormat responsePreference, - Map tableEntityProperties, - QueryOptions queryOptions) { - final String dataServiceVersion = "3.0"; - OdataMetadataFormat formatInternal = null; - if (queryOptions != null) { - formatInternal = queryOptions.getFormat(); - } - OdataMetadataFormat format = formatInternal; - return service.insertEntity( - this.client.getUrl(), - timeout, - this.client.getVersion(), - requestId, - dataServiceVersion, - format, - table, - responsePreference, - tableEntityProperties); - } - - /** - * Insert entity in a table. - * - * @param table The name of the table. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param responsePreference Specifies whether the response should include the inserted entity in the payload. - * Possible values are return-no-content and return-content. - * @param tableEntityProperties The other properties of the table entity. - * @param queryOptions Parameter group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the other properties of the table entity. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> insertEntityAsync( - String table, - Integer timeout, - String requestId, - ResponseFormat responsePreference, - Map tableEntityProperties, - QueryOptions queryOptions) { - return insertEntityWithResponseAsync( - table, timeout, requestId, responsePreference, tableEntityProperties, queryOptions) - .flatMap( - (TablesInsertEntityResponse res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Retrieves details about any stored access policies specified on the table that may be used with Shared Access - * Signatures. - * - * @param table The name of the table. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of signed identifiers. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAccessPolicyWithResponseAsync( - String table, Integer timeout, String requestId) { - final String comp = "acl"; - return service.getAccessPolicy(this.client.getUrl(), timeout, this.client.getVersion(), requestId, table, comp); - } - - /** - * Retrieves details about any stored access policies specified on the table that may be used with Shared Access - * Signatures. - * - * @param table The name of the table. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a collection of signed identifiers. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAccessPolicyAsync(String table, Integer timeout, String requestId) { - return getAccessPolicyWithResponseAsync(table, timeout, requestId) - .flatMap( - (TablesGetAccessPolicyResponse res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Sets stored access policies for the table that may be used with Shared Access Signatures. - * - * @param table The name of the table. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param tableAcl A collection of signed identifiers. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setAccessPolicyWithResponseAsync( - String table, Integer timeout, String requestId, List tableAcl) { - final String comp = "acl"; - return service.setAccessPolicy( - this.client.getUrl(), timeout, this.client.getVersion(), requestId, table, comp, tableAcl); - } - - /** - * Sets stored access policies for the table that may be used with Shared Access Signatures. - * - * @param table The name of the table. - * @param timeout The timeout parameter is expressed in seconds. - * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the - * analytics logs when analytics logging is enabled. - * @param tableAcl A collection of signed identifiers. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws TableServiceErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono setAccessPolicyAsync( - String table, Integer timeout, String requestId, List tableAcl) { - return setAccessPolicyWithResponseAsync(table, timeout, requestId, tableAcl) - .flatMap((TablesSetAccessPolicyResponse res) -> Mono.empty()); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/AccessPolicy.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/AccessPolicy.java deleted file mode 100644 index 0ead9f890a54..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/AccessPolicy.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The AccessPolicy model. */ -@Fluent -public final class AccessPolicy { - /* - * The start datetime from which the policy is active. - */ - @JsonProperty(value = "Start", required = true) - private OffsetDateTime start; - - /* - * The datetime that the policy expires. - */ - @JsonProperty(value = "Expiry", required = true) - private OffsetDateTime expiry; - - /* - * The permissions for the acl policy. - */ - @JsonProperty(value = "Permission", required = true) - private String permission; - - /** - * Get the start property: The start datetime from which the policy is active. - * - * @return the start value. - */ - public OffsetDateTime getStart() { - return this.start; - } - - /** - * Set the start property: The start datetime from which the policy is active. - * - * @param start the start value to set. - * @return the AccessPolicy object itself. - */ - public AccessPolicy setStart(OffsetDateTime start) { - this.start = start; - return this; - } - - /** - * Get the expiry property: The datetime that the policy expires. - * - * @return the expiry value. - */ - public OffsetDateTime getExpiry() { - return this.expiry; - } - - /** - * Set the expiry property: The datetime that the policy expires. - * - * @param expiry the expiry value to set. - * @return the AccessPolicy object itself. - */ - public AccessPolicy setExpiry(OffsetDateTime expiry) { - this.expiry = expiry; - return this; - } - - /** - * Get the permission property: The permissions for the acl policy. - * - * @return the permission value. - */ - public String getPermission() { - return this.permission; - } - - /** - * Set the permission property: The permissions for the acl policy. - * - * @param permission the permission value to set. - * @return the AccessPolicy object itself. - */ - public AccessPolicy setPermission(String permission) { - this.permission = permission; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/CorsRule.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/CorsRule.java deleted file mode 100644 index cb76c026b53c..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/CorsRule.java +++ /dev/null @@ -1,159 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The CorsRule model. */ -@Fluent -public final class CorsRule { - /* - * The origin domains that are permitted to make a request against the - * service via CORS. The origin domain is the domain from which the request - * originates. Note that the origin must be an exact case-sensitive match - * with the origin that the user age sends to the service. You can also use - * the wildcard character '*' to allow all origin domains to make requests - * via CORS. - */ - @JsonProperty(value = "AllowedOrigins", required = true) - private String allowedOrigins; - - /* - * The methods (HTTP request verbs) that the origin domain may use for a - * CORS request. (comma separated) - */ - @JsonProperty(value = "AllowedMethods", required = true) - private String allowedMethods; - - /* - * The request headers that the origin domain may specify on the CORS - * request. - */ - @JsonProperty(value = "AllowedHeaders", required = true) - private String allowedHeaders; - - /* - * The response headers that may be sent in the response to the CORS - * request and exposed by the browser to the request issuer. - */ - @JsonProperty(value = "ExposedHeaders", required = true) - private String exposedHeaders; - - /* - * The maximum amount time that a browser should cache the preflight - * OPTIONS request. - */ - @JsonProperty(value = "MaxAgeInSeconds", required = true) - private int maxAgeInSeconds; - - /** - * Get the allowedOrigins property: The origin domains that are permitted to make a request against the service via - * CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact - * case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard - * character '*' to allow all origin domains to make requests via CORS. - * - * @return the allowedOrigins value. - */ - public String getAllowedOrigins() { - return this.allowedOrigins; - } - - /** - * Set the allowedOrigins property: The origin domains that are permitted to make a request against the service via - * CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact - * case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard - * character '*' to allow all origin domains to make requests via CORS. - * - * @param allowedOrigins the allowedOrigins value to set. - * @return the CorsRule object itself. - */ - public CorsRule setAllowedOrigins(String allowedOrigins) { - this.allowedOrigins = allowedOrigins; - return this; - } - - /** - * Get the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS - * request. (comma separated). - * - * @return the allowedMethods value. - */ - public String getAllowedMethods() { - return this.allowedMethods; - } - - /** - * Set the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS - * request. (comma separated). - * - * @param allowedMethods the allowedMethods value to set. - * @return the CorsRule object itself. - */ - public CorsRule setAllowedMethods(String allowedMethods) { - this.allowedMethods = allowedMethods; - return this; - } - - /** - * Get the allowedHeaders property: The request headers that the origin domain may specify on the CORS request. - * - * @return the allowedHeaders value. - */ - public String getAllowedHeaders() { - return this.allowedHeaders; - } - - /** - * Set the allowedHeaders property: The request headers that the origin domain may specify on the CORS request. - * - * @param allowedHeaders the allowedHeaders value to set. - * @return the CorsRule object itself. - */ - public CorsRule setAllowedHeaders(String allowedHeaders) { - this.allowedHeaders = allowedHeaders; - return this; - } - - /** - * Get the exposedHeaders property: The response headers that may be sent in the response to the CORS request and - * exposed by the browser to the request issuer. - * - * @return the exposedHeaders value. - */ - public String getExposedHeaders() { - return this.exposedHeaders; - } - - /** - * Set the exposedHeaders property: The response headers that may be sent in the response to the CORS request and - * exposed by the browser to the request issuer. - * - * @param exposedHeaders the exposedHeaders value to set. - * @return the CorsRule object itself. - */ - public CorsRule setExposedHeaders(String exposedHeaders) { - this.exposedHeaders = exposedHeaders; - return this; - } - - /** - * Get the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS - * request. - * - * @return the maxAgeInSeconds value. - */ - public int getMaxAgeInSeconds() { - return this.maxAgeInSeconds; - } - - /** - * Set the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS - * request. - * - * @param maxAgeInSeconds the maxAgeInSeconds value to set. - * @return the CorsRule object itself. - */ - public CorsRule setMaxAgeInSeconds(int maxAgeInSeconds) { - this.maxAgeInSeconds = maxAgeInSeconds; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/GeoReplication.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/GeoReplication.java deleted file mode 100644 index 898205099ec3..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/GeoReplication.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The GeoReplication model. */ -@Fluent -public final class GeoReplication { - /* - * The status of the secondary location. - */ - @JsonProperty(value = "Status", required = true) - private GeoReplicationStatusType status; - - /* - * A GMT date/time value, to the second. All primary writes preceding this - * value are guaranteed to be available for read operations at the - * secondary. Primary writes after this point in time may or may not be - * available for reads. - */ - @JsonProperty(value = "LastSyncTime", required = true) - private DateTimeRfc1123 lastSyncTime; - - /** - * Get the status property: The status of the secondary location. - * - * @return the status value. - */ - public GeoReplicationStatusType getStatus() { - return this.status; - } - - /** - * Set the status property: The status of the secondary location. - * - * @param status the status value to set. - * @return the GeoReplication object itself. - */ - public GeoReplication setStatus(GeoReplicationStatusType status) { - this.status = status; - return this; - } - - /** - * Get the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are - * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or - * may not be available for reads. - * - * @return the lastSyncTime value. - */ - public OffsetDateTime getLastSyncTime() { - if (this.lastSyncTime == null) { - return null; - } - return this.lastSyncTime.getDateTime(); - } - - /** - * Set the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are - * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or - * may not be available for reads. - * - * @param lastSyncTime the lastSyncTime value to set. - * @return the GeoReplication object itself. - */ - public GeoReplication setLastSyncTime(OffsetDateTime lastSyncTime) { - if (lastSyncTime == null) { - this.lastSyncTime = null; - } else { - this.lastSyncTime = new DateTimeRfc1123(lastSyncTime); - } - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/GeoReplicationStatusType.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/GeoReplicationStatusType.java deleted file mode 100644 index 75fe301dd0ae..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/GeoReplicationStatusType.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for GeoReplicationStatusType. */ -public final class GeoReplicationStatusType extends ExpandableStringEnum { - /** Static value live for GeoReplicationStatusType. */ - public static final GeoReplicationStatusType LIVE = fromString("live"); - - /** Static value bootstrap for GeoReplicationStatusType. */ - public static final GeoReplicationStatusType BOOTSTRAP = fromString("bootstrap"); - - /** Static value unavailable for GeoReplicationStatusType. */ - public static final GeoReplicationStatusType UNAVAILABLE = fromString("unavailable"); - - /** - * Creates or finds a GeoReplicationStatusType from its string representation. - * - * @param name a name to look for. - * @return the corresponding GeoReplicationStatusType. - */ - @JsonCreator - public static GeoReplicationStatusType fromString(String name) { - return fromString(name, GeoReplicationStatusType.class); - } - - /** @return known GeoReplicationStatusType values. */ - public static Collection values() { - return values(GeoReplicationStatusType.class); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/Logging.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/Logging.java deleted file mode 100644 index 5faa96450c43..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/Logging.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Logging model. */ -@Fluent -public final class Logging { - /* - * The version of Analytics to configure. - */ - @JsonProperty(value = "Version", required = true) - private String version; - - /* - * Indicates whether all delete requests should be logged. - */ - @JsonProperty(value = "Delete", required = true) - private boolean delete; - - /* - * Indicates whether all read requests should be logged. - */ - @JsonProperty(value = "Read", required = true) - private boolean read; - - /* - * Indicates whether all write requests should be logged. - */ - @JsonProperty(value = "Write", required = true) - private boolean write; - - /* - * The retention policy. - */ - @JsonProperty(value = "RetentionPolicy", required = true) - private RetentionPolicy retentionPolicy; - - /** - * Get the version property: The version of Analytics to configure. - * - * @return the version value. - */ - public String getVersion() { - return this.version; - } - - /** - * Set the version property: The version of Analytics to configure. - * - * @param version the version value to set. - * @return the Logging object itself. - */ - public Logging setVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the delete property: Indicates whether all delete requests should be logged. - * - * @return the delete value. - */ - public boolean isDelete() { - return this.delete; - } - - /** - * Set the delete property: Indicates whether all delete requests should be logged. - * - * @param delete the delete value to set. - * @return the Logging object itself. - */ - public Logging setDelete(boolean delete) { - this.delete = delete; - return this; - } - - /** - * Get the read property: Indicates whether all read requests should be logged. - * - * @return the read value. - */ - public boolean isRead() { - return this.read; - } - - /** - * Set the read property: Indicates whether all read requests should be logged. - * - * @param read the read value to set. - * @return the Logging object itself. - */ - public Logging setRead(boolean read) { - this.read = read; - return this; - } - - /** - * Get the write property: Indicates whether all write requests should be logged. - * - * @return the write value. - */ - public boolean isWrite() { - return this.write; - } - - /** - * Set the write property: Indicates whether all write requests should be logged. - * - * @param write the write value to set. - * @return the Logging object itself. - */ - public Logging setWrite(boolean write) { - this.write = write; - return this; - } - - /** - * Get the retentionPolicy property: The retention policy. - * - * @return the retentionPolicy value. - */ - public RetentionPolicy getRetentionPolicy() { - return this.retentionPolicy; - } - - /** - * Set the retentionPolicy property: The retention policy. - * - * @param retentionPolicy the retentionPolicy value to set. - * @return the Logging object itself. - */ - public Logging setRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/Metrics.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/Metrics.java deleted file mode 100644 index d5caedd7e0f4..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/Metrics.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Metrics model. */ -@Fluent -public final class Metrics { - /* - * The version of Analytics to configure. - */ - @JsonProperty(value = "Version") - private String version; - - /* - * Indicates whether metrics are enabled for the Table service. - */ - @JsonProperty(value = "Enabled", required = true) - private boolean enabled; - - /* - * Indicates whether metrics should generate summary statistics for called - * API operations. - */ - @JsonProperty(value = "IncludeAPIs") - private Boolean includeAPIs; - - /* - * The retention policy. - */ - @JsonProperty(value = "RetentionPolicy") - private RetentionPolicy retentionPolicy; - - /** - * Get the version property: The version of Analytics to configure. - * - * @return the version value. - */ - public String getVersion() { - return this.version; - } - - /** - * Set the version property: The version of Analytics to configure. - * - * @param version the version value to set. - * @return the Metrics object itself. - */ - public Metrics setVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the enabled property: Indicates whether metrics are enabled for the Table service. - * - * @return the enabled value. - */ - public boolean isEnabled() { - return this.enabled; - } - - /** - * Set the enabled property: Indicates whether metrics are enabled for the Table service. - * - * @param enabled the enabled value to set. - * @return the Metrics object itself. - */ - public Metrics setEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the includeAPIs property: Indicates whether metrics should generate summary statistics for called API - * operations. - * - * @return the includeAPIs value. - */ - public Boolean isIncludeAPIs() { - return this.includeAPIs; - } - - /** - * Set the includeAPIs property: Indicates whether metrics should generate summary statistics for called API - * operations. - * - * @param includeAPIs the includeAPIs value to set. - * @return the Metrics object itself. - */ - public Metrics setIncludeAPIs(Boolean includeAPIs) { - this.includeAPIs = includeAPIs; - return this; - } - - /** - * Get the retentionPolicy property: The retention policy. - * - * @return the retentionPolicy value. - */ - public RetentionPolicy getRetentionPolicy() { - return this.retentionPolicy; - } - - /** - * Set the retentionPolicy property: The retention policy. - * - * @param retentionPolicy the retentionPolicy value to set. - * @return the Metrics object itself. - */ - public Metrics setRetentionPolicy(RetentionPolicy retentionPolicy) { - this.retentionPolicy = retentionPolicy; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/OdataMetadataFormat.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/OdataMetadataFormat.java deleted file mode 100644 index 2bd8755466e7..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/OdataMetadataFormat.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OdataMetadataFormat. */ -public final class OdataMetadataFormat extends ExpandableStringEnum { - /** Static value application/json;odata=nometadata for OdataMetadataFormat. */ - public static final OdataMetadataFormat APPLICATION_JSON_ODATA_NOMETADATA = - fromString("application/json;odata=nometadata"); - - /** Static value application/json;odata=minimalmetadata for OdataMetadataFormat. */ - public static final OdataMetadataFormat APPLICATION_JSON_ODATA_MINIMALMETADATA = - fromString("application/json;odata=minimalmetadata"); - - /** Static value application/json;odata=fullmetadata for OdataMetadataFormat. */ - public static final OdataMetadataFormat APPLICATION_JSON_ODATA_FULLMETADATA = - fromString("application/json;odata=fullmetadata"); - - /** - * Creates or finds a OdataMetadataFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding OdataMetadataFormat. - */ - @JsonCreator - public static OdataMetadataFormat fromString(String name) { - return fromString(name, OdataMetadataFormat.class); - } - - /** @return known OdataMetadataFormat values. */ - public static Collection values() { - return values(OdataMetadataFormat.class); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/QueryOptions.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/QueryOptions.java deleted file mode 100644 index c061fc938747..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/QueryOptions.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The QueryOptions model. */ -@Fluent -public final class QueryOptions { - /* - * Specifies the media type for the response. - */ - @JsonProperty(value = "Format") - private OdataMetadataFormat format; - - /* - * Maximum number of records to return. - */ - @JsonProperty(value = "Top") - private Integer top; - - /* - * Select expression using OData notation. Limits the columns on each - * record to just those requested, e.g. "$select=PolicyAssignmentId, - * ResourceId". - */ - @JsonProperty(value = "Select") - private String select; - - /* - * OData filter expression. - */ - @JsonProperty(value = "Filter") - private String filter; - - /** - * Get the format property: Specifies the media type for the response. - * - * @return the format value. - */ - public OdataMetadataFormat getFormat() { - return this.format; - } - - /** - * Set the format property: Specifies the media type for the response. - * - * @param format the format value to set. - * @return the QueryOptions object itself. - */ - public QueryOptions setFormat(OdataMetadataFormat format) { - this.format = format; - return this; - } - - /** - * Get the top property: Maximum number of records to return. - * - * @return the top value. - */ - public Integer getTop() { - return this.top; - } - - /** - * Set the top property: Maximum number of records to return. - * - * @param top the top value to set. - * @return the QueryOptions object itself. - */ - public QueryOptions setTop(Integer top) { - this.top = top; - return this; - } - - /** - * Get the select property: Select expression using OData notation. Limits the columns on each record to just those - * requested, e.g. "$select=PolicyAssignmentId, ResourceId". - * - * @return the select value. - */ - public String getSelect() { - return this.select; - } - - /** - * Set the select property: Select expression using OData notation. Limits the columns on each record to just those - * requested, e.g. "$select=PolicyAssignmentId, ResourceId". - * - * @param select the select value to set. - * @return the QueryOptions object itself. - */ - public QueryOptions setSelect(String select) { - this.select = select; - return this; - } - - /** - * Get the filter property: OData filter expression. - * - * @return the filter value. - */ - public String getFilter() { - return this.filter; - } - - /** - * Set the filter property: OData filter expression. - * - * @param filter the filter value to set. - * @return the QueryOptions object itself. - */ - public QueryOptions setFilter(String filter) { - this.filter = filter; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ResponseFormat.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ResponseFormat.java deleted file mode 100644 index 4112e5819719..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ResponseFormat.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ResponseFormat. */ -public final class ResponseFormat extends ExpandableStringEnum { - /** Static value return-no-content for ResponseFormat. */ - public static final ResponseFormat RETURN_NO_CONTENT = fromString("return-no-content"); - - /** Static value return-content for ResponseFormat. */ - public static final ResponseFormat RETURN_CONTENT = fromString("return-content"); - - /** - * Creates or finds a ResponseFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding ResponseFormat. - */ - @JsonCreator - public static ResponseFormat fromString(String name) { - return fromString(name, ResponseFormat.class); - } - - /** @return known ResponseFormat values. */ - public static Collection values() { - return values(ResponseFormat.class); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/RetentionPolicy.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/RetentionPolicy.java deleted file mode 100644 index 759ba72c1d68..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/RetentionPolicy.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The RetentionPolicy model. */ -@Fluent -public final class RetentionPolicy { - /* - * Indicates whether a retention policy is enabled for the service. - */ - @JsonProperty(value = "Enabled", required = true) - private boolean enabled; - - /* - * Indicates the number of days that metrics or logging or soft-deleted - * data should be retained. All data older than this value will be deleted. - */ - @JsonProperty(value = "Days") - private Integer days; - - /** - * Get the enabled property: Indicates whether a retention policy is enabled for the service. - * - * @return the enabled value. - */ - public boolean isEnabled() { - return this.enabled; - } - - /** - * Set the enabled property: Indicates whether a retention policy is enabled for the service. - * - * @param enabled the enabled value to set. - * @return the RetentionPolicy object itself. - */ - public RetentionPolicy setEnabled(boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be - * retained. All data older than this value will be deleted. - * - * @return the days value. - */ - public Integer getDays() { - return this.days; - } - - /** - * Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be - * retained. All data older than this value will be deleted. - * - * @param days the days value to set. - * @return the RetentionPolicy object itself. - */ - public RetentionPolicy setDays(Integer days) { - this.days = days; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetPropertiesHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetPropertiesHeaders.java deleted file mode 100644 index 47fb32a56bd8..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetPropertiesHeaders.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ServicesGetPropertiesHeaders model. */ -@Fluent -public final class ServicesGetPropertiesHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the ServicesGetPropertiesHeaders object itself. - */ - public ServicesGetPropertiesHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ServicesGetPropertiesHeaders object itself. - */ - public ServicesGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ServicesGetPropertiesHeaders object itself. - */ - public ServicesGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetPropertiesResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetPropertiesResponse.java deleted file mode 100644 index 4a1cdda12bb7..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetPropertiesResponse.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the getProperties operation. */ -public final class ServicesGetPropertiesResponse - extends ResponseBase { - /** - * Creates an instance of ServicesGetPropertiesResponse. - * - * @param request the request which resulted in this ServicesGetPropertiesResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public ServicesGetPropertiesResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - TableServiceProperties value, - ServicesGetPropertiesHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public TableServiceProperties getValue() { - return super.getValue(); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetStatisticsHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetStatisticsHeaders.java deleted file mode 100644 index 6dd1f9558753..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetStatisticsHeaders.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The ServicesGetStatisticsHeaders model. */ -@Fluent -public final class ServicesGetStatisticsHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the ServicesGetStatisticsHeaders object itself. - */ - public ServicesGetStatisticsHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ServicesGetStatisticsHeaders object itself. - */ - public ServicesGetStatisticsHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ServicesGetStatisticsHeaders object itself. - */ - public ServicesGetStatisticsHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the ServicesGetStatisticsHeaders object itself. - */ - public ServicesGetStatisticsHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetStatisticsResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetStatisticsResponse.java deleted file mode 100644 index f1ddd4228649..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesGetStatisticsResponse.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the getStatistics operation. */ -public final class ServicesGetStatisticsResponse extends ResponseBase { - /** - * Creates an instance of ServicesGetStatisticsResponse. - * - * @param request the request which resulted in this ServicesGetStatisticsResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public ServicesGetStatisticsResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - TableServiceStats value, - ServicesGetStatisticsHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public TableServiceStats getValue() { - return super.getValue(); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesSetPropertiesHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesSetPropertiesHeaders.java deleted file mode 100644 index f51ee7255721..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesSetPropertiesHeaders.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ServicesSetPropertiesHeaders model. */ -@Fluent -public final class ServicesSetPropertiesHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the ServicesSetPropertiesHeaders object itself. - */ - public ServicesSetPropertiesHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the ServicesSetPropertiesHeaders object itself. - */ - public ServicesSetPropertiesHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the ServicesSetPropertiesHeaders object itself. - */ - public ServicesSetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesSetPropertiesResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesSetPropertiesResponse.java deleted file mode 100644 index 44b6b629e428..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/ServicesSetPropertiesResponse.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the setProperties operation. */ -public final class ServicesSetPropertiesResponse extends ResponseBase { - /** - * Creates an instance of ServicesSetPropertiesResponse. - * - * @param request the request which resulted in this ServicesSetPropertiesResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public ServicesSetPropertiesResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - Void value, - ServicesSetPropertiesHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/SignedIdentifier.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/SignedIdentifier.java deleted file mode 100644 index d031ac00aace..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/SignedIdentifier.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The SignedIdentifier model. */ -@Fluent -public final class SignedIdentifier { - /* - * A unique id. - */ - @JsonProperty(value = "Id", required = true) - private String id; - - /* - * The access policy. - */ - @JsonProperty(value = "AccessPolicy", required = true) - private AccessPolicy accessPolicy; - - /** - * Get the id property: A unique id. - * - * @return the id value. - */ - public String getId() { - return this.id; - } - - /** - * Set the id property: A unique id. - * - * @param id the id value to set. - * @return the SignedIdentifier object itself. - */ - public SignedIdentifier setId(String id) { - this.id = id; - return this; - } - - /** - * Get the accessPolicy property: The access policy. - * - * @return the accessPolicy value. - */ - public AccessPolicy getAccessPolicy() { - return this.accessPolicy; - } - - /** - * Set the accessPolicy property: The access policy. - * - * @param accessPolicy the accessPolicy value to set. - * @return the SignedIdentifier object itself. - */ - public SignedIdentifier setAccessPolicy(AccessPolicy accessPolicy) { - this.accessPolicy = accessPolicy; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableEntityQueryResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableEntityQueryResponse.java deleted file mode 100644 index af621f2f7b51..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableEntityQueryResponse.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** The TableEntityQueryResponse model. */ -@Fluent -public final class TableEntityQueryResponse { - /* - * The metadata response of the table. - */ - @JsonProperty(value = "odata.metadata") - private String odataMetadata; - - /* - * List of table entities. - */ - @JsonProperty(value = "value") - private List> value; - - /** - * Get the odataMetadata property: The metadata response of the table. - * - * @return the odataMetadata value. - */ - public String getOdataMetadata() { - return this.odataMetadata; - } - - /** - * Set the odataMetadata property: The metadata response of the table. - * - * @param odataMetadata the odataMetadata value to set. - * @return the TableEntityQueryResponse object itself. - */ - public TableEntityQueryResponse setOdataMetadata(String odataMetadata) { - this.odataMetadata = odataMetadata; - return this; - } - - /** - * Get the value property: List of table entities. - * - * @return the value value. - */ - public List> getValue() { - return this.value; - } - - /** - * Set the value property: List of table entities. - * - * @param value the value value to set. - * @return the TableEntityQueryResponse object itself. - */ - public TableEntityQueryResponse setValue(List> value) { - this.value = value; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableProperties.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableProperties.java deleted file mode 100644 index 8c2f7a4e3b4a..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableProperties.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The TableProperties model. */ -@Fluent -public final class TableProperties { - /* - * The name of the table to create. - */ - @JsonProperty(value = "TableName") - private String tableName; - - /** - * Get the tableName property: The name of the table to create. - * - * @return the tableName value. - */ - public String getTableName() { - return this.tableName; - } - - /** - * Set the tableName property: The name of the table to create. - * - * @param tableName the tableName value to set. - * @return the TableProperties object itself. - */ - public TableProperties setTableName(String tableName) { - this.tableName = tableName; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableQueryResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableQueryResponse.java deleted file mode 100644 index e0da9b83114b..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableQueryResponse.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The TableQueryResponse model. */ -@Fluent -public final class TableQueryResponse { - /* - * The metadata response of the table. - */ - @JsonProperty(value = "odata.metadata") - private String odataMetadata; - - /* - * List of tables. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the odataMetadata property: The metadata response of the table. - * - * @return the odataMetadata value. - */ - public String getOdataMetadata() { - return this.odataMetadata; - } - - /** - * Set the odataMetadata property: The metadata response of the table. - * - * @param odataMetadata the odataMetadata value to set. - * @return the TableQueryResponse object itself. - */ - public TableQueryResponse setOdataMetadata(String odataMetadata) { - this.odataMetadata = odataMetadata; - return this; - } - - /** - * Get the value property: List of tables. - * - * @return the value value. - */ - public List getValue() { - return this.value; - } - - /** - * Set the value property: List of tables. - * - * @param value the value value to set. - * @return the TableQueryResponse object itself. - */ - public TableQueryResponse setValue(List value) { - this.value = value; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableResponse.java deleted file mode 100644 index 08b9aa187880..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableResponse.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The TableResponse model. */ -@Fluent -public final class TableResponse extends TableResponseProperties { - /* - * The metadata response of the table. - */ - @JsonProperty(value = "odata.metadata") - private String odataMetadata; - - /** - * Get the odataMetadata property: The metadata response of the table. - * - * @return the odataMetadata value. - */ - public String getOdataMetadata() { - return this.odataMetadata; - } - - /** - * Set the odataMetadata property: The metadata response of the table. - * - * @param odataMetadata the odataMetadata value to set. - * @return the TableResponse object itself. - */ - public TableResponse setOdataMetadata(String odataMetadata) { - this.odataMetadata = odataMetadata; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableResponseProperties.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableResponseProperties.java deleted file mode 100644 index a3877f02b94f..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableResponseProperties.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The TableResponseProperties model. */ -@Fluent -public class TableResponseProperties { - /* - * The name of the table. - */ - @JsonProperty(value = "TableName") - private String tableName; - - /* - * The odata type of the table. - */ - @JsonProperty(value = "odata.type") - private String odataType; - - /* - * The id of the table. - */ - @JsonProperty(value = "odata.id") - private String odataId; - - /* - * The edit link of the table. - */ - @JsonProperty(value = "odata.editLink") - private String odataEditLink; - - /** - * Get the tableName property: The name of the table. - * - * @return the tableName value. - */ - public String getTableName() { - return this.tableName; - } - - /** - * Set the tableName property: The name of the table. - * - * @param tableName the tableName value to set. - * @return the TableResponseProperties object itself. - */ - public TableResponseProperties setTableName(String tableName) { - this.tableName = tableName; - return this; - } - - /** - * Get the odataType property: The odata type of the table. - * - * @return the odataType value. - */ - public String getOdataType() { - return this.odataType; - } - - /** - * Set the odataType property: The odata type of the table. - * - * @param odataType the odataType value to set. - * @return the TableResponseProperties object itself. - */ - public TableResponseProperties setOdataType(String odataType) { - this.odataType = odataType; - return this; - } - - /** - * Get the odataId property: The id of the table. - * - * @return the odataId value. - */ - public String getOdataId() { - return this.odataId; - } - - /** - * Set the odataId property: The id of the table. - * - * @param odataId the odataId value to set. - * @return the TableResponseProperties object itself. - */ - public TableResponseProperties setOdataId(String odataId) { - this.odataId = odataId; - return this; - } - - /** - * Get the odataEditLink property: The edit link of the table. - * - * @return the odataEditLink value. - */ - public String getOdataEditLink() { - return this.odataEditLink; - } - - /** - * Set the odataEditLink property: The edit link of the table. - * - * @param odataEditLink the odataEditLink value to set. - * @return the TableResponseProperties object itself. - */ - public TableResponseProperties setOdataEditLink(String odataEditLink) { - this.odataEditLink = odataEditLink; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceError.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceError.java deleted file mode 100644 index c43fef3dc88e..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceError.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The TableServiceError model. */ -@Fluent -public final class TableServiceError { - /* - * The error message. - */ - @JsonProperty(value = "Message") - private String message; - - /** - * Get the message property: The error message. - * - * @return the message value. - */ - public String getMessage() { - return this.message; - } - - /** - * Set the message property: The error message. - * - * @param message the message value to set. - * @return the TableServiceError object itself. - */ - public TableServiceError setMessage(String message) { - this.message = message; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceErrorException.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceErrorException.java deleted file mode 100644 index 193c6cc8fb3e..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceErrorException.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.exception.HttpResponseException; -import com.azure.core.http.HttpResponse; - -/** Exception thrown for an invalid response with TableServiceError information. */ -public final class TableServiceErrorException extends HttpResponseException { - /** - * Initializes a new instance of the TableServiceErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - */ - public TableServiceErrorException(String message, HttpResponse response) { - super(message, response); - } - - /** - * Initializes a new instance of the TableServiceErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - * @param value the deserialized response value. - */ - public TableServiceErrorException(String message, HttpResponse response, TableServiceError value) { - super(message, response, value); - } - - @Override - public TableServiceError getValue() { - return (TableServiceError) super.getValue(); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceProperties.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceProperties.java deleted file mode 100644 index e1b9aecab791..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceProperties.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The TableServiceProperties model. */ -@Fluent -public final class TableServiceProperties { - /* - * Azure Analytics Logging settings. - */ - @JsonProperty(value = "Logging") - private Logging logging; - - /* - * A summary of request statistics grouped by API in hourly aggregates for - * tables. - */ - @JsonProperty(value = "HourMetrics") - private Metrics hourMetrics; - - /* - * A summary of request statistics grouped by API in minute aggregates for - * tables. - */ - @JsonProperty(value = "MinuteMetrics") - private Metrics minuteMetrics; - - /* - * The set of CORS rules. - */ - @JsonProperty(value = "Cors") - private List cors; - - /** - * Get the logging property: Azure Analytics Logging settings. - * - * @return the logging value. - */ - public Logging getLogging() { - return this.logging; - } - - /** - * Set the logging property: Azure Analytics Logging settings. - * - * @param logging the logging value to set. - * @return the TableServiceProperties object itself. - */ - public TableServiceProperties setLogging(Logging logging) { - this.logging = logging; - return this; - } - - /** - * Get the hourMetrics property: A summary of request statistics grouped by API in hourly aggregates for tables. - * - * @return the hourMetrics value. - */ - public Metrics getHourMetrics() { - return this.hourMetrics; - } - - /** - * Set the hourMetrics property: A summary of request statistics grouped by API in hourly aggregates for tables. - * - * @param hourMetrics the hourMetrics value to set. - * @return the TableServiceProperties object itself. - */ - public TableServiceProperties setHourMetrics(Metrics hourMetrics) { - this.hourMetrics = hourMetrics; - return this; - } - - /** - * Get the minuteMetrics property: A summary of request statistics grouped by API in minute aggregates for tables. - * - * @return the minuteMetrics value. - */ - public Metrics getMinuteMetrics() { - return this.minuteMetrics; - } - - /** - * Set the minuteMetrics property: A summary of request statistics grouped by API in minute aggregates for tables. - * - * @param minuteMetrics the minuteMetrics value to set. - * @return the TableServiceProperties object itself. - */ - public TableServiceProperties setMinuteMetrics(Metrics minuteMetrics) { - this.minuteMetrics = minuteMetrics; - return this; - } - - /** - * Get the cors property: The set of CORS rules. - * - * @return the cors value. - */ - public List getCors() { - return this.cors; - } - - /** - * Set the cors property: The set of CORS rules. - * - * @param cors the cors value to set. - * @return the TableServiceProperties object itself. - */ - public TableServiceProperties setCors(List cors) { - this.cors = cors; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceStats.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceStats.java deleted file mode 100644 index aaccd93f4bba..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TableServiceStats.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The TableServiceStats model. */ -@Fluent -public final class TableServiceStats { - /* - * Geo-Replication information for the Secondary Storage Service. - */ - @JsonProperty(value = "GeoReplication") - private GeoReplication geoReplication; - - /** - * Get the geoReplication property: Geo-Replication information for the Secondary Storage Service. - * - * @return the geoReplication value. - */ - public GeoReplication getGeoReplication() { - return this.geoReplication; - } - - /** - * Set the geoReplication property: Geo-Replication information for the Secondary Storage Service. - * - * @param geoReplication the geoReplication value to set. - * @return the TableServiceStats object itself. - */ - public TableServiceStats setGeoReplication(GeoReplication geoReplication) { - this.geoReplication = geoReplication; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesCreateHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesCreateHeaders.java deleted file mode 100644 index dc3978b2f1c7..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesCreateHeaders.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The TablesCreateHeaders model. */ -@Fluent -public final class TablesCreateHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /* - * The Preference-Applied property. - */ - @JsonProperty(value = "Preference-Applied") - private String preferenceApplied; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the TablesCreateHeaders object itself. - */ - public TablesCreateHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the TablesCreateHeaders object itself. - */ - public TablesCreateHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the TablesCreateHeaders object itself. - */ - public TablesCreateHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the TablesCreateHeaders object itself. - */ - public TablesCreateHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } - - /** - * Get the preferenceApplied property: The Preference-Applied property. - * - * @return the preferenceApplied value. - */ - public String getPreferenceApplied() { - return this.preferenceApplied; - } - - /** - * Set the preferenceApplied property: The Preference-Applied property. - * - * @param preferenceApplied the preferenceApplied value to set. - * @return the TablesCreateHeaders object itself. - */ - public TablesCreateHeaders setPreferenceApplied(String preferenceApplied) { - this.preferenceApplied = preferenceApplied; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesCreateResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesCreateResponse.java deleted file mode 100644 index b68b50207427..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesCreateResponse.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the create operation. */ -public final class TablesCreateResponse extends ResponseBase { - /** - * Creates an instance of TablesCreateResponse. - * - * @param request the request which resulted in this TablesCreateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public TablesCreateResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - TableResponse value, - TablesCreateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public TableResponse getValue() { - return super.getValue(); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteEntityHeaders.java deleted file mode 100644 index 39b37fc2744d..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteEntityHeaders.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The TablesDeleteEntityHeaders model. */ -@Fluent -public final class TablesDeleteEntityHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the TablesDeleteEntityHeaders object itself. - */ - public TablesDeleteEntityHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the TablesDeleteEntityHeaders object itself. - */ - public TablesDeleteEntityHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the TablesDeleteEntityHeaders object itself. - */ - public TablesDeleteEntityHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the TablesDeleteEntityHeaders object itself. - */ - public TablesDeleteEntityHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteEntityResponse.java deleted file mode 100644 index 9f4a425c50bf..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteEntityResponse.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the deleteEntity operation. */ -public final class TablesDeleteEntityResponse extends ResponseBase { - /** - * Creates an instance of TablesDeleteEntityResponse. - * - * @param request the request which resulted in this TablesDeleteEntityResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public TablesDeleteEntityResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - Void value, - TablesDeleteEntityHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteHeaders.java deleted file mode 100644 index b99d3367d644..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteHeaders.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The TablesDeleteHeaders model. */ -@Fluent -public final class TablesDeleteHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the TablesDeleteHeaders object itself. - */ - public TablesDeleteHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the TablesDeleteHeaders object itself. - */ - public TablesDeleteHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the TablesDeleteHeaders object itself. - */ - public TablesDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the TablesDeleteHeaders object itself. - */ - public TablesDeleteHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteResponse.java deleted file mode 100644 index 866b81fb901c..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesDeleteResponse.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the delete operation. */ -public final class TablesDeleteResponse extends ResponseBase { - /** - * Creates an instance of TablesDeleteResponse. - * - * @param request the request which resulted in this TablesDeleteResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public TablesDeleteResponse( - HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, TablesDeleteHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesGetAccessPolicyHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesGetAccessPolicyHeaders.java deleted file mode 100644 index e9c82e54893c..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesGetAccessPolicyHeaders.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The TablesGetAccessPolicyHeaders model. */ -@Fluent -public final class TablesGetAccessPolicyHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the TablesGetAccessPolicyHeaders object itself. - */ - public TablesGetAccessPolicyHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the TablesGetAccessPolicyHeaders object itself. - */ - public TablesGetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the TablesGetAccessPolicyHeaders object itself. - */ - public TablesGetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the TablesGetAccessPolicyHeaders object itself. - */ - public TablesGetAccessPolicyHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesGetAccessPolicyResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesGetAccessPolicyResponse.java deleted file mode 100644 index 14398cc689b7..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesGetAccessPolicyResponse.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import java.util.List; - -/** Contains all response data for the getAccessPolicy operation. */ -public final class TablesGetAccessPolicyResponse - extends ResponseBase> { - /** - * Creates an instance of TablesGetAccessPolicyResponse. - * - * @param request the request which resulted in this TablesGetAccessPolicyResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public TablesGetAccessPolicyResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - List value, - TablesGetAccessPolicyHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public List getValue() { - return super.getValue(); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesInsertEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesInsertEntityHeaders.java deleted file mode 100644 index f7320993c189..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesInsertEntityHeaders.java +++ /dev/null @@ -1,199 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The TablesInsertEntityHeaders model. */ -@Fluent -public final class TablesInsertEntityHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The ETag property. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /* - * The Preference-Applied property. - */ - @JsonProperty(value = "Preference-Applied") - private String preferenceApplied; - - /* - * The Content-Type property. - */ - @JsonProperty(value = "Content-Type") - private String contentType; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the TablesInsertEntityHeaders object itself. - */ - public TablesInsertEntityHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the TablesInsertEntityHeaders object itself. - */ - public TablesInsertEntityHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the TablesInsertEntityHeaders object itself. - */ - public TablesInsertEntityHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the TablesInsertEntityHeaders object itself. - */ - public TablesInsertEntityHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the TablesInsertEntityHeaders object itself. - */ - public TablesInsertEntityHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } - - /** - * Get the preferenceApplied property: The Preference-Applied property. - * - * @return the preferenceApplied value. - */ - public String getPreferenceApplied() { - return this.preferenceApplied; - } - - /** - * Set the preferenceApplied property: The Preference-Applied property. - * - * @param preferenceApplied the preferenceApplied value to set. - * @return the TablesInsertEntityHeaders object itself. - */ - public TablesInsertEntityHeaders setPreferenceApplied(String preferenceApplied) { - this.preferenceApplied = preferenceApplied; - return this; - } - - /** - * Get the contentType property: The Content-Type property. - * - * @return the contentType value. - */ - public String getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: The Content-Type property. - * - * @param contentType the contentType value to set. - * @return the TablesInsertEntityHeaders object itself. - */ - public TablesInsertEntityHeaders setContentType(String contentType) { - this.contentType = contentType; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesInsertEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesInsertEntityResponse.java deleted file mode 100644 index 3ed2ca7a164d..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesInsertEntityResponse.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import java.util.Map; - -/** Contains all response data for the insertEntity operation. */ -public final class TablesInsertEntityResponse extends ResponseBase> { - /** - * Creates an instance of TablesInsertEntityResponse. - * - * @param request the request which resulted in this TablesInsertEntityResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public TablesInsertEntityResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - Map value, - TablesInsertEntityHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public Map getValue() { - return super.getValue(); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesMergeEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesMergeEntityHeaders.java deleted file mode 100644 index 60d79131d644..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesMergeEntityHeaders.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The TablesMergeEntityHeaders model. */ -@Fluent -public final class TablesMergeEntityHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The ETag property. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the TablesMergeEntityHeaders object itself. - */ - public TablesMergeEntityHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the TablesMergeEntityHeaders object itself. - */ - public TablesMergeEntityHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the TablesMergeEntityHeaders object itself. - */ - public TablesMergeEntityHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the TablesMergeEntityHeaders object itself. - */ - public TablesMergeEntityHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the TablesMergeEntityHeaders object itself. - */ - public TablesMergeEntityHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesMergeEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesMergeEntityResponse.java deleted file mode 100644 index 0d5eaa69b7fc..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesMergeEntityResponse.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the mergeEntity operation. */ -public final class TablesMergeEntityResponse extends ResponseBase { - /** - * Creates an instance of TablesMergeEntityResponse. - * - * @param request the request which resulted in this TablesMergeEntityResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public TablesMergeEntityResponse( - HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, TablesMergeEntityHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesHeaders.java deleted file mode 100644 index 7ed751bb9e4b..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesHeaders.java +++ /dev/null @@ -1,173 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The TablesQueryEntitiesHeaders model. */ -@Fluent -public final class TablesQueryEntitiesHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The x-ms-continuation-NextPartitionKey property. - */ - @JsonProperty(value = "x-ms-continuation-NextPartitionKey") - private String xMsContinuationNextPartitionKey; - - /* - * The x-ms-continuation-NextRowKey property. - */ - @JsonProperty(value = "x-ms-continuation-NextRowKey") - private String xMsContinuationNextRowKey; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the TablesQueryEntitiesHeaders object itself. - */ - public TablesQueryEntitiesHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsContinuationNextPartitionKey property: The x-ms-continuation-NextPartitionKey property. - * - * @return the xMsContinuationNextPartitionKey value. - */ - public String getXMsContinuationNextPartitionKey() { - return this.xMsContinuationNextPartitionKey; - } - - /** - * Set the xMsContinuationNextPartitionKey property: The x-ms-continuation-NextPartitionKey property. - * - * @param xMsContinuationNextPartitionKey the xMsContinuationNextPartitionKey value to set. - * @return the TablesQueryEntitiesHeaders object itself. - */ - public TablesQueryEntitiesHeaders setXMsContinuationNextPartitionKey(String xMsContinuationNextPartitionKey) { - this.xMsContinuationNextPartitionKey = xMsContinuationNextPartitionKey; - return this; - } - - /** - * Get the xMsContinuationNextRowKey property: The x-ms-continuation-NextRowKey property. - * - * @return the xMsContinuationNextRowKey value. - */ - public String getXMsContinuationNextRowKey() { - return this.xMsContinuationNextRowKey; - } - - /** - * Set the xMsContinuationNextRowKey property: The x-ms-continuation-NextRowKey property. - * - * @param xMsContinuationNextRowKey the xMsContinuationNextRowKey value to set. - * @return the TablesQueryEntitiesHeaders object itself. - */ - public TablesQueryEntitiesHeaders setXMsContinuationNextRowKey(String xMsContinuationNextRowKey) { - this.xMsContinuationNextRowKey = xMsContinuationNextRowKey; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the TablesQueryEntitiesHeaders object itself. - */ - public TablesQueryEntitiesHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the TablesQueryEntitiesHeaders object itself. - */ - public TablesQueryEntitiesHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the TablesQueryEntitiesHeaders object itself. - */ - public TablesQueryEntitiesHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesResponse.java deleted file mode 100644 index 790840815f5b..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesResponse.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the queryEntities operation. */ -public final class TablesQueryEntitiesResponse - extends ResponseBase { - /** - * Creates an instance of TablesQueryEntitiesResponse. - * - * @param request the request which resulted in this TablesQueryEntitiesResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public TablesQueryEntitiesResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - TableEntityQueryResponse value, - TablesQueryEntitiesHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public TableEntityQueryResponse getValue() { - return super.getValue(); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java deleted file mode 100644 index 5f7351a3acde..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java +++ /dev/null @@ -1,201 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The TablesQueryEntitiesWithPartitionAndRowKeyHeaders model. */ -@Fluent -public final class TablesQueryEntitiesWithPartitionAndRowKeyHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The x-ms-continuation-NextPartitionKey property. - */ - @JsonProperty(value = "x-ms-continuation-NextPartitionKey") - private String xMsContinuationNextPartitionKey; - - /* - * The ETag property. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /* - * The x-ms-continuation-NextRowKey property. - */ - @JsonProperty(value = "x-ms-continuation-NextRowKey") - private String xMsContinuationNextRowKey; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. - */ - public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsContinuationNextPartitionKey property: The x-ms-continuation-NextPartitionKey property. - * - * @return the xMsContinuationNextPartitionKey value. - */ - public String getXMsContinuationNextPartitionKey() { - return this.xMsContinuationNextPartitionKey; - } - - /** - * Set the xMsContinuationNextPartitionKey property: The x-ms-continuation-NextPartitionKey property. - * - * @param xMsContinuationNextPartitionKey the xMsContinuationNextPartitionKey value to set. - * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. - */ - public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsContinuationNextPartitionKey( - String xMsContinuationNextPartitionKey) { - this.xMsContinuationNextPartitionKey = xMsContinuationNextPartitionKey; - return this; - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. - */ - public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the xMsContinuationNextRowKey property: The x-ms-continuation-NextRowKey property. - * - * @return the xMsContinuationNextRowKey value. - */ - public String getXMsContinuationNextRowKey() { - return this.xMsContinuationNextRowKey; - } - - /** - * Set the xMsContinuationNextRowKey property: The x-ms-continuation-NextRowKey property. - * - * @param xMsContinuationNextRowKey the xMsContinuationNextRowKey value to set. - * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. - */ - public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsContinuationNextRowKey( - String xMsContinuationNextRowKey) { - this.xMsContinuationNextRowKey = xMsContinuationNextRowKey; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. - */ - public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. - */ - public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. - */ - public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java deleted file mode 100644 index cfe781baca9c..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the queryEntitiesWithPartitionAndRowKey operation. */ -public final class TablesQueryEntitiesWithPartitionAndRowKeyResponse - extends ResponseBase { - /** - * Creates an instance of TablesQueryEntitiesWithPartitionAndRowKeyResponse. - * - * @param request the request which resulted in this TablesQueryEntitiesWithPartitionAndRowKeyResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public TablesQueryEntitiesWithPartitionAndRowKeyResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - TableEntityQueryResponse value, - TablesQueryEntitiesWithPartitionAndRowKeyHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public TableEntityQueryResponse getValue() { - return super.getValue(); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryHeaders.java deleted file mode 100644 index d40619444afa..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryHeaders.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The TablesQueryHeaders model. */ -@Fluent -public final class TablesQueryHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /* - * The x-ms-continuation-NextTableName property. - */ - @JsonProperty(value = "x-ms-continuation-NextTableName") - private String xMsContinuationNextTableName; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the TablesQueryHeaders object itself. - */ - public TablesQueryHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the TablesQueryHeaders object itself. - */ - public TablesQueryHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the TablesQueryHeaders object itself. - */ - public TablesQueryHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the TablesQueryHeaders object itself. - */ - public TablesQueryHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } - - /** - * Get the xMsContinuationNextTableName property: The x-ms-continuation-NextTableName property. - * - * @return the xMsContinuationNextTableName value. - */ - public String getXMsContinuationNextTableName() { - return this.xMsContinuationNextTableName; - } - - /** - * Set the xMsContinuationNextTableName property: The x-ms-continuation-NextTableName property. - * - * @param xMsContinuationNextTableName the xMsContinuationNextTableName value to set. - * @return the TablesQueryHeaders object itself. - */ - public TablesQueryHeaders setXMsContinuationNextTableName(String xMsContinuationNextTableName) { - this.xMsContinuationNextTableName = xMsContinuationNextTableName; - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryResponse.java deleted file mode 100644 index bb6f47e75844..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesQueryResponse.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the query operation. */ -public final class TablesQueryResponse extends ResponseBase { - /** - * Creates an instance of TablesQueryResponse. - * - * @param request the request which resulted in this TablesQueryResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public TablesQueryResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - TableQueryResponse value, - TablesQueryHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** @return the deserialized response body. */ - @Override - public TableQueryResponse getValue() { - return super.getValue(); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesSetAccessPolicyHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesSetAccessPolicyHeaders.java deleted file mode 100644 index 8295982bcab6..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesSetAccessPolicyHeaders.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The TablesSetAccessPolicyHeaders model. */ -@Fluent -public final class TablesSetAccessPolicyHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the TablesSetAccessPolicyHeaders object itself. - */ - public TablesSetAccessPolicyHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the TablesSetAccessPolicyHeaders object itself. - */ - public TablesSetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the TablesSetAccessPolicyHeaders object itself. - */ - public TablesSetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the TablesSetAccessPolicyHeaders object itself. - */ - public TablesSetAccessPolicyHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesSetAccessPolicyResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesSetAccessPolicyResponse.java deleted file mode 100644 index 31ed8b9c882f..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesSetAccessPolicyResponse.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the setAccessPolicy operation. */ -public final class TablesSetAccessPolicyResponse extends ResponseBase { - /** - * Creates an instance of TablesSetAccessPolicyResponse. - * - * @param request the request which resulted in this TablesSetAccessPolicyResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public TablesSetAccessPolicyResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - Void value, - TablesSetAccessPolicyHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesUpdateEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesUpdateEntityHeaders.java deleted file mode 100644 index 4b4eeeb2f81b..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesUpdateEntityHeaders.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.DateTimeRfc1123; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The TablesUpdateEntityHeaders model. */ -@Fluent -public final class TablesUpdateEntityHeaders { - /* - * The x-ms-version property. - */ - @JsonProperty(value = "x-ms-version") - private String xMsVersion; - - /* - * The ETag property. - */ - @JsonProperty(value = "ETag") - private String eTag; - - /* - * The x-ms-request-id property. - */ - @JsonProperty(value = "x-ms-request-id") - private String xMsRequestId; - - /* - * The x-ms-client-request-id property. - */ - @JsonProperty(value = "x-ms-client-request-id") - private String xMsClientRequestId; - - /* - * The Date property. - */ - @JsonProperty(value = "Date") - private DateTimeRfc1123 dateProperty; - - /** - * Get the xMsVersion property: The x-ms-version property. - * - * @return the xMsVersion value. - */ - public String getXMsVersion() { - return this.xMsVersion; - } - - /** - * Set the xMsVersion property: The x-ms-version property. - * - * @param xMsVersion the xMsVersion value to set. - * @return the TablesUpdateEntityHeaders object itself. - */ - public TablesUpdateEntityHeaders setXMsVersion(String xMsVersion) { - this.xMsVersion = xMsVersion; - return this; - } - - /** - * Get the eTag property: The ETag property. - * - * @return the eTag value. - */ - public String getETag() { - return this.eTag; - } - - /** - * Set the eTag property: The ETag property. - * - * @param eTag the eTag value to set. - * @return the TablesUpdateEntityHeaders object itself. - */ - public TablesUpdateEntityHeaders setETag(String eTag) { - this.eTag = eTag; - return this; - } - - /** - * Get the xMsRequestId property: The x-ms-request-id property. - * - * @return the xMsRequestId value. - */ - public String getXMsRequestId() { - return this.xMsRequestId; - } - - /** - * Set the xMsRequestId property: The x-ms-request-id property. - * - * @param xMsRequestId the xMsRequestId value to set. - * @return the TablesUpdateEntityHeaders object itself. - */ - public TablesUpdateEntityHeaders setXMsRequestId(String xMsRequestId) { - this.xMsRequestId = xMsRequestId; - return this; - } - - /** - * Get the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @return the xMsClientRequestId value. - */ - public String getXMsClientRequestId() { - return this.xMsClientRequestId; - } - - /** - * Set the xMsClientRequestId property: The x-ms-client-request-id property. - * - * @param xMsClientRequestId the xMsClientRequestId value to set. - * @return the TablesUpdateEntityHeaders object itself. - */ - public TablesUpdateEntityHeaders setXMsClientRequestId(String xMsClientRequestId) { - this.xMsClientRequestId = xMsClientRequestId; - return this; - } - - /** - * Get the dateProperty property: The Date property. - * - * @return the dateProperty value. - */ - public OffsetDateTime getDateProperty() { - if (this.dateProperty == null) { - return null; - } - return this.dateProperty.getDateTime(); - } - - /** - * Set the dateProperty property: The Date property. - * - * @param dateProperty the dateProperty value to set. - * @return the TablesUpdateEntityHeaders object itself. - */ - public TablesUpdateEntityHeaders setDateProperty(OffsetDateTime dateProperty) { - if (dateProperty == null) { - this.dateProperty = null; - } else { - this.dateProperty = new DateTimeRfc1123(dateProperty); - } - return this; - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesUpdateEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesUpdateEntityResponse.java deleted file mode 100644 index ddc53d628427..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/TablesUpdateEntityResponse.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.microsoft.azure.tables.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; - -/** Contains all response data for the updateEntity operation. */ -public final class TablesUpdateEntityResponse extends ResponseBase { - /** - * Creates an instance of TablesUpdateEntityResponse. - * - * @param request the request which resulted in this TablesUpdateEntityResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public TablesUpdateEntityResponse( - HttpRequest request, - int statusCode, - HttpHeaders rawHeaders, - Void value, - TablesUpdateEntityHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } -} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/package-info.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/package-info.java deleted file mode 100644 index 835095a3e1a1..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/models/package-info.java +++ /dev/null @@ -1,2 +0,0 @@ -/** Package containing the data models for AzureTable. null. */ -package com.microsoft.azure.tables.models; diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/package-info.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/package-info.java deleted file mode 100644 index 3e193265e751..000000000000 --- a/sdk/cosmos/azure-cosmos-table/src/main/java/com/microsoft/azure/table/package-info.java +++ /dev/null @@ -1,2 +0,0 @@ -/** Package containing the classes for AzureTable. null. */ -package com.microsoft.azure.table; diff --git a/sdk/cosmos/azure-cosmos-table/swagger/README.md b/sdk/cosmos/azure-cosmos-table/swagger/README.md index e3306633f4a8..7712eba93309 100644 --- a/sdk/cosmos/azure-cosmos-table/swagger/README.md +++ b/sdk/cosmos/azure-cosmos-table/swagger/README.md @@ -1,4 +1,4 @@ -# Azure Cognitive Service - Text Analytics for Java +# Azure Cosmos Table > see https://aka.ms/autorest From ad87118987459af6cd10d8c4196d46dd13ee882d Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Fri, 29 May 2020 13:46:08 -0400 Subject: [PATCH 08/10] quick fixes --- eng/jacoco-test-coverage/pom.xml | 2 +- sdk/cosmos/azure-cosmos-table/pom.xml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index 3c926f9781e5..3e494a95d7c7 100644 --- a/eng/jacoco-test-coverage/pom.xml +++ b/eng/jacoco-test-coverage/pom.xml @@ -185,7 +185,7 @@ com.azure azure-cosmos-table - 1.0.0-beta.1 + 1.0.0-beta.1 com.azure diff --git a/sdk/cosmos/azure-cosmos-table/pom.xml b/sdk/cosmos/azure-cosmos-table/pom.xml index e895fc51755d..cb8c4831d413 100644 --- a/sdk/cosmos/azure-cosmos-table/pom.xml +++ b/sdk/cosmos/azure-cosmos-table/pom.xml @@ -13,7 +13,7 @@ Licensed under the MIT License. com.azure azure-cosmos-table - 1.0.0-beta.1 + 1.0.0-beta.1 Microsoft Azure SDK for Azure Table This package contains the Microsoft Azure Cosmos Table client library. jar @@ -34,8 +34,7 @@ Licensed under the MIT License. - 0.0 - 0.0 + true From d41297e8a83bf573599d7dd53e1ad12418cc9d80 Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Fri, 29 May 2020 14:34:02 -0400 Subject: [PATCH 09/10] regenerated swaggger, fix build issue --- eng/.docsettings.yml | 1 + .../implementation/AzureTableBuilder.java | 83 +++ .../table/implementation/AzureTableImpl.java | 112 +++ .../table/implementation/ServicesImpl.java | 165 ++++ .../table/implementation/TablesImpl.java | 702 ++++++++++++++++++ .../implementation/models/AccessPolicy.java | 91 +++ .../table/implementation/models/CorsRule.java | 163 ++++ .../implementation/models/GeoReplication.java | 80 ++ .../models/GeoReplicationStatusType.java | 37 + .../table/implementation/models/Logging.java | 142 ++++ .../table/implementation/models/Metrics.java | 119 +++ .../models/OdataMetadataFormat.java | 40 + .../implementation/models/QueryOptions.java | 120 +++ .../implementation/models/ResponseFormat.java | 34 + .../models/RetentionPolicy.java | 67 ++ .../models/ServicesGetPropertiesHeaders.java | 90 +++ .../models/ServicesGetPropertiesResponse.java | 37 + .../models/ServicesGetStatisticsHeaders.java | 125 ++++ .../models/ServicesGetStatisticsResponse.java | 36 + .../models/ServicesSetPropertiesHeaders.java | 90 +++ .../models/ServicesSetPropertiesResponse.java | 30 + .../models/SignedIdentifier.java | 64 ++ .../models/TableEntityQueryResponse.java | 66 ++ .../models/TableProperties.java | 38 + .../models/TableQueryResponse.java | 65 ++ .../implementation/models/TableResponse.java | 38 + .../models/TableResponseProperties.java | 116 +++ .../models/TableServiceError.java | 38 + .../models/TableServiceErrorException.java | 37 + .../models/TableServiceProperties.java | 119 +++ .../models/TableServiceStats.java | 38 + .../models/TablesCreateHeaders.java | 151 ++++ .../models/TablesCreateResponse.java | 36 + .../models/TablesDeleteEntityHeaders.java | 125 ++++ .../models/TablesDeleteEntityResponse.java | 30 + .../models/TablesDeleteHeaders.java | 125 ++++ .../models/TablesDeleteResponse.java | 26 + .../models/TablesGetAccessPolicyHeaders.java | 125 ++++ .../models/TablesGetAccessPolicyResponse.java | 38 + .../models/TablesInsertEntityHeaders.java | 203 +++++ .../models/TablesInsertEntityResponse.java | 37 + .../models/TablesMergeEntityHeaders.java | 151 ++++ .../models/TablesMergeEntityResponse.java | 26 + .../models/TablesQueryEntitiesHeaders.java | 177 +++++ .../models/TablesQueryEntitiesResponse.java | 37 + ...EntitiesWithPartitionAndRowKeyHeaders.java | 205 +++++ ...ntitiesWithPartitionAndRowKeyResponse.java | 37 + .../models/TablesQueryHeaders.java | 151 ++++ .../models/TablesQueryResponse.java | 36 + .../models/TablesSetAccessPolicyHeaders.java | 125 ++++ .../models/TablesSetAccessPolicyResponse.java | 30 + .../models/TablesUpdateEntityHeaders.java | 151 ++++ .../models/TablesUpdateEntityResponse.java | 30 + .../implementation/models/package-info.java | 6 + .../table/implementation/package-info.java | 6 + 55 files changed, 5047 insertions(+) create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/AzureTableBuilder.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/AzureTableImpl.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/ServicesImpl.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/TablesImpl.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/AccessPolicy.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/CorsRule.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/GeoReplication.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/GeoReplicationStatusType.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/Logging.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/Metrics.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/OdataMetadataFormat.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/QueryOptions.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ResponseFormat.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/RetentionPolicy.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetPropertiesHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetPropertiesResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetStatisticsHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetStatisticsResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesSetPropertiesHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesSetPropertiesResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/SignedIdentifier.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableEntityQueryResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableProperties.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableQueryResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableResponseProperties.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceError.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceErrorException.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceProperties.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceStats.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesCreateHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesCreateResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteEntityHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteEntityResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesGetAccessPolicyHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesGetAccessPolicyResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesInsertEntityHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesInsertEntityResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesMergeEntityHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesMergeEntityResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesSetAccessPolicyHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesSetAccessPolicyResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesUpdateEntityHeaders.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesUpdateEntityResponse.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/package-info.java create mode 100644 sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/package-info.java diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index 85e4bda524a2..41962e87733e 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -120,6 +120,7 @@ known_content_issues: - ['sdk/cosmos/faq/README.md', '#3113'] - ['sdk/cosmos/azure-cosmos-benchmark/README.md', '#3113'] - ['sdk/cosmos/azure-cosmos-examples/README.md', '#3113'] + - ['sdk/cosmos/azure-cosmos-table/swagger/README.md', '#3113'] - ['sdk/cosmos/azure-cosmos/README.md', '#3113'] - ['sdk/e2e/README.md', '#3113'] - ['sdk/eventgrid/microsoft-azure-eventgrid/README.md', '#3113'] diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/AzureTableBuilder.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/AzureTableBuilder.java new file mode 100644 index 000000000000..390a4ebc1fda --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/AzureTableBuilder.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; + +/** A builder for creating a new instance of the AzureTable type. */ +@ServiceClientBuilder(serviceClients = {AzureTableImpl.class}) +public final class AzureTableBuilder { + /* + * The URL of the service account or table that is the targe of the desired + * operation. + */ + private String url; + + /** + * Sets The URL of the service account or table that is the targe of the desired operation. + * + * @param url the url value. + * @return the AzureTableBuilder. + */ + public AzureTableBuilder url(String url) { + this.url = url; + return this; + } + + /* + * Specifies the version of the operation to use for this request. + */ + private String version; + + /** + * Sets Specifies the version of the operation to use for this request. + * + * @param version the version value. + * @return the AzureTableBuilder. + */ + public AzureTableBuilder version(String version) { + this.version = version; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the AzureTableBuilder. + */ + public AzureTableBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /** + * Builds an instance of AzureTableImpl with the provided parameters. + * + * @return an instance of AzureTableImpl. + */ + public AzureTableImpl buildClient() { + if (pipeline == null) { + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); + } + AzureTableImpl client = new AzureTableImpl(pipeline); + client.setUrl(this.url); + client.setVersion(this.version); + return client; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/AzureTableImpl.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/AzureTableImpl.java new file mode 100644 index 000000000000..bc7ea2fb8c70 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/AzureTableImpl.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation; + +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; + +/** Initializes a new instance of the AzureTable type. */ +public final class AzureTableImpl { + /** The URL of the service account or table that is the targe of the desired operation. */ + private String url; + + /** + * Gets The URL of the service account or table that is the targe of the desired operation. + * + * @return the url value. + */ + public String getUrl() { + return this.url; + } + + /** + * Sets The URL of the service account or table that is the targe of the desired operation. + * + * @param url the url value. + * @return the service client itself. + */ + public AzureTableImpl setUrl(String url) { + this.url = url; + return this; + } + + /** Specifies the version of the operation to use for this request. */ + private String version; + + /** + * Gets Specifies the version of the operation to use for this request. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Sets Specifies the version of the operation to use for this request. + * + * @param version the version value. + * @return the service client itself. + */ + public AzureTableImpl setVersion(String version) { + this.version = version; + return this; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The TablesImpl object to access its operations. */ + private final TablesImpl tables; + + /** + * Gets the TablesImpl object to access its operations. + * + * @return the TablesImpl object. + */ + public TablesImpl getTables() { + return this.tables; + } + + /** The ServicesImpl object to access its operations. */ + private final ServicesImpl services; + + /** + * Gets the ServicesImpl object to access its operations. + * + * @return the ServicesImpl object. + */ + public ServicesImpl getServices() { + return this.services; + } + + /** Initializes an instance of AzureTable client. */ + public AzureTableImpl() { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build()); + } + + /** + * Initializes an instance of AzureTable client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + */ + public AzureTableImpl(HttpPipeline httpPipeline) { + this.httpPipeline = httpPipeline; + this.tables = new TablesImpl(this); + this.services = new ServicesImpl(this); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/ServicesImpl.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/ServicesImpl.java new file mode 100644 index 000000000000..5113dbafa91b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/ServicesImpl.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.cosmos.table.implementation.models.ServicesGetPropertiesResponse; +import com.azure.cosmos.table.implementation.models.ServicesGetStatisticsResponse; +import com.azure.cosmos.table.implementation.models.ServicesSetPropertiesResponse; +import com.azure.cosmos.table.implementation.models.TableServiceErrorException; +import com.azure.cosmos.table.implementation.models.TableServiceProperties; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Services. */ +public final class ServicesImpl { + /** The proxy service used to perform REST calls. */ + private final ServicesService service; + + /** The service client containing this operation class. */ + private final AzureTableImpl client; + + /** + * Initializes an instance of ServicesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ServicesImpl(AzureTableImpl client) { + this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * The interface defining all the services for AzureTableServices to be used by the proxy service to perform REST + * calls. + */ + @Host("{url}") + @ServiceInterface(name = "AzureTableServices") + private interface ServicesService { + @Put("/") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono setProperties( + @HostParam("url") String url, + @QueryParam("restype") String restype, + @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @BodyParam("application/xml") TableServiceProperties tableServiceProperties, + Context context); + + @Get("/") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono getProperties( + @HostParam("url") String url, + @QueryParam("restype") String restype, + @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + Context context); + + @Get("/") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono getStatistics( + @HostParam("url") String url, + @QueryParam("restype") String restype, + @QueryParam("comp") String comp, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + Context context); + } + + /** + * Sets properties for an account's Table service endpoint, including properties for Analytics and CORS + * (Cross-Origin Resource Sharing) rules. + * + * @param tableServiceProperties Table Service Properties. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setPropertiesWithResponseAsync( + TableServiceProperties tableServiceProperties, Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "properties"; + return service.setProperties( + this.client.getUrl(), + restype, + comp, + timeout, + this.client.getVersion(), + requestId, + tableServiceProperties, + context); + } + + /** + * Gets the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin + * Resource Sharing) rules. + * + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of an account's Table service, including properties for Analytics and CORS (Cross-Origin + * Resource Sharing) rules. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPropertiesWithResponseAsync( + Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "properties"; + return service.getProperties( + this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, context); + } + + /** + * Retrieves statistics related to replication for the Table service. It is only available on the secondary location + * endpoint when read-access geo-redundant replication is enabled for the account. + * + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return stats for the service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getStatisticsWithResponseAsync( + Integer timeout, String requestId, Context context) { + final String restype = "service"; + final String comp = "stats"; + return service.getStatistics( + this.client.getUrl(), restype, comp, timeout, this.client.getVersion(), requestId, context); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/TablesImpl.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/TablesImpl.java new file mode 100644 index 000000000000..c1db2ec136bf --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/TablesImpl.java @@ -0,0 +1,702 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.cosmos.table.implementation.models.OdataMetadataFormat; +import com.azure.cosmos.table.implementation.models.QueryOptions; +import com.azure.cosmos.table.implementation.models.ResponseFormat; +import com.azure.cosmos.table.implementation.models.SignedIdentifier; +import com.azure.cosmos.table.implementation.models.TableProperties; +import com.azure.cosmos.table.implementation.models.TableServiceErrorException; +import com.azure.cosmos.table.implementation.models.TablesCreateResponse; +import com.azure.cosmos.table.implementation.models.TablesDeleteEntityResponse; +import com.azure.cosmos.table.implementation.models.TablesDeleteResponse; +import com.azure.cosmos.table.implementation.models.TablesGetAccessPolicyResponse; +import com.azure.cosmos.table.implementation.models.TablesInsertEntityResponse; +import com.azure.cosmos.table.implementation.models.TablesMergeEntityResponse; +import com.azure.cosmos.table.implementation.models.TablesQueryEntitiesResponse; +import com.azure.cosmos.table.implementation.models.TablesQueryEntitiesWithPartitionAndRowKeyResponse; +import com.azure.cosmos.table.implementation.models.TablesQueryResponse; +import com.azure.cosmos.table.implementation.models.TablesSetAccessPolicyResponse; +import com.azure.cosmos.table.implementation.models.TablesUpdateEntityResponse; +import java.util.List; +import java.util.Map; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in Tables. */ +public final class TablesImpl { + /** The proxy service used to perform REST calls. */ + private final TablesService service; + + /** The service client containing this operation class. */ + private final AzureTableImpl client; + + /** + * Initializes an instance of TablesImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TablesImpl(AzureTableImpl client) { + this.service = RestProxy.create(TablesService.class, client.getHttpPipeline()); + this.client = client; + } + + /** + * The interface defining all the services for AzureTableTables to be used by the proxy service to perform REST + * calls. + */ + @Host("{url}") + @ServiceInterface(name = "AzureTableTables") + private interface TablesService { + @Get("/Tables") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono query( + @HostParam("url") String url, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @QueryParam("$top") Integer top, + @QueryParam("$select") String select, + @QueryParam("$filter") String filter, + @QueryParam("NextTableName") String nextTableName, + Context context); + + @Post("/Tables") + @ExpectedResponses({201, 204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono create( + @HostParam("url") String url, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @HeaderParam("Prefer") ResponseFormat responsePreference, + @BodyParam("application/json") TableProperties tableProperties, + Context context); + + @Delete("/Tables('{table}')") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono delete( + @HostParam("url") String url, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @PathParam("table") String table, + Context context); + + @Get("/{table}()") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono queryEntities( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @QueryParam("$top") Integer top, + @QueryParam("$select") String select, + @QueryParam("$filter") String filter, + @PathParam("table") String table, + @QueryParam("NextPartitionKey") String nextPartitionKey, + @QueryParam("NextRowKey") String nextRowKey, + Context context); + + @Get("/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono queryEntitiesWithPartitionAndRowKey( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @QueryParam("$select") String select, + @QueryParam("$filter") String filter, + @PathParam("table") String table, + @PathParam("partitionKey") String partitionKey, + @PathParam("rowKey") String rowKey, + Context context); + + @Put("/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono updateEntity( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @PathParam("table") String table, + @PathParam("partitionKey") String partitionKey, + @PathParam("rowKey") String rowKey, + @HeaderParam("If-Match") String ifMatch, + @BodyParam("application/json") Map tableEntityProperties, + Context context); + + @Patch("/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono mergeEntity( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @PathParam("table") String table, + @PathParam("partitionKey") String partitionKey, + @PathParam("rowKey") String rowKey, + @HeaderParam("If-Match") String ifMatch, + @BodyParam("application/json") Map tableEntityProperties, + Context context); + + @Delete("/{table}(PartitionKey='{partitionKey}',RowKey='{rowKey}')") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono deleteEntity( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @PathParam("table") String table, + @PathParam("partitionKey") String partitionKey, + @PathParam("rowKey") String rowKey, + @HeaderParam("If-Match") String ifMatch, + Context context); + + @Post("/{table}") + @ExpectedResponses({201, 204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono insertEntity( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @HeaderParam("DataServiceVersion") String dataServiceVersion, + @QueryParam("$format") OdataMetadataFormat format, + @PathParam("table") String table, + @HeaderParam("Prefer") ResponseFormat responsePreference, + @BodyParam("application/json") Map tableEntityProperties, + Context context); + + @Get("/{table}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono getAccessPolicy( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @PathParam("table") String table, + @QueryParam("comp") String comp, + Context context); + + @Put("/{table}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(TableServiceErrorException.class) + Mono setAccessPolicy( + @HostParam("url") String url, + @QueryParam("timeout") Integer timeout, + @HeaderParam("x-ms-version") String version, + @HeaderParam("x-ms-client-request-id") String requestId, + @PathParam("table") String table, + @QueryParam("comp") String comp, + @BodyParam("application/xml") List tableAcl, + Context context); + } + + /** + * Queries tables under the given account. + * + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param nextTableName A table query continuation token from a previous call. + * @param queryOptions Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties for the table query response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono queryWithResponseAsync( + String requestId, String nextTableName, QueryOptions queryOptions, Context context) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + Integer topInternal = null; + if (queryOptions != null) { + topInternal = queryOptions.getTop(); + } + Integer top = topInternal; + String selectInternal = null; + if (queryOptions != null) { + selectInternal = queryOptions.getSelect(); + } + String select = selectInternal; + String filterInternal = null; + if (queryOptions != null) { + filterInternal = queryOptions.getFilter(); + } + String filter = filterInternal; + return service.query( + this.client.getUrl(), + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + top, + select, + filter, + nextTableName, + context); + } + + /** + * Creates a new table under the given account. + * + * @param tableProperties The properties for creating a table. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param responsePreference Specifies whether the response should include the inserted entity in the payload. + * Possible values are return-no-content and return-content. + * @param queryOptions Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response for a single table. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createWithResponseAsync( + TableProperties tableProperties, + String requestId, + ResponseFormat responsePreference, + QueryOptions queryOptions, + Context context) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + return service.create( + this.client.getUrl(), + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + responsePreference, + tableProperties, + context); + } + + /** + * Operation permanently deletes the specified table. + * + * @param table The name of the table. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteWithResponseAsync(String table, String requestId, Context context) { + return service.delete(this.client.getUrl(), this.client.getVersion(), requestId, table, context); + } + + /** + * Queries entities in a table. + * + * @param table The name of the table. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param nextPartitionKey An entity query continuation token from a previous call. + * @param nextRowKey An entity query continuation token from a previous call. + * @param queryOptions Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties for the table entity query response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono queryEntitiesWithResponseAsync( + String table, + Integer timeout, + String requestId, + String nextPartitionKey, + String nextRowKey, + QueryOptions queryOptions, + Context context) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + Integer topInternal = null; + if (queryOptions != null) { + topInternal = queryOptions.getTop(); + } + Integer top = topInternal; + String selectInternal = null; + if (queryOptions != null) { + selectInternal = queryOptions.getSelect(); + } + String select = selectInternal; + String filterInternal = null; + if (queryOptions != null) { + filterInternal = queryOptions.getFilter(); + } + String filter = filterInternal; + return service.queryEntities( + this.client.getUrl(), + timeout, + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + top, + select, + filter, + table, + nextPartitionKey, + nextRowKey, + context); + } + + /** + * Queries entities in a table. + * + * @param table The name of the table. + * @param partitionKey The partition key of the entity. + * @param rowKey The row key of the entity. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param queryOptions Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties for the table entity query response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono queryEntitiesWithPartitionAndRowKeyWithResponseAsync( + String table, + String partitionKey, + String rowKey, + Integer timeout, + String requestId, + QueryOptions queryOptions, + Context context) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + String selectInternal = null; + if (queryOptions != null) { + selectInternal = queryOptions.getSelect(); + } + String select = selectInternal; + String filterInternal = null; + if (queryOptions != null) { + filterInternal = queryOptions.getFilter(); + } + String filter = filterInternal; + return service.queryEntitiesWithPartitionAndRowKey( + this.client.getUrl(), + timeout, + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + select, + filter, + table, + partitionKey, + rowKey, + context); + } + + /** + * Update entity in a table. + * + * @param table The name of the table. + * @param partitionKey The partition key of the entity. + * @param rowKey The row key of the entity. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param ifMatch Match condition for an entity to be updated. If specified and a matching entity is not found, an + * error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, + * an insert will be performed when no existing entity is found to update and a replace will be performed if an + * existing entity is found. + * @param tableEntityProperties The other properties of the table entity. + * @param queryOptions Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateEntityWithResponseAsync( + String table, + String partitionKey, + String rowKey, + Integer timeout, + String requestId, + String ifMatch, + Map tableEntityProperties, + QueryOptions queryOptions, + Context context) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + return service.updateEntity( + this.client.getUrl(), + timeout, + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + table, + partitionKey, + rowKey, + ifMatch, + tableEntityProperties, + context); + } + + /** + * Merge entity in a table. + * + * @param table The name of the table. + * @param partitionKey The partition key of the entity. + * @param rowKey The row key of the entity. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param ifMatch Match condition for an entity to be updated. If specified and a matching entity is not found, an + * error will be raised. To force an unconditional update, set to the wildcard character (*). If not specified, + * an insert will be performed when no existing entity is found to update and a merge will be performed if an + * existing entity is found. + * @param tableEntityProperties The other properties of the table entity. + * @param queryOptions Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono mergeEntityWithResponseAsync( + String table, + String partitionKey, + String rowKey, + Integer timeout, + String requestId, + String ifMatch, + Map tableEntityProperties, + QueryOptions queryOptions, + Context context) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + return service.mergeEntity( + this.client.getUrl(), + timeout, + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + table, + partitionKey, + rowKey, + ifMatch, + tableEntityProperties, + context); + } + + /** + * Deletes the specified entity in a table. + * + * @param table The name of the table. + * @param partitionKey The partition key of the entity. + * @param rowKey The row key of the entity. + * @param ifMatch Match condition for an entity to be deleted. If specified and a matching entity is not found, an + * error will be raised. To force an unconditional delete, set to the wildcard character (*). + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param queryOptions Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteEntityWithResponseAsync( + String table, + String partitionKey, + String rowKey, + String ifMatch, + Integer timeout, + String requestId, + QueryOptions queryOptions, + Context context) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + return service.deleteEntity( + this.client.getUrl(), + timeout, + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + table, + partitionKey, + rowKey, + ifMatch, + context); + } + + /** + * Insert entity in a table. + * + * @param table The name of the table. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param responsePreference Specifies whether the response should include the inserted entity in the payload. + * Possible values are return-no-content and return-content. + * @param tableEntityProperties The other properties of the table entity. + * @param queryOptions Parameter group. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the other properties of the table entity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono insertEntityWithResponseAsync( + String table, + Integer timeout, + String requestId, + ResponseFormat responsePreference, + Map tableEntityProperties, + QueryOptions queryOptions, + Context context) { + final String dataServiceVersion = "3.0"; + OdataMetadataFormat formatInternal = null; + if (queryOptions != null) { + formatInternal = queryOptions.getFormat(); + } + OdataMetadataFormat format = formatInternal; + return service.insertEntity( + this.client.getUrl(), + timeout, + this.client.getVersion(), + requestId, + dataServiceVersion, + format, + table, + responsePreference, + tableEntityProperties, + context); + } + + /** + * Retrieves details about any stored access policies specified on the table that may be used with Shared Access + * Signatures. + * + * @param table The name of the table. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a collection of signed identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAccessPolicyWithResponseAsync( + String table, Integer timeout, String requestId, Context context) { + final String comp = "acl"; + return service.getAccessPolicy( + this.client.getUrl(), timeout, this.client.getVersion(), requestId, table, comp, context); + } + + /** + * Sets stored access policies for the table that may be used with Shared Access Signatures. + * + * @param table The name of the table. + * @param timeout The timeout parameter is expressed in seconds. + * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the + * analytics logs when analytics logging is enabled. + * @param tableAcl A collection of signed identifiers. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws TableServiceErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono setAccessPolicyWithResponseAsync( + String table, Integer timeout, String requestId, List tableAcl, Context context) { + final String comp = "acl"; + return service.setAccessPolicy( + this.client.getUrl(), timeout, this.client.getVersion(), requestId, table, comp, tableAcl, context); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/AccessPolicy.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/AccessPolicy.java new file mode 100644 index 000000000000..fbe031ece89b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/AccessPolicy.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The AccessPolicy model. */ +@Fluent +public final class AccessPolicy { + /* + * The start datetime from which the policy is active. + */ + @JsonProperty(value = "Start", required = true) + private OffsetDateTime start; + + /* + * The datetime that the policy expires. + */ + @JsonProperty(value = "Expiry", required = true) + private OffsetDateTime expiry; + + /* + * The permissions for the acl policy. + */ + @JsonProperty(value = "Permission", required = true) + private String permission; + + /** + * Get the start property: The start datetime from which the policy is active. + * + * @return the start value. + */ + public OffsetDateTime getStart() { + return this.start; + } + + /** + * Set the start property: The start datetime from which the policy is active. + * + * @param start the start value to set. + * @return the AccessPolicy object itself. + */ + public AccessPolicy setStart(OffsetDateTime start) { + this.start = start; + return this; + } + + /** + * Get the expiry property: The datetime that the policy expires. + * + * @return the expiry value. + */ + public OffsetDateTime getExpiry() { + return this.expiry; + } + + /** + * Set the expiry property: The datetime that the policy expires. + * + * @param expiry the expiry value to set. + * @return the AccessPolicy object itself. + */ + public AccessPolicy setExpiry(OffsetDateTime expiry) { + this.expiry = expiry; + return this; + } + + /** + * Get the permission property: The permissions for the acl policy. + * + * @return the permission value. + */ + public String getPermission() { + return this.permission; + } + + /** + * Set the permission property: The permissions for the acl policy. + * + * @param permission the permission value to set. + * @return the AccessPolicy object itself. + */ + public AccessPolicy setPermission(String permission) { + this.permission = permission; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/CorsRule.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/CorsRule.java new file mode 100644 index 000000000000..3ecef8ea6480 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/CorsRule.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The CorsRule model. */ +@Fluent +public final class CorsRule { + /* + * The origin domains that are permitted to make a request against the + * service via CORS. The origin domain is the domain from which the request + * originates. Note that the origin must be an exact case-sensitive match + * with the origin that the user age sends to the service. You can also use + * the wildcard character '*' to allow all origin domains to make requests + * via CORS. + */ + @JsonProperty(value = "AllowedOrigins", required = true) + private String allowedOrigins; + + /* + * The methods (HTTP request verbs) that the origin domain may use for a + * CORS request. (comma separated) + */ + @JsonProperty(value = "AllowedMethods", required = true) + private String allowedMethods; + + /* + * The request headers that the origin domain may specify on the CORS + * request. + */ + @JsonProperty(value = "AllowedHeaders", required = true) + private String allowedHeaders; + + /* + * The response headers that may be sent in the response to the CORS + * request and exposed by the browser to the request issuer. + */ + @JsonProperty(value = "ExposedHeaders", required = true) + private String exposedHeaders; + + /* + * The maximum amount time that a browser should cache the preflight + * OPTIONS request. + */ + @JsonProperty(value = "MaxAgeInSeconds", required = true) + private int maxAgeInSeconds; + + /** + * Get the allowedOrigins property: The origin domains that are permitted to make a request against the service via + * CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact + * case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard + * character '*' to allow all origin domains to make requests via CORS. + * + * @return the allowedOrigins value. + */ + public String getAllowedOrigins() { + return this.allowedOrigins; + } + + /** + * Set the allowedOrigins property: The origin domains that are permitted to make a request against the service via + * CORS. The origin domain is the domain from which the request originates. Note that the origin must be an exact + * case-sensitive match with the origin that the user age sends to the service. You can also use the wildcard + * character '*' to allow all origin domains to make requests via CORS. + * + * @param allowedOrigins the allowedOrigins value to set. + * @return the CorsRule object itself. + */ + public CorsRule setAllowedOrigins(String allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + + /** + * Get the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS + * request. (comma separated). + * + * @return the allowedMethods value. + */ + public String getAllowedMethods() { + return this.allowedMethods; + } + + /** + * Set the allowedMethods property: The methods (HTTP request verbs) that the origin domain may use for a CORS + * request. (comma separated). + * + * @param allowedMethods the allowedMethods value to set. + * @return the CorsRule object itself. + */ + public CorsRule setAllowedMethods(String allowedMethods) { + this.allowedMethods = allowedMethods; + return this; + } + + /** + * Get the allowedHeaders property: The request headers that the origin domain may specify on the CORS request. + * + * @return the allowedHeaders value. + */ + public String getAllowedHeaders() { + return this.allowedHeaders; + } + + /** + * Set the allowedHeaders property: The request headers that the origin domain may specify on the CORS request. + * + * @param allowedHeaders the allowedHeaders value to set. + * @return the CorsRule object itself. + */ + public CorsRule setAllowedHeaders(String allowedHeaders) { + this.allowedHeaders = allowedHeaders; + return this; + } + + /** + * Get the exposedHeaders property: The response headers that may be sent in the response to the CORS request and + * exposed by the browser to the request issuer. + * + * @return the exposedHeaders value. + */ + public String getExposedHeaders() { + return this.exposedHeaders; + } + + /** + * Set the exposedHeaders property: The response headers that may be sent in the response to the CORS request and + * exposed by the browser to the request issuer. + * + * @param exposedHeaders the exposedHeaders value to set. + * @return the CorsRule object itself. + */ + public CorsRule setExposedHeaders(String exposedHeaders) { + this.exposedHeaders = exposedHeaders; + return this; + } + + /** + * Get the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS + * request. + * + * @return the maxAgeInSeconds value. + */ + public int getMaxAgeInSeconds() { + return this.maxAgeInSeconds; + } + + /** + * Set the maxAgeInSeconds property: The maximum amount time that a browser should cache the preflight OPTIONS + * request. + * + * @param maxAgeInSeconds the maxAgeInSeconds value to set. + * @return the CorsRule object itself. + */ + public CorsRule setMaxAgeInSeconds(int maxAgeInSeconds) { + this.maxAgeInSeconds = maxAgeInSeconds; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/GeoReplication.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/GeoReplication.java new file mode 100644 index 000000000000..1216102103d3 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/GeoReplication.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The GeoReplication model. */ +@Fluent +public final class GeoReplication { + /* + * The status of the secondary location. + */ + @JsonProperty(value = "Status", required = true) + private GeoReplicationStatusType status; + + /* + * A GMT date/time value, to the second. All primary writes preceding this + * value are guaranteed to be available for read operations at the + * secondary. Primary writes after this point in time may or may not be + * available for reads. + */ + @JsonProperty(value = "LastSyncTime", required = true) + private DateTimeRfc1123 lastSyncTime; + + /** + * Get the status property: The status of the secondary location. + * + * @return the status value. + */ + public GeoReplicationStatusType getStatus() { + return this.status; + } + + /** + * Set the status property: The status of the secondary location. + * + * @param status the status value to set. + * @return the GeoReplication object itself. + */ + public GeoReplication setStatus(GeoReplicationStatusType status) { + this.status = status; + return this; + } + + /** + * Get the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are + * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or + * may not be available for reads. + * + * @return the lastSyncTime value. + */ + public OffsetDateTime getLastSyncTime() { + if (this.lastSyncTime == null) { + return null; + } + return this.lastSyncTime.getDateTime(); + } + + /** + * Set the lastSyncTime property: A GMT date/time value, to the second. All primary writes preceding this value are + * guaranteed to be available for read operations at the secondary. Primary writes after this point in time may or + * may not be available for reads. + * + * @param lastSyncTime the lastSyncTime value to set. + * @return the GeoReplication object itself. + */ + public GeoReplication setLastSyncTime(OffsetDateTime lastSyncTime) { + if (lastSyncTime == null) { + this.lastSyncTime = null; + } else { + this.lastSyncTime = new DateTimeRfc1123(lastSyncTime); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/GeoReplicationStatusType.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/GeoReplicationStatusType.java new file mode 100644 index 000000000000..b74c876ebf8b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/GeoReplicationStatusType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for GeoReplicationStatusType. */ +public final class GeoReplicationStatusType extends ExpandableStringEnum { + /** Static value live for GeoReplicationStatusType. */ + public static final GeoReplicationStatusType LIVE = fromString("live"); + + /** Static value bootstrap for GeoReplicationStatusType. */ + public static final GeoReplicationStatusType BOOTSTRAP = fromString("bootstrap"); + + /** Static value unavailable for GeoReplicationStatusType. */ + public static final GeoReplicationStatusType UNAVAILABLE = fromString("unavailable"); + + /** + * Creates or finds a GeoReplicationStatusType from its string representation. + * + * @param name a name to look for. + * @return the corresponding GeoReplicationStatusType. + */ + @JsonCreator + public static GeoReplicationStatusType fromString(String name) { + return fromString(name, GeoReplicationStatusType.class); + } + + /** @return known GeoReplicationStatusType values. */ + public static Collection values() { + return values(GeoReplicationStatusType.class); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/Logging.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/Logging.java new file mode 100644 index 000000000000..65163cd9a77e --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/Logging.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Logging model. */ +@Fluent +public final class Logging { + /* + * The version of Analytics to configure. + */ + @JsonProperty(value = "Version", required = true) + private String version; + + /* + * Indicates whether all delete requests should be logged. + */ + @JsonProperty(value = "Delete", required = true) + private boolean delete; + + /* + * Indicates whether all read requests should be logged. + */ + @JsonProperty(value = "Read", required = true) + private boolean read; + + /* + * Indicates whether all write requests should be logged. + */ + @JsonProperty(value = "Write", required = true) + private boolean write; + + /* + * The retention policy. + */ + @JsonProperty(value = "RetentionPolicy", required = true) + private RetentionPolicy retentionPolicy; + + /** + * Get the version property: The version of Analytics to configure. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of Analytics to configure. + * + * @param version the version value to set. + * @return the Logging object itself. + */ + public Logging setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the delete property: Indicates whether all delete requests should be logged. + * + * @return the delete value. + */ + public boolean isDelete() { + return this.delete; + } + + /** + * Set the delete property: Indicates whether all delete requests should be logged. + * + * @param delete the delete value to set. + * @return the Logging object itself. + */ + public Logging setDelete(boolean delete) { + this.delete = delete; + return this; + } + + /** + * Get the read property: Indicates whether all read requests should be logged. + * + * @return the read value. + */ + public boolean isRead() { + return this.read; + } + + /** + * Set the read property: Indicates whether all read requests should be logged. + * + * @param read the read value to set. + * @return the Logging object itself. + */ + public Logging setRead(boolean read) { + this.read = read; + return this; + } + + /** + * Get the write property: Indicates whether all write requests should be logged. + * + * @return the write value. + */ + public boolean isWrite() { + return this.write; + } + + /** + * Set the write property: Indicates whether all write requests should be logged. + * + * @param write the write value to set. + * @return the Logging object itself. + */ + public Logging setWrite(boolean write) { + this.write = write; + return this; + } + + /** + * Get the retentionPolicy property: The retention policy. + * + * @return the retentionPolicy value. + */ + public RetentionPolicy getRetentionPolicy() { + return this.retentionPolicy; + } + + /** + * Set the retentionPolicy property: The retention policy. + * + * @param retentionPolicy the retentionPolicy value to set. + * @return the Logging object itself. + */ + public Logging setRetentionPolicy(RetentionPolicy retentionPolicy) { + this.retentionPolicy = retentionPolicy; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/Metrics.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/Metrics.java new file mode 100644 index 000000000000..da0292057d03 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/Metrics.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Metrics model. */ +@Fluent +public final class Metrics { + /* + * The version of Analytics to configure. + */ + @JsonProperty(value = "Version") + private String version; + + /* + * Indicates whether metrics are enabled for the Table service. + */ + @JsonProperty(value = "Enabled", required = true) + private boolean enabled; + + /* + * Indicates whether metrics should generate summary statistics for called + * API operations. + */ + @JsonProperty(value = "IncludeAPIs") + private Boolean includeAPIs; + + /* + * The retention policy. + */ + @JsonProperty(value = "RetentionPolicy") + private RetentionPolicy retentionPolicy; + + /** + * Get the version property: The version of Analytics to configure. + * + * @return the version value. + */ + public String getVersion() { + return this.version; + } + + /** + * Set the version property: The version of Analytics to configure. + * + * @param version the version value to set. + * @return the Metrics object itself. + */ + public Metrics setVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the enabled property: Indicates whether metrics are enabled for the Table service. + * + * @return the enabled value. + */ + public boolean isEnabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether metrics are enabled for the Table service. + * + * @param enabled the enabled value to set. + * @return the Metrics object itself. + */ + public Metrics setEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the includeAPIs property: Indicates whether metrics should generate summary statistics for called API + * operations. + * + * @return the includeAPIs value. + */ + public Boolean isIncludeAPIs() { + return this.includeAPIs; + } + + /** + * Set the includeAPIs property: Indicates whether metrics should generate summary statistics for called API + * operations. + * + * @param includeAPIs the includeAPIs value to set. + * @return the Metrics object itself. + */ + public Metrics setIncludeAPIs(Boolean includeAPIs) { + this.includeAPIs = includeAPIs; + return this; + } + + /** + * Get the retentionPolicy property: The retention policy. + * + * @return the retentionPolicy value. + */ + public RetentionPolicy getRetentionPolicy() { + return this.retentionPolicy; + } + + /** + * Set the retentionPolicy property: The retention policy. + * + * @param retentionPolicy the retentionPolicy value to set. + * @return the Metrics object itself. + */ + public Metrics setRetentionPolicy(RetentionPolicy retentionPolicy) { + this.retentionPolicy = retentionPolicy; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/OdataMetadataFormat.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/OdataMetadataFormat.java new file mode 100644 index 000000000000..9b32bb6c04af --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/OdataMetadataFormat.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for OdataMetadataFormat. */ +public final class OdataMetadataFormat extends ExpandableStringEnum { + /** Static value application/json;odata=nometadata for OdataMetadataFormat. */ + public static final OdataMetadataFormat APPLICATION_JSON_ODATA_NOMETADATA = + fromString("application/json;odata=nometadata"); + + /** Static value application/json;odata=minimalmetadata for OdataMetadataFormat. */ + public static final OdataMetadataFormat APPLICATION_JSON_ODATA_MINIMALMETADATA = + fromString("application/json;odata=minimalmetadata"); + + /** Static value application/json;odata=fullmetadata for OdataMetadataFormat. */ + public static final OdataMetadataFormat APPLICATION_JSON_ODATA_FULLMETADATA = + fromString("application/json;odata=fullmetadata"); + + /** + * Creates or finds a OdataMetadataFormat from its string representation. + * + * @param name a name to look for. + * @return the corresponding OdataMetadataFormat. + */ + @JsonCreator + public static OdataMetadataFormat fromString(String name) { + return fromString(name, OdataMetadataFormat.class); + } + + /** @return known OdataMetadataFormat values. */ + public static Collection values() { + return values(OdataMetadataFormat.class); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/QueryOptions.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/QueryOptions.java new file mode 100644 index 000000000000..58c43961cf32 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/QueryOptions.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The QueryOptions model. */ +@Fluent +public final class QueryOptions { + /* + * Specifies the media type for the response. + */ + @JsonProperty(value = "Format") + private OdataMetadataFormat format; + + /* + * Maximum number of records to return. + */ + @JsonProperty(value = "Top") + private Integer top; + + /* + * Select expression using OData notation. Limits the columns on each + * record to just those requested, e.g. "$select=PolicyAssignmentId, + * ResourceId". + */ + @JsonProperty(value = "Select") + private String select; + + /* + * OData filter expression. + */ + @JsonProperty(value = "Filter") + private String filter; + + /** + * Get the format property: Specifies the media type for the response. + * + * @return the format value. + */ + public OdataMetadataFormat getFormat() { + return this.format; + } + + /** + * Set the format property: Specifies the media type for the response. + * + * @param format the format value to set. + * @return the QueryOptions object itself. + */ + public QueryOptions setFormat(OdataMetadataFormat format) { + this.format = format; + return this; + } + + /** + * Get the top property: Maximum number of records to return. + * + * @return the top value. + */ + public Integer getTop() { + return this.top; + } + + /** + * Set the top property: Maximum number of records to return. + * + * @param top the top value to set. + * @return the QueryOptions object itself. + */ + public QueryOptions setTop(Integer top) { + this.top = top; + return this; + } + + /** + * Get the select property: Select expression using OData notation. Limits the columns on each record to just those + * requested, e.g. "$select=PolicyAssignmentId, ResourceId". + * + * @return the select value. + */ + public String getSelect() { + return this.select; + } + + /** + * Set the select property: Select expression using OData notation. Limits the columns on each record to just those + * requested, e.g. "$select=PolicyAssignmentId, ResourceId". + * + * @param select the select value to set. + * @return the QueryOptions object itself. + */ + public QueryOptions setSelect(String select) { + this.select = select; + return this; + } + + /** + * Get the filter property: OData filter expression. + * + * @return the filter value. + */ + public String getFilter() { + return this.filter; + } + + /** + * Set the filter property: OData filter expression. + * + * @param filter the filter value to set. + * @return the QueryOptions object itself. + */ + public QueryOptions setFilter(String filter) { + this.filter = filter; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ResponseFormat.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ResponseFormat.java new file mode 100644 index 000000000000..a53dc31f66c0 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ResponseFormat.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ResponseFormat. */ +public final class ResponseFormat extends ExpandableStringEnum { + /** Static value return-no-content for ResponseFormat. */ + public static final ResponseFormat RETURN_NO_CONTENT = fromString("return-no-content"); + + /** Static value return-content for ResponseFormat. */ + public static final ResponseFormat RETURN_CONTENT = fromString("return-content"); + + /** + * Creates or finds a ResponseFormat from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResponseFormat. + */ + @JsonCreator + public static ResponseFormat fromString(String name) { + return fromString(name, ResponseFormat.class); + } + + /** @return known ResponseFormat values. */ + public static Collection values() { + return values(ResponseFormat.class); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/RetentionPolicy.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/RetentionPolicy.java new file mode 100644 index 000000000000..1e6cf2139cf2 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/RetentionPolicy.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The RetentionPolicy model. */ +@Fluent +public final class RetentionPolicy { + /* + * Indicates whether a retention policy is enabled for the service. + */ + @JsonProperty(value = "Enabled", required = true) + private boolean enabled; + + /* + * Indicates the number of days that metrics or logging or soft-deleted + * data should be retained. All data older than this value will be deleted. + */ + @JsonProperty(value = "Days") + private Integer days; + + /** + * Get the enabled property: Indicates whether a retention policy is enabled for the service. + * + * @return the enabled value. + */ + public boolean isEnabled() { + return this.enabled; + } + + /** + * Set the enabled property: Indicates whether a retention policy is enabled for the service. + * + * @param enabled the enabled value to set. + * @return the RetentionPolicy object itself. + */ + public RetentionPolicy setEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the days property: Indicates the number of days that metrics or logging or soft-deleted data should be + * retained. All data older than this value will be deleted. + * + * @return the days value. + */ + public Integer getDays() { + return this.days; + } + + /** + * Set the days property: Indicates the number of days that metrics or logging or soft-deleted data should be + * retained. All data older than this value will be deleted. + * + * @param days the days value to set. + * @return the RetentionPolicy object itself. + */ + public RetentionPolicy setDays(Integer days) { + this.days = days; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetPropertiesHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetPropertiesHeaders.java new file mode 100644 index 000000000000..3f1f64dab2e5 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetPropertiesHeaders.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ServicesGetPropertiesHeaders model. */ +@Fluent +public final class ServicesGetPropertiesHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the ServicesGetPropertiesHeaders object itself. + */ + public ServicesGetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the ServicesGetPropertiesHeaders object itself. + */ + public ServicesGetPropertiesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the ServicesGetPropertiesHeaders object itself. + */ + public ServicesGetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetPropertiesResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetPropertiesResponse.java new file mode 100644 index 000000000000..f32a019ae9e4 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetPropertiesResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the getProperties operation. */ +public final class ServicesGetPropertiesResponse + extends ResponseBase { + /** + * Creates an instance of ServicesGetPropertiesResponse. + * + * @param request the request which resulted in this ServicesGetPropertiesResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ServicesGetPropertiesResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + TableServiceProperties value, + ServicesGetPropertiesHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public TableServiceProperties getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetStatisticsHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetStatisticsHeaders.java new file mode 100644 index 000000000000..04e6b22fd4ad --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetStatisticsHeaders.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The ServicesGetStatisticsHeaders model. */ +@Fluent +public final class ServicesGetStatisticsHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the ServicesGetStatisticsHeaders object itself. + */ + public ServicesGetStatisticsHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the ServicesGetStatisticsHeaders object itself. + */ + public ServicesGetStatisticsHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the ServicesGetStatisticsHeaders object itself. + */ + public ServicesGetStatisticsHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the ServicesGetStatisticsHeaders object itself. + */ + public ServicesGetStatisticsHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetStatisticsResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetStatisticsResponse.java new file mode 100644 index 000000000000..eb95d27ccff9 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesGetStatisticsResponse.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the getStatistics operation. */ +public final class ServicesGetStatisticsResponse extends ResponseBase { + /** + * Creates an instance of ServicesGetStatisticsResponse. + * + * @param request the request which resulted in this ServicesGetStatisticsResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ServicesGetStatisticsResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + TableServiceStats value, + ServicesGetStatisticsHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public TableServiceStats getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesSetPropertiesHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesSetPropertiesHeaders.java new file mode 100644 index 000000000000..49fd041d7cd7 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesSetPropertiesHeaders.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ServicesSetPropertiesHeaders model. */ +@Fluent +public final class ServicesSetPropertiesHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the ServicesSetPropertiesHeaders object itself. + */ + public ServicesSetPropertiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the ServicesSetPropertiesHeaders object itself. + */ + public ServicesSetPropertiesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the ServicesSetPropertiesHeaders object itself. + */ + public ServicesSetPropertiesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesSetPropertiesResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesSetPropertiesResponse.java new file mode 100644 index 000000000000..35ffc4728bb0 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/ServicesSetPropertiesResponse.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the setProperties operation. */ +public final class ServicesSetPropertiesResponse extends ResponseBase { + /** + * Creates an instance of ServicesSetPropertiesResponse. + * + * @param request the request which resulted in this ServicesSetPropertiesResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public ServicesSetPropertiesResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + ServicesSetPropertiesHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/SignedIdentifier.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/SignedIdentifier.java new file mode 100644 index 000000000000..beacfc02e6f0 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/SignedIdentifier.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The SignedIdentifier model. */ +@Fluent +public final class SignedIdentifier { + /* + * A unique id. + */ + @JsonProperty(value = "Id", required = true) + private String id; + + /* + * The access policy. + */ + @JsonProperty(value = "AccessPolicy", required = true) + private AccessPolicy accessPolicy; + + /** + * Get the id property: A unique id. + * + * @return the id value. + */ + public String getId() { + return this.id; + } + + /** + * Set the id property: A unique id. + * + * @param id the id value to set. + * @return the SignedIdentifier object itself. + */ + public SignedIdentifier setId(String id) { + this.id = id; + return this; + } + + /** + * Get the accessPolicy property: The access policy. + * + * @return the accessPolicy value. + */ + public AccessPolicy getAccessPolicy() { + return this.accessPolicy; + } + + /** + * Set the accessPolicy property: The access policy. + * + * @param accessPolicy the accessPolicy value to set. + * @return the SignedIdentifier object itself. + */ + public SignedIdentifier setAccessPolicy(AccessPolicy accessPolicy) { + this.accessPolicy = accessPolicy; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableEntityQueryResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableEntityQueryResponse.java new file mode 100644 index 000000000000..01b1335041ec --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableEntityQueryResponse.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The TableEntityQueryResponse model. */ +@Fluent +public final class TableEntityQueryResponse { + /* + * The metadata response of the table. + */ + @JsonProperty(value = "odata.metadata") + private String odataMetadata; + + /* + * List of table entities. + */ + @JsonProperty(value = "value") + private List> value; + + /** + * Get the odataMetadata property: The metadata response of the table. + * + * @return the odataMetadata value. + */ + public String getOdataMetadata() { + return this.odataMetadata; + } + + /** + * Set the odataMetadata property: The metadata response of the table. + * + * @param odataMetadata the odataMetadata value to set. + * @return the TableEntityQueryResponse object itself. + */ + public TableEntityQueryResponse setOdataMetadata(String odataMetadata) { + this.odataMetadata = odataMetadata; + return this; + } + + /** + * Get the value property: List of table entities. + * + * @return the value value. + */ + public List> getValue() { + return this.value; + } + + /** + * Set the value property: List of table entities. + * + * @param value the value value to set. + * @return the TableEntityQueryResponse object itself. + */ + public TableEntityQueryResponse setValue(List> value) { + this.value = value; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableProperties.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableProperties.java new file mode 100644 index 000000000000..344127d5c1eb --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableProperties.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TableProperties model. */ +@Fluent +public final class TableProperties { + /* + * The name of the table to create. + */ + @JsonProperty(value = "TableName") + private String tableName; + + /** + * Get the tableName property: The name of the table to create. + * + * @return the tableName value. + */ + public String getTableName() { + return this.tableName; + } + + /** + * Set the tableName property: The name of the table to create. + * + * @param tableName the tableName value to set. + * @return the TableProperties object itself. + */ + public TableProperties setTableName(String tableName) { + this.tableName = tableName; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableQueryResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableQueryResponse.java new file mode 100644 index 000000000000..f0c53ea6a055 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableQueryResponse.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The TableQueryResponse model. */ +@Fluent +public final class TableQueryResponse { + /* + * The metadata response of the table. + */ + @JsonProperty(value = "odata.metadata") + private String odataMetadata; + + /* + * List of tables. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the odataMetadata property: The metadata response of the table. + * + * @return the odataMetadata value. + */ + public String getOdataMetadata() { + return this.odataMetadata; + } + + /** + * Set the odataMetadata property: The metadata response of the table. + * + * @param odataMetadata the odataMetadata value to set. + * @return the TableQueryResponse object itself. + */ + public TableQueryResponse setOdataMetadata(String odataMetadata) { + this.odataMetadata = odataMetadata; + return this; + } + + /** + * Get the value property: List of tables. + * + * @return the value value. + */ + public List getValue() { + return this.value; + } + + /** + * Set the value property: List of tables. + * + * @param value the value value to set. + * @return the TableQueryResponse object itself. + */ + public TableQueryResponse setValue(List value) { + this.value = value; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableResponse.java new file mode 100644 index 000000000000..4c13e5347205 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TableResponse model. */ +@Fluent +public final class TableResponse extends TableResponseProperties { + /* + * The metadata response of the table. + */ + @JsonProperty(value = "odata.metadata") + private String odataMetadata; + + /** + * Get the odataMetadata property: The metadata response of the table. + * + * @return the odataMetadata value. + */ + public String getOdataMetadata() { + return this.odataMetadata; + } + + /** + * Set the odataMetadata property: The metadata response of the table. + * + * @param odataMetadata the odataMetadata value to set. + * @return the TableResponse object itself. + */ + public TableResponse setOdataMetadata(String odataMetadata) { + this.odataMetadata = odataMetadata; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableResponseProperties.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableResponseProperties.java new file mode 100644 index 000000000000..4331277aef4e --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableResponseProperties.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TableResponseProperties model. */ +@Fluent +public class TableResponseProperties { + /* + * The name of the table. + */ + @JsonProperty(value = "TableName") + private String tableName; + + /* + * The odata type of the table. + */ + @JsonProperty(value = "odata.type") + private String odataType; + + /* + * The id of the table. + */ + @JsonProperty(value = "odata.id") + private String odataId; + + /* + * The edit link of the table. + */ + @JsonProperty(value = "odata.editLink") + private String odataEditLink; + + /** + * Get the tableName property: The name of the table. + * + * @return the tableName value. + */ + public String getTableName() { + return this.tableName; + } + + /** + * Set the tableName property: The name of the table. + * + * @param tableName the tableName value to set. + * @return the TableResponseProperties object itself. + */ + public TableResponseProperties setTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the odataType property: The odata type of the table. + * + * @return the odataType value. + */ + public String getOdataType() { + return this.odataType; + } + + /** + * Set the odataType property: The odata type of the table. + * + * @param odataType the odataType value to set. + * @return the TableResponseProperties object itself. + */ + public TableResponseProperties setOdataType(String odataType) { + this.odataType = odataType; + return this; + } + + /** + * Get the odataId property: The id of the table. + * + * @return the odataId value. + */ + public String getOdataId() { + return this.odataId; + } + + /** + * Set the odataId property: The id of the table. + * + * @param odataId the odataId value to set. + * @return the TableResponseProperties object itself. + */ + public TableResponseProperties setOdataId(String odataId) { + this.odataId = odataId; + return this; + } + + /** + * Get the odataEditLink property: The edit link of the table. + * + * @return the odataEditLink value. + */ + public String getOdataEditLink() { + return this.odataEditLink; + } + + /** + * Set the odataEditLink property: The edit link of the table. + * + * @param odataEditLink the odataEditLink value to set. + * @return the TableResponseProperties object itself. + */ + public TableResponseProperties setOdataEditLink(String odataEditLink) { + this.odataEditLink = odataEditLink; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceError.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceError.java new file mode 100644 index 000000000000..d092472253aa --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceError.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TableServiceError model. */ +@Fluent +public final class TableServiceError { + /* + * The error message. + */ + @JsonProperty(value = "Message") + private String message; + + /** + * Get the message property: The error message. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Set the message property: The error message. + * + * @param message the message value to set. + * @return the TableServiceError object itself. + */ + public TableServiceError setMessage(String message) { + this.message = message; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceErrorException.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceErrorException.java new file mode 100644 index 000000000000..5b0e31221baf --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceErrorException.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpResponse; + +/** Exception thrown for an invalid response with TableServiceError information. */ +public final class TableServiceErrorException extends HttpResponseException { + /** + * Initializes a new instance of the TableServiceErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + public TableServiceErrorException(String message, HttpResponse response) { + super(message, response); + } + + /** + * Initializes a new instance of the TableServiceErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + public TableServiceErrorException(String message, HttpResponse response, TableServiceError value) { + super(message, response, value); + } + + @Override + public TableServiceError getValue() { + return (TableServiceError) super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceProperties.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceProperties.java new file mode 100644 index 000000000000..f23b973a8fbe --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceProperties.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The TableServiceProperties model. */ +@Fluent +public final class TableServiceProperties { + /* + * Azure Analytics Logging settings. + */ + @JsonProperty(value = "Logging") + private Logging logging; + + /* + * A summary of request statistics grouped by API in hourly aggregates for + * tables. + */ + @JsonProperty(value = "HourMetrics") + private Metrics hourMetrics; + + /* + * A summary of request statistics grouped by API in minute aggregates for + * tables. + */ + @JsonProperty(value = "MinuteMetrics") + private Metrics minuteMetrics; + + /* + * The set of CORS rules. + */ + @JsonProperty(value = "Cors") + private List cors; + + /** + * Get the logging property: Azure Analytics Logging settings. + * + * @return the logging value. + */ + public Logging getLogging() { + return this.logging; + } + + /** + * Set the logging property: Azure Analytics Logging settings. + * + * @param logging the logging value to set. + * @return the TableServiceProperties object itself. + */ + public TableServiceProperties setLogging(Logging logging) { + this.logging = logging; + return this; + } + + /** + * Get the hourMetrics property: A summary of request statistics grouped by API in hourly aggregates for tables. + * + * @return the hourMetrics value. + */ + public Metrics getHourMetrics() { + return this.hourMetrics; + } + + /** + * Set the hourMetrics property: A summary of request statistics grouped by API in hourly aggregates for tables. + * + * @param hourMetrics the hourMetrics value to set. + * @return the TableServiceProperties object itself. + */ + public TableServiceProperties setHourMetrics(Metrics hourMetrics) { + this.hourMetrics = hourMetrics; + return this; + } + + /** + * Get the minuteMetrics property: A summary of request statistics grouped by API in minute aggregates for tables. + * + * @return the minuteMetrics value. + */ + public Metrics getMinuteMetrics() { + return this.minuteMetrics; + } + + /** + * Set the minuteMetrics property: A summary of request statistics grouped by API in minute aggregates for tables. + * + * @param minuteMetrics the minuteMetrics value to set. + * @return the TableServiceProperties object itself. + */ + public TableServiceProperties setMinuteMetrics(Metrics minuteMetrics) { + this.minuteMetrics = minuteMetrics; + return this; + } + + /** + * Get the cors property: The set of CORS rules. + * + * @return the cors value. + */ + public List getCors() { + return this.cors; + } + + /** + * Set the cors property: The set of CORS rules. + * + * @param cors the cors value to set. + * @return the TableServiceProperties object itself. + */ + public TableServiceProperties setCors(List cors) { + this.cors = cors; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceStats.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceStats.java new file mode 100644 index 000000000000..fcf0f6cedbd8 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TableServiceStats.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The TableServiceStats model. */ +@Fluent +public final class TableServiceStats { + /* + * Geo-Replication information for the Secondary Storage Service. + */ + @JsonProperty(value = "GeoReplication") + private GeoReplication geoReplication; + + /** + * Get the geoReplication property: Geo-Replication information for the Secondary Storage Service. + * + * @return the geoReplication value. + */ + public GeoReplication getGeoReplication() { + return this.geoReplication; + } + + /** + * Set the geoReplication property: Geo-Replication information for the Secondary Storage Service. + * + * @param geoReplication the geoReplication value to set. + * @return the TableServiceStats object itself. + */ + public TableServiceStats setGeoReplication(GeoReplication geoReplication) { + this.geoReplication = geoReplication; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesCreateHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesCreateHeaders.java new file mode 100644 index 000000000000..df9a9bcd55f3 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesCreateHeaders.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesCreateHeaders model. */ +@Fluent +public final class TablesCreateHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /* + * The Preference-Applied property. + */ + @JsonProperty(value = "Preference-Applied") + private String preferenceApplied; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesCreateHeaders object itself. + */ + public TablesCreateHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesCreateHeaders object itself. + */ + public TablesCreateHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesCreateHeaders object itself. + */ + public TablesCreateHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesCreateHeaders object itself. + */ + public TablesCreateHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } + + /** + * Get the preferenceApplied property: The Preference-Applied property. + * + * @return the preferenceApplied value. + */ + public String getPreferenceApplied() { + return this.preferenceApplied; + } + + /** + * Set the preferenceApplied property: The Preference-Applied property. + * + * @param preferenceApplied the preferenceApplied value to set. + * @return the TablesCreateHeaders object itself. + */ + public TablesCreateHeaders setPreferenceApplied(String preferenceApplied) { + this.preferenceApplied = preferenceApplied; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesCreateResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesCreateResponse.java new file mode 100644 index 000000000000..4415bd4dd0ae --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesCreateResponse.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the create operation. */ +public final class TablesCreateResponse extends ResponseBase { + /** + * Creates an instance of TablesCreateResponse. + * + * @param request the request which resulted in this TablesCreateResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesCreateResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + TableResponse value, + TablesCreateHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public TableResponse getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteEntityHeaders.java new file mode 100644 index 000000000000..e8d0285b4170 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteEntityHeaders.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesDeleteEntityHeaders model. */ +@Fluent +public final class TablesDeleteEntityHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesDeleteEntityHeaders object itself. + */ + public TablesDeleteEntityHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesDeleteEntityHeaders object itself. + */ + public TablesDeleteEntityHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesDeleteEntityHeaders object itself. + */ + public TablesDeleteEntityHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesDeleteEntityHeaders object itself. + */ + public TablesDeleteEntityHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteEntityResponse.java new file mode 100644 index 000000000000..817b6689ff2f --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteEntityResponse.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the deleteEntity operation. */ +public final class TablesDeleteEntityResponse extends ResponseBase { + /** + * Creates an instance of TablesDeleteEntityResponse. + * + * @param request the request which resulted in this TablesDeleteEntityResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesDeleteEntityResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + TablesDeleteEntityHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteHeaders.java new file mode 100644 index 000000000000..89e432adeb68 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteHeaders.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesDeleteHeaders model. */ +@Fluent +public final class TablesDeleteHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesDeleteHeaders object itself. + */ + public TablesDeleteHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesDeleteHeaders object itself. + */ + public TablesDeleteHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesDeleteHeaders object itself. + */ + public TablesDeleteHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesDeleteHeaders object itself. + */ + public TablesDeleteHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteResponse.java new file mode 100644 index 000000000000..b0040e97ccd0 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesDeleteResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the delete operation. */ +public final class TablesDeleteResponse extends ResponseBase { + /** + * Creates an instance of TablesDeleteResponse. + * + * @param request the request which resulted in this TablesDeleteResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesDeleteResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, TablesDeleteHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesGetAccessPolicyHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesGetAccessPolicyHeaders.java new file mode 100644 index 000000000000..a2f53c7880ad --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesGetAccessPolicyHeaders.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesGetAccessPolicyHeaders model. */ +@Fluent +public final class TablesGetAccessPolicyHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesGetAccessPolicyHeaders object itself. + */ + public TablesGetAccessPolicyHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesGetAccessPolicyHeaders object itself. + */ + public TablesGetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesGetAccessPolicyHeaders object itself. + */ + public TablesGetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesGetAccessPolicyHeaders object itself. + */ + public TablesGetAccessPolicyHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesGetAccessPolicyResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesGetAccessPolicyResponse.java new file mode 100644 index 000000000000..bce50f27f45d --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesGetAccessPolicyResponse.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import java.util.List; + +/** Contains all response data for the getAccessPolicy operation. */ +public final class TablesGetAccessPolicyResponse + extends ResponseBase> { + /** + * Creates an instance of TablesGetAccessPolicyResponse. + * + * @param request the request which resulted in this TablesGetAccessPolicyResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesGetAccessPolicyResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + List value, + TablesGetAccessPolicyHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public List getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesInsertEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesInsertEntityHeaders.java new file mode 100644 index 000000000000..49922bc2a2c4 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesInsertEntityHeaders.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesInsertEntityHeaders model. */ +@Fluent +public final class TablesInsertEntityHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The ETag property. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /* + * The Preference-Applied property. + */ + @JsonProperty(value = "Preference-Applied") + private String preferenceApplied; + + /* + * The Content-Type property. + */ + @JsonProperty(value = "Content-Type") + private String contentType; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag property. + * + * @param eTag the eTag value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } + + /** + * Get the preferenceApplied property: The Preference-Applied property. + * + * @return the preferenceApplied value. + */ + public String getPreferenceApplied() { + return this.preferenceApplied; + } + + /** + * Set the preferenceApplied property: The Preference-Applied property. + * + * @param preferenceApplied the preferenceApplied value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setPreferenceApplied(String preferenceApplied) { + this.preferenceApplied = preferenceApplied; + return this; + } + + /** + * Get the contentType property: The Content-Type property. + * + * @return the contentType value. + */ + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The Content-Type property. + * + * @param contentType the contentType value to set. + * @return the TablesInsertEntityHeaders object itself. + */ + public TablesInsertEntityHeaders setContentType(String contentType) { + this.contentType = contentType; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesInsertEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesInsertEntityResponse.java new file mode 100644 index 000000000000..856a6b095242 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesInsertEntityResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; +import java.util.Map; + +/** Contains all response data for the insertEntity operation. */ +public final class TablesInsertEntityResponse extends ResponseBase> { + /** + * Creates an instance of TablesInsertEntityResponse. + * + * @param request the request which resulted in this TablesInsertEntityResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesInsertEntityResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Map value, + TablesInsertEntityHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public Map getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesMergeEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesMergeEntityHeaders.java new file mode 100644 index 000000000000..467b24a7f743 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesMergeEntityHeaders.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesMergeEntityHeaders model. */ +@Fluent +public final class TablesMergeEntityHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The ETag property. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesMergeEntityHeaders object itself. + */ + public TablesMergeEntityHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag property. + * + * @param eTag the eTag value to set. + * @return the TablesMergeEntityHeaders object itself. + */ + public TablesMergeEntityHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesMergeEntityHeaders object itself. + */ + public TablesMergeEntityHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesMergeEntityHeaders object itself. + */ + public TablesMergeEntityHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesMergeEntityHeaders object itself. + */ + public TablesMergeEntityHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesMergeEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesMergeEntityResponse.java new file mode 100644 index 000000000000..d77135b5de91 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesMergeEntityResponse.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the mergeEntity operation. */ +public final class TablesMergeEntityResponse extends ResponseBase { + /** + * Creates an instance of TablesMergeEntityResponse. + * + * @param request the request which resulted in this TablesMergeEntityResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesMergeEntityResponse( + HttpRequest request, int statusCode, HttpHeaders rawHeaders, Void value, TablesMergeEntityHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesHeaders.java new file mode 100644 index 000000000000..a351c5bef916 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesHeaders.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesQueryEntitiesHeaders model. */ +@Fluent +public final class TablesQueryEntitiesHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-continuation-NextPartitionKey property. + */ + @JsonProperty(value = "x-ms-continuation-NextPartitionKey") + private String xMsContinuationNextPartitionKey; + + /* + * The x-ms-continuation-NextRowKey property. + */ + @JsonProperty(value = "x-ms-continuation-NextRowKey") + private String xMsContinuationNextRowKey; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesQueryEntitiesHeaders object itself. + */ + public TablesQueryEntitiesHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsContinuationNextPartitionKey property: The x-ms-continuation-NextPartitionKey property. + * + * @return the xMsContinuationNextPartitionKey value. + */ + public String getXMsContinuationNextPartitionKey() { + return this.xMsContinuationNextPartitionKey; + } + + /** + * Set the xMsContinuationNextPartitionKey property: The x-ms-continuation-NextPartitionKey property. + * + * @param xMsContinuationNextPartitionKey the xMsContinuationNextPartitionKey value to set. + * @return the TablesQueryEntitiesHeaders object itself. + */ + public TablesQueryEntitiesHeaders setXMsContinuationNextPartitionKey(String xMsContinuationNextPartitionKey) { + this.xMsContinuationNextPartitionKey = xMsContinuationNextPartitionKey; + return this; + } + + /** + * Get the xMsContinuationNextRowKey property: The x-ms-continuation-NextRowKey property. + * + * @return the xMsContinuationNextRowKey value. + */ + public String getXMsContinuationNextRowKey() { + return this.xMsContinuationNextRowKey; + } + + /** + * Set the xMsContinuationNextRowKey property: The x-ms-continuation-NextRowKey property. + * + * @param xMsContinuationNextRowKey the xMsContinuationNextRowKey value to set. + * @return the TablesQueryEntitiesHeaders object itself. + */ + public TablesQueryEntitiesHeaders setXMsContinuationNextRowKey(String xMsContinuationNextRowKey) { + this.xMsContinuationNextRowKey = xMsContinuationNextRowKey; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesQueryEntitiesHeaders object itself. + */ + public TablesQueryEntitiesHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesQueryEntitiesHeaders object itself. + */ + public TablesQueryEntitiesHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesQueryEntitiesHeaders object itself. + */ + public TablesQueryEntitiesHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesResponse.java new file mode 100644 index 000000000000..21c0d4437882 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the queryEntities operation. */ +public final class TablesQueryEntitiesResponse + extends ResponseBase { + /** + * Creates an instance of TablesQueryEntitiesResponse. + * + * @param request the request which resulted in this TablesQueryEntitiesResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesQueryEntitiesResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + TableEntityQueryResponse value, + TablesQueryEntitiesHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public TableEntityQueryResponse getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java new file mode 100644 index 000000000000..1a4d8076f2fe --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesWithPartitionAndRowKeyHeaders.java @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesQueryEntitiesWithPartitionAndRowKeyHeaders model. */ +@Fluent +public final class TablesQueryEntitiesWithPartitionAndRowKeyHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-continuation-NextPartitionKey property. + */ + @JsonProperty(value = "x-ms-continuation-NextPartitionKey") + private String xMsContinuationNextPartitionKey; + + /* + * The ETag property. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The x-ms-continuation-NextRowKey property. + */ + @JsonProperty(value = "x-ms-continuation-NextRowKey") + private String xMsContinuationNextRowKey; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsContinuationNextPartitionKey property: The x-ms-continuation-NextPartitionKey property. + * + * @return the xMsContinuationNextPartitionKey value. + */ + public String getXMsContinuationNextPartitionKey() { + return this.xMsContinuationNextPartitionKey; + } + + /** + * Set the xMsContinuationNextPartitionKey property: The x-ms-continuation-NextPartitionKey property. + * + * @param xMsContinuationNextPartitionKey the xMsContinuationNextPartitionKey value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsContinuationNextPartitionKey( + String xMsContinuationNextPartitionKey) { + this.xMsContinuationNextPartitionKey = xMsContinuationNextPartitionKey; + return this; + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag property. + * + * @param eTag the eTag value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsContinuationNextRowKey property: The x-ms-continuation-NextRowKey property. + * + * @return the xMsContinuationNextRowKey value. + */ + public String getXMsContinuationNextRowKey() { + return this.xMsContinuationNextRowKey; + } + + /** + * Set the xMsContinuationNextRowKey property: The x-ms-continuation-NextRowKey property. + * + * @param xMsContinuationNextRowKey the xMsContinuationNextRowKey value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsContinuationNextRowKey( + String xMsContinuationNextRowKey) { + this.xMsContinuationNextRowKey = xMsContinuationNextRowKey; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesQueryEntitiesWithPartitionAndRowKeyHeaders object itself. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java new file mode 100644 index 000000000000..655e80a58d02 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryEntitiesWithPartitionAndRowKeyResponse.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the queryEntitiesWithPartitionAndRowKey operation. */ +public final class TablesQueryEntitiesWithPartitionAndRowKeyResponse + extends ResponseBase { + /** + * Creates an instance of TablesQueryEntitiesWithPartitionAndRowKeyResponse. + * + * @param request the request which resulted in this TablesQueryEntitiesWithPartitionAndRowKeyResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesQueryEntitiesWithPartitionAndRowKeyResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + TableEntityQueryResponse value, + TablesQueryEntitiesWithPartitionAndRowKeyHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public TableEntityQueryResponse getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryHeaders.java new file mode 100644 index 000000000000..aa3e03a4967b --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryHeaders.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesQueryHeaders model. */ +@Fluent +public final class TablesQueryHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /* + * The x-ms-continuation-NextTableName property. + */ + @JsonProperty(value = "x-ms-continuation-NextTableName") + private String xMsContinuationNextTableName; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesQueryHeaders object itself. + */ + public TablesQueryHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesQueryHeaders object itself. + */ + public TablesQueryHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesQueryHeaders object itself. + */ + public TablesQueryHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesQueryHeaders object itself. + */ + public TablesQueryHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } + + /** + * Get the xMsContinuationNextTableName property: The x-ms-continuation-NextTableName property. + * + * @return the xMsContinuationNextTableName value. + */ + public String getXMsContinuationNextTableName() { + return this.xMsContinuationNextTableName; + } + + /** + * Set the xMsContinuationNextTableName property: The x-ms-continuation-NextTableName property. + * + * @param xMsContinuationNextTableName the xMsContinuationNextTableName value to set. + * @return the TablesQueryHeaders object itself. + */ + public TablesQueryHeaders setXMsContinuationNextTableName(String xMsContinuationNextTableName) { + this.xMsContinuationNextTableName = xMsContinuationNextTableName; + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryResponse.java new file mode 100644 index 000000000000..3f418f13393e --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesQueryResponse.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the query operation. */ +public final class TablesQueryResponse extends ResponseBase { + /** + * Creates an instance of TablesQueryResponse. + * + * @param request the request which resulted in this TablesQueryResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesQueryResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + TableQueryResponse value, + TablesQueryHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } + + /** @return the deserialized response body. */ + @Override + public TableQueryResponse getValue() { + return super.getValue(); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesSetAccessPolicyHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesSetAccessPolicyHeaders.java new file mode 100644 index 000000000000..da3886ec0dbd --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesSetAccessPolicyHeaders.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesSetAccessPolicyHeaders model. */ +@Fluent +public final class TablesSetAccessPolicyHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesSetAccessPolicyHeaders object itself. + */ + public TablesSetAccessPolicyHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesSetAccessPolicyHeaders object itself. + */ + public TablesSetAccessPolicyHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesSetAccessPolicyHeaders object itself. + */ + public TablesSetAccessPolicyHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesSetAccessPolicyHeaders object itself. + */ + public TablesSetAccessPolicyHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesSetAccessPolicyResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesSetAccessPolicyResponse.java new file mode 100644 index 000000000000..dfb05cbc7ccb --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesSetAccessPolicyResponse.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the setAccessPolicy operation. */ +public final class TablesSetAccessPolicyResponse extends ResponseBase { + /** + * Creates an instance of TablesSetAccessPolicyResponse. + * + * @param request the request which resulted in this TablesSetAccessPolicyResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesSetAccessPolicyResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + TablesSetAccessPolicyHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesUpdateEntityHeaders.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesUpdateEntityHeaders.java new file mode 100644 index 000000000000..298a8892f33e --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesUpdateEntityHeaders.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.DateTimeRfc1123; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The TablesUpdateEntityHeaders model. */ +@Fluent +public final class TablesUpdateEntityHeaders { + /* + * The x-ms-version property. + */ + @JsonProperty(value = "x-ms-version") + private String xMsVersion; + + /* + * The ETag property. + */ + @JsonProperty(value = "ETag") + private String eTag; + + /* + * The x-ms-request-id property. + */ + @JsonProperty(value = "x-ms-request-id") + private String xMsRequestId; + + /* + * The x-ms-client-request-id property. + */ + @JsonProperty(value = "x-ms-client-request-id") + private String xMsClientRequestId; + + /* + * The Date property. + */ + @JsonProperty(value = "Date") + private DateTimeRfc1123 dateProperty; + + /** + * Get the xMsVersion property: The x-ms-version property. + * + * @return the xMsVersion value. + */ + public String getXMsVersion() { + return this.xMsVersion; + } + + /** + * Set the xMsVersion property: The x-ms-version property. + * + * @param xMsVersion the xMsVersion value to set. + * @return the TablesUpdateEntityHeaders object itself. + */ + public TablesUpdateEntityHeaders setXMsVersion(String xMsVersion) { + this.xMsVersion = xMsVersion; + return this; + } + + /** + * Get the eTag property: The ETag property. + * + * @return the eTag value. + */ + public String getETag() { + return this.eTag; + } + + /** + * Set the eTag property: The ETag property. + * + * @param eTag the eTag value to set. + * @return the TablesUpdateEntityHeaders object itself. + */ + public TablesUpdateEntityHeaders setETag(String eTag) { + this.eTag = eTag; + return this; + } + + /** + * Get the xMsRequestId property: The x-ms-request-id property. + * + * @return the xMsRequestId value. + */ + public String getXMsRequestId() { + return this.xMsRequestId; + } + + /** + * Set the xMsRequestId property: The x-ms-request-id property. + * + * @param xMsRequestId the xMsRequestId value to set. + * @return the TablesUpdateEntityHeaders object itself. + */ + public TablesUpdateEntityHeaders setXMsRequestId(String xMsRequestId) { + this.xMsRequestId = xMsRequestId; + return this; + } + + /** + * Get the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @return the xMsClientRequestId value. + */ + public String getXMsClientRequestId() { + return this.xMsClientRequestId; + } + + /** + * Set the xMsClientRequestId property: The x-ms-client-request-id property. + * + * @param xMsClientRequestId the xMsClientRequestId value to set. + * @return the TablesUpdateEntityHeaders object itself. + */ + public TablesUpdateEntityHeaders setXMsClientRequestId(String xMsClientRequestId) { + this.xMsClientRequestId = xMsClientRequestId; + return this; + } + + /** + * Get the dateProperty property: The Date property. + * + * @return the dateProperty value. + */ + public OffsetDateTime getDateProperty() { + if (this.dateProperty == null) { + return null; + } + return this.dateProperty.getDateTime(); + } + + /** + * Set the dateProperty property: The Date property. + * + * @param dateProperty the dateProperty value to set. + * @return the TablesUpdateEntityHeaders object itself. + */ + public TablesUpdateEntityHeaders setDateProperty(OffsetDateTime dateProperty) { + if (dateProperty == null) { + this.dateProperty = null; + } else { + this.dateProperty = new DateTimeRfc1123(dateProperty); + } + return this; + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesUpdateEntityResponse.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesUpdateEntityResponse.java new file mode 100644 index 000000000000..66847e9c6386 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/TablesUpdateEntityResponse.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.cosmos.table.implementation.models; + +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpRequest; +import com.azure.core.http.rest.ResponseBase; + +/** Contains all response data for the updateEntity operation. */ +public final class TablesUpdateEntityResponse extends ResponseBase { + /** + * Creates an instance of TablesUpdateEntityResponse. + * + * @param request the request which resulted in this TablesUpdateEntityResponse. + * @param statusCode the status code of the HTTP response. + * @param rawHeaders the raw headers of the HTTP response. + * @param value the deserialized value of the HTTP response. + * @param headers the deserialized headers of the HTTP response. + */ + public TablesUpdateEntityResponse( + HttpRequest request, + int statusCode, + HttpHeaders rawHeaders, + Void value, + TablesUpdateEntityHeaders headers) { + super(request, statusCode, rawHeaders, value, headers); + } +} diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/package-info.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/package-info.java new file mode 100644 index 000000000000..f58fd1faa0bd --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the data models for AzureTable. null. */ +package com.azure.cosmos.table.implementation.models; diff --git a/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/package-info.java b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/package-info.java new file mode 100644 index 000000000000..ceca4909d702 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/src/main/java/com/azure/cosmos/table/implementation/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the implementations and inner classes for AzureTable. null. */ +package com.azure.cosmos.table.implementation; From 669d116b82af515e5ff51413d18b13f58918a323 Mon Sep 17 00:00:00 2001 From: Eleanor Boyd Date: Fri, 29 May 2020 15:30:53 -0400 Subject: [PATCH 10/10] readme fix --- sdk/cosmos/azure-cosmos-table/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/cosmos/azure-cosmos-table/README.md b/sdk/cosmos/azure-cosmos-table/README.md index a7606da21a80..b9dbcfeb0255 100644 --- a/sdk/cosmos/azure-cosmos-table/README.md +++ b/sdk/cosmos/azure-cosmos-table/README.md @@ -33,6 +33,6 @@ Use the client library for Tables to: ## Next steps -## Contribution and Feedback +## Contributing ## License