diff --git a/sdk/appconfiguration/azure-data-appconfiguration/CHANGELOG.md b/sdk/appconfiguration/azure-data-appconfiguration/CHANGELOG.md index f31d8c548399..1072b193f16e 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/CHANGELOG.md +++ b/sdk/appconfiguration/azure-data-appconfiguration/CHANGELOG.md @@ -10,6 +10,8 @@ ### Other Changes +- Updated to support `2026-05-01-preview` + ## 1.10.0 (2026-06-15) ### Features Added diff --git a/sdk/appconfiguration/azure-data-appconfiguration/customization/src/main/java/AppConfigurationCustomizations.java b/sdk/appconfiguration/azure-data-appconfiguration/customization/src/main/java/AppConfigurationCustomizations.java index e7e334e7ab03..321b822c0ba3 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/customization/src/main/java/AppConfigurationCustomizations.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/customization/src/main/java/AppConfigurationCustomizations.java @@ -42,6 +42,12 @@ public class AppConfigurationCustomizations extends Customization { "AzureAppConfigurationBuilder.java" }; + private static final String[] FILES_WITH_GENERATED_CLIENT_REFERENCES = new String[] { + "FeatureFlagClient.java", + "FeatureFlagAsyncClient.java", + "implementation/FeatureFlagClientsImpl.java" + }; + // Matches: " private Mono> fooSinglePageAsync(" // " private PagedResponse fooSinglePage(" // " private Mono> fooNextSinglePageAsync(" @@ -67,6 +73,7 @@ public void customize(LibraryCustomization customization, Logger logger) { } } renameGeneratedImpl(editor, logger); + patchGeneratedClientReferences(editor, logger); promoteSinglePageMethodsToPublic(editor, logger); patchModuleInfo(editor, logger); addKeyValueSetKey(editor, logger); @@ -94,6 +101,26 @@ private static void renameGeneratedImpl(Editor editor, Logger logger) { GENERATED_IMPL_PATH, IMPL_CLIENT_PATH); } + private static void patchGeneratedClientReferences(Editor editor, Logger logger) { + for (String fileName : FILES_WITH_GENERATED_CLIENT_REFERENCES) { + String path = ROOT_FILE_PATH + fileName; + String content = editor.getContents().get(path); + if (content == null) { + logger.info("{} not present; skipping generated client reference patch.", path); + continue; + } + + String updated = content + .replace("AzureAppConfigurationServiceVersion", "ConfigurationServiceVersion") + .replace("AzureAppConfigurationImpl", "ConfigurationClientImpl") + .replace("AzureAppConfigurationBuilder", "ConfigurationClientBuilder"); + if (!updated.equals(content)) { + editor.replaceFile(path, updated); + logger.info("Updated generated client references in {}.", path); + } + } + } + // The TypeSpec @key decorator drops the setter for KeyValue.key. We still need to populate it on // the request body for set/put operations, so add the setter back via customization. private static void addKeyValueSetKey(Editor editor, Logger logger) { diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/FeatureFlagAsyncClient.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/FeatureFlagAsyncClient.java new file mode 100644 index 000000000000..c20fcea9df3d --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/FeatureFlagAsyncClient.java @@ -0,0 +1,1522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.MatchConditions; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.FluxUtil; +import com.azure.data.appconfiguration.implementation.FeatureFlagClientsImpl; +import com.azure.data.appconfiguration.implementation.models.FeatureFlag; +import com.azure.data.appconfiguration.implementation.models.FeatureFlagFields; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous AzureAppConfiguration type. + */ +@ServiceClient(builder = ConfigurationClientBuilder.class, isAsync = true) +public final class FeatureFlagAsyncClient { + @Generated + private final FeatureFlagClientsImpl serviceClient; + + /** + * Initializes an instance of FeatureFlagAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + FeatureFlagAsyncClient(FeatureFlagClientsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Gets a list of feature flags. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match feature flag names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flags as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getFeatureFlags(RequestOptions requestOptions) { + return this.serviceClient.getFeatureFlagsAsync(requestOptions); + } + + /** + * Requests the headers and status of the given resource. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match feature flag names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkFeatureFlagsWithResponse(RequestOptions requestOptions) { + return this.serviceClient.checkFeatureFlagsWithResponseAsync(requestOptions); + } + + /** + * Gets a single feature flag. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to retrieve.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
Content-TypeStringContent-Type header
+ * + * @param name The name of the feature flag. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a single feature flag along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getFeatureFlagWithResponse(String name, RequestOptions requestOptions) { + return this.serviceClient.getFeatureFlagWithResponseAsync(name, requestOptions); + } + + /** + * Requests the headers and status of the given resource. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to retrieve.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
+ * + * @param name The name of the feature flag to retrieve. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkFeatureFlagWithResponse(String name, RequestOptions requestOptions) { + return this.serviceClient.checkFeatureFlagWithResponseAsync(name, requestOptions); + } + + /** + * Creates a feature flag. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to create.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json;profile=\"https://azconfig.io/mime-profiles/ff\";charset=utf-8".
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
Content-TypeStringContent-Type header
+ * + * @param name The name of the feature flag to create. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a feature flag along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> putFeatureFlagWithResponse(String name, RequestOptions requestOptions) { + return this.serviceClient.putFeatureFlagWithResponseAsync(name, requestOptions); + } + + /** + * Deletes a feature flag. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to delete.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
Content-TypeStringContent-Type header
+ * + * @param name The name of the feature flag to delete. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a feature flag along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteFeatureFlagWithResponse(String name, RequestOptions requestOptions) { + return this.serviceClient.deleteFeatureFlagWithResponseAsync(name, requestOptions); + } + + /** + * Gets a list of feature flag revisions. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flag revisions as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getFeatureFlagRevisions(RequestOptions requestOptions) { + return this.serviceClient.getFeatureFlagRevisionsAsync(requestOptions); + } + + /** + * Requests the headers and status of the given resource. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkFeatureFlagRevisionsWithResponse(RequestOptions requestOptions) { + return this.serviceClient.checkFeatureFlagRevisionsWithResponseAsync(requestOptions); + } + + /** + * Gets a list of feature flags. + * + * @param name A filter used to match feature flag names. + * @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 tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param matchConditions Specifies HTTP options for conditional requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of feature flags as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getFeatureFlags(String name, String label, String syncToken, String after, + String acceptDatetime, List select, List tags, MatchConditions matchConditions) { + // Generated convenience method for getFeatureFlags + RequestOptions requestOptions = new RequestOptions(); + String ifMatch = matchConditions == null ? null : matchConditions.getIfMatch(); + String ifNoneMatch = matchConditions == null ? null : matchConditions.getIfNoneMatch(); + if (name != null) { + requestOptions.addQueryParam("name", name, false); + } + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (after != null) { + requestOptions.addQueryParam("After", after, false); + } + if (acceptDatetime != null) { + requestOptions.setHeader(HttpHeaderName.ACCEPT_DATETIME, acceptDatetime); + } + if (select != null) { + requestOptions.addQueryParam("$Select", + select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (tags != null) { + for (String paramItemValue : tags) { + if (paramItemValue != null) { + requestOptions.addQueryParam("tags", paramItemValue, false); + } + } + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + PagedFlux pagedFluxResponse = getFeatureFlags(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(FeatureFlag.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Gets a list of feature flags. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of feature flags as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getFeatureFlags() { + // Generated convenience method for getFeatureFlags + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = getFeatureFlags(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(FeatureFlag.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter used to match feature flag names. + * @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 tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param matchConditions Specifies HTTP options for conditional requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkFeatureFlags(String name, String label, String syncToken, String after, + String acceptDatetime, List select, List tags, MatchConditions matchConditions) { + // Generated convenience method for checkFeatureFlagsWithResponse + RequestOptions requestOptions = new RequestOptions(); + String ifMatch = matchConditions == null ? null : matchConditions.getIfMatch(); + String ifNoneMatch = matchConditions == null ? null : matchConditions.getIfNoneMatch(); + if (name != null) { + requestOptions.addQueryParam("name", name, false); + } + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (after != null) { + requestOptions.addQueryParam("After", after, false); + } + if (acceptDatetime != null) { + requestOptions.setHeader(HttpHeaderName.ACCEPT_DATETIME, acceptDatetime); + } + if (select != null) { + requestOptions.addQueryParam("$Select", + select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (tags != null) { + for (String paramItemValue : tags) { + if (paramItemValue != null) { + requestOptions.addQueryParam("tags", paramItemValue, false); + } + } + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return checkFeatureFlagsWithResponse(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Requests the headers and status of the given resource. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkFeatureFlags() { + // Generated convenience method for checkFeatureFlagsWithResponse + RequestOptions requestOptions = new RequestOptions(); + return checkFeatureFlagsWithResponse(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Gets a single feature flag. + * + * @param name The name of the feature flag. + * @param label The label of the feature flag 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 tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param matchConditions Specifies HTTP options for conditional requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single feature flag on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getFeatureFlag(String name, String label, List select, String syncToken, + String acceptDatetime, List tags, MatchConditions matchConditions) { + // Generated convenience method for getFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + String ifMatch = matchConditions == null ? null : matchConditions.getIfMatch(); + String ifNoneMatch = matchConditions == null ? null : matchConditions.getIfNoneMatch(); + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (select != null) { + requestOptions.addQueryParam("$Select", + select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (acceptDatetime != null) { + requestOptions.setHeader(HttpHeaderName.ACCEPT_DATETIME, acceptDatetime); + } + if (tags != null) { + for (String paramItemValue : tags) { + if (paramItemValue != null) { + requestOptions.addQueryParam("tags", paramItemValue, false); + } + } + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return getFeatureFlagWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(FeatureFlag.class)); + } + + /** + * Gets a single feature flag. + * + * @param name The name of the feature flag. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single feature flag on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getFeatureFlag(String name) { + // Generated convenience method for getFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getFeatureFlagWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(FeatureFlag.class)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name The name of the feature flag to retrieve. + * @param label The label of the feature flag 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 select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param matchConditions Specifies HTTP options for conditional requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkFeatureFlag(String name, String label, String syncToken, String acceptDatetime, + List select, List tags, MatchConditions matchConditions) { + // Generated convenience method for checkFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + String ifMatch = matchConditions == null ? null : matchConditions.getIfMatch(); + String ifNoneMatch = matchConditions == null ? null : matchConditions.getIfNoneMatch(); + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (acceptDatetime != null) { + requestOptions.setHeader(HttpHeaderName.ACCEPT_DATETIME, acceptDatetime); + } + if (select != null) { + requestOptions.addQueryParam("$Select", + select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (tags != null) { + for (String paramItemValue : tags) { + if (paramItemValue != null) { + requestOptions.addQueryParam("tags", paramItemValue, false); + } + } + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return checkFeatureFlagWithResponse(name, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name The name of the feature flag to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkFeatureFlag(String name) { + // Generated convenience method for checkFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + return checkFeatureFlagWithResponse(name, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Creates a feature flag. + * + * @param name The name of the feature flag to create. + * @param label The label of the feature flag to create. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param entity The feature flag to create. + * @param matchConditions Specifies HTTP options for conditional requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a feature flag on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono putFeatureFlag(String name, String label, String syncToken, FeatureFlag entity, + MatchConditions matchConditions) { + // Generated convenience method for putFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + String ifMatch = matchConditions == null ? null : matchConditions.getIfMatch(); + String ifNoneMatch = matchConditions == null ? null : matchConditions.getIfNoneMatch(); + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (entity != null) { + requestOptions.setBody(BinaryData.fromObject(entity)); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return putFeatureFlagWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(FeatureFlag.class)); + } + + /** + * Creates a feature flag. + * + * @param name The name of the feature flag to create. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a feature flag on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono putFeatureFlag(String name) { + // Generated convenience method for putFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + return putFeatureFlagWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(FeatureFlag.class)); + } + + /** + * Deletes a feature flag. + * + * @param name The name of the feature flag to delete. + * @param label The label of the feature flag 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 HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a feature flag on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteFeatureFlag(String name, String label, String syncToken, String ifMatch) { + // Generated convenience method for deleteFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return deleteFeatureFlagWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(FeatureFlag.class)); + } + + /** + * Deletes a feature flag. + * + * @param name The name of the feature flag to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a feature flag on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteFeatureFlag(String name) { + // Generated convenience method for deleteFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + return deleteFeatureFlagWithResponse(name, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(FeatureFlag.class)); + } + + /** + * Gets a list of feature flag revisions. + * + * @param name A filter used to match names. + * @param label A filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. + * @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 tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param matchConditions Specifies HTTP options for conditional requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of feature flag revisions as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getFeatureFlagRevisions(String name, String label, String after, + List select, List tags, String syncToken, MatchConditions matchConditions) { + // Generated convenience method for getFeatureFlagRevisions + RequestOptions requestOptions = new RequestOptions(); + String ifMatch = matchConditions == null ? null : matchConditions.getIfMatch(); + String ifNoneMatch = matchConditions == null ? null : matchConditions.getIfNoneMatch(); + if (name != null) { + requestOptions.addQueryParam("name", name, false); + } + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (after != null) { + requestOptions.addQueryParam("After", after, false); + } + if (select != null) { + requestOptions.addQueryParam("$Select", + select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (tags != null) { + for (String paramItemValue : tags) { + if (paramItemValue != null) { + requestOptions.addQueryParam("tags", paramItemValue, false); + } + } + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + PagedFlux pagedFluxResponse = getFeatureFlagRevisions(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(FeatureFlag.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Gets a list of feature flag revisions. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of feature flag revisions as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getFeatureFlagRevisions() { + // Generated convenience method for getFeatureFlagRevisions + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = getFeatureFlagRevisions(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(FeatureFlag.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter used to match names. + * @param label A filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. + * @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 tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkFeatureFlagRevisions(String name, String label, String after, List select, + List tags) { + // Generated convenience method for checkFeatureFlagRevisionsWithResponse + RequestOptions requestOptions = new RequestOptions(); + if (name != null) { + requestOptions.addQueryParam("name", name, false); + } + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (after != null) { + requestOptions.addQueryParam("After", after, false); + } + if (select != null) { + requestOptions.addQueryParam("$Select", + select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (tags != null) { + for (String paramItemValue : tags) { + if (paramItemValue != null) { + requestOptions.addQueryParam("tags", paramItemValue, false); + } + } + } + return checkFeatureFlagRevisionsWithResponse(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Requests the headers and status of the given resource. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono checkFeatureFlagRevisions() { + // Generated convenience method for checkFeatureFlagRevisionsWithResponse + RequestOptions requestOptions = new RequestOptions(); + return checkFeatureFlagRevisionsWithResponse(requestOptions).flatMap(FluxUtil::toMono); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/FeatureFlagClient.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/FeatureFlagClient.java new file mode 100644 index 000000000000..4b3cac553d3a --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/FeatureFlagClient.java @@ -0,0 +1,1461 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.MatchConditions; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.data.appconfiguration.implementation.FeatureFlagClientsImpl; +import com.azure.data.appconfiguration.implementation.models.FeatureFlag; +import com.azure.data.appconfiguration.implementation.models.FeatureFlagFields; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Initializes a new instance of the synchronous AzureAppConfiguration type. + */ +@ServiceClient(builder = ConfigurationClientBuilder.class) +public final class FeatureFlagClient { + @Generated + private final FeatureFlagClientsImpl serviceClient; + + /** + * Initializes an instance of FeatureFlagClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + FeatureFlagClient(FeatureFlagClientsImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Gets a list of feature flags. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match feature flag names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flags as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getFeatureFlags(RequestOptions requestOptions) { + return this.serviceClient.getFeatureFlags(requestOptions); + } + + /** + * Requests the headers and status of the given resource. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match feature flag names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkFeatureFlagsWithResponse(RequestOptions requestOptions) { + return this.serviceClient.checkFeatureFlagsWithResponse(requestOptions); + } + + /** + * Gets a single feature flag. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to retrieve.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
Content-TypeStringContent-Type header
+ * + * @param name The name of the feature flag. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a single feature flag along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFeatureFlagWithResponse(String name, RequestOptions requestOptions) { + return this.serviceClient.getFeatureFlagWithResponse(name, requestOptions); + } + + /** + * Requests the headers and status of the given resource. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to retrieve.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
+ * + * @param name The name of the feature flag to retrieve. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkFeatureFlagWithResponse(String name, RequestOptions requestOptions) { + return this.serviceClient.checkFeatureFlagWithResponse(name, requestOptions); + } + + /** + * Creates a feature flag. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to create.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json;profile=\"https://azconfig.io/mime-profiles/ff\";charset=utf-8".
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
Content-TypeStringContent-Type header
+ * + * @param name The name of the feature flag to create. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a feature flag along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response putFeatureFlagWithResponse(String name, RequestOptions requestOptions) { + return this.serviceClient.putFeatureFlagWithResponse(name, requestOptions); + } + + /** + * Deletes a feature flag. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to delete.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
Content-TypeStringContent-Type header
+ * + * @param name The name of the feature flag to delete. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a feature flag along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteFeatureFlagWithResponse(String name, RequestOptions requestOptions) { + return this.serviceClient.deleteFeatureFlagWithResponse(name, requestOptions); + } + + /** + * Gets a list of feature flag revisions. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flag revisions as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getFeatureFlagRevisions(RequestOptions requestOptions) { + return this.serviceClient.getFeatureFlagRevisions(requestOptions); + } + + /** + * Requests the headers and status of the given resource. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkFeatureFlagRevisionsWithResponse(RequestOptions requestOptions) { + return this.serviceClient.checkFeatureFlagRevisionsWithResponse(requestOptions); + } + + /** + * Gets a list of feature flags. + * + * @param name A filter used to match feature flag names. + * @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 tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param matchConditions Specifies HTTP options for conditional requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of feature flags as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getFeatureFlags(String name, String label, String syncToken, String after, + String acceptDatetime, List select, List tags, MatchConditions matchConditions) { + // Generated convenience method for getFeatureFlags + RequestOptions requestOptions = new RequestOptions(); + String ifMatch = matchConditions == null ? null : matchConditions.getIfMatch(); + String ifNoneMatch = matchConditions == null ? null : matchConditions.getIfNoneMatch(); + if (name != null) { + requestOptions.addQueryParam("name", name, false); + } + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (after != null) { + requestOptions.addQueryParam("After", after, false); + } + if (acceptDatetime != null) { + requestOptions.setHeader(HttpHeaderName.ACCEPT_DATETIME, acceptDatetime); + } + if (select != null) { + requestOptions.addQueryParam("$Select", + select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (tags != null) { + for (String paramItemValue : tags) { + if (paramItemValue != null) { + requestOptions.addQueryParam("tags", paramItemValue, false); + } + } + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return serviceClient.getFeatureFlags(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(FeatureFlag.class)); + } + + /** + * Gets a list of feature flags. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of feature flags as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getFeatureFlags() { + // Generated convenience method for getFeatureFlags + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.getFeatureFlags(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(FeatureFlag.class)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter used to match feature flag names. + * @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 tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param matchConditions Specifies HTTP options for conditional requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkFeatureFlags(String name, String label, String syncToken, String after, String acceptDatetime, + List select, List tags, MatchConditions matchConditions) { + // Generated convenience method for checkFeatureFlagsWithResponse + RequestOptions requestOptions = new RequestOptions(); + String ifMatch = matchConditions == null ? null : matchConditions.getIfMatch(); + String ifNoneMatch = matchConditions == null ? null : matchConditions.getIfNoneMatch(); + if (name != null) { + requestOptions.addQueryParam("name", name, false); + } + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (after != null) { + requestOptions.addQueryParam("After", after, false); + } + if (acceptDatetime != null) { + requestOptions.setHeader(HttpHeaderName.ACCEPT_DATETIME, acceptDatetime); + } + if (select != null) { + requestOptions.addQueryParam("$Select", + select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (tags != null) { + for (String paramItemValue : tags) { + if (paramItemValue != null) { + requestOptions.addQueryParam("tags", paramItemValue, false); + } + } + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + checkFeatureFlagsWithResponse(requestOptions).getValue(); + } + + /** + * Requests the headers and status of the given resource. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkFeatureFlags() { + // Generated convenience method for checkFeatureFlagsWithResponse + RequestOptions requestOptions = new RequestOptions(); + checkFeatureFlagsWithResponse(requestOptions).getValue(); + } + + /** + * Gets a single feature flag. + * + * @param name The name of the feature flag. + * @param label The label of the feature flag 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 tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param matchConditions Specifies HTTP options for conditional requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single feature flag. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public FeatureFlag getFeatureFlag(String name, String label, List select, String syncToken, + String acceptDatetime, List tags, MatchConditions matchConditions) { + // Generated convenience method for getFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + String ifMatch = matchConditions == null ? null : matchConditions.getIfMatch(); + String ifNoneMatch = matchConditions == null ? null : matchConditions.getIfNoneMatch(); + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (select != null) { + requestOptions.addQueryParam("$Select", + select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (acceptDatetime != null) { + requestOptions.setHeader(HttpHeaderName.ACCEPT_DATETIME, acceptDatetime); + } + if (tags != null) { + for (String paramItemValue : tags) { + if (paramItemValue != null) { + requestOptions.addQueryParam("tags", paramItemValue, false); + } + } + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return getFeatureFlagWithResponse(name, requestOptions).getValue().toObject(FeatureFlag.class); + } + + /** + * Gets a single feature flag. + * + * @param name The name of the feature flag. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a single feature flag. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public FeatureFlag getFeatureFlag(String name) { + // Generated convenience method for getFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getFeatureFlagWithResponse(name, requestOptions).getValue().toObject(FeatureFlag.class); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name The name of the feature flag to retrieve. + * @param label The label of the feature flag 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 select Used to select what fields are present in the returned resource(s). + * @param tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. + * @param matchConditions Specifies HTTP options for conditional requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkFeatureFlag(String name, String label, String syncToken, String acceptDatetime, + List select, List tags, MatchConditions matchConditions) { + // Generated convenience method for checkFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + String ifMatch = matchConditions == null ? null : matchConditions.getIfMatch(); + String ifNoneMatch = matchConditions == null ? null : matchConditions.getIfNoneMatch(); + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (acceptDatetime != null) { + requestOptions.setHeader(HttpHeaderName.ACCEPT_DATETIME, acceptDatetime); + } + if (select != null) { + requestOptions.addQueryParam("$Select", + select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (tags != null) { + for (String paramItemValue : tags) { + if (paramItemValue != null) { + requestOptions.addQueryParam("tags", paramItemValue, false); + } + } + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + checkFeatureFlagWithResponse(name, requestOptions).getValue(); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name The name of the feature flag to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkFeatureFlag(String name) { + // Generated convenience method for checkFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + checkFeatureFlagWithResponse(name, requestOptions).getValue(); + } + + /** + * Creates a feature flag. + * + * @param name The name of the feature flag to create. + * @param label The label of the feature flag to create. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param entity The feature flag to create. + * @param matchConditions Specifies HTTP options for conditional requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a feature flag. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public FeatureFlag putFeatureFlag(String name, String label, String syncToken, FeatureFlag entity, + MatchConditions matchConditions) { + // Generated convenience method for putFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + String ifMatch = matchConditions == null ? null : matchConditions.getIfMatch(); + String ifNoneMatch = matchConditions == null ? null : matchConditions.getIfNoneMatch(); + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (entity != null) { + requestOptions.setBody(BinaryData.fromObject(entity)); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return putFeatureFlagWithResponse(name, requestOptions).getValue().toObject(FeatureFlag.class); + } + + /** + * Creates a feature flag. + * + * @param name The name of the feature flag to create. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a feature flag. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public FeatureFlag putFeatureFlag(String name) { + // Generated convenience method for putFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + return putFeatureFlagWithResponse(name, requestOptions).getValue().toObject(FeatureFlag.class); + } + + /** + * Deletes a feature flag. + * + * @param name The name of the feature flag to delete. + * @param label The label of the feature flag 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 HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a feature flag. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public FeatureFlag deleteFeatureFlag(String name, String label, String syncToken, String ifMatch) { + // Generated convenience method for deleteFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + return deleteFeatureFlagWithResponse(name, requestOptions).getValue().toObject(FeatureFlag.class); + } + + /** + * Deletes a feature flag. + * + * @param name The name of the feature flag to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a feature flag. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public FeatureFlag deleteFeatureFlag(String name) { + // Generated convenience method for deleteFeatureFlagWithResponse + RequestOptions requestOptions = new RequestOptions(); + return deleteFeatureFlagWithResponse(name, requestOptions).getValue().toObject(FeatureFlag.class); + } + + /** + * Gets a list of feature flag revisions. + * + * @param name A filter used to match names. + * @param label A filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. + * @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 tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. + * @param syncToken Used to guarantee real-time consistency between requests. + * @param matchConditions Specifies HTTP options for conditional requests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of feature flag revisions as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getFeatureFlagRevisions(String name, String label, String after, + List select, List tags, String syncToken, MatchConditions matchConditions) { + // Generated convenience method for getFeatureFlagRevisions + RequestOptions requestOptions = new RequestOptions(); + String ifMatch = matchConditions == null ? null : matchConditions.getIfMatch(); + String ifNoneMatch = matchConditions == null ? null : matchConditions.getIfNoneMatch(); + if (name != null) { + requestOptions.addQueryParam("name", name, false); + } + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (after != null) { + requestOptions.addQueryParam("After", after, false); + } + if (select != null) { + requestOptions.addQueryParam("$Select", + select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (tags != null) { + for (String paramItemValue : tags) { + if (paramItemValue != null) { + requestOptions.addQueryParam("tags", paramItemValue, false); + } + } + } + if (syncToken != null) { + requestOptions.setHeader(HttpHeaderName.fromString("Sync-Token"), syncToken); + } + if (ifMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_MATCH, ifMatch); + } + if (ifNoneMatch != null) { + requestOptions.setHeader(HttpHeaderName.IF_NONE_MATCH, ifNoneMatch); + } + return serviceClient.getFeatureFlagRevisions(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(FeatureFlag.class)); + } + + /** + * Gets a list of feature flag revisions. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of feature flag revisions as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getFeatureFlagRevisions() { + // Generated convenience method for getFeatureFlagRevisions + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.getFeatureFlagRevisions(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(FeatureFlag.class)); + } + + /** + * Requests the headers and status of the given resource. + * + * @param name A filter used to match names. + * @param label A filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. + * @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 tags A filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkFeatureFlagRevisions(String name, String label, String after, List select, + List tags) { + // Generated convenience method for checkFeatureFlagRevisionsWithResponse + RequestOptions requestOptions = new RequestOptions(); + if (name != null) { + requestOptions.addQueryParam("name", name, false); + } + if (label != null) { + requestOptions.addQueryParam("label", label, false); + } + if (after != null) { + requestOptions.addQueryParam("After", after, false); + } + if (select != null) { + requestOptions.addQueryParam("$Select", + select.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (tags != null) { + for (String paramItemValue : tags) { + if (paramItemValue != null) { + requestOptions.addQueryParam("tags", paramItemValue, false); + } + } + } + checkFeatureFlagRevisionsWithResponse(requestOptions).getValue(); + } + + /** + * Requests the headers and status of the given resource. + * + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void checkFeatureFlagRevisions() { + // Generated convenience method for checkFeatureFlagRevisionsWithResponse + RequestOptions requestOptions = new RequestOptions(); + checkFeatureFlagRevisionsWithResponse(requestOptions).getValue(); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/ConfigurationClientImpl.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/ConfigurationClientImpl.java index 2a61eb724294..d004405520a2 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/ConfigurationClientImpl.java +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/ConfigurationClientImpl.java @@ -118,6 +118,20 @@ public SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } + /** + * The FeatureFlagClientsImpl object to access its operations. + */ + private final FeatureFlagClientsImpl featureFlagClients; + + /** + * Gets the FeatureFlagClientsImpl object to access its operations. + * + * @return the FeatureFlagClientsImpl object. + */ + public FeatureFlagClientsImpl getFeatureFlagClients() { + return this.featureFlagClients; + } + /** * Initializes an instance of AzureAppConfiguration client. * @@ -155,6 +169,7 @@ public ConfigurationClientImpl(HttpPipeline httpPipeline, SerializerAdapter seri this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; this.serviceVersion = serviceVersion; + this.featureFlagClients = new FeatureFlagClientsImpl(this); this.service = RestProxy.create(ConfigurationClientService.class, this.httpPipeline, this.getSerializerAdapter()); } @@ -3220,6 +3235,8 @@ public Response checkSnapshotWithResponse(String name, RequestOptions requ * to by the specified token. * $SelectList<String>NoUsed to select what fields are present in the * returned resource(s). In the form of "," separated string. + * resourceTypeStringNoA filter used to indicate the resource type of the labels. + * Accepted values: 'kv' for key-value labels, 'ff' for feature flag labels. * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Header Parameters

@@ -3272,6 +3289,8 @@ public Mono> getLabelsSinglePageAsync(RequestOptions r * to by the specified token. * $SelectList<String>NoUsed to select what fields are present in the * returned resource(s). In the form of "," separated string. + * resourceTypeStringNoA filter used to indicate the resource type of the labels. + * Accepted values: 'kv' for key-value labels, 'ff' for feature flag labels. * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Header Parameters

@@ -3323,6 +3342,8 @@ public PagedFlux getLabelsAsync(RequestOptions requestOptions) { * to by the specified token. * $SelectList<String>NoUsed to select what fields are present in the * returned resource(s). In the form of "," separated string. + * resourceTypeStringNoA filter used to indicate the resource type of the labels. + * Accepted values: 'kv' for key-value labels, 'ff' for feature flag labels. * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Header Parameters

@@ -3374,6 +3395,8 @@ public PagedResponse getLabelsSinglePage(RequestOptions requestOptio * to by the specified token. * $SelectList<String>NoUsed to select what fields are present in the * returned resource(s). In the form of "," separated string. + * resourceTypeStringNoA filter used to indicate the resource type of the labels. + * Accepted values: 'kv' for key-value labels, 'ff' for feature flag labels. * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Header Parameters

@@ -3425,6 +3448,8 @@ public PagedIterable getLabels(RequestOptions requestOptions) { * to by the specified token. * $SelectList<String>NoUsed to select what fields are present in the * returned resource(s). In the form of "," separated string. + * resourceTypeStringNoA filter used to indicate the resource type of the labels. + * Accepted values: 'kv' for key-value labels, 'ff' for feature flag labels. * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Header Parameters

@@ -3470,6 +3495,8 @@ public Mono> checkLabelsWithResponseAsync(RequestOptions requestO * to by the specified token. * $SelectList<String>NoUsed to select what fields are present in the * returned resource(s). In the form of "," separated string. + * resourceTypeStringNoA filter used to indicate the resource type of the labels. + * Accepted values: 'kv' for key-value labels, 'ff' for feature flag labels. * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Header Parameters

diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/FeatureFlagClientsImpl.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/FeatureFlagClientsImpl.java new file mode 100644 index 000000000000..4d16f4d6a05e --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/FeatureFlagClientsImpl.java @@ -0,0 +1,2913 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation; + +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.Head; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +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.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.data.appconfiguration.ConfigurationServiceVersion; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in FeatureFlagClients. + */ +public final class FeatureFlagClientsImpl { + /** + * The proxy service used to perform REST calls. + */ + private final FeatureFlagClientsService service; + + /** + * The service client containing this operation class. + */ + private final ConfigurationClientImpl client; + + /** + * Initializes an instance of FeatureFlagClientsImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FeatureFlagClientsImpl(ConfigurationClientImpl client) { + this.service = RestProxy.create(FeatureFlagClientsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public ConfigurationServiceVersion getServiceVersion() { + return client.getServiceVersion(); + } + + /** + * The interface defining all the services for AzureAppConfigurationFeatureFlagClients to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "AzureAppConfigurationFeatureFlagClients") + public interface FeatureFlagClientsService { + @Get("/ff") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getFeatureFlags(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/ff") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getFeatureFlagsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Head("/ff") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> checkFeatureFlags(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, RequestOptions requestOptions, Context context); + + @Head("/ff") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response checkFeatureFlagsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, RequestOptions requestOptions, Context context); + + @Get("/ff/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getFeatureFlag(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("name") String name, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/ff/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getFeatureFlagSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("name") String name, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Head("/ff/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> checkFeatureFlag(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("name") String name, RequestOptions requestOptions, + Context context); + + @Head("/ff/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response checkFeatureFlagSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("name") String name, RequestOptions requestOptions, + Context context); + + @Put("/ff/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> putFeatureFlag(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("name") String name, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Put("/ff/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response putFeatureFlagSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("name") String name, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/ff/{name}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteFeatureFlag(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("name") String name, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Delete("/ff/{name}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteFeatureFlagSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("name") String name, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/ff-revisions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getFeatureFlagRevisions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/ff-revisions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getFeatureFlagRevisionsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Head("/ff-revisions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> checkFeatureFlagRevisions(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, RequestOptions requestOptions, Context context); + + @Head("/ff-revisions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response checkFeatureFlagRevisionsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getFeatureFlagsNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getFeatureFlagsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getFeatureFlagRevisionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getFeatureFlagRevisionsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Gets a list of feature flags. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match feature flag names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flags along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFeatureFlagsSinglePageAsync(RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ffset\\\";charset=utf-8, application/problem+json"; + return FluxUtil + .withContext(context -> service.getFeatureFlags(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "items"), getNextLink(res.getValue(), "@nextLink"), null)); + } + + /** + * Gets a list of feature flags. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match feature flag names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flags as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getFeatureFlagsAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> getFeatureFlagsSinglePageAsync(requestOptions), + nextLink -> getFeatureFlagsNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets a list of feature flags. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match feature flag names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flags along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getFeatureFlagsSinglePage(RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ffset\\\";charset=utf-8, application/problem+json"; + Response res = service.getFeatureFlagsSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "items"), getNextLink(res.getValue(), "@nextLink"), null); + } + + /** + * Gets a list of feature flags. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match feature flag names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flags as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getFeatureFlags(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> getFeatureFlagsSinglePage(requestOptions), + nextLink -> getFeatureFlagsNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Requests the headers and status of the given resource. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match feature flag names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkFeatureFlagsWithResponseAsync(RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.checkFeatureFlags(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), requestOptions, context)); + } + + /** + * Requests the headers and status of the given resource. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match feature flag names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkFeatureFlagsWithResponse(RequestOptions requestOptions) { + return service.checkFeatureFlagsSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + requestOptions, Context.NONE); + } + + /** + * Gets a single feature flag. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to retrieve.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
Content-TypeStringContent-Type header
+ * + * @param name The name of the feature flag. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a single feature flag along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getFeatureFlagWithResponseAsync(String name, RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ff\\\";charset=utf-8, application/problem+json"; + return FluxUtil.withContext(context -> service.getFeatureFlag(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), name, accept, requestOptions, context)); + } + + /** + * Gets a single feature flag. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to retrieve.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + * + *
Response Headers
NameTypeDescription
x-ms-request-idStringAn opaque, globally-unique, server-generated string identifier for + * the request.
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
Content-TypeStringContent-Type header
+ * + * @param name The name of the feature flag. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a single feature flag along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFeatureFlagWithResponse(String name, RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ff\\\";charset=utf-8, application/problem+json"; + return service.getFeatureFlagSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), name, + accept, requestOptions, Context.NONE); + } + + /** + * Requests the headers and status of the given resource. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to retrieve.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
+ * + * @param name The name of the feature flag to retrieve. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkFeatureFlagWithResponseAsync(String name, RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.checkFeatureFlag(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), name, requestOptions, context)); + } + + /** + * Requests the headers and status of the given resource. + *

Query Parameters

+ * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to retrieve.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/keyvaluefiltering. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
+ * + * @param name The name of the feature flag to retrieve. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkFeatureFlagWithResponse(String name, RequestOptions requestOptions) { + return service.checkFeatureFlagSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + name, requestOptions, Context.NONE); + } + + /** + * Creates a feature flag. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to create.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json;profile=\"https://azconfig.io/mime-profiles/ff\";charset=utf-8".
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
Content-TypeStringContent-Type header
+ * + * @param name The name of the feature flag to create. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a feature flag along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> putFeatureFlagWithResponseAsync(String name, RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ff\\\";charset=utf-8, application/problem+json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.CONTENT_TYPE, + "application/json;profile=\"https://azconfig.io/mime-profiles/ff\";charset=utf-8"); + } + }); + return FluxUtil.withContext(context -> service.putFeatureFlag(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), name, accept, requestOptionsLocal, context)); + } + + /** + * Creates a feature flag. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to create.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: + * "application/json;profile=\"https://azconfig.io/mime-profiles/ff\";charset=utf-8".
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
Content-TypeStringContent-Type header
+ * + * @param name The name of the feature flag to create. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a feature flag along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response putFeatureFlagWithResponse(String name, RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ff\\\";charset=utf-8, application/problem+json"; + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + requestOptionsLocal.addRequestCallback(requestLocal -> { + if (requestLocal.getBody() != null && requestLocal.getHeaders().get(HttpHeaderName.CONTENT_TYPE) == null) { + requestLocal.getHeaders() + .set(HttpHeaderName.CONTENT_TYPE, + "application/json;profile=\"https://azconfig.io/mime-profiles/ff\";charset=utf-8"); + } + }); + return service.putFeatureFlagSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), name, + accept, requestOptionsLocal, Context.NONE); + } + + /** + * Deletes a feature flag. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to delete.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
Content-TypeStringContent-Type header
+ * + * @param name The name of the feature flag to delete. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a feature flag along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteFeatureFlagWithResponseAsync(String name, RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ff\\\";charset=utf-8, application/problem+json"; + return FluxUtil.withContext(context -> service.deleteFeatureFlag(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), name, accept, requestOptions, context)); + } + + /** + * Deletes a feature flag. + *

Query Parameters

+ * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
labelStringNoThe label of the feature flag to delete.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Headers

+ * + * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
Content-TypeStringContent-Type header
+ * + * @param name The name of the feature flag to delete. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a feature flag along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteFeatureFlagWithResponse(String name, RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ff\\\";charset=utf-8, application/problem+json"; + return service.deleteFeatureFlagSync(this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), + name, accept, requestOptions, Context.NONE); + } + + /** + * Gets a list of feature flag revisions. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flag revisions along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFeatureFlagRevisionsSinglePageAsync(RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ffset\\\";charset=utf-8, application/problem+json"; + return FluxUtil + .withContext(context -> service.getFeatureFlagRevisions(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "items"), getNextLink(res.getValue(), "@nextLink"), null)); + } + + /** + * Gets a list of feature flag revisions. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flag revisions as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux getFeatureFlagRevisionsAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>(() -> getFeatureFlagRevisionsSinglePageAsync(requestOptions), + nextLink -> getFeatureFlagRevisionsNextSinglePageAsync(nextLink, requestOptionsForNextPage)); + } + + /** + * Gets a list of feature flag revisions. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flag revisions along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getFeatureFlagRevisionsSinglePage(RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ffset\\\";charset=utf-8, application/problem+json"; + Response res = service.getFeatureFlagRevisionsSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "items"), getNextLink(res.getValue(), "@nextLink"), null); + } + + /** + * Gets a list of feature flag revisions. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flag revisions as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getFeatureFlagRevisions(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>(() -> getFeatureFlagRevisionsSinglePage(requestOptions), + nextLink -> getFeatureFlagRevisionsNextSinglePage(nextLink, requestOptionsForNextPage)); + } + + /** + * Requests the headers and status of the given resource. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> checkFeatureFlagRevisionsWithResponseAsync(RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.checkFeatureFlagRevisions(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), requestOptions, context)); + } + + /** + * Requests the headers and status of the given resource. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
nameStringNoA filter used to match names.
labelStringNoA filter used to match labels. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions
AfterStringNoInstructs the server to return elements that appear after the + * element referred + * to by the specified token.
$SelectList<String>NoUsed to select what fields are present in the + * returned resource(s). In the form of "," separated string.
tagsList<String>NoA filter used to query by tags. Syntax reference: + * https://aka.ms/azconfig/docs/restapirevisions. Call {@link RequestOptions#addQueryParam} to add string to + * array.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Headers

+ * + * + * + * + * + *
Response Headers
NameTypeDescription
Sync-TokenStringUsed to guarantee real-time consistency between requests.
ETagStringA value representing the current state of the resource.
+ * + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkFeatureFlagRevisionsWithResponse(RequestOptions requestOptions) { + return service.checkFeatureFlagRevisionsSync(this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), requestOptions, Context.NONE); + } + + /** + * Gets a list of feature flags. + * + * Get the next page of items. + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flags along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFeatureFlagsNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ffset\\\";charset=utf-8, application/problem+json"; + return FluxUtil + .withContext(context -> service.getFeatureFlagsNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "items"), getNextLink(res.getValue(), "@nextLink"), null)); + } + + /** + * Gets a list of feature flags. + * + * Get the next page of items. + *

Header Parameters

+ * + * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
Accept-DatetimeStringNoRequests the server to respond with the state of the + * resource at the specified + * time.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flags along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getFeatureFlagsNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ffset\\\";charset=utf-8, application/problem+json"; + Response res = service.getFeatureFlagsNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "items"), getNextLink(res.getValue(), "@nextLink"), null); + } + + /** + * Gets a list of feature flag revisions. + * + * Get the next page of items. + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flag revisions along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFeatureFlagRevisionsNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ffset\\\";charset=utf-8, application/problem+json"; + return FluxUtil + .withContext(context -> service.getFeatureFlagRevisionsNext(nextLink, this.client.getEndpoint(), accept, + requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "items"), getNextLink(res.getValue(), "@nextLink"), null)); + } + + /** + * Gets a list of feature flag revisions. + * + * Get the next page of items. + *

Header Parameters

+ * + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Sync-TokenStringNoUsed to guarantee real-time consistency between + * requests.
If-MatchStringNoUsed to perform an operation only if the targeted resource's + * etag matches the + * value provided.
If-None-MatchStringNoUsed to perform an operation only if the targeted + * resource's etag does not + * match the value provided.
+ * You can add these to a request with {@link RequestOptions#addHeader} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     name: String (Required)
+     *     enabled: boolean (Required)
+     *     label: String (Optional)
+     *     description: String (Optional)
+     *     conditions (Optional): {
+     *         requirement_type: String(Any/All) (Optional)
+     *         filters (Optional): [
+     *              (Optional){
+     *                 name: String (Required)
+     *                 parameters (Optional): {
+     *                     String: String (Required)
+     *                 }
+     *             }
+     *         ]
+     *     }
+     *     variants (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             value: String (Optional)
+     *             content_type: String (Optional)
+     *             status_override: String(None/Enabled/Disabled) (Optional)
+     *         }
+     *     ]
+     *     allocation (Optional): {
+     *         default_when_disabled: String (Optional)
+     *         default_when_enabled: String (Optional)
+     *         percentile (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 from: double (Required)
+     *                 to: double (Required)
+     *             }
+     *         ]
+     *         user (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 users (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         group (Optional): [
+     *              (Optional){
+     *                 variant: String (Required)
+     *                 groups (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         ]
+     *         seed: String (Optional)
+     *     }
+     *     telemetry (Optional): {
+     *         enabled: boolean (Required)
+     *         metadata (Optional): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     tags (Optional): {
+     *         String: String (Required)
+     *     }
+     *     last_modified: OffsetDateTime (Optional)
+     *     etag: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return a list of feature flag revisions along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse getFeatureFlagRevisionsNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept + = "application/json;profile=\\\"https://azconfig.io/mime-profiles/ffset\\\";charset=utf-8, application/problem+json"; + Response res = service.getFeatureFlagRevisionsNextSync(nextLink, this.client.getEndpoint(), accept, + requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "items"), getNextLink(res.getValue(), "@nextLink"), null); + } + + private List getValues(BinaryData binaryData, String... path) { + try { + Object value = binaryData.toObject(Map.class); + for (String segment : path) { + value = ((Map) value).get(segment); + } + List values = (List) value; + return values.stream().map(BinaryData::fromObject).collect(Collectors.toList()); + } catch (RuntimeException e) { + return null; + } + } + + private String getNextLink(BinaryData binaryData, String... path) { + try { + Object value = binaryData.toObject(Map.class); + for (String segment : path) { + value = ((Map) value).get(segment); + } + return (String) value; + } catch (RuntimeException e) { + return null; + } + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlag.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlag.java new file mode 100644 index 000000000000..4aa782217165 --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlag.java @@ -0,0 +1,368 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** + * A feature flag. + */ +@Fluent +public final class FeatureFlag implements JsonSerializable { + /* + * The name of the feature flag. + */ + @Generated + private String name; + + /* + * The enabled state of the feature flag. + */ + @Generated + private final boolean enabled; + + /* + * The label the feature flag belongs to. + */ + @Generated + private String label; + + /* + * The description of the feature flag. + */ + @Generated + private String description; + + /* + * The conditions of the feature flag. + */ + @Generated + private FeatureFlagConditions conditions; + + /* + * The variants of the feature flag. + */ + @Generated + private List variants; + + /* + * The allocation of the feature flag. + */ + @Generated + private FeatureFlagAllocation allocation; + + /* + * The telemetry settings of the feature flag. + */ + @Generated + private FeatureFlagTelemetryConfiguration telemetry; + + /* + * The tags of the feature flag + */ + @Generated + private Map tags; + + /* + * A date representing the last time the feature flag was modified. + */ + @Generated + private OffsetDateTime lastModified; + + /* + * A value representing the current state of the resource. + */ + @Generated + private String etag; + + /** + * Creates an instance of FeatureFlag class. + * + * @param enabled the enabled value to set. + */ + @Generated + public FeatureFlag(boolean enabled) { + this.enabled = enabled; + } + + /** + * Get the name property: The name of the feature flag. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the enabled property: The enabled state of the feature flag. + * + * @return the enabled value. + */ + @Generated + public boolean isEnabled() { + return this.enabled; + } + + /** + * Get the label property: The label the feature flag belongs to. + * + * @return the label value. + */ + @Generated + public String getLabel() { + return this.label; + } + + /** + * Get the description property: The description of the feature flag. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Set the description property: The description of the feature flag. + * + * @param description the description value to set. + * @return the FeatureFlag object itself. + */ + @Generated + public FeatureFlag setDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the conditions property: The conditions of the feature flag. + * + * @return the conditions value. + */ + @Generated + public FeatureFlagConditions getConditions() { + return this.conditions; + } + + /** + * Set the conditions property: The conditions of the feature flag. + * + * @param conditions the conditions value to set. + * @return the FeatureFlag object itself. + */ + @Generated + public FeatureFlag setConditions(FeatureFlagConditions conditions) { + this.conditions = conditions; + return this; + } + + /** + * Get the variants property: The variants of the feature flag. + * + * @return the variants value. + */ + @Generated + public List getVariants() { + return this.variants; + } + + /** + * Set the variants property: The variants of the feature flag. + * + * @param variants the variants value to set. + * @return the FeatureFlag object itself. + */ + @Generated + public FeatureFlag setVariants(List variants) { + this.variants = variants; + return this; + } + + /** + * Get the allocation property: The allocation of the feature flag. + * + * @return the allocation value. + */ + @Generated + public FeatureFlagAllocation getAllocation() { + return this.allocation; + } + + /** + * Set the allocation property: The allocation of the feature flag. + * + * @param allocation the allocation value to set. + * @return the FeatureFlag object itself. + */ + @Generated + public FeatureFlag setAllocation(FeatureFlagAllocation allocation) { + this.allocation = allocation; + return this; + } + + /** + * Get the telemetry property: The telemetry settings of the feature flag. + * + * @return the telemetry value. + */ + @Generated + public FeatureFlagTelemetryConfiguration getTelemetry() { + return this.telemetry; + } + + /** + * Set the telemetry property: The telemetry settings of the feature flag. + * + * @param telemetry the telemetry value to set. + * @return the FeatureFlag object itself. + */ + @Generated + public FeatureFlag setTelemetry(FeatureFlagTelemetryConfiguration telemetry) { + this.telemetry = telemetry; + return this; + } + + /** + * Get the tags property: The tags of the feature flag. + * + * @return the tags value. + */ + @Generated + public Map getTags() { + return this.tags; + } + + /** + * Set the tags property: The tags of the feature flag. + * + * @param tags the tags value to set. + * @return the FeatureFlag object itself. + */ + @Generated + public FeatureFlag setTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the lastModified property: A date representing the last time the feature flag was modified. + * + * @return the lastModified value. + */ + @Generated + public OffsetDateTime getLastModified() { + return this.lastModified; + } + + /** + * Get the etag property: A value representing the current state of the resource. + * + * @return the etag value. + */ + @Generated + public String getEtag() { + return this.etag; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeJsonField("conditions", this.conditions); + jsonWriter.writeArrayField("variants", this.variants, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeJsonField("allocation", this.allocation); + jsonWriter.writeJsonField("telemetry", this.telemetry); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureFlag from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureFlag if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FeatureFlag. + */ + @Generated + public static FeatureFlag fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String name = null; + boolean enabled = false; + String label = null; + String description = null; + FeatureFlagConditions conditions = null; + List variants = null; + FeatureFlagAllocation allocation = null; + FeatureFlagTelemetryConfiguration telemetry = null; + Map tags = null; + OffsetDateTime lastModified = null; + String etag = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("enabled".equals(fieldName)) { + enabled = reader.getBoolean(); + } else if ("label".equals(fieldName)) { + label = reader.getString(); + } else if ("description".equals(fieldName)) { + description = reader.getString(); + } else if ("conditions".equals(fieldName)) { + conditions = FeatureFlagConditions.fromJson(reader); + } else if ("variants".equals(fieldName)) { + variants = reader.readArray(reader1 -> FeatureFlagVariantDefinition.fromJson(reader1)); + } else if ("allocation".equals(fieldName)) { + allocation = FeatureFlagAllocation.fromJson(reader); + } else if ("telemetry".equals(fieldName)) { + telemetry = FeatureFlagTelemetryConfiguration.fromJson(reader); + } else if ("tags".equals(fieldName)) { + tags = reader.readMap(reader1 -> reader1.getString()); + } else if ("last_modified".equals(fieldName)) { + lastModified = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("etag".equals(fieldName)) { + etag = reader.getString(); + } else { + reader.skipChildren(); + } + } + FeatureFlag deserializedFeatureFlag = new FeatureFlag(enabled); + deserializedFeatureFlag.name = name; + deserializedFeatureFlag.label = label; + deserializedFeatureFlag.description = description; + deserializedFeatureFlag.conditions = conditions; + deserializedFeatureFlag.variants = variants; + deserializedFeatureFlag.allocation = allocation; + deserializedFeatureFlag.telemetry = telemetry; + deserializedFeatureFlag.tags = tags; + deserializedFeatureFlag.lastModified = lastModified; + deserializedFeatureFlag.etag = etag; + + return deserializedFeatureFlag; + }); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagAllocation.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagAllocation.java new file mode 100644 index 000000000000..4546a7a48bef --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagAllocation.java @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Defines how to allocate variants based on context. + */ +@Fluent +public final class FeatureFlagAllocation implements JsonSerializable { + /* + * The default variant to use when disabled. + */ + @Generated + private String defaultWhenDisabled; + + /* + * The default variant to use when enabled but not allocated. + */ + @Generated + private String defaultWhenEnabled; + + /* + * Allocates percentiles to variants. + */ + @Generated + private List percentile; + + /* + * Allocates users to variants. + */ + @Generated + private List user; + + /* + * Allocates groups to variants. + */ + @Generated + private List group; + + /* + * The seed used for random allocation. + */ + @Generated + private String seed; + + /** + * Creates an instance of FeatureFlagAllocation class. + */ + @Generated + public FeatureFlagAllocation() { + } + + /** + * Get the defaultWhenDisabled property: The default variant to use when disabled. + * + * @return the defaultWhenDisabled value. + */ + @Generated + public String getDefaultWhenDisabled() { + return this.defaultWhenDisabled; + } + + /** + * Set the defaultWhenDisabled property: The default variant to use when disabled. + * + * @param defaultWhenDisabled the defaultWhenDisabled value to set. + * @return the FeatureFlagAllocation object itself. + */ + @Generated + public FeatureFlagAllocation setDefaultWhenDisabled(String defaultWhenDisabled) { + this.defaultWhenDisabled = defaultWhenDisabled; + return this; + } + + /** + * Get the defaultWhenEnabled property: The default variant to use when enabled but not allocated. + * + * @return the defaultWhenEnabled value. + */ + @Generated + public String getDefaultWhenEnabled() { + return this.defaultWhenEnabled; + } + + /** + * Set the defaultWhenEnabled property: The default variant to use when enabled but not allocated. + * + * @param defaultWhenEnabled the defaultWhenEnabled value to set. + * @return the FeatureFlagAllocation object itself. + */ + @Generated + public FeatureFlagAllocation setDefaultWhenEnabled(String defaultWhenEnabled) { + this.defaultWhenEnabled = defaultWhenEnabled; + return this; + } + + /** + * Get the percentile property: Allocates percentiles to variants. + * + * @return the percentile value. + */ + @Generated + public List getPercentile() { + return this.percentile; + } + + /** + * Set the percentile property: Allocates percentiles to variants. + * + * @param percentile the percentile value to set. + * @return the FeatureFlagAllocation object itself. + */ + @Generated + public FeatureFlagAllocation setPercentile(List percentile) { + this.percentile = percentile; + return this; + } + + /** + * Get the user property: Allocates users to variants. + * + * @return the user value. + */ + @Generated + public List getUser() { + return this.user; + } + + /** + * Set the user property: Allocates users to variants. + * + * @param user the user value to set. + * @return the FeatureFlagAllocation object itself. + */ + @Generated + public FeatureFlagAllocation setUser(List user) { + this.user = user; + return this; + } + + /** + * Get the group property: Allocates groups to variants. + * + * @return the group value. + */ + @Generated + public List getGroup() { + return this.group; + } + + /** + * Set the group property: Allocates groups to variants. + * + * @param group the group value to set. + * @return the FeatureFlagAllocation object itself. + */ + @Generated + public FeatureFlagAllocation setGroup(List group) { + this.group = group; + return this; + } + + /** + * Get the seed property: The seed used for random allocation. + * + * @return the seed value. + */ + @Generated + public String getSeed() { + return this.seed; + } + + /** + * Set the seed property: The seed used for random allocation. + * + * @param seed the seed value to set. + * @return the FeatureFlagAllocation object itself. + */ + @Generated + public FeatureFlagAllocation setSeed(String seed) { + this.seed = seed; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("default_when_disabled", this.defaultWhenDisabled); + jsonWriter.writeStringField("default_when_enabled", this.defaultWhenEnabled); + jsonWriter.writeArrayField("percentile", this.percentile, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("user", this.user, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeArrayField("group", this.group, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("seed", this.seed); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureFlagAllocation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureFlagAllocation if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the FeatureFlagAllocation. + */ + @Generated + public static FeatureFlagAllocation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FeatureFlagAllocation deserializedFeatureFlagAllocation = new FeatureFlagAllocation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("default_when_disabled".equals(fieldName)) { + deserializedFeatureFlagAllocation.defaultWhenDisabled = reader.getString(); + } else if ("default_when_enabled".equals(fieldName)) { + deserializedFeatureFlagAllocation.defaultWhenEnabled = reader.getString(); + } else if ("percentile".equals(fieldName)) { + List percentile + = reader.readArray(reader1 -> PercentileAllocation.fromJson(reader1)); + deserializedFeatureFlagAllocation.percentile = percentile; + } else if ("user".equals(fieldName)) { + List user = reader.readArray(reader1 -> UserAllocation.fromJson(reader1)); + deserializedFeatureFlagAllocation.user = user; + } else if ("group".equals(fieldName)) { + List group = reader.readArray(reader1 -> GroupAllocation.fromJson(reader1)); + deserializedFeatureFlagAllocation.group = group; + } else if ("seed".equals(fieldName)) { + deserializedFeatureFlagAllocation.seed = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedFeatureFlagAllocation; + }); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagConditions.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagConditions.java new file mode 100644 index 000000000000..bf0c84f3794d --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagConditions.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * The conditions that must be met for the feature flag to be enabled. + */ +@Fluent +public final class FeatureFlagConditions implements JsonSerializable { + /* + * The requirement type for the conditions. + */ + @Generated + private RequirementType requirementType; + + /* + * The filters that will conditionally enable or disable the flag. + */ + @Generated + private List filters; + + /** + * Creates an instance of FeatureFlagConditions class. + */ + @Generated + public FeatureFlagConditions() { + } + + /** + * Get the requirementType property: The requirement type for the conditions. + * + * @return the requirementType value. + */ + @Generated + public RequirementType getRequirementType() { + return this.requirementType; + } + + /** + * Set the requirementType property: The requirement type for the conditions. + * + * @param requirementType the requirementType value to set. + * @return the FeatureFlagConditions object itself. + */ + @Generated + public FeatureFlagConditions setRequirementType(RequirementType requirementType) { + this.requirementType = requirementType; + return this; + } + + /** + * Get the filters property: The filters that will conditionally enable or disable the flag. + * + * @return the filters value. + */ + @Generated + public List getFilters() { + return this.filters; + } + + /** + * Set the filters property: The filters that will conditionally enable or disable the flag. + * + * @param filters the filters value to set. + * @return the FeatureFlagConditions object itself. + */ + @Generated + public FeatureFlagConditions setFilters(List filters) { + this.filters = filters; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("requirement_type", + this.requirementType == null ? null : this.requirementType.toString()); + jsonWriter.writeArrayField("filters", this.filters, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureFlagConditions from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureFlagConditions if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the FeatureFlagConditions. + */ + @Generated + public static FeatureFlagConditions fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + FeatureFlagConditions deserializedFeatureFlagConditions = new FeatureFlagConditions(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("requirement_type".equals(fieldName)) { + deserializedFeatureFlagConditions.requirementType = RequirementType.fromString(reader.getString()); + } else if ("filters".equals(fieldName)) { + List filters = reader.readArray(reader1 -> FeatureFlagFilter.fromJson(reader1)); + deserializedFeatureFlagConditions.filters = filters; + } else { + reader.skipChildren(); + } + } + + return deserializedFeatureFlagConditions; + }); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagFields.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagFields.java new file mode 100644 index 000000000000..3a6e64da8533 --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagFields.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Feature Flag fields. + */ +public final class FeatureFlagFields extends ExpandableStringEnum { + /** + * Name field. + */ + @Generated + public static final FeatureFlagFields NAME = fromString("name"); + + /** + * Enabled field. + */ + @Generated + public static final FeatureFlagFields ENABLED = fromString("enabled"); + + /** + * Label field. + */ + @Generated + public static final FeatureFlagFields LABEL = fromString("label"); + + /** + * Description field. + */ + @Generated + public static final FeatureFlagFields DESCRIPTION = fromString("description"); + + /** + * Conditions field. + */ + @Generated + public static final FeatureFlagFields CONDITIONS = fromString("conditions"); + + /** + * Variants field. + */ + @Generated + public static final FeatureFlagFields VARIANTS = fromString("variants"); + + /** + * Allocation field. + */ + @Generated + public static final FeatureFlagFields ALLOCATION = fromString("allocation"); + + /** + * Telemetry field. + */ + @Generated + public static final FeatureFlagFields TELEMETRY = fromString("telemetry"); + + /** + * Tags field. + */ + @Generated + public static final FeatureFlagFields TAGS = fromString("tags"); + + /** + * Last modified field. + */ + @Generated + public static final FeatureFlagFields LAST_MODIFIED = fromString("last_modified"); + + /** + * Etag field. + */ + @Generated + public static final FeatureFlagFields ETAG = fromString("etag"); + + /** + * Creates a new instance of FeatureFlagFields value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public FeatureFlagFields() { + } + + /** + * Creates or finds a FeatureFlagFields from its string representation. + * + * @param name a name to look for. + * @return the corresponding FeatureFlagFields. + */ + @Generated + public static FeatureFlagFields fromString(String name) { + return fromString(name, FeatureFlagFields.class); + } + + /** + * Gets known FeatureFlagFields values. + * + * @return known FeatureFlagFields values. + */ + @Generated + public static Collection values() { + return values(FeatureFlagFields.class); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagFilter.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagFilter.java new file mode 100644 index 000000000000..c4790e3a5340 --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagFilter.java @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Feature Flag Filter object. + */ +@Fluent +public final class FeatureFlagFilter implements JsonSerializable { + /* + * The name of the filter. + */ + @Generated + private final String name; + + /* + * The parameters used by the filter + */ + @Generated + private Map parameters; + + /** + * Creates an instance of FeatureFlagFilter class. + * + * @param name the name value to set. + */ + @Generated + public FeatureFlagFilter(String name) { + this.name = name; + } + + /** + * Get the name property: The name of the filter. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the parameters property: The parameters used by the filter. + * + * @return the parameters value. + */ + @Generated + public Map getParameters() { + return this.parameters; + } + + /** + * Set the parameters property: The parameters used by the filter. + * + * @param parameters the parameters value to set. + * @return the FeatureFlagFilter object itself. + */ + @Generated + public FeatureFlagFilter setParameters(Map parameters) { + this.parameters = parameters; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeMapField("parameters", this.parameters, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureFlagFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureFlagFilter if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FeatureFlagFilter. + */ + @Generated + public static FeatureFlagFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String name = null; + Map parameters = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("parameters".equals(fieldName)) { + parameters = reader.readMap(reader1 -> reader1.getString()); + } else { + reader.skipChildren(); + } + } + FeatureFlagFilter deserializedFeatureFlagFilter = new FeatureFlagFilter(name); + deserializedFeatureFlagFilter.parameters = parameters; + + return deserializedFeatureFlagFilter; + }); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagTelemetryConfiguration.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagTelemetryConfiguration.java new file mode 100644 index 000000000000..b9f48fc6529d --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagTelemetryConfiguration.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Feature Flag Telemetry object. + */ +@Fluent +public final class FeatureFlagTelemetryConfiguration implements JsonSerializable { + /* + * The enabled state of the telemetry. + */ + @Generated + private final boolean enabled; + + /* + * The metadata to include on outbound telemetry + */ + @Generated + private Map metadata; + + /** + * Creates an instance of FeatureFlagTelemetryConfiguration class. + * + * @param enabled the enabled value to set. + */ + @Generated + public FeatureFlagTelemetryConfiguration(boolean enabled) { + this.enabled = enabled; + } + + /** + * Get the enabled property: The enabled state of the telemetry. + * + * @return the enabled value. + */ + @Generated + public boolean isEnabled() { + return this.enabled; + } + + /** + * Get the metadata property: The metadata to include on outbound telemetry. + * + * @return the metadata value. + */ + @Generated + public Map getMetadata() { + return this.metadata; + } + + /** + * Set the metadata property: The metadata to include on outbound telemetry. + * + * @param metadata the metadata value to set. + * @return the FeatureFlagTelemetryConfiguration object itself. + */ + @Generated + public FeatureFlagTelemetryConfiguration setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureFlagTelemetryConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureFlagTelemetryConfiguration if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FeatureFlagTelemetryConfiguration. + */ + @Generated + public static FeatureFlagTelemetryConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + boolean enabled = false; + Map metadata = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + enabled = reader.getBoolean(); + } else if ("metadata".equals(fieldName)) { + metadata = reader.readMap(reader1 -> reader1.getString()); + } else { + reader.skipChildren(); + } + } + FeatureFlagTelemetryConfiguration deserializedFeatureFlagTelemetryConfiguration + = new FeatureFlagTelemetryConfiguration(enabled); + deserializedFeatureFlagTelemetryConfiguration.metadata = metadata; + + return deserializedFeatureFlagTelemetryConfiguration; + }); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagVariantDefinition.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagVariantDefinition.java new file mode 100644 index 000000000000..130dab9d6d2f --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagVariantDefinition.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Feature Flag Variants object. + */ +@Fluent +public final class FeatureFlagVariantDefinition implements JsonSerializable { + /* + * The name of the variant. + */ + @Generated + private final String name; + + /* + * The value of the variant. + */ + @Generated + private String value; + + /* + * The content type of the value stored within the key-value. + */ + @Generated + private String contentType; + + /* + * Determines if the variant should override the status of the flag. + */ + @Generated + private StatusOverride statusOverride; + + /** + * Creates an instance of FeatureFlagVariantDefinition class. + * + * @param name the name value to set. + */ + @Generated + public FeatureFlagVariantDefinition(String name) { + this.name = name; + } + + /** + * Get the name property: The name of the variant. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the value property: The value of the variant. + * + * @return the value value. + */ + @Generated + public String getValue() { + return this.value; + } + + /** + * Set the value property: The value of the variant. + * + * @param value the value value to set. + * @return the FeatureFlagVariantDefinition object itself. + */ + @Generated + public FeatureFlagVariantDefinition setValue(String value) { + this.value = value; + return this; + } + + /** + * Get the contentType property: The content type of the value stored within the key-value. + * + * @return the contentType value. + */ + @Generated + public String getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The content type of the value stored within the key-value. + * + * @param contentType the contentType value to set. + * @return the FeatureFlagVariantDefinition object itself. + */ + @Generated + public FeatureFlagVariantDefinition setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the statusOverride property: Determines if the variant should override the status of the flag. + * + * @return the statusOverride value. + */ + @Generated + public StatusOverride getStatusOverride() { + return this.statusOverride; + } + + /** + * Set the statusOverride property: Determines if the variant should override the status of the flag. + * + * @param statusOverride the statusOverride value to set. + * @return the FeatureFlagVariantDefinition object itself. + */ + @Generated + public FeatureFlagVariantDefinition setStatusOverride(StatusOverride statusOverride) { + this.statusOverride = statusOverride; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("value", this.value); + jsonWriter.writeStringField("content_type", this.contentType); + jsonWriter.writeStringField("status_override", + this.statusOverride == null ? null : this.statusOverride.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of FeatureFlagVariantDefinition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of FeatureFlagVariantDefinition if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the FeatureFlagVariantDefinition. + */ + @Generated + public static FeatureFlagVariantDefinition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String name = null; + String value = null; + String contentType = null; + StatusOverride statusOverride = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("value".equals(fieldName)) { + value = reader.getString(); + } else if ("content_type".equals(fieldName)) { + contentType = reader.getString(); + } else if ("status_override".equals(fieldName)) { + statusOverride = StatusOverride.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + FeatureFlagVariantDefinition deserializedFeatureFlagVariantDefinition + = new FeatureFlagVariantDefinition(name); + deserializedFeatureFlagVariantDefinition.value = value; + deserializedFeatureFlagVariantDefinition.contentType = contentType; + deserializedFeatureFlagVariantDefinition.statusOverride = statusOverride; + + return deserializedFeatureFlagVariantDefinition; + }); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GroupAllocation.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GroupAllocation.java new file mode 100644 index 000000000000..bcfa5e4f01fc --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GroupAllocation.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Feature Flag GroupAllocation object. + */ +@Immutable +public final class GroupAllocation implements JsonSerializable { + /* + * The variant to allocate these percentiles to. + */ + @Generated + private final String variant; + + /* + * The groups to get this variant. + */ + @Generated + private final List groups; + + /** + * Creates an instance of GroupAllocation class. + * + * @param variant the variant value to set. + * @param groups the groups value to set. + */ + @Generated + public GroupAllocation(String variant, List groups) { + this.variant = variant; + this.groups = groups; + } + + /** + * Get the variant property: The variant to allocate these percentiles to. + * + * @return the variant value. + */ + @Generated + public String getVariant() { + return this.variant; + } + + /** + * Get the groups property: The groups to get this variant. + * + * @return the groups value. + */ + @Generated + public List getGroups() { + return this.groups; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("variant", this.variant); + jsonWriter.writeArrayField("groups", this.groups, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GroupAllocation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GroupAllocation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the GroupAllocation. + */ + @Generated + public static GroupAllocation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String variant = null; + List groups = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("variant".equals(fieldName)) { + variant = reader.getString(); + } else if ("groups".equals(fieldName)) { + groups = reader.readArray(reader1 -> reader1.getString()); + } else { + reader.skipChildren(); + } + } + return new GroupAllocation(variant, groups); + }); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/PercentileAllocation.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/PercentileAllocation.java new file mode 100644 index 000000000000..cd71cef1839d --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/PercentileAllocation.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Feature Flag PercentileAllocation object. + */ +@Immutable +public final class PercentileAllocation implements JsonSerializable { + /* + * The variant to allocate these percentiles to. + */ + @Generated + private final String variant; + + /* + * The lower bounds for this percentile allocation. + */ + @Generated + private final double from; + + /* + * The upper bounds for this percentile allocation. + */ + @Generated + private final double to; + + /** + * Creates an instance of PercentileAllocation class. + * + * @param variant the variant value to set. + * @param from the from value to set. + * @param to the to value to set. + */ + @Generated + public PercentileAllocation(String variant, double from, double to) { + this.variant = variant; + this.from = from; + this.to = to; + } + + /** + * Get the variant property: The variant to allocate these percentiles to. + * + * @return the variant value. + */ + @Generated + public String getVariant() { + return this.variant; + } + + /** + * Get the from property: The lower bounds for this percentile allocation. + * + * @return the from value. + */ + @Generated + public double getFrom() { + return this.from; + } + + /** + * Get the to property: The upper bounds for this percentile allocation. + * + * @return the to value. + */ + @Generated + public double getTo() { + return this.to; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("variant", this.variant); + jsonWriter.writeDoubleField("from", this.from); + jsonWriter.writeDoubleField("to", this.to); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PercentileAllocation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PercentileAllocation if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PercentileAllocation. + */ + @Generated + public static PercentileAllocation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String variant = null; + double from = 0.0; + double to = 0.0; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("variant".equals(fieldName)) { + variant = reader.getString(); + } else if ("from".equals(fieldName)) { + from = reader.getDouble(); + } else if ("to".equals(fieldName)) { + to = reader.getDouble(); + } else { + reader.skipChildren(); + } + } + return new PercentileAllocation(variant, from, to); + }); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/RequirementType.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/RequirementType.java new file mode 100644 index 000000000000..42b20302174c --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/RequirementType.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Controls how multiple feature-flag filters are combined. + */ +public final class RequirementType extends ExpandableStringEnum { + /** + * Enables the feature flag when any filter matches. + */ + @Generated + public static final RequirementType ANY = fromString("Any"); + + /** + * Enables the feature flag only when all filters match. + */ + @Generated + public static final RequirementType ALL = fromString("All"); + + /** + * Creates a new instance of RequirementType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public RequirementType() { + } + + /** + * Creates or finds a RequirementType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RequirementType. + */ + @Generated + public static RequirementType fromString(String name) { + return fromString(name, RequirementType.class); + } + + /** + * Gets known RequirementType values. + * + * @return known RequirementType values. + */ + @Generated + public static Collection values() { + return values(RequirementType.class); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/StatusOverride.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/StatusOverride.java new file mode 100644 index 000000000000..8ea6db0b315e --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/StatusOverride.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Status Override. + */ +public final class StatusOverride extends ExpandableStringEnum { + /** + * No status override. + */ + @Generated + public static final StatusOverride NONE = fromString("None"); + + /** + * Overrides the status to enabled. + */ + @Generated + public static final StatusOverride ENABLED = fromString("Enabled"); + + /** + * Overrides the status to disabled. + */ + @Generated + public static final StatusOverride DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of StatusOverride value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public StatusOverride() { + } + + /** + * Creates or finds a StatusOverride from its string representation. + * + * @param name a name to look for. + * @return the corresponding StatusOverride. + */ + @Generated + public static StatusOverride fromString(String name) { + return fromString(name, StatusOverride.class); + } + + /** + * Gets known StatusOverride values. + * + * @return known StatusOverride values. + */ + @Generated + public static Collection values() { + return values(StatusOverride.class); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/UserAllocation.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/UserAllocation.java new file mode 100644 index 000000000000..6479b5668fff --- /dev/null +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/UserAllocation.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.data.appconfiguration.implementation.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Feature Flag UserAllocation object. + */ +@Immutable +public final class UserAllocation implements JsonSerializable { + /* + * The variant to allocate these percentiles to. + */ + @Generated + private final String variant; + + /* + * The users to get this variant. + */ + @Generated + private final List users; + + /** + * Creates an instance of UserAllocation class. + * + * @param variant the variant value to set. + * @param users the users value to set. + */ + @Generated + public UserAllocation(String variant, List users) { + this.variant = variant; + this.users = users; + } + + /** + * Get the variant property: The variant to allocate these percentiles to. + * + * @return the variant value. + */ + @Generated + public String getVariant() { + return this.variant; + } + + /** + * Get the users property: The users to get this variant. + * + * @return the users value. + */ + @Generated + public List getUsers() { + return this.users; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("variant", this.variant); + jsonWriter.writeArrayField("users", this.users, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of UserAllocation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of UserAllocation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the UserAllocation. + */ + @Generated + public static UserAllocation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String variant = null; + List users = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("variant".equals(fieldName)) { + variant = reader.getString(); + } else if ("users".equals(fieldName)) { + users = reader.readArray(reader1 -> reader1.getString()); + } else { + reader.skipChildren(); + } + } + return new UserAllocation(variant, users); + }); + } +} diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/resources/META-INF/azure-data-appconfiguration_metadata.json b/sdk/appconfiguration/azure-data-appconfiguration/src/main/resources/META-INF/azure-data-appconfiguration_metadata.json index 138a5abb3c4b..3effe5570f35 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/resources/META-INF/azure-data-appconfiguration_metadata.json +++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/resources/META-INF/azure-data-appconfiguration_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersions":{"AzureAppConfiguration":"2026-04-01"},"crossLanguagePackageId":"AzureAppConfiguration","crossLanguageVersion":"a2a80f4f2e80","crossLanguageDefinitions":{"com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient":"AzureAppConfiguration","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkKeyValue":"AzureAppConfiguration.checkKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkKeyValueWithResponse":"AzureAppConfiguration.checkKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkKeyValues":"AzureAppConfiguration.checkKeyValues","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkKeyValuesWithResponse":"AzureAppConfiguration.checkKeyValues","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkKeys":"AzureAppConfiguration.checkKeys","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkKeysWithResponse":"AzureAppConfiguration.checkKeys","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkLabels":"AzureAppConfiguration.checkLabels","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkLabelsWithResponse":"AzureAppConfiguration.checkLabels","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkRevisions":"AzureAppConfiguration.checkRevisions","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkRevisionsWithResponse":"AzureAppConfiguration.checkRevisions","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkSnapshot":"AzureAppConfiguration.checkSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkSnapshotWithResponse":"AzureAppConfiguration.checkSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkSnapshots":"AzureAppConfiguration.checkSnapshots","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkSnapshotsWithResponse":"AzureAppConfiguration.checkSnapshots","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.deleteConfigurationSetting":"AzureAppConfiguration.deleteKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.deleteConfigurationSettingWithResponse":"AzureAppConfiguration.deleteKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.deleteLock":"AzureAppConfiguration.deleteLock","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.deleteLockWithResponse":"AzureAppConfiguration.deleteLock","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getKeyValue":"AzureAppConfiguration.getKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getKeyValueWithResponse":"AzureAppConfiguration.getKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getKeys":"AzureAppConfiguration.getKeys","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getLabels":"AzureAppConfiguration.getLabels","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getOperationDetails":"AzureAppConfiguration.getOperationDetails","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getOperationDetailsWithResponse":"AzureAppConfiguration.getOperationDetails","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getRevisions":"AzureAppConfiguration.getRevisions","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getSnapshot":"AzureAppConfiguration.getSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getSnapshotWithResponse":"AzureAppConfiguration.getSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getSnapshots":"AzureAppConfiguration.getSnapshots","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.listConfigurationSettings":"AzureAppConfiguration.getKeyValues","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.putLock":"AzureAppConfiguration.putLock","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.putLockWithResponse":"AzureAppConfiguration.putLock","com.azure.data.appconfiguration.AzureAppConfigurationBuilder":"AzureAppConfiguration","com.azure.data.appconfiguration.AzureAppConfigurationClient":"AzureAppConfiguration","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkKeyValue":"AzureAppConfiguration.checkKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkKeyValueWithResponse":"AzureAppConfiguration.checkKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkKeyValues":"AzureAppConfiguration.checkKeyValues","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkKeyValuesWithResponse":"AzureAppConfiguration.checkKeyValues","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkKeys":"AzureAppConfiguration.checkKeys","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkKeysWithResponse":"AzureAppConfiguration.checkKeys","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkLabels":"AzureAppConfiguration.checkLabels","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkLabelsWithResponse":"AzureAppConfiguration.checkLabels","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkRevisions":"AzureAppConfiguration.checkRevisions","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkRevisionsWithResponse":"AzureAppConfiguration.checkRevisions","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkSnapshot":"AzureAppConfiguration.checkSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkSnapshotWithResponse":"AzureAppConfiguration.checkSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkSnapshots":"AzureAppConfiguration.checkSnapshots","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkSnapshotsWithResponse":"AzureAppConfiguration.checkSnapshots","com.azure.data.appconfiguration.AzureAppConfigurationClient.deleteConfigurationSetting":"AzureAppConfiguration.deleteKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationClient.deleteConfigurationSettingWithResponse":"AzureAppConfiguration.deleteKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationClient.deleteLock":"AzureAppConfiguration.deleteLock","com.azure.data.appconfiguration.AzureAppConfigurationClient.deleteLockWithResponse":"AzureAppConfiguration.deleteLock","com.azure.data.appconfiguration.AzureAppConfigurationClient.getKeyValue":"AzureAppConfiguration.getKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationClient.getKeyValueWithResponse":"AzureAppConfiguration.getKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationClient.getKeys":"AzureAppConfiguration.getKeys","com.azure.data.appconfiguration.AzureAppConfigurationClient.getLabels":"AzureAppConfiguration.getLabels","com.azure.data.appconfiguration.AzureAppConfigurationClient.getOperationDetails":"AzureAppConfiguration.getOperationDetails","com.azure.data.appconfiguration.AzureAppConfigurationClient.getOperationDetailsWithResponse":"AzureAppConfiguration.getOperationDetails","com.azure.data.appconfiguration.AzureAppConfigurationClient.getRevisions":"AzureAppConfiguration.getRevisions","com.azure.data.appconfiguration.AzureAppConfigurationClient.getSnapshot":"AzureAppConfiguration.getSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationClient.getSnapshotWithResponse":"AzureAppConfiguration.getSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationClient.getSnapshots":"AzureAppConfiguration.getSnapshots","com.azure.data.appconfiguration.AzureAppConfigurationClient.listConfigurationSettings":"AzureAppConfiguration.getKeyValues","com.azure.data.appconfiguration.AzureAppConfigurationClient.putLock":"AzureAppConfiguration.putLock","com.azure.data.appconfiguration.AzureAppConfigurationClient.putLockWithResponse":"AzureAppConfiguration.putLock","com.azure.data.appconfiguration.implementation.models.CompositionType":"AzureAppConfiguration.CompositionType","com.azure.data.appconfiguration.implementation.models.Key":"AzureAppConfiguration.Key","com.azure.data.appconfiguration.implementation.models.KeyValue":"AzureAppConfiguration.KeyValue","com.azure.data.appconfiguration.implementation.models.KeyValueFields":"AzureAppConfiguration.KeyValueFields","com.azure.data.appconfiguration.implementation.models.KeyValueFilter":"AzureAppConfiguration.KeyValueFilter","com.azure.data.appconfiguration.implementation.models.Label":"AzureAppConfiguration.Label","com.azure.data.appconfiguration.implementation.models.LabelFields":"AzureAppConfiguration.LabelFields","com.azure.data.appconfiguration.implementation.models.OperationDetails":"AzureAppConfiguration.OperationDetails","com.azure.data.appconfiguration.implementation.models.OperationState":"Azure.Core.Foundations.OperationState","com.azure.data.appconfiguration.implementation.models.Snapshot":"AzureAppConfiguration.Snapshot","com.azure.data.appconfiguration.implementation.models.SnapshotFields":"AzureAppConfiguration.SnapshotFields","com.azure.data.appconfiguration.implementation.models.SnapshotStatus":"AzureAppConfiguration.SnapshotStatus"},"generatedFiles":["src/main/java/com/azure/data/appconfiguration/AzureAppConfigurationAsyncClient.java","src/main/java/com/azure/data/appconfiguration/AzureAppConfigurationBuilder.java","src/main/java/com/azure/data/appconfiguration/AzureAppConfigurationClient.java","src/main/java/com/azure/data/appconfiguration/AzureAppConfigurationServiceVersion.java","src/main/java/com/azure/data/appconfiguration/implementation/AzureAppConfigurationImpl.java","src/main/java/com/azure/data/appconfiguration/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/data/appconfiguration/implementation/PollingUtils.java","src/main/java/com/azure/data/appconfiguration/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/data/appconfiguration/implementation/models/CompositionType.java","src/main/java/com/azure/data/appconfiguration/implementation/models/Key.java","src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValue.java","src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValueFields.java","src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValueFilter.java","src/main/java/com/azure/data/appconfiguration/implementation/models/Label.java","src/main/java/com/azure/data/appconfiguration/implementation/models/LabelFields.java","src/main/java/com/azure/data/appconfiguration/implementation/models/OperationDetails.java","src/main/java/com/azure/data/appconfiguration/implementation/models/OperationState.java","src/main/java/com/azure/data/appconfiguration/implementation/models/Snapshot.java","src/main/java/com/azure/data/appconfiguration/implementation/models/SnapshotFields.java","src/main/java/com/azure/data/appconfiguration/implementation/models/SnapshotStatus.java","src/main/java/com/azure/data/appconfiguration/implementation/models/package-info.java","src/main/java/com/azure/data/appconfiguration/implementation/package-info.java","src/main/java/com/azure/data/appconfiguration/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersions":{"AzureAppConfiguration":"2026-05-01-preview"},"crossLanguagePackageId":"AzureAppConfiguration","crossLanguageVersion":"86cbb52f4587","crossLanguageDefinitions":{"com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient":"AzureAppConfiguration","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkKeyValue":"AzureAppConfiguration.checkKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkKeyValueWithResponse":"AzureAppConfiguration.checkKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkKeyValues":"AzureAppConfiguration.checkKeyValues","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkKeyValuesWithResponse":"AzureAppConfiguration.checkKeyValues","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkKeys":"AzureAppConfiguration.checkKeys","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkKeysWithResponse":"AzureAppConfiguration.checkKeys","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkLabels":"AzureAppConfiguration.checkLabels","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkLabelsWithResponse":"AzureAppConfiguration.checkLabels","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkRevisions":"AzureAppConfiguration.checkRevisions","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkRevisionsWithResponse":"AzureAppConfiguration.checkRevisions","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkSnapshot":"AzureAppConfiguration.checkSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkSnapshotWithResponse":"AzureAppConfiguration.checkSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkSnapshots":"AzureAppConfiguration.checkSnapshots","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.checkSnapshotsWithResponse":"AzureAppConfiguration.checkSnapshots","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.deleteConfigurationSetting":"AzureAppConfiguration.deleteKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.deleteConfigurationSettingWithResponse":"AzureAppConfiguration.deleteKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.deleteLock":"AzureAppConfiguration.deleteLock","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.deleteLockWithResponse":"AzureAppConfiguration.deleteLock","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getKeyValue":"AzureAppConfiguration.getKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getKeyValueWithResponse":"AzureAppConfiguration.getKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getKeys":"AzureAppConfiguration.getKeys","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getLabels":"AzureAppConfiguration.getLabels","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getOperationDetails":"AzureAppConfiguration.getOperationDetails","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getOperationDetailsWithResponse":"AzureAppConfiguration.getOperationDetails","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getRevisions":"AzureAppConfiguration.getRevisions","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getSnapshot":"AzureAppConfiguration.getSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getSnapshotWithResponse":"AzureAppConfiguration.getSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.getSnapshots":"AzureAppConfiguration.getSnapshots","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.listConfigurationSettings":"AzureAppConfiguration.getKeyValues","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.putLock":"AzureAppConfiguration.putLock","com.azure.data.appconfiguration.AzureAppConfigurationAsyncClient.putLockWithResponse":"AzureAppConfiguration.putLock","com.azure.data.appconfiguration.AzureAppConfigurationBuilder":"AzureAppConfiguration","com.azure.data.appconfiguration.AzureAppConfigurationClient":"AzureAppConfiguration","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkKeyValue":"AzureAppConfiguration.checkKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkKeyValueWithResponse":"AzureAppConfiguration.checkKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkKeyValues":"AzureAppConfiguration.checkKeyValues","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkKeyValuesWithResponse":"AzureAppConfiguration.checkKeyValues","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkKeys":"AzureAppConfiguration.checkKeys","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkKeysWithResponse":"AzureAppConfiguration.checkKeys","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkLabels":"AzureAppConfiguration.checkLabels","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkLabelsWithResponse":"AzureAppConfiguration.checkLabels","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkRevisions":"AzureAppConfiguration.checkRevisions","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkRevisionsWithResponse":"AzureAppConfiguration.checkRevisions","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkSnapshot":"AzureAppConfiguration.checkSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkSnapshotWithResponse":"AzureAppConfiguration.checkSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkSnapshots":"AzureAppConfiguration.checkSnapshots","com.azure.data.appconfiguration.AzureAppConfigurationClient.checkSnapshotsWithResponse":"AzureAppConfiguration.checkSnapshots","com.azure.data.appconfiguration.AzureAppConfigurationClient.deleteConfigurationSetting":"AzureAppConfiguration.deleteKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationClient.deleteConfigurationSettingWithResponse":"AzureAppConfiguration.deleteKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationClient.deleteLock":"AzureAppConfiguration.deleteLock","com.azure.data.appconfiguration.AzureAppConfigurationClient.deleteLockWithResponse":"AzureAppConfiguration.deleteLock","com.azure.data.appconfiguration.AzureAppConfigurationClient.getKeyValue":"AzureAppConfiguration.getKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationClient.getKeyValueWithResponse":"AzureAppConfiguration.getKeyValue","com.azure.data.appconfiguration.AzureAppConfigurationClient.getKeys":"AzureAppConfiguration.getKeys","com.azure.data.appconfiguration.AzureAppConfigurationClient.getLabels":"AzureAppConfiguration.getLabels","com.azure.data.appconfiguration.AzureAppConfigurationClient.getOperationDetails":"AzureAppConfiguration.getOperationDetails","com.azure.data.appconfiguration.AzureAppConfigurationClient.getOperationDetailsWithResponse":"AzureAppConfiguration.getOperationDetails","com.azure.data.appconfiguration.AzureAppConfigurationClient.getRevisions":"AzureAppConfiguration.getRevisions","com.azure.data.appconfiguration.AzureAppConfigurationClient.getSnapshot":"AzureAppConfiguration.getSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationClient.getSnapshotWithResponse":"AzureAppConfiguration.getSnapshot","com.azure.data.appconfiguration.AzureAppConfigurationClient.getSnapshots":"AzureAppConfiguration.getSnapshots","com.azure.data.appconfiguration.AzureAppConfigurationClient.listConfigurationSettings":"AzureAppConfiguration.getKeyValues","com.azure.data.appconfiguration.AzureAppConfigurationClient.putLock":"AzureAppConfiguration.putLock","com.azure.data.appconfiguration.AzureAppConfigurationClient.putLockWithResponse":"AzureAppConfiguration.putLock","com.azure.data.appconfiguration.FeatureFlagAsyncClient":"AzureAppConfiguration","com.azure.data.appconfiguration.FeatureFlagAsyncClient.checkFeatureFlag":"AzureAppConfiguration.checkFeatureFlag","com.azure.data.appconfiguration.FeatureFlagAsyncClient.checkFeatureFlagRevisions":"AzureAppConfiguration.checkFeatureFlagRevisions","com.azure.data.appconfiguration.FeatureFlagAsyncClient.checkFeatureFlagRevisionsWithResponse":"AzureAppConfiguration.checkFeatureFlagRevisions","com.azure.data.appconfiguration.FeatureFlagAsyncClient.checkFeatureFlagWithResponse":"AzureAppConfiguration.checkFeatureFlag","com.azure.data.appconfiguration.FeatureFlagAsyncClient.checkFeatureFlags":"AzureAppConfiguration.checkFeatureFlags","com.azure.data.appconfiguration.FeatureFlagAsyncClient.checkFeatureFlagsWithResponse":"AzureAppConfiguration.checkFeatureFlags","com.azure.data.appconfiguration.FeatureFlagAsyncClient.deleteFeatureFlag":"AzureAppConfiguration.deleteFeatureFlag","com.azure.data.appconfiguration.FeatureFlagAsyncClient.deleteFeatureFlagWithResponse":"AzureAppConfiguration.deleteFeatureFlag","com.azure.data.appconfiguration.FeatureFlagAsyncClient.getFeatureFlag":"AzureAppConfiguration.getFeatureFlag","com.azure.data.appconfiguration.FeatureFlagAsyncClient.getFeatureFlagRevisions":"AzureAppConfiguration.getFeatureFlagRevisions","com.azure.data.appconfiguration.FeatureFlagAsyncClient.getFeatureFlagWithResponse":"AzureAppConfiguration.getFeatureFlag","com.azure.data.appconfiguration.FeatureFlagAsyncClient.getFeatureFlags":"AzureAppConfiguration.getFeatureFlags","com.azure.data.appconfiguration.FeatureFlagAsyncClient.putFeatureFlag":"AzureAppConfiguration.putFeatureFlag","com.azure.data.appconfiguration.FeatureFlagAsyncClient.putFeatureFlagWithResponse":"AzureAppConfiguration.putFeatureFlag","com.azure.data.appconfiguration.FeatureFlagClient":"AzureAppConfiguration","com.azure.data.appconfiguration.FeatureFlagClient.checkFeatureFlag":"AzureAppConfiguration.checkFeatureFlag","com.azure.data.appconfiguration.FeatureFlagClient.checkFeatureFlagRevisions":"AzureAppConfiguration.checkFeatureFlagRevisions","com.azure.data.appconfiguration.FeatureFlagClient.checkFeatureFlagRevisionsWithResponse":"AzureAppConfiguration.checkFeatureFlagRevisions","com.azure.data.appconfiguration.FeatureFlagClient.checkFeatureFlagWithResponse":"AzureAppConfiguration.checkFeatureFlag","com.azure.data.appconfiguration.FeatureFlagClient.checkFeatureFlags":"AzureAppConfiguration.checkFeatureFlags","com.azure.data.appconfiguration.FeatureFlagClient.checkFeatureFlagsWithResponse":"AzureAppConfiguration.checkFeatureFlags","com.azure.data.appconfiguration.FeatureFlagClient.deleteFeatureFlag":"AzureAppConfiguration.deleteFeatureFlag","com.azure.data.appconfiguration.FeatureFlagClient.deleteFeatureFlagWithResponse":"AzureAppConfiguration.deleteFeatureFlag","com.azure.data.appconfiguration.FeatureFlagClient.getFeatureFlag":"AzureAppConfiguration.getFeatureFlag","com.azure.data.appconfiguration.FeatureFlagClient.getFeatureFlagRevisions":"AzureAppConfiguration.getFeatureFlagRevisions","com.azure.data.appconfiguration.FeatureFlagClient.getFeatureFlagWithResponse":"AzureAppConfiguration.getFeatureFlag","com.azure.data.appconfiguration.FeatureFlagClient.getFeatureFlags":"AzureAppConfiguration.getFeatureFlags","com.azure.data.appconfiguration.FeatureFlagClient.putFeatureFlag":"AzureAppConfiguration.putFeatureFlag","com.azure.data.appconfiguration.FeatureFlagClient.putFeatureFlagWithResponse":"AzureAppConfiguration.putFeatureFlag","com.azure.data.appconfiguration.implementation.models.CompositionType":"AzureAppConfiguration.CompositionType","com.azure.data.appconfiguration.implementation.models.FeatureFlag":"AzureAppConfiguration.FeatureFlag","com.azure.data.appconfiguration.implementation.models.FeatureFlagAllocation":"AzureAppConfiguration.FeatureFlagAllocation","com.azure.data.appconfiguration.implementation.models.FeatureFlagConditions":"AzureAppConfiguration.FeatureFlagConditions","com.azure.data.appconfiguration.implementation.models.FeatureFlagFields":"AzureAppConfiguration.FeatureFlagFields","com.azure.data.appconfiguration.implementation.models.FeatureFlagFilter":"AzureAppConfiguration.FeatureFlagFilter","com.azure.data.appconfiguration.implementation.models.FeatureFlagTelemetryConfiguration":"AzureAppConfiguration.FeatureFlagTelemetryConfiguration","com.azure.data.appconfiguration.implementation.models.FeatureFlagVariantDefinition":"AzureAppConfiguration.FeatureFlagVariantDefinition","com.azure.data.appconfiguration.implementation.models.GroupAllocation":"AzureAppConfiguration.GroupAllocation","com.azure.data.appconfiguration.implementation.models.Key":"AzureAppConfiguration.Key","com.azure.data.appconfiguration.implementation.models.KeyValue":"AzureAppConfiguration.KeyValue","com.azure.data.appconfiguration.implementation.models.KeyValueFields":"AzureAppConfiguration.KeyValueFields","com.azure.data.appconfiguration.implementation.models.KeyValueFilter":"AzureAppConfiguration.KeyValueFilter","com.azure.data.appconfiguration.implementation.models.Label":"AzureAppConfiguration.Label","com.azure.data.appconfiguration.implementation.models.LabelFields":"AzureAppConfiguration.LabelFields","com.azure.data.appconfiguration.implementation.models.OperationDetails":"AzureAppConfiguration.OperationDetails","com.azure.data.appconfiguration.implementation.models.OperationState":"Azure.Core.Foundations.OperationState","com.azure.data.appconfiguration.implementation.models.PercentileAllocation":"AzureAppConfiguration.PercentileAllocation","com.azure.data.appconfiguration.implementation.models.RequirementType":"AzureAppConfiguration.RequirementType","com.azure.data.appconfiguration.implementation.models.Snapshot":"AzureAppConfiguration.Snapshot","com.azure.data.appconfiguration.implementation.models.SnapshotFields":"AzureAppConfiguration.SnapshotFields","com.azure.data.appconfiguration.implementation.models.SnapshotStatus":"AzureAppConfiguration.SnapshotStatus","com.azure.data.appconfiguration.implementation.models.StatusOverride":"AzureAppConfiguration.StatusOverride","com.azure.data.appconfiguration.implementation.models.UserAllocation":"AzureAppConfiguration.UserAllocation"},"generatedFiles":["src/main/java/com/azure/data/appconfiguration/AzureAppConfigurationAsyncClient.java","src/main/java/com/azure/data/appconfiguration/AzureAppConfigurationBuilder.java","src/main/java/com/azure/data/appconfiguration/AzureAppConfigurationClient.java","src/main/java/com/azure/data/appconfiguration/AzureAppConfigurationServiceVersion.java","src/main/java/com/azure/data/appconfiguration/FeatureFlagAsyncClient.java","src/main/java/com/azure/data/appconfiguration/FeatureFlagClient.java","src/main/java/com/azure/data/appconfiguration/implementation/AzureAppConfigurationImpl.java","src/main/java/com/azure/data/appconfiguration/implementation/FeatureFlagClientsImpl.java","src/main/java/com/azure/data/appconfiguration/implementation/OperationLocationPollingStrategy.java","src/main/java/com/azure/data/appconfiguration/implementation/PollingUtils.java","src/main/java/com/azure/data/appconfiguration/implementation/SyncOperationLocationPollingStrategy.java","src/main/java/com/azure/data/appconfiguration/implementation/models/CompositionType.java","src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlag.java","src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagAllocation.java","src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagConditions.java","src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagFields.java","src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagFilter.java","src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagTelemetryConfiguration.java","src/main/java/com/azure/data/appconfiguration/implementation/models/FeatureFlagVariantDefinition.java","src/main/java/com/azure/data/appconfiguration/implementation/models/GroupAllocation.java","src/main/java/com/azure/data/appconfiguration/implementation/models/Key.java","src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValue.java","src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValueFields.java","src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValueFilter.java","src/main/java/com/azure/data/appconfiguration/implementation/models/Label.java","src/main/java/com/azure/data/appconfiguration/implementation/models/LabelFields.java","src/main/java/com/azure/data/appconfiguration/implementation/models/OperationDetails.java","src/main/java/com/azure/data/appconfiguration/implementation/models/OperationState.java","src/main/java/com/azure/data/appconfiguration/implementation/models/PercentileAllocation.java","src/main/java/com/azure/data/appconfiguration/implementation/models/RequirementType.java","src/main/java/com/azure/data/appconfiguration/implementation/models/Snapshot.java","src/main/java/com/azure/data/appconfiguration/implementation/models/SnapshotFields.java","src/main/java/com/azure/data/appconfiguration/implementation/models/SnapshotStatus.java","src/main/java/com/azure/data/appconfiguration/implementation/models/StatusOverride.java","src/main/java/com/azure/data/appconfiguration/implementation/models/UserAllocation.java","src/main/java/com/azure/data/appconfiguration/implementation/models/package-info.java","src/main/java/com/azure/data/appconfiguration/implementation/package-info.java","src/main/java/com/azure/data/appconfiguration/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/appconfiguration/azure-data-appconfiguration/tsp-location.yaml b/sdk/appconfiguration/azure-data-appconfiguration/tsp-location.yaml index a1970700d5e3..121dbe6aedd3 100644 --- a/sdk/appconfiguration/azure-data-appconfiguration/tsp-location.yaml +++ b/sdk/appconfiguration/azure-data-appconfiguration/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/appconfiguration/data-plane/AppConfiguration -commit: 609f05e331fd1b5b71ed2c476f0d356d25053c9a +commit: a50b71d881f890a11d80dd7d6a7c64891c20c216 repo: Azure/azure-rest-api-specs \ No newline at end of file