Class Subscription.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • 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