Class TriggerPatch

  • All Implemented Interfaces:
    com.ibm.cloud.sdk.core.service.model.ObjectModel

    public class TriggerPatch
    extends com.ibm.cloud.sdk.core.service.model.GenericModel
    Tekton pipeline trigger object used for updating the trigger.
    • Method Detail

      • newBuilder

        public TriggerPatch.Builder newBuilder()
        New builder.
        Returns:
        a TriggerPatch builder
      • type

        public java.lang.String type()
        Gets the type. Trigger type.
        Returns:
        the type
      • name

        public java.lang.String name()
        Gets the name. Trigger name.
        Returns:
        the name
      • eventListener

        public java.lang.String eventListener()
        Gets the eventListener. Event listener name. The name of the event listener to which the trigger is associated. The event listeners are defined in the definition repositories of the Tekton pipeline.
        Returns:
        the eventListener
      • tags

        public java.util.List<java.lang.String> tags()
        Gets the tags. Trigger tags array. Optional tags for the trigger.
        Returns:
        the tags
      • worker

        public WorkerIdentity worker()
        Gets the worker. Specify the worker used to run the trigger. Use `worker: { id: 'public' }` to use the IBM Managed workers. Use `worker: { id: 'inherit' }` to inherit the worker used by the pipeline.
        Returns:
        the worker
      • maxConcurrentRuns

        public java.lang.Long maxConcurrentRuns()
        Gets the maxConcurrentRuns. Defines the maximum number of concurrent runs for this trigger. If set to 0 then the custom concurrency limit is disabled for this trigger.
        Returns:
        the maxConcurrentRuns
      • limitWaitingRuns

        public java.lang.Boolean limitWaitingRuns()
        Gets the limitWaitingRuns. Flag that will limit the trigger to a maximum of one waiting run. A newly triggered run will cause any other waiting run(s) to be automatically cancelled.
        Returns:
        the limitWaitingRuns
      • enabled

        public java.lang.Boolean enabled()
        Gets the enabled. Defines if this trigger is enabled.
        Returns:
        the enabled
      • secret

        public GenericSecret secret()
        Gets the secret. Only needed for Generic Webhook trigger type. The secret is used to start the Generic Webhook trigger.
        Returns:
        the secret
      • cron

        public java.lang.String cron()
        Gets the cron. Only needed for timer triggers. CRON expression that indicates when this trigger will activate. Maximum frequency is every 5 minutes. The string is based on UNIX crontab syntax: minute, hour, day of month, month, day of week. Example: The CRON expression 0 *_/2 * * * - translates to - every 2 hours.
        Returns:
        the cron
      • timezone

        public java.lang.String timezone()
        Gets the timezone. Only used for timer triggers. Specify the timezone used for this timer trigger, which will ensure the CRON activates this trigger relative to the specified timezone. If no timezone is specified, the default timezone used is UTC. Valid timezones are those listed in the IANA timezone database, https://www.iana.org/time-zones.
        Returns:
        the timezone
      • source

        public TriggerSourcePrototype source()
        Gets the source. Source repository for a Git trigger. Only required for Git triggers. The referenced repository URL must match the URL of a repository tool integration in the parent toolchain. Obtain the list of integrations from the toolchain API https://cloud.ibm.com/apidocs/toolchain#list-tools.
        Returns:
        the source
      • events

        public java.util.List<java.lang.String> events()
        Gets the events. Either 'events' or 'filter' is required specifically for Git triggers. Stores a list of events that a Git trigger listens to. Choose one or more from 'push', 'pull_request', and 'pull_request_closed'. If SCM repositories use the 'merge request' term, they correspond to the generic term i.e. 'pull request'.
        Returns:
        the events
      • filter

        public java.lang.String filter()
        Gets the filter. Either 'events' or 'filter' can be used. Stores the CEL (Common Expression Language) expression value which is used for event filtering against the Git webhook payloads.
        Returns:
        the filter
      • favorite

        public java.lang.Boolean favorite()
        Gets the favorite. Mark the trigger as a favorite.
        Returns:
        the favorite
      • enableEventsFromForks

        public java.lang.Boolean enableEventsFromForks()
        Gets the enableEventsFromForks. Only used for SCM triggers. When enabled, pull request events from forks of the selected repository will trigger a pipeline run.
        Returns:
        the enableEventsFromForks
      • disableDraftEvents

        public java.lang.Boolean disableDraftEvents()
        Gets the disableDraftEvents. Prevent new pipeline runs from being triggered by events from draft pull requests.
        Returns:
        the disableDraftEvents
      • asPatch

        public java.util.Map<java.lang.String,​java.lang.Object> asPatch()
        Construct a JSON merge-patch from the TriggerPatch. Note that properties of the TriggerPatch with null values are not represented in the constructed JSON merge-patch object, but can be explicitly set afterward to signify a property delete.
        Returns:
        a JSON merge-patch for the TriggerPatch