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/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml index ddcc79376672..3e494a95d7c7 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/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 new file mode 100644 index 000000000000..b9dbcfeb0255 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/README.md @@ -0,0 +1,38 @@ +# 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. + +## Examples +Use the client library for Tables to: +- manages tables +- edit and access table contents + +## 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-beta.1 + +``` +[//]: # ({x-version-update-end}) + +## Key concepts + +## Troubleshooting + +## Next steps + +## Contributing + +## License diff --git a/sdk/cosmos/azure-cosmos-table/pom.xml b/sdk/cosmos/azure-cosmos-table/pom.xml new file mode 100644 index 000000000000..cb8c4831d413 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/pom.xml @@ -0,0 +1,68 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-cosmos-table + 1.0.0-beta.1 + Microsoft Azure SDK for Azure Table + This package contains the Microsoft Azure Cosmos Table client library. + 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 + + + + + true + + + + + com.azure + azure-core + 1.5.0 + + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + + + com.azure:* + + + + + + + + + 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; 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..7712eba93309 --- /dev/null +++ b/sdk/cosmos/azure-cosmos-table/swagger/README.md @@ -0,0 +1,35 @@ +# Azure Cosmos Table + +> 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 +``` 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