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

com.amazonaws.services.appmesh.model.VirtualGatewayClientPolicyTls Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS App Mesh module holds the client classes that are used for communicating with AWS App Mesh Service

There is a newer version: 1.12.780
Show 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.appmesh.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* An object that represents a Transport Layer Security (TLS) client policy. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class VirtualGatewayClientPolicyTls implements Serializable, Cloneable, StructuredPojo { /** *

* A reference to an object that represents a virtual gateway's client's Transport Layer Security (TLS) certificate. *

*/ private VirtualGatewayClientTlsCertificate certificate; /** *

* Whether the policy is enforced. The default is True, if a value isn't specified. *

*/ private Boolean enforce; /** *

* One or more ports that the policy is enforced for. *

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

* A reference to an object that represents a Transport Layer Security (TLS) validation context. *

*/ private VirtualGatewayTlsValidationContext validation; /** *

* A reference to an object that represents a virtual gateway's client's Transport Layer Security (TLS) certificate. *

* * @param certificate * A reference to an object that represents a virtual gateway's client's Transport Layer Security (TLS) * certificate. */ public void setCertificate(VirtualGatewayClientTlsCertificate certificate) { this.certificate = certificate; } /** *

* A reference to an object that represents a virtual gateway's client's Transport Layer Security (TLS) certificate. *

* * @return A reference to an object that represents a virtual gateway's client's Transport Layer Security (TLS) * certificate. */ public VirtualGatewayClientTlsCertificate getCertificate() { return this.certificate; } /** *

* A reference to an object that represents a virtual gateway's client's Transport Layer Security (TLS) certificate. *

* * @param certificate * A reference to an object that represents a virtual gateway's client's Transport Layer Security (TLS) * certificate. * @return Returns a reference to this object so that method calls can be chained together. */ public VirtualGatewayClientPolicyTls withCertificate(VirtualGatewayClientTlsCertificate certificate) { setCertificate(certificate); return this; } /** *

* Whether the policy is enforced. The default is True, if a value isn't specified. *

* * @param enforce * Whether the policy is enforced. The default is True, if a value isn't specified. */ public void setEnforce(Boolean enforce) { this.enforce = enforce; } /** *

* Whether the policy is enforced. The default is True, if a value isn't specified. *

* * @return Whether the policy is enforced. The default is True, if a value isn't specified. */ public Boolean getEnforce() { return this.enforce; } /** *

* Whether the policy is enforced. The default is True, if a value isn't specified. *

* * @param enforce * Whether the policy is enforced. The default is True, if a value isn't specified. * @return Returns a reference to this object so that method calls can be chained together. */ public VirtualGatewayClientPolicyTls withEnforce(Boolean enforce) { setEnforce(enforce); return this; } /** *

* Whether the policy is enforced. The default is True, if a value isn't specified. *

* * @return Whether the policy is enforced. The default is True, if a value isn't specified. */ public Boolean isEnforce() { return this.enforce; } /** *

* One or more ports that the policy is enforced for. *

* * @return One or more ports that the policy is enforced for. */ public java.util.List getPorts() { return ports; } /** *

* One or more ports that the policy is enforced for. *

* * @param ports * One or more ports that the policy is enforced for. */ public void setPorts(java.util.Collection ports) { if (ports == null) { this.ports = null; return; } this.ports = new java.util.ArrayList(ports); } /** *

* One or more ports that the policy is enforced for. *

*

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

* * @param ports * One or more ports that the policy is enforced for. * @return Returns a reference to this object so that method calls can be chained together. */ public VirtualGatewayClientPolicyTls withPorts(Integer... ports) { if (this.ports == null) { setPorts(new java.util.ArrayList(ports.length)); } for (Integer ele : ports) { this.ports.add(ele); } return this; } /** *

* One or more ports that the policy is enforced for. *

* * @param ports * One or more ports that the policy is enforced for. * @return Returns a reference to this object so that method calls can be chained together. */ public VirtualGatewayClientPolicyTls withPorts(java.util.Collection ports) { setPorts(ports); return this; } /** *

* A reference to an object that represents a Transport Layer Security (TLS) validation context. *

* * @param validation * A reference to an object that represents a Transport Layer Security (TLS) validation context. */ public void setValidation(VirtualGatewayTlsValidationContext validation) { this.validation = validation; } /** *

* A reference to an object that represents a Transport Layer Security (TLS) validation context. *

* * @return A reference to an object that represents a Transport Layer Security (TLS) validation context. */ public VirtualGatewayTlsValidationContext getValidation() { return this.validation; } /** *

* A reference to an object that represents a Transport Layer Security (TLS) validation context. *

* * @param validation * A reference to an object that represents a Transport Layer Security (TLS) validation context. * @return Returns a reference to this object so that method calls can be chained together. */ public VirtualGatewayClientPolicyTls withValidation(VirtualGatewayTlsValidationContext validation) { setValidation(validation); 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 (getCertificate() != null) sb.append("Certificate: ").append(getCertificate()).append(","); if (getEnforce() != null) sb.append("Enforce: ").append(getEnforce()).append(","); if (getPorts() != null) sb.append("Ports: ").append(getPorts()).append(","); if (getValidation() != null) sb.append("Validation: ").append(getValidation()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof VirtualGatewayClientPolicyTls == false) return false; VirtualGatewayClientPolicyTls other = (VirtualGatewayClientPolicyTls) obj; if (other.getCertificate() == null ^ this.getCertificate() == null) return false; if (other.getCertificate() != null && other.getCertificate().equals(this.getCertificate()) == false) return false; if (other.getEnforce() == null ^ this.getEnforce() == null) return false; if (other.getEnforce() != null && other.getEnforce().equals(this.getEnforce()) == false) return false; if (other.getPorts() == null ^ this.getPorts() == null) return false; if (other.getPorts() != null && other.getPorts().equals(this.getPorts()) == false) return false; if (other.getValidation() == null ^ this.getValidation() == null) return false; if (other.getValidation() != null && other.getValidation().equals(this.getValidation()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCertificate() == null) ? 0 : getCertificate().hashCode()); hashCode = prime * hashCode + ((getEnforce() == null) ? 0 : getEnforce().hashCode()); hashCode = prime * hashCode + ((getPorts() == null) ? 0 : getPorts().hashCode()); hashCode = prime * hashCode + ((getValidation() == null) ? 0 : getValidation().hashCode()); return hashCode; } @Override public VirtualGatewayClientPolicyTls clone() { try { return (VirtualGatewayClientPolicyTls) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.appmesh.model.transform.VirtualGatewayClientPolicyTlsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy