/* * 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.elasticloadbalancingv2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateRuleRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The Amazon Resource Name (ARN) of the listener. *
*/ private String listenerArn; /** ** The conditions. *
*/ private java.util.List* The rule priority. A listener can't have multiple rules with the same priority. *
*/ private Integer priority; /** ** The actions. *
*/ private java.util.List* The tags to assign to the rule. *
*/ private java.util.List* The Amazon Resource Name (ARN) of the listener. *
* * @param listenerArn * The Amazon Resource Name (ARN) of the listener. */ public void setListenerArn(String listenerArn) { this.listenerArn = listenerArn; } /** ** The Amazon Resource Name (ARN) of the listener. *
* * @return The Amazon Resource Name (ARN) of the listener. */ public String getListenerArn() { return this.listenerArn; } /** ** The Amazon Resource Name (ARN) of the listener. *
* * @param listenerArn * The Amazon Resource Name (ARN) of the listener. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRuleRequest withListenerArn(String listenerArn) { setListenerArn(listenerArn); return this; } /** ** The conditions. *
* * @return The conditions. */ public java.util.List* The conditions. *
* * @param conditions * The conditions. */ public void setConditions(java.util.Collection* The conditions. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setConditions(java.util.Collection)} or {@link #withConditions(java.util.Collection)} if you want to * override the existing values. *
* * @param conditions * The conditions. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRuleRequest withConditions(RuleCondition... conditions) { if (this.conditions == null) { setConditions(new java.util.ArrayList* The conditions. *
* * @param conditions * The conditions. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRuleRequest withConditions(java.util.Collection* The rule priority. A listener can't have multiple rules with the same priority. *
* * @param priority * The rule priority. A listener can't have multiple rules with the same priority. */ public void setPriority(Integer priority) { this.priority = priority; } /** ** The rule priority. A listener can't have multiple rules with the same priority. *
* * @return The rule priority. A listener can't have multiple rules with the same priority. */ public Integer getPriority() { return this.priority; } /** ** The rule priority. A listener can't have multiple rules with the same priority. *
* * @param priority * The rule priority. A listener can't have multiple rules with the same priority. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRuleRequest withPriority(Integer priority) { setPriority(priority); return this; } /** ** The actions. *
* * @return The actions. */ public java.util.List* The actions. *
* * @param actions * The actions. */ public void setActions(java.util.Collection* The actions. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setActions(java.util.Collection)} or {@link #withActions(java.util.Collection)} if you want to override * the existing values. *
* * @param actions * The actions. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRuleRequest withActions(Action... actions) { if (this.actions == null) { setActions(new java.util.ArrayList* The actions. *
* * @param actions * The actions. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRuleRequest withActions(java.util.Collection* The tags to assign to the rule. *
* * @return The tags to assign to the rule. */ public java.util.List* The tags to assign to the rule. *
* * @param tags * The tags to assign to the rule. */ public void setTags(java.util.Collection* The tags to assign to the rule. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * The tags to assign to the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRuleRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* The tags to assign to the rule. *
* * @param tags * The tags to assign to the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateRuleRequest withTags(java.util.Collection