All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ecr.model.Repository Maven / Gradle / Ivy

Go to download

The AWS Java SDK for the Amazon EC2 Container Registry holds the client classes that are used for communicating with the Amazon EC2 Container Registry Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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 representing a repository. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Repository implements Serializable, Cloneable, StructuredPojo { /** *

* The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the arn:aws:ecr * namespace, followed by the region of the repository, Amazon Web Services account ID of the repository owner, * repository namespace, and repository name. For example, * arn:aws:ecr:region:012345678910:repository-namespace/repository-name. *

*/ private String repositoryArn; /** *

* The Amazon Web Services account ID associated with the registry that contains the repository. *

*/ private String registryId; /** *

* The name of the repository. *

*/ private String repositoryName; /** *

* The URI for the repository. You can use this URI for container image push and pull * operations. *

*/ private String repositoryUri; /** *

* The date and time, in JavaScript date format, when the repository was created. *

*/ private java.util.Date createdAt; /** *

* The tag mutability setting for the repository. *

*/ private String imageTagMutability; private ImageScanningConfiguration imageScanningConfiguration; /** *

* The encryption configuration for the repository. This determines how the contents of your repository are * encrypted at rest. *

*/ private EncryptionConfiguration encryptionConfiguration; /** *

* The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the arn:aws:ecr * namespace, followed by the region of the repository, Amazon Web Services account ID of the repository owner, * repository namespace, and repository name. For example, * arn:aws:ecr:region:012345678910:repository-namespace/repository-name. *

* * @param repositoryArn * The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the * arn:aws:ecr namespace, followed by the region of the repository, Amazon Web Services account * ID of the repository owner, repository namespace, and repository name. For example, * arn:aws:ecr:region:012345678910:repository-namespace/repository-name. */ public void setRepositoryArn(String repositoryArn) { this.repositoryArn = repositoryArn; } /** *

* The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the arn:aws:ecr * namespace, followed by the region of the repository, Amazon Web Services account ID of the repository owner, * repository namespace, and repository name. For example, * arn:aws:ecr:region:012345678910:repository-namespace/repository-name. *

* * @return The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the * arn:aws:ecr namespace, followed by the region of the repository, Amazon Web Services account * ID of the repository owner, repository namespace, and repository name. For example, * arn:aws:ecr:region:012345678910:repository-namespace/repository-name. */ public String getRepositoryArn() { return this.repositoryArn; } /** *

* The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the arn:aws:ecr * namespace, followed by the region of the repository, Amazon Web Services account ID of the repository owner, * repository namespace, and repository name. For example, * arn:aws:ecr:region:012345678910:repository-namespace/repository-name. *

* * @param repositoryArn * The Amazon Resource Name (ARN) that identifies the repository. The ARN contains the * arn:aws:ecr namespace, followed by the region of the repository, Amazon Web Services account * ID of the repository owner, repository namespace, and repository name. For example, * arn:aws:ecr:region:012345678910:repository-namespace/repository-name. * @return Returns a reference to this object so that method calls can be chained together. */ public Repository withRepositoryArn(String repositoryArn) { setRepositoryArn(repositoryArn); return this; } /** *

* The Amazon Web Services account ID associated with the registry that contains the repository. *

* * @param registryId * The Amazon Web Services account ID associated with the registry that contains the repository. */ public void setRegistryId(String registryId) { this.registryId = registryId; } /** *

* The Amazon Web Services account ID associated with the registry that contains the repository. *

* * @return The Amazon Web Services account ID associated with the registry that contains the repository. */ public String getRegistryId() { return this.registryId; } /** *

* The Amazon Web Services account ID associated with the registry that contains the repository. *

* * @param registryId * The Amazon Web Services account ID associated with the registry that contains the repository. * @return Returns a reference to this object so that method calls can be chained together. */ public Repository withRegistryId(String registryId) { setRegistryId(registryId); return this; } /** *

* The name of the repository. *

* * @param repositoryName * The name of the repository. */ public void setRepositoryName(String repositoryName) { this.repositoryName = repositoryName; } /** *

* The name of the repository. *

* * @return The name of the repository. */ public String getRepositoryName() { return this.repositoryName; } /** *

* The name of the repository. *

* * @param repositoryName * The name of the repository. * @return Returns a reference to this object so that method calls can be chained together. */ public Repository withRepositoryName(String repositoryName) { setRepositoryName(repositoryName); return this; } /** *

* The URI for the repository. You can use this URI for container image push and pull * operations. *

* * @param repositoryUri * The URI for the repository. You can use this URI for container image push and * pull operations. */ public void setRepositoryUri(String repositoryUri) { this.repositoryUri = repositoryUri; } /** *

* The URI for the repository. You can use this URI for container image push and pull * operations. *

* * @return The URI for the repository. You can use this URI for container image push and * pull operations. */ public String getRepositoryUri() { return this.repositoryUri; } /** *

* The URI for the repository. You can use this URI for container image push and pull * operations. *

* * @param repositoryUri * The URI for the repository. You can use this URI for container image push and * pull operations. * @return Returns a reference to this object so that method calls can be chained together. */ public Repository withRepositoryUri(String repositoryUri) { setRepositoryUri(repositoryUri); return this; } /** *

* The date and time, in JavaScript date format, when the repository was created. *

* * @param createdAt * The date and time, in JavaScript date format, when the repository was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** *

* The date and time, in JavaScript date format, when the repository was created. *

* * @return The date and time, in JavaScript date format, when the repository was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** *

* The date and time, in JavaScript date format, when the repository was created. *

* * @param createdAt * The date and time, in JavaScript date format, when the repository was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Repository withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** *

* The tag mutability setting for the repository. *

* * @param imageTagMutability * The tag mutability setting for the repository. * @see ImageTagMutability */ public void setImageTagMutability(String imageTagMutability) { this.imageTagMutability = imageTagMutability; } /** *

* The tag mutability setting for the repository. *

* * @return The tag mutability setting for the repository. * @see ImageTagMutability */ public String getImageTagMutability() { return this.imageTagMutability; } /** *

* The tag mutability setting for the repository. *

* * @param imageTagMutability * The tag mutability setting for the repository. * @return Returns a reference to this object so that method calls can be chained together. * @see ImageTagMutability */ public Repository withImageTagMutability(String imageTagMutability) { setImageTagMutability(imageTagMutability); return this; } /** *

* The tag mutability setting for the repository. *

* * @param imageTagMutability * The tag mutability setting for the repository. * @return Returns a reference to this object so that method calls can be chained together. * @see ImageTagMutability */ public Repository withImageTagMutability(ImageTagMutability imageTagMutability) { this.imageTagMutability = imageTagMutability.toString(); return this; } /** * @param imageScanningConfiguration */ public void setImageScanningConfiguration(ImageScanningConfiguration imageScanningConfiguration) { this.imageScanningConfiguration = imageScanningConfiguration; } /** * @return */ public ImageScanningConfiguration getImageScanningConfiguration() { return this.imageScanningConfiguration; } /** * @param imageScanningConfiguration * @return Returns a reference to this object so that method calls can be chained together. */ public Repository withImageScanningConfiguration(ImageScanningConfiguration imageScanningConfiguration) { setImageScanningConfiguration(imageScanningConfiguration); return this; } /** *

* The encryption configuration for the repository. This determines how the contents of your repository are * encrypted at rest. *

* * @param encryptionConfiguration * The encryption configuration for the repository. This determines how the contents of your repository are * encrypted at rest. */ public void setEncryptionConfiguration(EncryptionConfiguration encryptionConfiguration) { this.encryptionConfiguration = encryptionConfiguration; } /** *

* The encryption configuration for the repository. This determines how the contents of your repository are * encrypted at rest. *

* * @return The encryption configuration for the repository. This determines how the contents of your repository are * encrypted at rest. */ public EncryptionConfiguration getEncryptionConfiguration() { return this.encryptionConfiguration; } /** *

* The encryption configuration for the repository. This determines how the contents of your repository are * encrypted at rest. *

* * @param encryptionConfiguration * The encryption configuration for the repository. This determines how the contents of your repository are * encrypted at rest. * @return Returns a reference to this object so that method calls can be chained together. */ public Repository withEncryptionConfiguration(EncryptionConfiguration encryptionConfiguration) { setEncryptionConfiguration(encryptionConfiguration); 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 (getRepositoryArn() != null) sb.append("RepositoryArn: ").append(getRepositoryArn()).append(","); if (getRegistryId() != null) sb.append("RegistryId: ").append(getRegistryId()).append(","); if (getRepositoryName() != null) sb.append("RepositoryName: ").append(getRepositoryName()).append(","); if (getRepositoryUri() != null) sb.append("RepositoryUri: ").append(getRepositoryUri()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getImageTagMutability() != null) sb.append("ImageTagMutability: ").append(getImageTagMutability()).append(","); if (getImageScanningConfiguration() != null) sb.append("ImageScanningConfiguration: ").append(getImageScanningConfiguration()).append(","); if (getEncryptionConfiguration() != null) sb.append("EncryptionConfiguration: ").append(getEncryptionConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Repository == false) return false; Repository other = (Repository) obj; if (other.getRepositoryArn() == null ^ this.getRepositoryArn() == null) return false; if (other.getRepositoryArn() != null && other.getRepositoryArn().equals(this.getRepositoryArn()) == false) return false; 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.getRepositoryUri() == null ^ this.getRepositoryUri() == null) return false; if (other.getRepositoryUri() != null && other.getRepositoryUri().equals(this.getRepositoryUri()) == false) return false; if (other.getCreatedAt() == null ^ this.getCreatedAt() == null) return false; if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false) return false; if (other.getImageTagMutability() == null ^ this.getImageTagMutability() == null) return false; if (other.getImageTagMutability() != null && other.getImageTagMutability().equals(this.getImageTagMutability()) == false) return false; if (other.getImageScanningConfiguration() == null ^ this.getImageScanningConfiguration() == null) return false; if (other.getImageScanningConfiguration() != null && other.getImageScanningConfiguration().equals(this.getImageScanningConfiguration()) == false) return false; if (other.getEncryptionConfiguration() == null ^ this.getEncryptionConfiguration() == null) return false; if (other.getEncryptionConfiguration() != null && other.getEncryptionConfiguration().equals(this.getEncryptionConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRepositoryArn() == null) ? 0 : getRepositoryArn().hashCode()); hashCode = prime * hashCode + ((getRegistryId() == null) ? 0 : getRegistryId().hashCode()); hashCode = prime * hashCode + ((getRepositoryName() == null) ? 0 : getRepositoryName().hashCode()); hashCode = prime * hashCode + ((getRepositoryUri() == null) ? 0 : getRepositoryUri().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getImageTagMutability() == null) ? 0 : getImageTagMutability().hashCode()); hashCode = prime * hashCode + ((getImageScanningConfiguration() == null) ? 0 : getImageScanningConfiguration().hashCode()); hashCode = prime * hashCode + ((getEncryptionConfiguration() == null) ? 0 : getEncryptionConfiguration().hashCode()); return hashCode; } @Override public Repository clone() { try { return (Repository) 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.RepositoryMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy