Package org.azd.featuremanagement.state
Class StateRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.featuremanagement.state.StateRequestBuilder
Request builder to manage Feature management state Api.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter
-
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer
-
Constructor Summary
ConstructorDescriptionStateRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionget
(FeatureManagement feature, FeatureManagementUserScope userScope) Get the state of the specified feature for the given user/all-users scopegetAsync
(FeatureManagement feature, FeatureManagementUserScope userScope) Get the state of the specified feature for the given user/all-users scopeset
(ContributedFeatureState featureState, FeatureManagement feature, FeatureManagementUserScope userScope) Set the state of a featureset
(ContributedFeatureState featureState, FeatureManagement feature, FeatureManagementUserScope userScope, Consumer<FeatureManagementRequestBuilder.RequestConfiguration> requestConfiguration) Set the state of a featuresetAsync
(ContributedFeatureState featureState, FeatureManagement feature, FeatureManagementUserScope userScope) Set the state of a featuresetAsync
(ContributedFeatureState featureState, FeatureManagement feature, FeatureManagementUserScope userScope, Consumer<FeatureManagementRequestBuilder.RequestConfiguration> requestConfiguration) Set the state of a featureMethods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
StateRequestBuilder
Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl
- Represents organization location request url.accessTokenCredential
- Access token credential object.
-
-
Method Details
-
getAsync
public CompletableFuture<ContributedFeatureState> getAsync(FeatureManagement feature, FeatureManagementUserScope userScope) throws AzDException Get the state of the specified feature for the given user/all-users scope- Parameters:
feature
- Contribution id of the feature.userScope
- User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.- Returns:
- Contributed feature state object.
ContributedFeatureState
- Throws:
AzDException
- Default Api exception handler.
-
setAsync
public CompletableFuture<ContributedFeatureState> setAsync(ContributedFeatureState featureState, FeatureManagement feature, FeatureManagementUserScope userScope) throws AzDException Set the state of a feature- Parameters:
featureState
- Posted feature state object. Should specify the effective value.feature
- Contribution id of the featureuserScope
- User-Scope at which to set the value. Should be "me" for the current user or "host" for all users.- Returns:
- Contributed feature object.
ContributedFeature
- Throws:
AzDException
- Default Api exception handler.
-
setAsync
public CompletableFuture<ContributedFeatureState> setAsync(ContributedFeatureState featureState, FeatureManagement feature, FeatureManagementUserScope userScope, Consumer<FeatureManagementRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Set the state of a feature- Parameters:
featureState
- Posted feature state object. Should specify the effective value.feature
- Contribution id of the featureuserScope
- User-Scope at which to set the value. Should be "me" for the current user or "host" for all users.requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Contributed feature object.
ContributedFeature
- Throws:
AzDException
- Default Api exception handler.
-
get
public ContributedFeatureState get(FeatureManagement feature, FeatureManagementUserScope userScope) throws AzDException Get the state of the specified feature for the given user/all-users scope- Parameters:
feature
- Contribution id of the feature.userScope
- User-Scope at which to get the value. Should be "me" for the current user or "host" for all users.- Returns:
- Contributed feature state object.
ContributedFeatureState
- Throws:
AzDException
- Default Api exception handler.
-
set
public ContributedFeatureState set(ContributedFeatureState featureState, FeatureManagement feature, FeatureManagementUserScope userScope) throws AzDException Set the state of a feature- Parameters:
featureState
- Posted feature state object. Should specify the effective value.feature
- Contribution id of the featureuserScope
- User-Scope at which to set the value. Should be "me" for the current user or "host" for all users.- Returns:
- Contributed feature object.
ContributedFeature
- Throws:
AzDException
- Default Api exception handler.
-
set
public ContributedFeatureState set(ContributedFeatureState featureState, FeatureManagement feature, FeatureManagementUserScope userScope, Consumer<FeatureManagementRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Set the state of a feature- Parameters:
featureState
- Posted feature state object. Should specify the effective value.feature
- Contribution id of the featureuserScope
- User-Scope at which to set the value. Should be "me" for the current user or "host" for all users.requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Contributed feature object.
ContributedFeature
- Throws:
AzDException
- Default Api exception handler.
-