/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.codecommit.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about a trigger for a repository. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RepositoryTrigger implements Serializable, Cloneable, StructuredPojo { /** ** The name of the trigger. *
*/ private String name; /** ** The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS). *
*/ private String destinationArn; /** ** Any custom data associated with the trigger to be included in the information sent to the target of the trigger. *
*/ private String customData; /** ** The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to * all branches. *
** Although no content is required in the array, you must include the array itself. *
** The repository events that cause the trigger to run actions in another service, such as sending a notification * through Amazon SNS. *
** The valid value "all" cannot be used with any other values. *
** The name of the trigger. *
* * @param name * The name of the trigger. */ public void setName(String name) { this.name = name; } /** ** The name of the trigger. *
* * @return The name of the trigger. */ public String getName() { return this.name; } /** ** The name of the trigger. *
* * @param name * The name of the trigger. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryTrigger withName(String name) { setName(name); return this; } /** ** The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS). *
* * @param destinationArn * The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS). */ public void setDestinationArn(String destinationArn) { this.destinationArn = destinationArn; } /** ** The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS). *
* * @return The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS). */ public String getDestinationArn() { return this.destinationArn; } /** ** The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS). *
* * @param destinationArn * The ARN of the resource that is the target for a trigger (for example, the ARN of a topic in Amazon SNS). * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryTrigger withDestinationArn(String destinationArn) { setDestinationArn(destinationArn); return this; } /** ** Any custom data associated with the trigger to be included in the information sent to the target of the trigger. *
* * @param customData * Any custom data associated with the trigger to be included in the information sent to the target of the * trigger. */ public void setCustomData(String customData) { this.customData = customData; } /** ** Any custom data associated with the trigger to be included in the information sent to the target of the trigger. *
* * @return Any custom data associated with the trigger to be included in the information sent to the target of the * trigger. */ public String getCustomData() { return this.customData; } /** ** Any custom data associated with the trigger to be included in the information sent to the target of the trigger. *
* * @param customData * Any custom data associated with the trigger to be included in the information sent to the target of the * trigger. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryTrigger withCustomData(String customData) { setCustomData(customData); return this; } /** ** The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to * all branches. *
** Although no content is required in the array, you must include the array itself. *
** Although no content is required in the array, you must include the array itself. *
*/ public java.util.List* The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to * all branches. *
** Although no content is required in the array, you must include the array itself. *
** Although no content is required in the array, you must include the array itself. *
*/ public void setBranches(java.util.Collection* The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to * all branches. *
** Although no content is required in the array, you must include the array itself. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setBranches(java.util.Collection)} or {@link #withBranches(java.util.Collection)} if you want to override * the existing values. *
* * @param branches * The branches to be included in the trigger configuration. If you specify an empty array, the trigger * applies to all branches.* Although no content is required in the array, you must include the array itself. *
* @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryTrigger withBranches(String... branches) { if (this.branches == null) { setBranches(new java.util.ArrayList* The branches to be included in the trigger configuration. If you specify an empty array, the trigger applies to * all branches. *
** Although no content is required in the array, you must include the array itself. *
** Although no content is required in the array, you must include the array itself. *
* @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryTrigger withBranches(java.util.Collection* The repository events that cause the trigger to run actions in another service, such as sending a notification * through Amazon SNS. *
** The valid value "all" cannot be used with any other values. *
** The valid value "all" cannot be used with any other values. *
* @see RepositoryTriggerEventEnum */ public java.util.List* The repository events that cause the trigger to run actions in another service, such as sending a notification * through Amazon SNS. *
** The valid value "all" cannot be used with any other values. *
** The valid value "all" cannot be used with any other values. *
* @see RepositoryTriggerEventEnum */ public void setEvents(java.util.Collection* The repository events that cause the trigger to run actions in another service, such as sending a notification * through Amazon SNS. *
** The valid value "all" cannot be used with any other values. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setEvents(java.util.Collection)} or {@link #withEvents(java.util.Collection)} if you want to override the * existing values. *
* * @param events * The repository events that cause the trigger to run actions in another service, such as sending a * notification through Amazon SNS.* The valid value "all" cannot be used with any other values. *
* @return Returns a reference to this object so that method calls can be chained together. * @see RepositoryTriggerEventEnum */ public RepositoryTrigger withEvents(String... events) { if (this.events == null) { setEvents(new java.util.ArrayList* The repository events that cause the trigger to run actions in another service, such as sending a notification * through Amazon SNS. *
** The valid value "all" cannot be used with any other values. *
** The valid value "all" cannot be used with any other values. *
* @return Returns a reference to this object so that method calls can be chained together. * @see RepositoryTriggerEventEnum */ public RepositoryTrigger withEvents(java.util.Collection* The repository events that cause the trigger to run actions in another service, such as sending a notification * through Amazon SNS. *
** The valid value "all" cannot be used with any other values. *
** The valid value "all" cannot be used with any other values. *
* @return Returns a reference to this object so that method calls can be chained together. * @see RepositoryTriggerEventEnum */ public RepositoryTrigger withEvents(RepositoryTriggerEventEnum... events) { java.util.ArrayList