Class TriggerPatch
- java.lang.Object
-
- com.ibm.cloud.sdk.core.service.model.GenericModel
-
- com.ibm.cloud.continuous_delivery.cd_tekton_pipeline.v2.model.TriggerPatch
-
- All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel
public class TriggerPatch extends com.ibm.cloud.sdk.core.service.model.GenericModelTekton pipeline trigger object used for updating the trigger.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTriggerPatch.BuilderBuilder.static interfaceTriggerPatch.EventsList of events.static interfaceTriggerPatch.TypeTrigger type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>asPatch()Construct a JSON merge-patch from the TriggerPatch.java.lang.Stringcron()Gets the cron.java.lang.Booleanenabled()Gets the enabled.java.lang.StringeventListener()Gets the eventListener.java.util.List<java.lang.String>events()Gets the events.java.lang.Booleanfavorite()Gets the favorite.java.lang.LongmaxConcurrentRuns()Gets the maxConcurrentRuns.java.lang.Stringname()Gets the name.TriggerPatch.BuildernewBuilder()New builder.GenericSecretsecret()Gets the secret.TriggerSourcePrototypesource()Gets the source.java.util.List<java.lang.String>tags()Gets the tags.java.lang.Stringtimezone()Gets the timezone.java.lang.Stringtype()Gets the type.WorkerIdentityworker()Gets the worker.
-
-
-
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
-
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. Secret used to start 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: 0 *_/2 * * * - 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. Only needed for Git triggers. List of events to which a Git trigger listens. Choose one or more from: 'push', 'pull_request' and 'pull_request_closed'. For SCM repositories that use 'merge request' events, such events map to the equivalent 'pull request' events.- Returns:
- the events
-
favorite
public java.lang.Boolean favorite()
Gets the favorite. Mark the trigger as a favorite.- Returns:
- the favorite
-
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
-
-