com.amazonaws.services.lambda.model.GetLayerVersionByArnResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-lambda Show documentation
/*
* 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.lambda.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetLayerVersionByArnResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* Details about the layer version.
*
*/
private LayerVersionContentOutput content;
/**
*
* The ARN of the layer.
*
*/
private String layerArn;
/**
*
* The ARN of the layer version.
*
*/
private String layerVersionArn;
/**
*
* The description of the version.
*
*/
private String description;
/**
*
* The date that the layer version was created, in ISO-8601 format
* (YYYY-MM-DDThh:mm:ss.sTZD).
*
*/
private String createdDate;
/**
*
* The version number.
*
*/
private Long version;
/**
*
* The layer's compatible runtimes.
*
*
* The following list includes deprecated runtimes. For more information, see Runtime
* deprecation policy.
*
*/
private com.amazonaws.internal.SdkInternalList compatibleRuntimes;
/**
*
* The layer's software license.
*
*/
private String licenseInfo;
/**
*
* A list of compatible instruction set
* architectures.
*
*/
private com.amazonaws.internal.SdkInternalList compatibleArchitectures;
/**
*
* Details about the layer version.
*
*
* @param content
* Details about the layer version.
*/
public void setContent(LayerVersionContentOutput content) {
this.content = content;
}
/**
*
* Details about the layer version.
*
*
* @return Details about the layer version.
*/
public LayerVersionContentOutput getContent() {
return this.content;
}
/**
*
* Details about the layer version.
*
*
* @param content
* Details about the layer version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLayerVersionByArnResult withContent(LayerVersionContentOutput content) {
setContent(content);
return this;
}
/**
*
* The ARN of the layer.
*
*
* @param layerArn
* The ARN of the layer.
*/
public void setLayerArn(String layerArn) {
this.layerArn = layerArn;
}
/**
*
* The ARN of the layer.
*
*
* @return The ARN of the layer.
*/
public String getLayerArn() {
return this.layerArn;
}
/**
*
* The ARN of the layer.
*
*
* @param layerArn
* The ARN of the layer.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLayerVersionByArnResult withLayerArn(String layerArn) {
setLayerArn(layerArn);
return this;
}
/**
*
* The ARN of the layer version.
*
*
* @param layerVersionArn
* The ARN of the layer version.
*/
public void setLayerVersionArn(String layerVersionArn) {
this.layerVersionArn = layerVersionArn;
}
/**
*
* The ARN of the layer version.
*
*
* @return The ARN of the layer version.
*/
public String getLayerVersionArn() {
return this.layerVersionArn;
}
/**
*
* The ARN of the layer version.
*
*
* @param layerVersionArn
* The ARN of the layer version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLayerVersionByArnResult withLayerVersionArn(String layerVersionArn) {
setLayerVersionArn(layerVersionArn);
return this;
}
/**
*
* The description of the version.
*
*
* @param description
* The description of the version.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The description of the version.
*
*
* @return The description of the version.
*/
public String getDescription() {
return this.description;
}
/**
*
* The description of the version.
*
*
* @param description
* The description of the version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLayerVersionByArnResult withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The date that the layer version was created, in ISO-8601 format
* (YYYY-MM-DDThh:mm:ss.sTZD).
*
*
* @param createdDate
* The date that the layer version was created, in ISO-8601
* format (YYYY-MM-DDThh:mm:ss.sTZD).
*/
public void setCreatedDate(String createdDate) {
this.createdDate = createdDate;
}
/**
*
* The date that the layer version was created, in ISO-8601 format
* (YYYY-MM-DDThh:mm:ss.sTZD).
*
*
* @return The date that the layer version was created, in ISO-8601
* format (YYYY-MM-DDThh:mm:ss.sTZD).
*/
public String getCreatedDate() {
return this.createdDate;
}
/**
*
* The date that the layer version was created, in ISO-8601 format
* (YYYY-MM-DDThh:mm:ss.sTZD).
*
*
* @param createdDate
* The date that the layer version was created, in ISO-8601
* format (YYYY-MM-DDThh:mm:ss.sTZD).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLayerVersionByArnResult withCreatedDate(String createdDate) {
setCreatedDate(createdDate);
return this;
}
/**
*
* The version number.
*
*
* @param version
* The version number.
*/
public void setVersion(Long version) {
this.version = version;
}
/**
*
* The version number.
*
*
* @return The version number.
*/
public Long getVersion() {
return this.version;
}
/**
*
* The version number.
*
*
* @param version
* The version number.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLayerVersionByArnResult withVersion(Long version) {
setVersion(version);
return this;
}
/**
*
* The layer's compatible runtimes.
*
*
* The following list includes deprecated runtimes. For more information, see Runtime
* deprecation policy.
*
*
* @return The layer's compatible runtimes.
*
* The following list includes deprecated runtimes. For more information, see Runtime
* deprecation policy.
* @see Runtime
*/
public java.util.List getCompatibleRuntimes() {
if (compatibleRuntimes == null) {
compatibleRuntimes = new com.amazonaws.internal.SdkInternalList();
}
return compatibleRuntimes;
}
/**
*
* The layer's compatible runtimes.
*
*
* The following list includes deprecated runtimes. For more information, see Runtime
* deprecation policy.
*
*
* @param compatibleRuntimes
* The layer's compatible runtimes.
*
* The following list includes deprecated runtimes. For more information, see Runtime
* deprecation policy.
* @see Runtime
*/
public void setCompatibleRuntimes(java.util.Collection compatibleRuntimes) {
if (compatibleRuntimes == null) {
this.compatibleRuntimes = null;
return;
}
this.compatibleRuntimes = new com.amazonaws.internal.SdkInternalList(compatibleRuntimes);
}
/**
*
* The layer's compatible runtimes.
*
*
* The following list includes deprecated runtimes. For more information, see Runtime
* deprecation policy.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCompatibleRuntimes(java.util.Collection)} or {@link #withCompatibleRuntimes(java.util.Collection)} if
* you want to override the existing values.
*
*
* @param compatibleRuntimes
* The layer's compatible runtimes.
*
* The following list includes deprecated runtimes. For more information, see Runtime
* deprecation policy.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Runtime
*/
public GetLayerVersionByArnResult withCompatibleRuntimes(String... compatibleRuntimes) {
if (this.compatibleRuntimes == null) {
setCompatibleRuntimes(new com.amazonaws.internal.SdkInternalList(compatibleRuntimes.length));
}
for (String ele : compatibleRuntimes) {
this.compatibleRuntimes.add(ele);
}
return this;
}
/**
*
* The layer's compatible runtimes.
*
*
* The following list includes deprecated runtimes. For more information, see Runtime
* deprecation policy.
*
*
* @param compatibleRuntimes
* The layer's compatible runtimes.
*
* The following list includes deprecated runtimes. For more information, see Runtime
* deprecation policy.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Runtime
*/
public GetLayerVersionByArnResult withCompatibleRuntimes(java.util.Collection compatibleRuntimes) {
setCompatibleRuntimes(compatibleRuntimes);
return this;
}
/**
*
* The layer's compatible runtimes.
*
*
* The following list includes deprecated runtimes. For more information, see Runtime
* deprecation policy.
*
*
* @param compatibleRuntimes
* The layer's compatible runtimes.
*
* The following list includes deprecated runtimes. For more information, see Runtime
* deprecation policy.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Runtime
*/
public GetLayerVersionByArnResult withCompatibleRuntimes(Runtime... compatibleRuntimes) {
com.amazonaws.internal.SdkInternalList compatibleRuntimesCopy = new com.amazonaws.internal.SdkInternalList(compatibleRuntimes.length);
for (Runtime value : compatibleRuntimes) {
compatibleRuntimesCopy.add(value.toString());
}
if (getCompatibleRuntimes() == null) {
setCompatibleRuntimes(compatibleRuntimesCopy);
} else {
getCompatibleRuntimes().addAll(compatibleRuntimesCopy);
}
return this;
}
/**
*
* The layer's software license.
*
*
* @param licenseInfo
* The layer's software license.
*/
public void setLicenseInfo(String licenseInfo) {
this.licenseInfo = licenseInfo;
}
/**
*
* The layer's software license.
*
*
* @return The layer's software license.
*/
public String getLicenseInfo() {
return this.licenseInfo;
}
/**
*
* The layer's software license.
*
*
* @param licenseInfo
* The layer's software license.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLayerVersionByArnResult withLicenseInfo(String licenseInfo) {
setLicenseInfo(licenseInfo);
return this;
}
/**
*
* A list of compatible instruction set
* architectures.
*
*
* @return A list of compatible instruction set
* architectures.
* @see Architecture
*/
public java.util.List getCompatibleArchitectures() {
if (compatibleArchitectures == null) {
compatibleArchitectures = new com.amazonaws.internal.SdkInternalList();
}
return compatibleArchitectures;
}
/**
*
* A list of compatible instruction set
* architectures.
*
*
* @param compatibleArchitectures
* A list of compatible instruction set
* architectures.
* @see Architecture
*/
public void setCompatibleArchitectures(java.util.Collection compatibleArchitectures) {
if (compatibleArchitectures == null) {
this.compatibleArchitectures = null;
return;
}
this.compatibleArchitectures = new com.amazonaws.internal.SdkInternalList(compatibleArchitectures);
}
/**
*
* A list of compatible instruction set
* architectures.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCompatibleArchitectures(java.util.Collection)} or
* {@link #withCompatibleArchitectures(java.util.Collection)} if you want to override the existing values.
*
*
* @param compatibleArchitectures
* A list of compatible instruction set
* architectures.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Architecture
*/
public GetLayerVersionByArnResult withCompatibleArchitectures(String... compatibleArchitectures) {
if (this.compatibleArchitectures == null) {
setCompatibleArchitectures(new com.amazonaws.internal.SdkInternalList(compatibleArchitectures.length));
}
for (String ele : compatibleArchitectures) {
this.compatibleArchitectures.add(ele);
}
return this;
}
/**
*
* A list of compatible instruction set
* architectures.
*
*
* @param compatibleArchitectures
* A list of compatible instruction set
* architectures.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Architecture
*/
public GetLayerVersionByArnResult withCompatibleArchitectures(java.util.Collection compatibleArchitectures) {
setCompatibleArchitectures(compatibleArchitectures);
return this;
}
/**
*
* A list of compatible instruction set
* architectures.
*
*
* @param compatibleArchitectures
* A list of compatible instruction set
* architectures.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Architecture
*/
public GetLayerVersionByArnResult withCompatibleArchitectures(Architecture... compatibleArchitectures) {
com.amazonaws.internal.SdkInternalList compatibleArchitecturesCopy = new com.amazonaws.internal.SdkInternalList(
compatibleArchitectures.length);
for (Architecture value : compatibleArchitectures) {
compatibleArchitecturesCopy.add(value.toString());
}
if (getCompatibleArchitectures() == null) {
setCompatibleArchitectures(compatibleArchitecturesCopy);
} else {
getCompatibleArchitectures().addAll(compatibleArchitecturesCopy);
}
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 (getContent() != null)
sb.append("Content: ").append(getContent()).append(",");
if (getLayerArn() != null)
sb.append("LayerArn: ").append(getLayerArn()).append(",");
if (getLayerVersionArn() != null)
sb.append("LayerVersionArn: ").append(getLayerVersionArn()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getCreatedDate() != null)
sb.append("CreatedDate: ").append(getCreatedDate()).append(",");
if (getVersion() != null)
sb.append("Version: ").append(getVersion()).append(",");
if (getCompatibleRuntimes() != null)
sb.append("CompatibleRuntimes: ").append(getCompatibleRuntimes()).append(",");
if (getLicenseInfo() != null)
sb.append("LicenseInfo: ").append(getLicenseInfo()).append(",");
if (getCompatibleArchitectures() != null)
sb.append("CompatibleArchitectures: ").append(getCompatibleArchitectures());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetLayerVersionByArnResult == false)
return false;
GetLayerVersionByArnResult other = (GetLayerVersionByArnResult) obj;
if (other.getContent() == null ^ this.getContent() == null)
return false;
if (other.getContent() != null && other.getContent().equals(this.getContent()) == false)
return false;
if (other.getLayerArn() == null ^ this.getLayerArn() == null)
return false;
if (other.getLayerArn() != null && other.getLayerArn().equals(this.getLayerArn()) == false)
return false;
if (other.getLayerVersionArn() == null ^ this.getLayerVersionArn() == null)
return false;
if (other.getLayerVersionArn() != null && other.getLayerVersionArn().equals(this.getLayerVersionArn()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getCreatedDate() == null ^ this.getCreatedDate() == null)
return false;
if (other.getCreatedDate() != null && other.getCreatedDate().equals(this.getCreatedDate()) == false)
return false;
if (other.getVersion() == null ^ this.getVersion() == null)
return false;
if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false)
return false;
if (other.getCompatibleRuntimes() == null ^ this.getCompatibleRuntimes() == null)
return false;
if (other.getCompatibleRuntimes() != null && other.getCompatibleRuntimes().equals(this.getCompatibleRuntimes()) == false)
return false;
if (other.getLicenseInfo() == null ^ this.getLicenseInfo() == null)
return false;
if (other.getLicenseInfo() != null && other.getLicenseInfo().equals(this.getLicenseInfo()) == false)
return false;
if (other.getCompatibleArchitectures() == null ^ this.getCompatibleArchitectures() == null)
return false;
if (other.getCompatibleArchitectures() != null && other.getCompatibleArchitectures().equals(this.getCompatibleArchitectures()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getContent() == null) ? 0 : getContent().hashCode());
hashCode = prime * hashCode + ((getLayerArn() == null) ? 0 : getLayerArn().hashCode());
hashCode = prime * hashCode + ((getLayerVersionArn() == null) ? 0 : getLayerVersionArn().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode());
hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode());
hashCode = prime * hashCode + ((getCompatibleRuntimes() == null) ? 0 : getCompatibleRuntimes().hashCode());
hashCode = prime * hashCode + ((getLicenseInfo() == null) ? 0 : getLicenseInfo().hashCode());
hashCode = prime * hashCode + ((getCompatibleArchitectures() == null) ? 0 : getCompatibleArchitectures().hashCode());
return hashCode;
}
@Override
public GetLayerVersionByArnResult clone() {
try {
return (GetLayerVersionByArnResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}