com.amazonaws.services.lambda.model.GetLayerVersionResult Maven / Gradle / Ivy
/*
* Copyright 2015-2020 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 GetLayerVersionResult 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.
*
*/
private com.amazonaws.internal.SdkInternalList compatibleRuntimes;
/**
*
* The layer's software license.
*
*/
private String licenseInfo;
/**
*
* 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 GetLayerVersionResult 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 GetLayerVersionResult 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 GetLayerVersionResult 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 GetLayerVersionResult 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 GetLayerVersionResult 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 GetLayerVersionResult withVersion(Long version) {
setVersion(version);
return this;
}
/**
*
* The layer's compatible runtimes.
*
*
* @return The layer's compatible runtimes.
* @see Runtime
*/
public java.util.List getCompatibleRuntimes() {
if (compatibleRuntimes == null) {
compatibleRuntimes = new com.amazonaws.internal.SdkInternalList();
}
return compatibleRuntimes;
}
/**
*
* The layer's compatible runtimes.
*
*
* @param compatibleRuntimes
* The layer's compatible runtimes.
* @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.
*
*
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Runtime
*/
public GetLayerVersionResult 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.
*
*
* @param compatibleRuntimes
* The layer's compatible runtimes.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Runtime
*/
public GetLayerVersionResult withCompatibleRuntimes(java.util.Collection compatibleRuntimes) {
setCompatibleRuntimes(compatibleRuntimes);
return this;
}
/**
*
* The layer's compatible runtimes.
*
*
* @param compatibleRuntimes
* The layer's compatible runtimes.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Runtime
*/
public GetLayerVersionResult 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 GetLayerVersionResult withLicenseInfo(String licenseInfo) {
setLicenseInfo(licenseInfo);
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());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetLayerVersionResult == false)
return false;
GetLayerVersionResult other = (GetLayerVersionResult) 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;
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());
return hashCode;
}
@Override
public GetLayerVersionResult clone() {
try {
return (GetLayerVersionResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}