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

com.amazonaws.services.signer.model.EncryptionAlgorithmOptions Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
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.signer.model;

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

/**
 * 

* The encryption algorithm options that are available to a code-signing job. *

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

* The set of accepted encryption algorithms that are allowed in a code-signing job. *

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

* The default encryption algorithm that is used by a code-signing job. *

*/ private String defaultValue; /** *

* The set of accepted encryption algorithms that are allowed in a code-signing job. *

* * @return The set of accepted encryption algorithms that are allowed in a code-signing job. * @see EncryptionAlgorithm */ public java.util.List getAllowedValues() { return allowedValues; } /** *

* The set of accepted encryption algorithms that are allowed in a code-signing job. *

* * @param allowedValues * The set of accepted encryption algorithms that are allowed in a code-signing job. * @see EncryptionAlgorithm */ public void setAllowedValues(java.util.Collection allowedValues) { if (allowedValues == null) { this.allowedValues = null; return; } this.allowedValues = new java.util.ArrayList(allowedValues); } /** *

* The set of accepted encryption algorithms that are allowed in a code-signing job. *

*

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

* * @param allowedValues * The set of accepted encryption algorithms that are allowed in a code-signing job. * @return Returns a reference to this object so that method calls can be chained together. * @see EncryptionAlgorithm */ public EncryptionAlgorithmOptions withAllowedValues(String... allowedValues) { if (this.allowedValues == null) { setAllowedValues(new java.util.ArrayList(allowedValues.length)); } for (String ele : allowedValues) { this.allowedValues.add(ele); } return this; } /** *

* The set of accepted encryption algorithms that are allowed in a code-signing job. *

* * @param allowedValues * The set of accepted encryption algorithms that are allowed in a code-signing job. * @return Returns a reference to this object so that method calls can be chained together. * @see EncryptionAlgorithm */ public EncryptionAlgorithmOptions withAllowedValues(java.util.Collection allowedValues) { setAllowedValues(allowedValues); return this; } /** *

* The set of accepted encryption algorithms that are allowed in a code-signing job. *

* * @param allowedValues * The set of accepted encryption algorithms that are allowed in a code-signing job. * @return Returns a reference to this object so that method calls can be chained together. * @see EncryptionAlgorithm */ public EncryptionAlgorithmOptions withAllowedValues(EncryptionAlgorithm... allowedValues) { java.util.ArrayList allowedValuesCopy = new java.util.ArrayList(allowedValues.length); for (EncryptionAlgorithm value : allowedValues) { allowedValuesCopy.add(value.toString()); } if (getAllowedValues() == null) { setAllowedValues(allowedValuesCopy); } else { getAllowedValues().addAll(allowedValuesCopy); } return this; } /** *

* The default encryption algorithm that is used by a code-signing job. *

* * @param defaultValue * The default encryption algorithm that is used by a code-signing job. * @see EncryptionAlgorithm */ public void setDefaultValue(String defaultValue) { this.defaultValue = defaultValue; } /** *

* The default encryption algorithm that is used by a code-signing job. *

* * @return The default encryption algorithm that is used by a code-signing job. * @see EncryptionAlgorithm */ public String getDefaultValue() { return this.defaultValue; } /** *

* The default encryption algorithm that is used by a code-signing job. *

* * @param defaultValue * The default encryption algorithm that is used by a code-signing job. * @return Returns a reference to this object so that method calls can be chained together. * @see EncryptionAlgorithm */ public EncryptionAlgorithmOptions withDefaultValue(String defaultValue) { setDefaultValue(defaultValue); return this; } /** *

* The default encryption algorithm that is used by a code-signing job. *

* * @param defaultValue * The default encryption algorithm that is used by a code-signing job. * @return Returns a reference to this object so that method calls can be chained together. * @see EncryptionAlgorithm */ public EncryptionAlgorithmOptions withDefaultValue(EncryptionAlgorithm defaultValue) { this.defaultValue = defaultValue.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 (getAllowedValues() != null) sb.append("AllowedValues: ").append(getAllowedValues()).append(","); if (getDefaultValue() != null) sb.append("DefaultValue: ").append(getDefaultValue()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof EncryptionAlgorithmOptions == false) return false; EncryptionAlgorithmOptions other = (EncryptionAlgorithmOptions) obj; if (other.getAllowedValues() == null ^ this.getAllowedValues() == null) return false; if (other.getAllowedValues() != null && other.getAllowedValues().equals(this.getAllowedValues()) == false) return false; if (other.getDefaultValue() == null ^ this.getDefaultValue() == null) return false; if (other.getDefaultValue() != null && other.getDefaultValue().equals(this.getDefaultValue()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAllowedValues() == null) ? 0 : getAllowedValues().hashCode()); hashCode = prime * hashCode + ((getDefaultValue() == null) ? 0 : getDefaultValue().hashCode()); return hashCode; } @Override public EncryptionAlgorithmOptions clone() { try { return (EncryptionAlgorithmOptions) 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.signer.model.transform.EncryptionAlgorithmOptionsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy