Class Subscription.Builder
- java.lang.Object
-
- com.oracle.bmc.ons.model.Subscription.Builder
-
- Enclosing class:
- Subscription
public static class Subscription.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Subscription
build()
Subscription.Builder
compartmentId(String compartmentId)
The OCID of the compartment for the subscription.Subscription.Builder
copy(Subscription model)
Subscription.Builder
createdTime(Long createdTime)
The time when this suscription was created.Subscription.Builder
definedTags(Map<String,Map<String,Object>> definedTags)
Defined tags for this resource.Subscription.Builder
deliverPolicy(String deliverPolicy)
The delivery policy of the subscription.Subscription.Builder
endpoint(String endpoint)
A locator that corresponds to the subscription protocol.Subscription.Builder
etag(String etag)
For optimistic concurrency control.Subscription.Builder
freeformTags(Map<String,String> freeformTags)
Free-form tags for this resource.Subscription.Builder
id(String id)
The OCID of the subscription.Subscription.Builder
lifecycleState(Subscription.LifecycleState lifecycleState)
The lifecycle state of the subscription.Subscription.Builder
protocol(String protocol)
The protocol used for the subscription.Subscription.Builder
topicId(String topicId)
The OCID of the associated topic.
-
-
-
Method Detail
-
id
public Subscription.Builder id(String id)
The OCID of the subscription.- Parameters:
id
- the value to set- Returns:
- this builder
-
topicId
public Subscription.Builder topicId(String topicId)
The OCID of the associated topic.- Parameters:
topicId
- the value to set- Returns:
- this builder
-
protocol
public Subscription.Builder protocol(String protocol)
The protocol used for the subscription.Allowed values: * CUSTOM_HTTPS * EMAIL * HTTPS (deprecated; for PagerDuty endpoints, use PAGERDUTY) * ORACLE_FUNCTIONS * PAGERDUTY * SLACK * SMS
For information about subscription protocols, see [To create a subscription](https://docs.oracle.com/iaas/Content/Notification/Tasks/managingtopicsandsubscriptions.htm#createSub).
- Parameters:
protocol
- the value to set- Returns:
- this builder
-
endpoint
public Subscription.Builder endpoint(String endpoint)
A locator that corresponds to the subscription protocol.For example, an email address for a subscription that uses the EMAIL protocol, or a URL for a subscription that uses an HTTP-based protocol.
- Parameters:
endpoint
- the value to set- Returns:
- this builder
-
lifecycleState
public Subscription.Builder lifecycleState(Subscription.LifecycleState lifecycleState)
The lifecycle state of the subscription.The status of a new subscription is PENDING; when confirmed, the subscription status changes to ACTIVE.
- Parameters:
lifecycleState
- the value to set- Returns:
- this builder
-
compartmentId
public Subscription.Builder compartmentId(String compartmentId)
The OCID of the compartment for the subscription.- Parameters:
compartmentId
- the value to set- Returns:
- this builder
-
createdTime
public Subscription.Builder createdTime(Long createdTime)
The time when this suscription was created.- Parameters:
createdTime
- the value to set- Returns:
- this builder
-
deliverPolicy
public Subscription.Builder deliverPolicy(String deliverPolicy)
The delivery policy of the subscription.Stored as a JSON string.
- Parameters:
deliverPolicy
- the value to set- Returns:
- this builder
-
etag
public Subscription.Builder etag(String etag)
For optimistic concurrency control.See if-match.
- Parameters:
etag
- the value to set- Returns:
- this builder
-
freeformTags
public Subscription.Builder freeformTags(Map<String,String> freeformTags)
Free-form tags for this resource.Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {"Department": "Finance"}
- Parameters:
freeformTags
- the value to set- Returns:
- this builder
-
definedTags
public Subscription.Builder definedTags(Map<String,Map<String,Object>> definedTags)
Defined tags for this resource.Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {"Operations": {"CostCenter": "42"}}
- Parameters:
definedTags
- the value to set- Returns:
- this builder
-
build
public Subscription build()
-
copy
public Subscription.Builder copy(Subscription model)
-
-