/* * 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.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Details about a Lambda layer version. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AwsLambdaLayerVersionDetails implements Serializable, Cloneable, StructuredPojo { /** ** The version number. *
*/ private Long version; /** ** The layer's compatible runtimes. Maximum number of five items. *
*
* Valid values: nodejs10.x
| nodejs12.x
| java8
| java11
|
* python2.7
| python3.6
| python3.7
| python3.8
|
* dotnetcore1.0
| dotnetcore2.1
| go1.x
| ruby2.5
|
* provided
*
* Indicates when the version was created. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* 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 AwsLambdaLayerVersionDetails withVersion(Long version) { setVersion(version); return this; } /** ** The layer's compatible runtimes. Maximum number of five items. *
*
* Valid values: nodejs10.x
| nodejs12.x
| java8
| java11
|
* python2.7
| python3.6
| python3.7
| python3.8
|
* dotnetcore1.0
| dotnetcore2.1
| go1.x
| ruby2.5
|
* provided
*
* Valid values:
* The layer's compatible runtimes. Maximum number of five items.
*
* Valid values: nodejs10.x
| nodejs12.x
| java8
|
* java11
| python2.7
| python3.6
| python3.7
|
* python3.8
| dotnetcore1.0
| dotnetcore2.1
| go1.x
|
* ruby2.5
| provided
*/
public java.util.Listnodejs10.x
| nodejs12.x
| java8
| java11
|
* python2.7
| python3.6
| python3.7
| python3.8
|
* dotnetcore1.0
| dotnetcore2.1
| go1.x
| ruby2.5
|
* provided
*
* Valid values:
* The layer's compatible runtimes. Maximum number of five items.
*
* Valid values:
* 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.
* nodejs10.x
| nodejs12.x
| java8
| java11
* | python2.7
| python3.6
| python3.7
| python3.8
|
* dotnetcore1.0
| dotnetcore2.1
| go1.x
| ruby2.5
|
* provided
*/
public void setCompatibleRuntimes(java.util.Collectionnodejs10.x
| nodejs12.x
| java8
| java11
|
* python2.7
| python3.6
| python3.7
| python3.8
|
* dotnetcore1.0
| dotnetcore2.1
| go1.x
| ruby2.5
|
* provided
*
* Valid values:
* The layer's compatible runtimes. Maximum number of five items.
*
* Valid values: nodejs10.x
| nodejs12.x
| java8
| java11
* | python2.7
| python3.6
| python3.7
| python3.8
|
* dotnetcore1.0
| dotnetcore2.1
| go1.x
| ruby2.5
|
* provided
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsLambdaLayerVersionDetails withCompatibleRuntimes(String... compatibleRuntimes) {
if (this.compatibleRuntimes == null) {
setCompatibleRuntimes(new java.util.ArrayListnodejs10.x
| nodejs12.x
| java8
| java11
|
* python2.7
| python3.6
| python3.7
| python3.8
|
* dotnetcore1.0
| dotnetcore2.1
| go1.x
| ruby2.5
|
* provided
*
* Valid values:
* Indicates when the version was created.
*
* Uses the nodejs10.x
| nodejs12.x
| java8
| java11
* | python2.7
| python3.6
| python3.7
| python3.8
|
* dotnetcore1.0
| dotnetcore2.1
| go1.x
| ruby2.5
|
* provided
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsLambdaLayerVersionDetails withCompatibleRuntimes(java.util.Collectiondate-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
*/
public void setCreatedDate(String createdDate) {
this.createdDate = createdDate;
}
/**
*
* Indicates when the version was created. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
*/
public String getCreatedDate() {
return this.createdDate;
}
/**
*
* Indicates when the version was created. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsLambdaLayerVersionDetails withCreatedDate(String createdDate) {
setCreatedDate(createdDate);
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 (getVersion() != null)
sb.append("Version: ").append(getVersion()).append(",");
if (getCompatibleRuntimes() != null)
sb.append("CompatibleRuntimes: ").append(getCompatibleRuntimes()).append(",");
if (getCreatedDate() != null)
sb.append("CreatedDate: ").append(getCreatedDate());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AwsLambdaLayerVersionDetails == false)
return false;
AwsLambdaLayerVersionDetails other = (AwsLambdaLayerVersionDetails) obj;
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.getCreatedDate() == null ^ this.getCreatedDate() == null)
return false;
if (other.getCreatedDate() != null && other.getCreatedDate().equals(this.getCreatedDate()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode());
hashCode = prime * hashCode + ((getCompatibleRuntimes() == null) ? 0 : getCompatibleRuntimes().hashCode());
hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode());
return hashCode;
}
@Override
public AwsLambdaLayerVersionDetails clone() {
try {
return (AwsLambdaLayerVersionDetails) 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.securityhub.model.transform.AwsLambdaLayerVersionDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}