com.amazonaws.services.securityhub.model.AwsEcrContainerImageDetails Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub 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.securityhub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about an Amazon ECR image.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AwsEcrContainerImageDetails implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Web Services account identifier that is associated with the registry that the image belongs to.
*
*/
private String registryId;
/**
*
* The name of the repository that the image belongs to.
*
*/
private String repositoryName;
/**
*
* The architecture of the image. Valid values are as follows:
*
*
* -
*
* arm64
*
*
* -
*
* i386
*
*
* -
*
* x86_64
*
*
*
*/
private String architecture;
/**
*
* The sha256 digest of the image manifest.
*
*/
private String imageDigest;
/**
*
* The list of tags that are associated with the image.
*
*/
private java.util.List imageTags;
/**
*
* The date and time when the image was pushed to the repository.
*
*
* 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
.
*
*/
private String imagePublishedAt;
/**
*
* The Amazon Web Services account identifier that is associated with the registry that the image belongs to.
*
*
* @param registryId
* The Amazon Web Services account identifier that is associated with the registry that the image belongs to.
*/
public void setRegistryId(String registryId) {
this.registryId = registryId;
}
/**
*
* The Amazon Web Services account identifier that is associated with the registry that the image belongs to.
*
*
* @return The Amazon Web Services account identifier that is associated with the registry that the image belongs
* to.
*/
public String getRegistryId() {
return this.registryId;
}
/**
*
* The Amazon Web Services account identifier that is associated with the registry that the image belongs to.
*
*
* @param registryId
* The Amazon Web Services account identifier that is associated with the registry that the image belongs to.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcrContainerImageDetails withRegistryId(String registryId) {
setRegistryId(registryId);
return this;
}
/**
*
* The name of the repository that the image belongs to.
*
*
* @param repositoryName
* The name of the repository that the image belongs to.
*/
public void setRepositoryName(String repositoryName) {
this.repositoryName = repositoryName;
}
/**
*
* The name of the repository that the image belongs to.
*
*
* @return The name of the repository that the image belongs to.
*/
public String getRepositoryName() {
return this.repositoryName;
}
/**
*
* The name of the repository that the image belongs to.
*
*
* @param repositoryName
* The name of the repository that the image belongs to.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcrContainerImageDetails withRepositoryName(String repositoryName) {
setRepositoryName(repositoryName);
return this;
}
/**
*
* The architecture of the image. Valid values are as follows:
*
*
* -
*
* arm64
*
*
* -
*
* i386
*
*
* -
*
* x86_64
*
*
*
*
* @param architecture
* The architecture of the image. Valid values are as follows:
*
* -
*
* arm64
*
*
* -
*
* i386
*
*
* -
*
* x86_64
*
*
*/
public void setArchitecture(String architecture) {
this.architecture = architecture;
}
/**
*
* The architecture of the image. Valid values are as follows:
*
*
* -
*
* arm64
*
*
* -
*
* i386
*
*
* -
*
* x86_64
*
*
*
*
* @return The architecture of the image. Valid values are as follows:
*
* -
*
* arm64
*
*
* -
*
* i386
*
*
* -
*
* x86_64
*
*
*/
public String getArchitecture() {
return this.architecture;
}
/**
*
* The architecture of the image. Valid values are as follows:
*
*
* -
*
* arm64
*
*
* -
*
* i386
*
*
* -
*
* x86_64
*
*
*
*
* @param architecture
* The architecture of the image. Valid values are as follows:
*
* -
*
* arm64
*
*
* -
*
* i386
*
*
* -
*
* x86_64
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcrContainerImageDetails withArchitecture(String architecture) {
setArchitecture(architecture);
return this;
}
/**
*
* The sha256 digest of the image manifest.
*
*
* @param imageDigest
* The sha256 digest of the image manifest.
*/
public void setImageDigest(String imageDigest) {
this.imageDigest = imageDigest;
}
/**
*
* The sha256 digest of the image manifest.
*
*
* @return The sha256 digest of the image manifest.
*/
public String getImageDigest() {
return this.imageDigest;
}
/**
*
* The sha256 digest of the image manifest.
*
*
* @param imageDigest
* The sha256 digest of the image manifest.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcrContainerImageDetails withImageDigest(String imageDigest) {
setImageDigest(imageDigest);
return this;
}
/**
*
* The list of tags that are associated with the image.
*
*
* @return The list of tags that are associated with the image.
*/
public java.util.List getImageTags() {
return imageTags;
}
/**
*
* The list of tags that are associated with the image.
*
*
* @param imageTags
* The list of tags that are associated with the image.
*/
public void setImageTags(java.util.Collection imageTags) {
if (imageTags == null) {
this.imageTags = null;
return;
}
this.imageTags = new java.util.ArrayList(imageTags);
}
/**
*
* The list of tags that are associated with the image.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setImageTags(java.util.Collection)} or {@link #withImageTags(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param imageTags
* The list of tags that are associated with the image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcrContainerImageDetails withImageTags(String... imageTags) {
if (this.imageTags == null) {
setImageTags(new java.util.ArrayList(imageTags.length));
}
for (String ele : imageTags) {
this.imageTags.add(ele);
}
return this;
}
/**
*
* The list of tags that are associated with the image.
*
*
* @param imageTags
* The list of tags that are associated with the image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcrContainerImageDetails withImageTags(java.util.Collection imageTags) {
setImageTags(imageTags);
return this;
}
/**
*
* The date and time when the image was pushed to the repository.
*
*
* 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
.
*
*
* @param imagePublishedAt
* The date and time when the image was pushed to the repository.
*
* 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 setImagePublishedAt(String imagePublishedAt) {
this.imagePublishedAt = imagePublishedAt;
}
/**
*
* The date and time when the image was pushed to the repository.
*
*
* 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 The date and time when the image was pushed to the repository.
*
* 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 getImagePublishedAt() {
return this.imagePublishedAt;
}
/**
*
* The date and time when the image was pushed to the repository.
*
*
* 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
.
*
*
* @param imagePublishedAt
* The date and time when the image was pushed to the repository.
*
* 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 AwsEcrContainerImageDetails withImagePublishedAt(String imagePublishedAt) {
setImagePublishedAt(imagePublishedAt);
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 (getRegistryId() != null)
sb.append("RegistryId: ").append(getRegistryId()).append(",");
if (getRepositoryName() != null)
sb.append("RepositoryName: ").append(getRepositoryName()).append(",");
if (getArchitecture() != null)
sb.append("Architecture: ").append(getArchitecture()).append(",");
if (getImageDigest() != null)
sb.append("ImageDigest: ").append(getImageDigest()).append(",");
if (getImageTags() != null)
sb.append("ImageTags: ").append(getImageTags()).append(",");
if (getImagePublishedAt() != null)
sb.append("ImagePublishedAt: ").append(getImagePublishedAt());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AwsEcrContainerImageDetails == false)
return false;
AwsEcrContainerImageDetails other = (AwsEcrContainerImageDetails) obj;
if (other.getRegistryId() == null ^ this.getRegistryId() == null)
return false;
if (other.getRegistryId() != null && other.getRegistryId().equals(this.getRegistryId()) == false)
return false;
if (other.getRepositoryName() == null ^ this.getRepositoryName() == null)
return false;
if (other.getRepositoryName() != null && other.getRepositoryName().equals(this.getRepositoryName()) == false)
return false;
if (other.getArchitecture() == null ^ this.getArchitecture() == null)
return false;
if (other.getArchitecture() != null && other.getArchitecture().equals(this.getArchitecture()) == false)
return false;
if (other.getImageDigest() == null ^ this.getImageDigest() == null)
return false;
if (other.getImageDigest() != null && other.getImageDigest().equals(this.getImageDigest()) == false)
return false;
if (other.getImageTags() == null ^ this.getImageTags() == null)
return false;
if (other.getImageTags() != null && other.getImageTags().equals(this.getImageTags()) == false)
return false;
if (other.getImagePublishedAt() == null ^ this.getImagePublishedAt() == null)
return false;
if (other.getImagePublishedAt() != null && other.getImagePublishedAt().equals(this.getImagePublishedAt()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRegistryId() == null) ? 0 : getRegistryId().hashCode());
hashCode = prime * hashCode + ((getRepositoryName() == null) ? 0 : getRepositoryName().hashCode());
hashCode = prime * hashCode + ((getArchitecture() == null) ? 0 : getArchitecture().hashCode());
hashCode = prime * hashCode + ((getImageDigest() == null) ? 0 : getImageDigest().hashCode());
hashCode = prime * hashCode + ((getImageTags() == null) ? 0 : getImageTags().hashCode());
hashCode = prime * hashCode + ((getImagePublishedAt() == null) ? 0 : getImagePublishedAt().hashCode());
return hashCode;
}
@Override
public AwsEcrContainerImageDetails clone() {
try {
return (AwsEcrContainerImageDetails) 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.AwsEcrContainerImageDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}