Class FeatureManagementHelpersRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.featuremanagement.FeatureManagementRequestBuilder
org.azd.helpers.featuremanagement.FeatureManagementHelpersRequestBuilder
Helper request builder that combines multiple Apis to create logical helper methods for ease of use.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.azd.featuremanagement.FeatureManagementRequestBuilder
FeatureManagementRequestBuilder.GetQueryParameters, FeatureManagementRequestBuilder.RequestConfiguration
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
ConstructorDescriptionFeatureManagementHelpersRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionfeatureToggle
(String projectId, FeatureManagement feature, boolean state) Set project feature state for project service SeeFeatureManagement
for list of featuresgetFeatureState
(String projectId, FeatureManagement feature) Call un-published API feature to fetch project service feature state.Methods inherited from class org.azd.featuremanagement.FeatureManagementRequestBuilder
get, getAsync, list, listAsync, query, queryAsync, state, stateScope
Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
FeatureManagementHelpersRequestBuilder
public FeatureManagementHelpersRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl
- Represents organization location request url.accessTokenCredential
- Access token credential object.
-
-
Method Details
-
getFeatureState
public Optional<Boolean> getFeatureState(String projectId, FeatureManagement feature) throws AzDException Call un-published API feature to fetch project service feature state. SeeFeatureManagement
for current list of features. Besides an 'enabled' and 'disabled' state, there is also an undefined state, hence the Optional return wrapper- Parameters:
projectId
- project identifierfeature
- FeatureManagement enum type for which to return state- Returns:
- Optional wrapped boolean, empty if state is undefined
- Throws:
AzDException
- Default Api Exception handler
-
featureToggle
public ProjectFeature featureToggle(String projectId, FeatureManagement feature, boolean state) throws AzDException Set project feature state for project service SeeFeatureManagement
for list of features- Parameters:
projectId
- project identifierfeature
- enum value for feature to enable or disablestate
- enable or disable feature- Returns:
- object containing feature id and state
- Throws:
AzDException
- Default Api Exception handler
-