com.amazonaws.services.ecr.model.ImageDetail Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ecr 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.ecr.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* An object that describes an image returned by a DescribeImages operation.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ImageDetail implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Web Services account ID associated with the registry to which this image belongs.
*
*/
private String registryId;
/**
*
* The name of the repository to which this image belongs.
*
*/
private String repositoryName;
/**
*
* The sha256
digest of the image manifest.
*
*/
private String imageDigest;
/**
*
* The list of tags associated with this image.
*
*/
private java.util.List imageTags;
/**
*
* The size, in bytes, of the image in the repository.
*
*
* If the image is a manifest list, this will be the max size of all manifests in the list.
*
*
*
* Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker
* registry. The output of the docker images
command shows the uncompressed image size, so it may
* return a larger image size than the image sizes returned by DescribeImages.
*
*
*/
private Long imageSizeInBytes;
/**
*
* The date and time, expressed in standard JavaScript date format, at which the current image was pushed to the
* repository.
*
*/
private java.util.Date imagePushedAt;
/**
*
* The current state of the scan.
*
*/
private ImageScanStatus imageScanStatus;
/**
*
* A summary of the last completed image scan.
*
*/
private ImageScanFindingsSummary imageScanFindingsSummary;
/**
*
* The media type of the image manifest.
*
*/
private String imageManifestMediaType;
/**
*
* The artifact media type of the image.
*
*/
private String artifactMediaType;
/**
*
* The date and time, expressed in standard JavaScript date format, when Amazon ECR recorded the last image pull.
*
*
*
* Amazon ECR refreshes the last image pull timestamp at least once every 24 hours. For example, if you pull an
* image once a day then the lastRecordedPullTime
timestamp will indicate the exact time that the image
* was last pulled. However, if you pull an image once an hour, because Amazon ECR refreshes the
* lastRecordedPullTime
timestamp at least once every 24 hours, the result may not be the exact time
* that the image was last pulled.
*
*
*/
private java.util.Date lastRecordedPullTime;
/**
*
* The Amazon Web Services account ID associated with the registry to which this image belongs.
*
*
* @param registryId
* The Amazon Web Services account ID associated with the registry to which this image belongs.
*/
public void setRegistryId(String registryId) {
this.registryId = registryId;
}
/**
*
* The Amazon Web Services account ID associated with the registry to which this image belongs.
*
*
* @return The Amazon Web Services account ID associated with the registry to which this image belongs.
*/
public String getRegistryId() {
return this.registryId;
}
/**
*
* The Amazon Web Services account ID associated with the registry to which this image belongs.
*
*
* @param registryId
* The Amazon Web Services account ID associated with the registry to which this image belongs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImageDetail withRegistryId(String registryId) {
setRegistryId(registryId);
return this;
}
/**
*
* The name of the repository to which this image belongs.
*
*
* @param repositoryName
* The name of the repository to which this image belongs.
*/
public void setRepositoryName(String repositoryName) {
this.repositoryName = repositoryName;
}
/**
*
* The name of the repository to which this image belongs.
*
*
* @return The name of the repository to which this image belongs.
*/
public String getRepositoryName() {
return this.repositoryName;
}
/**
*
* The name of the repository to which this image belongs.
*
*
* @param repositoryName
* The name of the repository to which this image belongs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImageDetail withRepositoryName(String repositoryName) {
setRepositoryName(repositoryName);
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 ImageDetail withImageDigest(String imageDigest) {
setImageDigest(imageDigest);
return this;
}
/**
*
* The list of tags associated with this image.
*
*
* @return The list of tags associated with this image.
*/
public java.util.List getImageTags() {
return imageTags;
}
/**
*
* The list of tags associated with this image.
*
*
* @param imageTags
* The list of tags associated with this 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 associated with this 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 associated with this image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImageDetail 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 associated with this image.
*
*
* @param imageTags
* The list of tags associated with this image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImageDetail withImageTags(java.util.Collection imageTags) {
setImageTags(imageTags);
return this;
}
/**
*
* The size, in bytes, of the image in the repository.
*
*
* If the image is a manifest list, this will be the max size of all manifests in the list.
*
*
*
* Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker
* registry. The output of the docker images
command shows the uncompressed image size, so it may
* return a larger image size than the image sizes returned by DescribeImages.
*
*
*
* @param imageSizeInBytes
* The size, in bytes, of the image in the repository.
*
* If the image is a manifest list, this will be the max size of all manifests in the list.
*
*
*
* Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2
* Docker registry. The output of the docker images
command shows the uncompressed image size,
* so it may return a larger image size than the image sizes returned by DescribeImages.
*
*/
public void setImageSizeInBytes(Long imageSizeInBytes) {
this.imageSizeInBytes = imageSizeInBytes;
}
/**
*
* The size, in bytes, of the image in the repository.
*
*
* If the image is a manifest list, this will be the max size of all manifests in the list.
*
*
*
* Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker
* registry. The output of the docker images
command shows the uncompressed image size, so it may
* return a larger image size than the image sizes returned by DescribeImages.
*
*
*
* @return The size, in bytes, of the image in the repository.
*
* If the image is a manifest list, this will be the max size of all manifests in the list.
*
*
*
* Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2
* Docker registry. The output of the docker images
command shows the uncompressed image size,
* so it may return a larger image size than the image sizes returned by DescribeImages.
*
*/
public Long getImageSizeInBytes() {
return this.imageSizeInBytes;
}
/**
*
* The size, in bytes, of the image in the repository.
*
*
* If the image is a manifest list, this will be the max size of all manifests in the list.
*
*
*
* Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker
* registry. The output of the docker images
command shows the uncompressed image size, so it may
* return a larger image size than the image sizes returned by DescribeImages.
*
*
*
* @param imageSizeInBytes
* The size, in bytes, of the image in the repository.
*
* If the image is a manifest list, this will be the max size of all manifests in the list.
*
*
*
* Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2
* Docker registry. The output of the docker images
command shows the uncompressed image size,
* so it may return a larger image size than the image sizes returned by DescribeImages.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImageDetail withImageSizeInBytes(Long imageSizeInBytes) {
setImageSizeInBytes(imageSizeInBytes);
return this;
}
/**
*
* The date and time, expressed in standard JavaScript date format, at which the current image was pushed to the
* repository.
*
*
* @param imagePushedAt
* The date and time, expressed in standard JavaScript date format, at which the current image was pushed to
* the repository.
*/
public void setImagePushedAt(java.util.Date imagePushedAt) {
this.imagePushedAt = imagePushedAt;
}
/**
*
* The date and time, expressed in standard JavaScript date format, at which the current image was pushed to the
* repository.
*
*
* @return The date and time, expressed in standard JavaScript date format, at which the current image was pushed to
* the repository.
*/
public java.util.Date getImagePushedAt() {
return this.imagePushedAt;
}
/**
*
* The date and time, expressed in standard JavaScript date format, at which the current image was pushed to the
* repository.
*
*
* @param imagePushedAt
* The date and time, expressed in standard JavaScript date format, at which the current image was pushed to
* the repository.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImageDetail withImagePushedAt(java.util.Date imagePushedAt) {
setImagePushedAt(imagePushedAt);
return this;
}
/**
*
* The current state of the scan.
*
*
* @param imageScanStatus
* The current state of the scan.
*/
public void setImageScanStatus(ImageScanStatus imageScanStatus) {
this.imageScanStatus = imageScanStatus;
}
/**
*
* The current state of the scan.
*
*
* @return The current state of the scan.
*/
public ImageScanStatus getImageScanStatus() {
return this.imageScanStatus;
}
/**
*
* The current state of the scan.
*
*
* @param imageScanStatus
* The current state of the scan.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImageDetail withImageScanStatus(ImageScanStatus imageScanStatus) {
setImageScanStatus(imageScanStatus);
return this;
}
/**
*
* A summary of the last completed image scan.
*
*
* @param imageScanFindingsSummary
* A summary of the last completed image scan.
*/
public void setImageScanFindingsSummary(ImageScanFindingsSummary imageScanFindingsSummary) {
this.imageScanFindingsSummary = imageScanFindingsSummary;
}
/**
*
* A summary of the last completed image scan.
*
*
* @return A summary of the last completed image scan.
*/
public ImageScanFindingsSummary getImageScanFindingsSummary() {
return this.imageScanFindingsSummary;
}
/**
*
* A summary of the last completed image scan.
*
*
* @param imageScanFindingsSummary
* A summary of the last completed image scan.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImageDetail withImageScanFindingsSummary(ImageScanFindingsSummary imageScanFindingsSummary) {
setImageScanFindingsSummary(imageScanFindingsSummary);
return this;
}
/**
*
* The media type of the image manifest.
*
*
* @param imageManifestMediaType
* The media type of the image manifest.
*/
public void setImageManifestMediaType(String imageManifestMediaType) {
this.imageManifestMediaType = imageManifestMediaType;
}
/**
*
* The media type of the image manifest.
*
*
* @return The media type of the image manifest.
*/
public String getImageManifestMediaType() {
return this.imageManifestMediaType;
}
/**
*
* The media type of the image manifest.
*
*
* @param imageManifestMediaType
* The media type of the image manifest.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImageDetail withImageManifestMediaType(String imageManifestMediaType) {
setImageManifestMediaType(imageManifestMediaType);
return this;
}
/**
*
* The artifact media type of the image.
*
*
* @param artifactMediaType
* The artifact media type of the image.
*/
public void setArtifactMediaType(String artifactMediaType) {
this.artifactMediaType = artifactMediaType;
}
/**
*
* The artifact media type of the image.
*
*
* @return The artifact media type of the image.
*/
public String getArtifactMediaType() {
return this.artifactMediaType;
}
/**
*
* The artifact media type of the image.
*
*
* @param artifactMediaType
* The artifact media type of the image.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImageDetail withArtifactMediaType(String artifactMediaType) {
setArtifactMediaType(artifactMediaType);
return this;
}
/**
*
* The date and time, expressed in standard JavaScript date format, when Amazon ECR recorded the last image pull.
*
*
*
* Amazon ECR refreshes the last image pull timestamp at least once every 24 hours. For example, if you pull an
* image once a day then the lastRecordedPullTime
timestamp will indicate the exact time that the image
* was last pulled. However, if you pull an image once an hour, because Amazon ECR refreshes the
* lastRecordedPullTime
timestamp at least once every 24 hours, the result may not be the exact time
* that the image was last pulled.
*
*
*
* @param lastRecordedPullTime
* The date and time, expressed in standard JavaScript date format, when Amazon ECR recorded the last image
* pull.
*
* Amazon ECR refreshes the last image pull timestamp at least once every 24 hours. For example, if you pull
* an image once a day then the lastRecordedPullTime
timestamp will indicate the exact time that
* the image was last pulled. However, if you pull an image once an hour, because Amazon ECR refreshes the
* lastRecordedPullTime
timestamp at least once every 24 hours, the result may not be the exact
* time that the image was last pulled.
*
*/
public void setLastRecordedPullTime(java.util.Date lastRecordedPullTime) {
this.lastRecordedPullTime = lastRecordedPullTime;
}
/**
*
* The date and time, expressed in standard JavaScript date format, when Amazon ECR recorded the last image pull.
*
*
*
* Amazon ECR refreshes the last image pull timestamp at least once every 24 hours. For example, if you pull an
* image once a day then the lastRecordedPullTime
timestamp will indicate the exact time that the image
* was last pulled. However, if you pull an image once an hour, because Amazon ECR refreshes the
* lastRecordedPullTime
timestamp at least once every 24 hours, the result may not be the exact time
* that the image was last pulled.
*
*
*
* @return The date and time, expressed in standard JavaScript date format, when Amazon ECR recorded the last image
* pull.
*
* Amazon ECR refreshes the last image pull timestamp at least once every 24 hours. For example, if you pull
* an image once a day then the lastRecordedPullTime
timestamp will indicate the exact time
* that the image was last pulled. However, if you pull an image once an hour, because Amazon ECR refreshes
* the lastRecordedPullTime
timestamp at least once every 24 hours, the result may not be the
* exact time that the image was last pulled.
*
*/
public java.util.Date getLastRecordedPullTime() {
return this.lastRecordedPullTime;
}
/**
*
* The date and time, expressed in standard JavaScript date format, when Amazon ECR recorded the last image pull.
*
*
*
* Amazon ECR refreshes the last image pull timestamp at least once every 24 hours. For example, if you pull an
* image once a day then the lastRecordedPullTime
timestamp will indicate the exact time that the image
* was last pulled. However, if you pull an image once an hour, because Amazon ECR refreshes the
* lastRecordedPullTime
timestamp at least once every 24 hours, the result may not be the exact time
* that the image was last pulled.
*
*
*
* @param lastRecordedPullTime
* The date and time, expressed in standard JavaScript date format, when Amazon ECR recorded the last image
* pull.
*
* Amazon ECR refreshes the last image pull timestamp at least once every 24 hours. For example, if you pull
* an image once a day then the lastRecordedPullTime
timestamp will indicate the exact time that
* the image was last pulled. However, if you pull an image once an hour, because Amazon ECR refreshes the
* lastRecordedPullTime
timestamp at least once every 24 hours, the result may not be the exact
* time that the image was last pulled.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ImageDetail withLastRecordedPullTime(java.util.Date lastRecordedPullTime) {
setLastRecordedPullTime(lastRecordedPullTime);
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 (getImageDigest() != null)
sb.append("ImageDigest: ").append(getImageDigest()).append(",");
if (getImageTags() != null)
sb.append("ImageTags: ").append(getImageTags()).append(",");
if (getImageSizeInBytes() != null)
sb.append("ImageSizeInBytes: ").append(getImageSizeInBytes()).append(",");
if (getImagePushedAt() != null)
sb.append("ImagePushedAt: ").append(getImagePushedAt()).append(",");
if (getImageScanStatus() != null)
sb.append("ImageScanStatus: ").append(getImageScanStatus()).append(",");
if (getImageScanFindingsSummary() != null)
sb.append("ImageScanFindingsSummary: ").append(getImageScanFindingsSummary()).append(",");
if (getImageManifestMediaType() != null)
sb.append("ImageManifestMediaType: ").append(getImageManifestMediaType()).append(",");
if (getArtifactMediaType() != null)
sb.append("ArtifactMediaType: ").append(getArtifactMediaType()).append(",");
if (getLastRecordedPullTime() != null)
sb.append("LastRecordedPullTime: ").append(getLastRecordedPullTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ImageDetail == false)
return false;
ImageDetail other = (ImageDetail) 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.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.getImageSizeInBytes() == null ^ this.getImageSizeInBytes() == null)
return false;
if (other.getImageSizeInBytes() != null && other.getImageSizeInBytes().equals(this.getImageSizeInBytes()) == false)
return false;
if (other.getImagePushedAt() == null ^ this.getImagePushedAt() == null)
return false;
if (other.getImagePushedAt() != null && other.getImagePushedAt().equals(this.getImagePushedAt()) == false)
return false;
if (other.getImageScanStatus() == null ^ this.getImageScanStatus() == null)
return false;
if (other.getImageScanStatus() != null && other.getImageScanStatus().equals(this.getImageScanStatus()) == false)
return false;
if (other.getImageScanFindingsSummary() == null ^ this.getImageScanFindingsSummary() == null)
return false;
if (other.getImageScanFindingsSummary() != null && other.getImageScanFindingsSummary().equals(this.getImageScanFindingsSummary()) == false)
return false;
if (other.getImageManifestMediaType() == null ^ this.getImageManifestMediaType() == null)
return false;
if (other.getImageManifestMediaType() != null && other.getImageManifestMediaType().equals(this.getImageManifestMediaType()) == false)
return false;
if (other.getArtifactMediaType() == null ^ this.getArtifactMediaType() == null)
return false;
if (other.getArtifactMediaType() != null && other.getArtifactMediaType().equals(this.getArtifactMediaType()) == false)
return false;
if (other.getLastRecordedPullTime() == null ^ this.getLastRecordedPullTime() == null)
return false;
if (other.getLastRecordedPullTime() != null && other.getLastRecordedPullTime().equals(this.getLastRecordedPullTime()) == 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 + ((getImageDigest() == null) ? 0 : getImageDigest().hashCode());
hashCode = prime * hashCode + ((getImageTags() == null) ? 0 : getImageTags().hashCode());
hashCode = prime * hashCode + ((getImageSizeInBytes() == null) ? 0 : getImageSizeInBytes().hashCode());
hashCode = prime * hashCode + ((getImagePushedAt() == null) ? 0 : getImagePushedAt().hashCode());
hashCode = prime * hashCode + ((getImageScanStatus() == null) ? 0 : getImageScanStatus().hashCode());
hashCode = prime * hashCode + ((getImageScanFindingsSummary() == null) ? 0 : getImageScanFindingsSummary().hashCode());
hashCode = prime * hashCode + ((getImageManifestMediaType() == null) ? 0 : getImageManifestMediaType().hashCode());
hashCode = prime * hashCode + ((getArtifactMediaType() == null) ? 0 : getArtifactMediaType().hashCode());
hashCode = prime * hashCode + ((getLastRecordedPullTime() == null) ? 0 : getLastRecordedPullTime().hashCode());
return hashCode;
}
@Override
public ImageDetail clone() {
try {
return (ImageDetail) 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.ecr.model.transform.ImageDetailMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}