diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 92dbd2e57617..8d1eec352c61 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -110,6 +110,7 @@ com.azure:azure-cosmos-test;1.0.0-beta.11;1.0.0-beta.12 com.azure:azure-cosmos-tests;1.0.0-beta.1;1.0.0-beta.1 com.azure.cosmos.kafka:azure-cosmos-kafka-connect;2.2.0;2.3.0-beta.1 com.azure:azure-data-appconfiguration;1.8.0;1.9.0-beta.1 +com.azure:azure-data-appconfiguration-v2;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-data-appconfiguration-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-data-schemaregistry;1.5.4;1.6.0-beta.1 com.azure:azure-data-schemaregistry-apacheavro;1.1.25;1.2.0-beta.3 diff --git a/sdk/appconfiguration/azure-data-appconfiguration-v2/CHANGELOG.md b/sdk/appconfiguration/azure-data-appconfiguration-v2/CHANGELOG.md new file mode 100644 index 000000000000..13dd08af78ab --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration-v2/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes diff --git a/sdk/appconfiguration/azure-data-appconfiguration-v2/README.md b/sdk/appconfiguration/azure-data-appconfiguration-v2/README.md new file mode 100644 index 000000000000..3d03de8a6410 --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration-v2/README.md @@ -0,0 +1,15 @@ +# Azure AppConfiguration client library for Java + +## Getting started + +## Key concepts + +## Examples + +## Troubleshooting + +## Next steps + +## Next steps Samples + +## Contributing diff --git a/sdk/appconfiguration/azure-data-appconfiguration-v2/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration-v2/pom.xml new file mode 100644 index 000000000000..0d9416fd0b23 --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration-v2/pom.xml @@ -0,0 +1,108 @@ + + + 4.0.0 + + com.azure.v2 + azure-client-sdk-parent + 2.0.0-beta.1 + ../../parents/azure-client-sdk-parent-v2 + + + io.clientcore + azure-data-appconfiguration-v2 + 1.0.0-beta.1 + jar + + SDK for AzureAppConfiguration + This package contains AzureAppConfiguration client library. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + false + + + + io.clientcore + core + 1.0.0-beta.8 + + + com.azure.v2 + azure-core + 2.0.0-beta.1 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + + run-annotation-processing + generate-sources + + compile + + + 1.8 + 1.8 + 8 + only + ${project.build.directory}/generated-sources/ + + + io.clientcore + annotation-processor + 1.0.0-beta.1 + + + + io.clientcore.annotation.processor.AnnotationProcessor + + + -Xlint:-options + + + module-info.java + + + + + + + io.clientcore + annotation-processor + 1.0.0-beta.1 + + + + + + diff --git a/sdk/appconfiguration/azure-data-appconfiguration-v2/src/main/java/com/azure/v2/data/appconfiguration/AzureAppConfigurationClient.java b/sdk/appconfiguration/azure-data-appconfiguration-v2/src/main/java/com/azure/v2/data/appconfiguration/AzureAppConfigurationClient.java new file mode 100644 index 000000000000..94e07f7ef93e --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration-v2/src/main/java/com/azure/v2/data/appconfiguration/AzureAppConfigurationClient.java @@ -0,0 +1,1283 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.v2.data.appconfiguration; + +import com.azure.v2.data.appconfiguration.implementation.AzureAppConfigurationClientImpl; +import com.azure.v2.data.appconfiguration.models.ErrorException; +import com.azure.v2.data.appconfiguration.models.Key; +import com.azure.v2.data.appconfiguration.models.KeyValue; +import com.azure.v2.data.appconfiguration.models.KeyValueFields; +import com.azure.v2.data.appconfiguration.models.Label; +import com.azure.v2.data.appconfiguration.models.LabelFields; +import com.azure.v2.data.appconfiguration.models.Snapshot; +import com.azure.v2.data.appconfiguration.models.SnapshotFields; +import com.azure.v2.data.appconfiguration.models.SnapshotStatus; +import com.azure.v2.data.appconfiguration.models.SnapshotUpdateParameters; +import com.azure.v2.data.appconfiguration.models.UpdateSnapshotRequestContentType; +import io.clientcore.core.annotations.Metadata; +import io.clientcore.core.annotations.MetadataProperties; +import io.clientcore.core.annotations.ReturnType; +import io.clientcore.core.annotations.ServiceClient; +import io.clientcore.core.annotations.ServiceMethod; +import io.clientcore.core.http.models.RequestContext; +import io.clientcore.core.http.models.Response; +import io.clientcore.core.http.paging.PagedIterable; +import java.util.List; + +/** + * Initializes a new instance of the synchronous AzureAppConfigurationClient type. + */ +@ServiceClient(builder = AzureAppConfigurationClientBuilder.class) +public final class AzureAppConfigurationClient { + @Metadata(properties = { MetadataProperties.GENERATED }) + private final AzureAppConfigurationClientImpl serviceClient; + + /** + * Initializes an instance of AzureAppConfigurationClient class. + * + * @param serviceClient the service client implementation. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + AzureAppConfigurationClient(AzureAppConfigurationClientImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Gets a list of keys. + * + * @param accept The accept parameter. + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of keys. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeys(String accept, String name, String after, String syncToken, + String acceptDatetime) { + return this.serviceClient.getKeys(accept, name, after, syncToken, acceptDatetime); + } + + /** + * Gets a list of keys. + * + * @param accept The accept parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of keys. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeys(String accept) { + return this.serviceClient.getKeys(accept); + } + + /** + * Gets a list of keys. + * + * @param accept The accept parameter. + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of keys. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeys(String accept, String name, String after, String syncToken, String acceptDatetime, + RequestContext requestContext) { + return this.serviceClient.getKeys(accept, name, after, syncToken, acceptDatetime, requestContext); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException 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. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkKeysWithResponse(String name, String after, String syncToken, String acceptDatetime, + RequestContext requestContext) { + return this.serviceClient.checkKeysWithResponse(name, after, syncToken, acceptDatetime, requestContext); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter for the name of the returned keys. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkKeys(String name, String after, String syncToken, String acceptDatetime) { + this.serviceClient.checkKeys(name, after, syncToken, acceptDatetime); + } + + /** + * Requests the headers and status of the given resource. + * + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkKeys() { + this.serviceClient.checkKeys(); + } + + /** + * Gets a list of key-values. + * + * @param accept The accept parameter. + * @param key A filter used to match keys. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. The value should be the name of + * the snapshot. Not valid when used with 'key' and 'label' filters. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @param tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of key-values. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeyValues(String accept, String key, String label, String syncToken, String after, + String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, + List tags) { + return this.serviceClient.getKeyValues(accept, key, label, syncToken, after, acceptDatetime, select, snapshot, + ifMatch, ifNoneMatch, tags); + } + + /** + * Gets a list of key-values. + * + * @param accept The accept parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of key-values. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeyValues(String accept) { + return this.serviceClient.getKeyValues(accept); + } + + /** + * Gets a list of key-values. + * + * @param accept The accept parameter. + * @param key A filter used to match keys. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. The value should be the name of + * the snapshot. Not valid when used with 'key' and 'label' filters. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @param tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of key-values. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getKeyValues(String accept, String key, String label, String syncToken, String after, + String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, + List tags, RequestContext requestContext) { + return this.serviceClient.getKeyValues(accept, key, label, syncToken, after, acceptDatetime, select, snapshot, + ifMatch, ifNoneMatch, tags, requestContext); + } + + /** + * Requests the headers and status of the given resource. + * + * @param key A filter used to match keys. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. The value should be the name of + * the snapshot. Not valid when used with 'key' and 'label' filters. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @param tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException 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. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkKeyValuesWithResponse(String key, String label, String syncToken, String after, + String acceptDatetime, List select, String snapshot, String ifMatch, String ifNoneMatch, + List tags, RequestContext requestContext) { + return this.serviceClient.checkKeyValuesWithResponse(key, label, syncToken, after, acceptDatetime, select, + snapshot, ifMatch, ifNoneMatch, tags, requestContext); + } + + /** + * Requests the headers and status of the given resource. + * + * @param key A filter used to match keys. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param label A filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @param select Used to select what fields are present in the returned resource(s). + * @param snapshot A filter used get key-values for a snapshot. The value should be the name of + * the snapshot. Not valid when used with 'key' and 'label' filters. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @param tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkKeyValues(String key, String label, String syncToken, String after, String acceptDatetime, + List select, String snapshot, String ifMatch, String ifNoneMatch, List tags) { + this.serviceClient.checkKeyValues(key, label, syncToken, after, acceptDatetime, select, snapshot, ifMatch, + ifNoneMatch, tags); + } + + /** + * Requests the headers and status of the given resource. + * + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkKeyValues() { + this.serviceClient.checkKeyValues(); + } + + /** + * Gets a single key-value. + * + * @param key The key of the key-value. + * @param accept The accept parameter. + * @param label The label of the key-value to retrieve. + * @param select Used to select what fields are present in the returned resource(s). + * @param syncToken Used to guarantee real-time consistency between requests. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getKeyValueWithResponse(String key, String accept, String label, + List select, String syncToken, String acceptDatetime, String ifMatch, String ifNoneMatch, + RequestContext requestContext) { + return this.serviceClient.getKeyValueWithResponse(key, accept, label, select, syncToken, acceptDatetime, + ifMatch, ifNoneMatch, requestContext); + } + + /** + * Gets a single key-value. + * + * @param key The key of the key-value. + * @param accept The accept parameter. + * @param label The label of the key-value to retrieve. + * @param select Used to select what fields are present in the returned resource(s). + * @param syncToken Used to guarantee real-time consistency between requests. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyValue getKeyValue(String key, String accept, String label, List select, String syncToken, + String acceptDatetime, String ifMatch, String ifNoneMatch) { + return this.serviceClient.getKeyValue(key, accept, label, select, syncToken, acceptDatetime, ifMatch, + ifNoneMatch); + } + + /** + * Gets a single key-value. + * + * @param key The key of the key-value. + * @param accept The accept parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyValue getKeyValue(String key, String accept) { + return this.serviceClient.getKeyValue(key, accept); + } + + /** + * Creates a key-value. + * + * @param key The key of the key-value to create. + * @param accept The accept parameter. + * @param label The label of the key-value to create. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @param entity The key-value to create. + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a key-value pair representing application settings. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Response putKeyValueWithResponse(String key, String accept, String label, String syncToken, + String ifMatch, String ifNoneMatch, KeyValue entity, RequestContext requestContext) { + // Operation 'putKeyValue' can be invoked with multiple content-type. It is difficult to form a correct method + // signature for convenience API, and hence the convenience API is not generated. + return this.serviceClient.putKeyValueWithResponse(key, accept, label, syncToken, ifMatch, ifNoneMatch, entity, + requestContext); + } + + /** + * Creates a key-value. + * + * @param key The key of the key-value to create. + * @param accept The accept parameter. + * @param label The label of the key-value to create. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @param entity The key-value to create. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a key-value pair representing application settings. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyValue putKeyValue(String key, String accept, String label, String syncToken, String ifMatch, + String ifNoneMatch, KeyValue entity) { + // Operation 'putKeyValue' can be invoked with multiple content-type. It is difficult to form a correct method + // signature for convenience API, and hence the convenience API is not generated. + return this.serviceClient.putKeyValue(key, accept, label, syncToken, ifMatch, ifNoneMatch, entity); + } + + /** + * Creates a key-value. + * + * @param key The key of the key-value to create. + * @param accept The accept parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a key-value pair representing application settings. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyValue putKeyValue(String key, String accept) { + // Operation 'putKeyValue' can be invoked with multiple content-type. It is difficult to form a correct method + // signature for convenience API, and hence the convenience API is not generated. + return this.serviceClient.putKeyValue(key, accept); + } + + /** + * Deletes a key-value. + * + * @param key The key of the key-value to delete. + * @param accept The accept parameter. + * @param label The label of the key-value to delete. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a key-value pair representing application settings. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteKeyValueWithResponse(String key, String accept, String label, String syncToken, + String ifMatch, RequestContext requestContext) { + return this.serviceClient.deleteKeyValueWithResponse(key, accept, label, syncToken, ifMatch, requestContext); + } + + /** + * Deletes a key-value. + * + * @param key The key of the key-value to delete. + * @param accept The accept parameter. + * @param label The label of the key-value to delete. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a key-value pair representing application settings. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyValue deleteKeyValue(String key, String accept, String label, String syncToken, String ifMatch) { + return this.serviceClient.deleteKeyValue(key, accept, label, syncToken, ifMatch); + } + + /** + * Deletes a key-value. + * + * @param key The key of the key-value to delete. + * @param accept The accept parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a key-value pair representing application settings. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyValue deleteKeyValue(String key, String accept) { + return this.serviceClient.deleteKeyValue(key, accept); + } + + /** + * Requests the headers and status of the given resource. + * + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @param select Used to select what fields are present in the returned resource(s). + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException 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. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkKeyValueWithResponse(String key, String label, String syncToken, String acceptDatetime, + String ifMatch, String ifNoneMatch, List select, RequestContext requestContext) { + return this.serviceClient.checkKeyValueWithResponse(key, label, syncToken, acceptDatetime, ifMatch, ifNoneMatch, + select, requestContext); + } + + /** + * Requests the headers and status of the given resource. + * + * @param key The key of the key-value to retrieve. + * @param label The label of the key-value to retrieve. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @param select Used to select what fields are present in the returned resource(s). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkKeyValue(String key, String label, String syncToken, String acceptDatetime, String ifMatch, + String ifNoneMatch, List select) { + this.serviceClient.checkKeyValue(key, label, syncToken, acceptDatetime, ifMatch, ifNoneMatch, select); + } + + /** + * Requests the headers and status of the given resource. + * + * @param key The key of the key-value to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkKeyValue(String key) { + this.serviceClient.checkKeyValue(key); + } + + /** + * Gets a list of key-value snapshots. + * + * @param accept The accept parameter. + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @param syncToken Used to guarantee real-time consistency between requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of key-value snapshots. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getSnapshots(String accept, String name, String after, List select, + List status, String syncToken) { + return this.serviceClient.getSnapshots(accept, name, after, select, status, syncToken); + } + + /** + * Gets a list of key-value snapshots. + * + * @param accept The accept parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of key-value snapshots. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getSnapshots(String accept) { + return this.serviceClient.getSnapshots(accept); + } + + /** + * Gets a list of key-value snapshots. + * + * @param accept The accept parameter. + * @param name A filter for the name of the returned snapshots. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @param select Used to select what fields are present in the returned resource(s). + * @param status Used to filter returned snapshots by their status property. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of key-value snapshots. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getSnapshots(String accept, String name, String after, List select, + List status, String syncToken, RequestContext requestContext) { + return this.serviceClient.getSnapshots(accept, name, after, select, status, syncToken, requestContext); + } + + /** + * Requests the headers and status of the given resource. + * + * @param syncToken Used to guarantee real-time consistency between requests. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException 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. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkSnapshotsWithResponse(String syncToken, String after, RequestContext requestContext) { + return this.serviceClient.checkSnapshotsWithResponse(syncToken, after, requestContext); + } + + /** + * Requests the headers and status of the given resource. + * + * @param syncToken Used to guarantee real-time consistency between requests. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkSnapshots(String syncToken, String after) { + this.serviceClient.checkSnapshots(syncToken, after); + } + + /** + * Requests the headers and status of the given resource. + * + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkSnapshots() { + this.serviceClient.checkSnapshots(); + } + + /** + * Gets a single key-value snapshot. + * + * @param name The name of the snapshot. + * @param accept The accept parameter. + * @param select Used to select what fields are present in the returned resource(s). + * @param syncToken Used to guarantee real-time consistency between requests. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value snapshot. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSnapshotWithResponse(String name, String accept, List select, + String syncToken, String ifMatch, String ifNoneMatch, RequestContext requestContext) { + return this.serviceClient.getSnapshotWithResponse(name, accept, select, syncToken, ifMatch, ifNoneMatch, + requestContext); + } + + /** + * Gets a single key-value snapshot. + * + * @param name The name of the snapshot. + * @param accept The accept parameter. + * @param select Used to select what fields are present in the returned resource(s). + * @param syncToken Used to guarantee real-time consistency between requests. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value snapshot. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Snapshot getSnapshot(String name, String accept, List select, String syncToken, + String ifMatch, String ifNoneMatch) { + return this.serviceClient.getSnapshot(name, accept, select, syncToken, ifMatch, ifNoneMatch); + } + + /** + * Gets a single key-value snapshot. + * + * @param name The name of the snapshot. + * @param accept The accept parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single key-value snapshot. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Snapshot getSnapshot(String name, String accept) { + return this.serviceClient.getSnapshot(name, accept); + } + + /** + * Updates the state of a key-value snapshot. + * + * @param contentType Content-Type header. + * @param name The name of the key-value snapshot to update. + * @param accept The accept parameter. + * @param entity The parameters used to update the snapshot. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot is a named, immutable subset of an App Configuration store's key-values. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSnapshotWithResponse(UpdateSnapshotRequestContentType contentType, String name, + String accept, SnapshotUpdateParameters entity, String syncToken, String ifMatch, String ifNoneMatch, + RequestContext requestContext) { + // Operation 'updateSnapshot' can be invoked with multiple content-type. It is difficult to form a correct + // method signature for convenience API, and hence the convenience API is not generated. + return this.serviceClient.updateSnapshotWithResponse(contentType, name, accept, entity, syncToken, ifMatch, + ifNoneMatch, requestContext); + } + + /** + * Updates the state of a key-value snapshot. + * + * @param contentType Content-Type header. + * @param name The name of the key-value snapshot to update. + * @param accept The accept parameter. + * @param entity The parameters used to update the snapshot. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot is a named, immutable subset of an App Configuration store's key-values. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Snapshot updateSnapshot(UpdateSnapshotRequestContentType contentType, String name, String accept, + SnapshotUpdateParameters entity, String syncToken, String ifMatch, String ifNoneMatch) { + // Operation 'updateSnapshot' can be invoked with multiple content-type. It is difficult to form a correct + // method signature for convenience API, and hence the convenience API is not generated. + return this.serviceClient.updateSnapshot(contentType, name, accept, entity, syncToken, ifMatch, ifNoneMatch); + } + + /** + * Updates the state of a key-value snapshot. + * + * @param contentType Content-Type header. + * @param name The name of the key-value snapshot to update. + * @param accept The accept parameter. + * @param entity The parameters used to update the snapshot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a snapshot is a named, immutable subset of an App Configuration store's key-values. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Snapshot updateSnapshot(UpdateSnapshotRequestContentType contentType, String name, String accept, + SnapshotUpdateParameters entity) { + // Operation 'updateSnapshot' can be invoked with multiple content-type. It is difficult to form a correct + // method signature for convenience API, and hence the convenience API is not generated. + return this.serviceClient.updateSnapshot(contentType, name, accept, entity); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name The name of the key-value snapshot to check. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @param requestContext The context to configure the HTTP request before HTTP client sends it. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException 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. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkSnapshotWithResponse(String name, String syncToken, String ifMatch, String ifNoneMatch, + RequestContext requestContext) { + return this.serviceClient.checkSnapshotWithResponse(name, syncToken, ifMatch, ifNoneMatch, requestContext); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name The name of the key-value snapshot to check. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the + * value provided. + * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not + * match the value provided. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkSnapshot(String name, String syncToken, String ifMatch, String ifNoneMatch) { + this.serviceClient.checkSnapshot(name, syncToken, ifMatch, ifNoneMatch); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name The name of the key-value snapshot to check. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkSnapshot(String name) { + this.serviceClient.checkSnapshot(name); + } + + /** + * Gets a list of labels. + * + * @param accept The accept parameter. + * @param name A filter for the name of the returned labels. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param after Instructs the server to return elements that appear after the element referred + * to by the specified token. + * @param acceptDatetime Requests the server to respond with the state of the resource at the specified + * time. + * @param select Used to select what fields are present in the returned resource(s). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of labels. + */ + @Metadata(properties = { MetadataProperties.GENERATED }) + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable