/* * 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.ecrpublic.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/test
.
*
* The Amazon Web Services account ID that's associated with the public 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.
*
* The date and time, in JavaScript date format, when the repository was created. *
*/ private java.util.Date createdAt; /** *
* 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/test
.
*
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/test
.
*/
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/test
.
*
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/test
.
*/
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/test
.
*
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/test
.
* @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 that's associated with the public registry that contains the repository. *
* * @param registryId * The Amazon Web Services account ID that's associated with the public registry that contains the * repository. */ public void setRegistryId(String registryId) { this.registryId = registryId; } /** ** The Amazon Web Services account ID that's associated with the public registry that contains the repository. *
* * @return The Amazon Web Services account ID that's associated with the public registry that contains the * repository. */ public String getRegistryId() { return this.registryId; } /** ** The Amazon Web Services account ID that's associated with the public registry that contains the repository. *
* * @param registryId * The Amazon Web Services account ID that's associated with the public 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.
*
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.
*
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.
*
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; } /** * 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()); 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; 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()); 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.ecrpublic.model.transform.RepositoryMarshaller.getInstance().marshall(this, protocolMarshaller); } }