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

com.amazonaws.services.acmpca.model.CustomExtension Maven / Gradle / Ivy

/*
 * 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.acmpca.model;

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

/**
 * 

*

* Specifies the X.509 extension information for a certificate. *

*

* Extensions present in CustomExtensions follow the ApiPassthrough template rules. *

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

*

* Specifies the object identifier (OID) of the X.509 extension. For more information, see the Global OID reference database. *

*/ private String objectIdentifier; /** *

*

* Specifies the base64-encoded value of the X.509 extension. *

*/ private String value; /** *

*

* Specifies the critical flag of the X.509 extension. *

*/ private Boolean critical; /** *

*

* Specifies the object identifier (OID) of the X.509 extension. For more information, see the Global OID reference database. *

* * @param objectIdentifier *

* Specifies the object identifier (OID) of the X.509 extension. For more information, see the Global OID reference database. */ public void setObjectIdentifier(String objectIdentifier) { this.objectIdentifier = objectIdentifier; } /** *

*

* Specifies the object identifier (OID) of the X.509 extension. For more information, see the Global OID reference database. *

* * @return

* Specifies the object identifier (OID) of the X.509 extension. For more information, see the Global OID reference database. */ public String getObjectIdentifier() { return this.objectIdentifier; } /** *

*

* Specifies the object identifier (OID) of the X.509 extension. For more information, see the Global OID reference database. *

* * @param objectIdentifier *

* Specifies the object identifier (OID) of the X.509 extension. For more information, see the Global OID reference database. * @return Returns a reference to this object so that method calls can be chained together. */ public CustomExtension withObjectIdentifier(String objectIdentifier) { setObjectIdentifier(objectIdentifier); return this; } /** *

*

* Specifies the base64-encoded value of the X.509 extension. *

* * @param value *

* Specifies the base64-encoded value of the X.509 extension. */ public void setValue(String value) { this.value = value; } /** *

*

* Specifies the base64-encoded value of the X.509 extension. *

* * @return

* Specifies the base64-encoded value of the X.509 extension. */ public String getValue() { return this.value; } /** *

*

* Specifies the base64-encoded value of the X.509 extension. *

* * @param value *

* Specifies the base64-encoded value of the X.509 extension. * @return Returns a reference to this object so that method calls can be chained together. */ public CustomExtension withValue(String value) { setValue(value); return this; } /** *

*

* Specifies the critical flag of the X.509 extension. *

* * @param critical *

* Specifies the critical flag of the X.509 extension. */ public void setCritical(Boolean critical) { this.critical = critical; } /** *

*

* Specifies the critical flag of the X.509 extension. *

* * @return

* Specifies the critical flag of the X.509 extension. */ public Boolean getCritical() { return this.critical; } /** *

*

* Specifies the critical flag of the X.509 extension. *

* * @param critical *

* Specifies the critical flag of the X.509 extension. * @return Returns a reference to this object so that method calls can be chained together. */ public CustomExtension withCritical(Boolean critical) { setCritical(critical); return this; } /** *

*

* Specifies the critical flag of the X.509 extension. *

* * @return

* Specifies the critical flag of the X.509 extension. */ public Boolean isCritical() { return this.critical; } /** * 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 (getObjectIdentifier() != null) sb.append("ObjectIdentifier: ").append(getObjectIdentifier()).append(","); if (getValue() != null) sb.append("Value: ").append(getValue()).append(","); if (getCritical() != null) sb.append("Critical: ").append(getCritical()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CustomExtension == false) return false; CustomExtension other = (CustomExtension) obj; if (other.getObjectIdentifier() == null ^ this.getObjectIdentifier() == null) return false; if (other.getObjectIdentifier() != null && other.getObjectIdentifier().equals(this.getObjectIdentifier()) == false) return false; if (other.getValue() == null ^ this.getValue() == null) return false; if (other.getValue() != null && other.getValue().equals(this.getValue()) == false) return false; if (other.getCritical() == null ^ this.getCritical() == null) return false; if (other.getCritical() != null && other.getCritical().equals(this.getCritical()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getObjectIdentifier() == null) ? 0 : getObjectIdentifier().hashCode()); hashCode = prime * hashCode + ((getValue() == null) ? 0 : getValue().hashCode()); hashCode = prime * hashCode + ((getCritical() == null) ? 0 : getCritical().hashCode()); return hashCode; } @Override public CustomExtension clone() { try { return (CustomExtension) 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.acmpca.model.transform.CustomExtensionMarshaller.getInstance().marshall(this, protocolMarshaller); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy