com.amazonaws.services.lambda.model.CodeSigningPolicies Maven / Gradle / Ivy
Show all versions of aws-java-sdk-lambda Show documentation
/*
* 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.lambda.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Code signing configuration policies specify the validation failure action for signature mismatch or expiry.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CodeSigningPolicies implements Serializable, Cloneable, StructuredPojo {
/**
*
* Code signing configuration policy for deployment validation failure. If you set the policy to
* Enforce
, Lambda blocks the deployment request if signature validation checks fail. If you set the
* policy to Warn
, Lambda allows the deployment and creates a CloudWatch log.
*
*
* Default value: Warn
*
*/
private String untrustedArtifactOnDeployment;
/**
*
* Code signing configuration policy for deployment validation failure. If you set the policy to
* Enforce
, Lambda blocks the deployment request if signature validation checks fail. If you set the
* policy to Warn
, Lambda allows the deployment and creates a CloudWatch log.
*
*
* Default value: Warn
*
*
* @param untrustedArtifactOnDeployment
* Code signing configuration policy for deployment validation failure. If you set the policy to
* Enforce
, Lambda blocks the deployment request if signature validation checks fail. If you set
* the policy to Warn
, Lambda allows the deployment and creates a CloudWatch log.
*
* Default value: Warn
* @see CodeSigningPolicy
*/
public void setUntrustedArtifactOnDeployment(String untrustedArtifactOnDeployment) {
this.untrustedArtifactOnDeployment = untrustedArtifactOnDeployment;
}
/**
*
* Code signing configuration policy for deployment validation failure. If you set the policy to
* Enforce
, Lambda blocks the deployment request if signature validation checks fail. If you set the
* policy to Warn
, Lambda allows the deployment and creates a CloudWatch log.
*
*
* Default value: Warn
*
*
* @return Code signing configuration policy for deployment validation failure. If you set the policy to
* Enforce
, Lambda blocks the deployment request if signature validation checks fail. If you
* set the policy to Warn
, Lambda allows the deployment and creates a CloudWatch log.
*
* Default value: Warn
* @see CodeSigningPolicy
*/
public String getUntrustedArtifactOnDeployment() {
return this.untrustedArtifactOnDeployment;
}
/**
*
* Code signing configuration policy for deployment validation failure. If you set the policy to
* Enforce
, Lambda blocks the deployment request if signature validation checks fail. If you set the
* policy to Warn
, Lambda allows the deployment and creates a CloudWatch log.
*
*
* Default value: Warn
*
*
* @param untrustedArtifactOnDeployment
* Code signing configuration policy for deployment validation failure. If you set the policy to
* Enforce
, Lambda blocks the deployment request if signature validation checks fail. If you set
* the policy to Warn
, Lambda allows the deployment and creates a CloudWatch log.
*
* Default value: Warn
* @return Returns a reference to this object so that method calls can be chained together.
* @see CodeSigningPolicy
*/
public CodeSigningPolicies withUntrustedArtifactOnDeployment(String untrustedArtifactOnDeployment) {
setUntrustedArtifactOnDeployment(untrustedArtifactOnDeployment);
return this;
}
/**
*
* Code signing configuration policy for deployment validation failure. If you set the policy to
* Enforce
, Lambda blocks the deployment request if signature validation checks fail. If you set the
* policy to Warn
, Lambda allows the deployment and creates a CloudWatch log.
*
*
* Default value: Warn
*
*
* @param untrustedArtifactOnDeployment
* Code signing configuration policy for deployment validation failure. If you set the policy to
* Enforce
, Lambda blocks the deployment request if signature validation checks fail. If you set
* the policy to Warn
, Lambda allows the deployment and creates a CloudWatch log.
*
* Default value: Warn
* @return Returns a reference to this object so that method calls can be chained together.
* @see CodeSigningPolicy
*/
public CodeSigningPolicies withUntrustedArtifactOnDeployment(CodeSigningPolicy untrustedArtifactOnDeployment) {
this.untrustedArtifactOnDeployment = untrustedArtifactOnDeployment.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 (getUntrustedArtifactOnDeployment() != null)
sb.append("UntrustedArtifactOnDeployment: ").append(getUntrustedArtifactOnDeployment());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CodeSigningPolicies == false)
return false;
CodeSigningPolicies other = (CodeSigningPolicies) obj;
if (other.getUntrustedArtifactOnDeployment() == null ^ this.getUntrustedArtifactOnDeployment() == null)
return false;
if (other.getUntrustedArtifactOnDeployment() != null
&& other.getUntrustedArtifactOnDeployment().equals(this.getUntrustedArtifactOnDeployment()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getUntrustedArtifactOnDeployment() == null) ? 0 : getUntrustedArtifactOnDeployment().hashCode());
return hashCode;
}
@Override
public CodeSigningPolicies clone() {
try {
return (CodeSigningPolicies) 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.lambda.model.transform.CodeSigningPoliciesMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}