Class Trigger
- java.lang.Object
-
- com.ibm.cloud.sdk.core.service.model.GenericModel
-
- com.ibm.cloud.continuous_delivery.cd_tekton_pipeline.v2.model.Trigger
-
- All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel
- Direct Known Subclasses:
TriggerGenericTrigger,TriggerManualTrigger,TriggerScmTrigger,TriggerTimerTrigger
public class Trigger extends com.ibm.cloud.sdk.core.service.model.GenericModelTekton pipeline trigger. Classes which extend this class: - TriggerManualTrigger - TriggerScmTrigger - TriggerTimerTrigger - TriggerGenericTrigger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTrigger.EventsList of events.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCron()Gets the cron.java.lang.StringgetEventListener()Gets the eventListener.java.util.List<java.lang.String>getEvents()Gets the events.java.lang.StringgetFilter()Gets the filter.java.lang.StringgetHref()Gets the href.java.lang.StringgetId()Gets the id.java.lang.LonggetMaxConcurrentRuns()Gets the maxConcurrentRuns.java.lang.StringgetName()Gets the name.GenericSecretgetSecret()Gets the secret.TriggerSourcegetSource()Gets the source.java.util.List<java.lang.String>getTags()Gets the tags.java.lang.StringgetTimezone()Gets the timezone.java.lang.StringgetType()Gets the type.java.lang.StringgetWebhookUrl()Gets the webhookUrl.WorkergetWorker()Gets the worker.java.util.List<TriggerProperty>getXProperties()Gets the xProperties.java.lang.BooleanisDisableDraftEvents()Gets the disableDraftEvents.java.lang.BooleanisEnabled()Gets the enabled.java.lang.BooleanisEnableEventsFromForks()Gets the enableEventsFromForks.java.lang.BooleanisFavorite()Gets the favorite.java.lang.BooleanisLimitWaitingRuns()Gets the limitWaitingRuns.
-
-
-
Method Detail
-
getType
public java.lang.String getType()
Gets the type. Trigger type.- Returns:
- the type
-
getName
public java.lang.String getName()
Gets the name. Trigger name.- Returns:
- the name
-
getHref
public java.lang.String getHref()
Gets the href. API URL for interacting with the trigger. Only included when fetching the list of pipeline triggers.- Returns:
- the href
-
getEventListener
public java.lang.String getEventListener()
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
-
getId
public java.lang.String getId()
Gets the id. The Trigger ID.- Returns:
- the id
-
getXProperties
public java.util.List<TriggerProperty> getXProperties()
Gets the xProperties. Optional trigger properties are used to override or supplement the pipeline properties when triggering a pipeline run.- Returns:
- the xProperties
-
getTags
public java.util.List<java.lang.String> getTags()
Gets the tags. Optional trigger tags array.- Returns:
- the tags
-
getWorker
public Worker getWorker()
Gets the worker. Details of the worker used to run the trigger.- Returns:
- the worker
-
getMaxConcurrentRuns
public java.lang.Long getMaxConcurrentRuns()
Gets the maxConcurrentRuns. Defines the maximum number of concurrent runs for this trigger. If omitted then the concurrency limit is disabled for this trigger.- Returns:
- the maxConcurrentRuns
-
isEnabled
public java.lang.Boolean isEnabled()
Gets the enabled. Flag to check if the trigger is enabled.- Returns:
- the enabled
-
isFavorite
public java.lang.Boolean isFavorite()
Gets the favorite. Mark the trigger as a favorite.- Returns:
- the favorite
-
isLimitWaitingRuns
public java.lang.Boolean isLimitWaitingRuns()
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
-
isEnableEventsFromForks
public java.lang.Boolean isEnableEventsFromForks()
Gets the enableEventsFromForks. When enabled, pull request events from forks of the selected repository will trigger a pipeline run.- Returns:
- the enableEventsFromForks
-
isDisableDraftEvents
public java.lang.Boolean isDisableDraftEvents()
Gets the disableDraftEvents. Prevent new pipeline runs from being triggered by events from draft pull requests.- Returns:
- the disableDraftEvents
-
getSource
public TriggerSource getSource()
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
-
getEvents
public java.util.List<java.lang.String> getEvents()
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
-
getFilter
public java.lang.String getFilter()
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
-
getCron
public java.lang.String getCron()
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
-
getTimezone
public java.lang.String getTimezone()
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
-
getSecret
public GenericSecret getSecret()
Gets the secret. Only needed for Generic Webhook trigger type. The secret is used to start the Generic Webhook trigger.- Returns:
- the secret
-
getWebhookUrl
public java.lang.String getWebhookUrl()
Gets the webhookUrl. Webhook URL that can be used to trigger pipeline runs.- Returns:
- the webhookUrl
-
-