Class SubscriptionsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.servicehooks.subscriptions.SubscriptionsRequestBuilder
Provides functionality to manage Service hooks subscriptions Api.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the query parameters.static class
Request configuration object for the query parameters.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
ConstructorDescriptionSubscriptionsRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(ServiceHooksSubscription subscription) Create a subscription.createAsync
(ServiceHooksSubscription subscription) Create a subscription.createQuery
(SubscriptionsQuery query) Query for service hook subscriptions.Query for service hook subscriptions.Delete a specific service hooks subscription.deleteAsync
(String subscriptionId) Delete a specific service hooks subscription.Get a specific service hooks subscription.Get a specific service hooks subscription.list()
Get a list of subscriptions.list
(Consumer<SubscriptionsRequestBuilder.RequestConfiguration> requestConfiguration) Get a list of subscriptions.Get a list of subscriptions.listAsync
(Consumer<SubscriptionsRequestBuilder.RequestConfiguration> requestConfiguration) Get a list of subscriptions.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
SubscriptionsRequestBuilder
public SubscriptionsRequestBuilder(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
-
createAsync
public CompletableFuture<ServiceHooksSubscription> createAsync(ServiceHooksSubscription subscription) throws AzDException Create a subscription.- Parameters:
subscription
- Subscription object to create a new subscription.- Returns:
- ServiceHooksSubscription
ServiceHooksSubscription
- Throws:
AzDException
- Default Api Exception handler.
-
createQueryAsync
public CompletableFuture<SubscriptionsQuery> createQueryAsync(SubscriptionsQuery query) throws AzDException Query for service hook subscriptions.- Parameters:
query
- Subscription query object to query.- Returns:
- Subscription query
SubscriptionsQuery
- Throws:
AzDException
- Default Api Exception handler.
-
deleteAsync
Delete a specific service hooks subscription.- Parameters:
subscriptionId
- ID for a subscription.- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
public CompletableFuture<ServiceHooksSubscription> getAsync(String subscriptionId) throws AzDException Get a specific service hooks subscription.- Parameters:
subscriptionId
- ID for a subscription.- Returns:
- ServiceHooksSubscription
ServiceHooksSubscription
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
Get a list of subscriptions.- Returns:
- ServiceHooksSubscriptions
ServiceHooksSubscriptions
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
public CompletableFuture<ServiceHooksSubscriptions> listAsync(Consumer<SubscriptionsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Get a list of subscriptions.- Parameters:
requestConfiguration
- Represents the query parameters.- Returns:
- ServiceHooksSubscriptions
ServiceHooksSubscriptions
- Throws:
AzDException
- Default Api Exception handler.
-
create
Create a subscription.- Parameters:
subscription
- Subscription object to create a new subscription.- Returns:
- ServiceHooksSubscription
ServiceHooksSubscription
- Throws:
AzDException
- Default Api Exception handler.
-
createQuery
Query for service hook subscriptions.- Parameters:
query
- Subscription query object to query.- Returns:
- Subscription query
SubscriptionsQuery
- Throws:
AzDException
- Default Api Exception handler.
-
delete
Delete a specific service hooks subscription.- Parameters:
subscriptionId
- ID for a subscription.- Throws:
AzDException
- Default Api Exception handler.
-
get
Get a specific service hooks subscription.- Parameters:
subscriptionId
- ID for a subscription.- Returns:
- ServiceHooksSubscription
ServiceHooksSubscription
- Throws:
AzDException
- Default Api Exception handler.
-
list
Get a list of subscriptions.- Returns:
- ServiceHooksSubscriptions
ServiceHooksSubscriptions
- Throws:
AzDException
- Default Api Exception handler.
-
list
public ServiceHooksSubscriptions list(Consumer<SubscriptionsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Get a list of subscriptions.- Parameters:
requestConfiguration
- Represents the query parameters.- Returns:
- ServiceHooksSubscriptions
ServiceHooksSubscriptions
- Throws:
AzDException
- Default Api Exception handler.
-