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 Subscriptionbuild()Subscription.BuildercompartmentId(String compartmentId)The OCID of the compartment for the subscription.Subscription.Buildercopy(Subscription model)Subscription.BuildercreatedTime(Long createdTime)The time when this suscription was created.Subscription.BuilderdefinedTags(Map<String,Map<String,Object>> definedTags)Defined tags for this resource.Subscription.BuilderdeliverPolicy(String deliverPolicy)The delivery policy of the subscription.Subscription.Builderendpoint(String endpoint)A locator that corresponds to the subscription protocol.Subscription.Builderetag(String etag)For optimistic concurrency control.Subscription.BuilderfreeformTags(Map<String,String> freeformTags)Free-form tags for this resource.Subscription.Builderid(String id)The OCID of the subscription.Subscription.BuilderlifecycleState(Subscription.LifecycleState lifecycleState)The lifecycle state of the subscription.Subscription.Builderprotocol(String protocol)The protocol used for the subscription.Subscription.BuildertopicId(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)
-
-