All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.elasticloadbalancingv2.model.SetSecurityGroupsRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Elastic Load Balancing module holds the client classes that are used for communicating with Elastic Load Balancing Service (API Version 2015-12-01)

The newest version!
/*
 * Copyright 2019-2024 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 SetSecurityGroupsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The Amazon Resource Name (ARN) of the load balancer. *

*/ private String loadBalancerArn; /** *

* The IDs of the security groups. *

*/ private java.util.List securityGroups; /** *

* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through * Amazon Web Services PrivateLink. The default is on. *

*/ private String enforceSecurityGroupInboundRulesOnPrivateLinkTraffic; /** *

* The Amazon Resource Name (ARN) of the load balancer. *

* * @param loadBalancerArn * The Amazon Resource Name (ARN) of the load balancer. */ public void setLoadBalancerArn(String loadBalancerArn) { this.loadBalancerArn = loadBalancerArn; } /** *

* The Amazon Resource Name (ARN) of the load balancer. *

* * @return The Amazon Resource Name (ARN) of the load balancer. */ public String getLoadBalancerArn() { return this.loadBalancerArn; } /** *

* The Amazon Resource Name (ARN) of the load balancer. *

* * @param loadBalancerArn * The Amazon Resource Name (ARN) of the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public SetSecurityGroupsRequest withLoadBalancerArn(String loadBalancerArn) { setLoadBalancerArn(loadBalancerArn); return this; } /** *

* The IDs of the security groups. *

* * @return The IDs of the security groups. */ public java.util.List getSecurityGroups() { return securityGroups; } /** *

* The IDs of the security groups. *

* * @param securityGroups * The IDs of the security groups. */ public void setSecurityGroups(java.util.Collection securityGroups) { if (securityGroups == null) { this.securityGroups = null; return; } this.securityGroups = new java.util.ArrayList(securityGroups); } /** *

* The IDs of the security groups. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecurityGroups(java.util.Collection)} or {@link #withSecurityGroups(java.util.Collection)} if you want * to override the existing values. *

* * @param securityGroups * The IDs of the security groups. * @return Returns a reference to this object so that method calls can be chained together. */ public SetSecurityGroupsRequest withSecurityGroups(String... securityGroups) { if (this.securityGroups == null) { setSecurityGroups(new java.util.ArrayList(securityGroups.length)); } for (String ele : securityGroups) { this.securityGroups.add(ele); } return this; } /** *

* The IDs of the security groups. *

* * @param securityGroups * The IDs of the security groups. * @return Returns a reference to this object so that method calls can be chained together. */ public SetSecurityGroupsRequest withSecurityGroups(java.util.Collection securityGroups) { setSecurityGroups(securityGroups); return this; } /** *

* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through * Amazon Web Services PrivateLink. The default is on. *

* * @param enforceSecurityGroupInboundRulesOnPrivateLinkTraffic * Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer * through Amazon Web Services PrivateLink. The default is on. * @see EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum */ public void setEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(String enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) { this.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = enforceSecurityGroupInboundRulesOnPrivateLinkTraffic; } /** *

* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through * Amazon Web Services PrivateLink. The default is on. *

* * @return Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer * through Amazon Web Services PrivateLink. The default is on. * @see EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum */ public String getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() { return this.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic; } /** *

* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through * Amazon Web Services PrivateLink. The default is on. *

* * @param enforceSecurityGroupInboundRulesOnPrivateLinkTraffic * Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer * through Amazon Web Services PrivateLink. The default is on. * @return Returns a reference to this object so that method calls can be chained together. * @see EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum */ public SetSecurityGroupsRequest withEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(String enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) { setEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(enforceSecurityGroupInboundRulesOnPrivateLinkTraffic); return this; } /** *

* Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through * Amazon Web Services PrivateLink. The default is on. *

* * @param enforceSecurityGroupInboundRulesOnPrivateLinkTraffic * Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer * through Amazon Web Services PrivateLink. The default is on. * @return Returns a reference to this object so that method calls can be chained together. * @see EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum */ public SetSecurityGroupsRequest withEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic( EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) { this.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = enforceSecurityGroupInboundRulesOnPrivateLinkTraffic.toString(); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLoadBalancerArn() != null) sb.append("LoadBalancerArn: ").append(getLoadBalancerArn()).append(","); if (getSecurityGroups() != null) sb.append("SecurityGroups: ").append(getSecurityGroups()).append(","); if (getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() != null) sb.append("EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic: ").append(getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SetSecurityGroupsRequest == false) return false; SetSecurityGroupsRequest other = (SetSecurityGroupsRequest) obj; if (other.getLoadBalancerArn() == null ^ this.getLoadBalancerArn() == null) return false; if (other.getLoadBalancerArn() != null && other.getLoadBalancerArn().equals(this.getLoadBalancerArn()) == false) return false; if (other.getSecurityGroups() == null ^ this.getSecurityGroups() == null) return false; if (other.getSecurityGroups() != null && other.getSecurityGroups().equals(this.getSecurityGroups()) == false) return false; if (other.getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() == null ^ this.getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() == null) return false; if (other.getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() != null && other.getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic().equals(this.getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerArn() == null) ? 0 : getLoadBalancerArn().hashCode()); hashCode = prime * hashCode + ((getSecurityGroups() == null) ? 0 : getSecurityGroups().hashCode()); hashCode = prime * hashCode + ((getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() == null) ? 0 : getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic() .hashCode()); return hashCode; } @Override public SetSecurityGroupsRequest clone() { return (SetSecurityGroupsRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy