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

com.amazonaws.services.ecr.model.RepositoryCreationTemplate 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;

/**
 * 

* The details of the repository creation template associated with the request. *

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

* The repository namespace prefix associated with the repository creation template. *

*/ private String prefix; /** *

* The description associated with the repository creation template. *

*/ private String description; /** *

* The encryption configuration associated with the repository creation template. *

*/ private EncryptionConfigurationForRepositoryCreationTemplate encryptionConfiguration; /** *

* The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key and an * optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag * values can have a maximum length of 256 characters. *

*/ private java.util.List resourceTags; /** *

* The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLE will * be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image tags within the * repository will be immutable which will prevent them from being overwritten. *

*/ private String imageTagMutability; /** *

* he repository policy to apply to repositories created using the template. A repository policy is a permissions * policy associated with a repository to control access permissions. *

*/ private String repositoryPolicy; /** *

* The lifecycle policy to use for repositories created using the template. *

*/ private String lifecyclePolicy; /** *

* A list of enumerable Strings representing the repository creation scenarios that this template will apply * towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION *

*/ private java.util.List appliedFor; /** *

* The ARN of the role to be assumed by Amazon ECR. *

*/ private String customRoleArn; /** *

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

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

* The date and time, in JavaScript date format, when the repository creation template was last updated. *

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

* The repository namespace prefix associated with the repository creation template. *

* * @param prefix * The repository namespace prefix associated with the repository creation template. */ public void setPrefix(String prefix) { this.prefix = prefix; } /** *

* The repository namespace prefix associated with the repository creation template. *

* * @return The repository namespace prefix associated with the repository creation template. */ public String getPrefix() { return this.prefix; } /** *

* The repository namespace prefix associated with the repository creation template. *

* * @param prefix * The repository namespace prefix associated with the repository creation template. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryCreationTemplate withPrefix(String prefix) { setPrefix(prefix); return this; } /** *

* The description associated with the repository creation template. *

* * @param description * The description associated with the repository creation template. */ public void setDescription(String description) { this.description = description; } /** *

* The description associated with the repository creation template. *

* * @return The description associated with the repository creation template. */ public String getDescription() { return this.description; } /** *

* The description associated with the repository creation template. *

* * @param description * The description associated with the repository creation template. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryCreationTemplate withDescription(String description) { setDescription(description); return this; } /** *

* The encryption configuration associated with the repository creation template. *

* * @param encryptionConfiguration * The encryption configuration associated with the repository creation template. */ public void setEncryptionConfiguration(EncryptionConfigurationForRepositoryCreationTemplate encryptionConfiguration) { this.encryptionConfiguration = encryptionConfiguration; } /** *

* The encryption configuration associated with the repository creation template. *

* * @return The encryption configuration associated with the repository creation template. */ public EncryptionConfigurationForRepositoryCreationTemplate getEncryptionConfiguration() { return this.encryptionConfiguration; } /** *

* The encryption configuration associated with the repository creation template. *

* * @param encryptionConfiguration * The encryption configuration associated with the repository creation template. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryCreationTemplate withEncryptionConfiguration(EncryptionConfigurationForRepositoryCreationTemplate encryptionConfiguration) { setEncryptionConfiguration(encryptionConfiguration); return this; } /** *

* The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key and an * optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag * values can have a maximum length of 256 characters. *

* * @return The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key * and an optional value, both of which you define. Tag keys can have a maximum character length of 128 * characters, and tag values can have a maximum length of 256 characters. */ public java.util.List getResourceTags() { return resourceTags; } /** *

* The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key and an * optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag * values can have a maximum length of 256 characters. *

* * @param resourceTags * The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key * and an optional value, both of which you define. Tag keys can have a maximum character length of 128 * characters, and tag values can have a maximum length of 256 characters. */ public void setResourceTags(java.util.Collection resourceTags) { if (resourceTags == null) { this.resourceTags = null; return; } this.resourceTags = new java.util.ArrayList(resourceTags); } /** *

* The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key and an * optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag * values can have a maximum length of 256 characters. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setResourceTags(java.util.Collection)} or {@link #withResourceTags(java.util.Collection)} if you want to * override the existing values. *

* * @param resourceTags * The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key * and an optional value, both of which you define. Tag keys can have a maximum character length of 128 * characters, and tag values can have a maximum length of 256 characters. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryCreationTemplate withResourceTags(Tag... resourceTags) { if (this.resourceTags == null) { setResourceTags(new java.util.ArrayList(resourceTags.length)); } for (Tag ele : resourceTags) { this.resourceTags.add(ele); } return this; } /** *

* The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key and an * optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag * values can have a maximum length of 256 characters. *

* * @param resourceTags * The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key * and an optional value, both of which you define. Tag keys can have a maximum character length of 128 * characters, and tag values can have a maximum length of 256 characters. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryCreationTemplate withResourceTags(java.util.Collection resourceTags) { setResourceTags(resourceTags); return this; } /** *

* The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLE will * be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image tags within the * repository will be immutable which will prevent them from being overwritten. *

* * @param imageTagMutability * The tag mutability setting for the repository. If this parameter is omitted, the default setting of * MUTABLE will be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image * tags within the repository will be immutable which will prevent them from being overwritten. * @see ImageTagMutability */ public void setImageTagMutability(String imageTagMutability) { this.imageTagMutability = imageTagMutability; } /** *

* The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLE will * be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image tags within the * repository will be immutable which will prevent them from being overwritten. *

* * @return The tag mutability setting for the repository. If this parameter is omitted, the default setting of * MUTABLE will be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image * tags within the repository will be immutable which will prevent them from being overwritten. * @see ImageTagMutability */ public String getImageTagMutability() { return this.imageTagMutability; } /** *

* The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLE will * be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image tags within the * repository will be immutable which will prevent them from being overwritten. *

* * @param imageTagMutability * The tag mutability setting for the repository. If this parameter is omitted, the default setting of * MUTABLE will be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image * tags within the repository will be immutable which will prevent them from being overwritten. * @return Returns a reference to this object so that method calls can be chained together. * @see ImageTagMutability */ public RepositoryCreationTemplate withImageTagMutability(String imageTagMutability) { setImageTagMutability(imageTagMutability); return this; } /** *

* The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLE will * be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image tags within the * repository will be immutable which will prevent them from being overwritten. *

* * @param imageTagMutability * The tag mutability setting for the repository. If this parameter is omitted, the default setting of * MUTABLE will be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image * tags within the repository will be immutable which will prevent them from being overwritten. * @return Returns a reference to this object so that method calls can be chained together. * @see ImageTagMutability */ public RepositoryCreationTemplate withImageTagMutability(ImageTagMutability imageTagMutability) { this.imageTagMutability = imageTagMutability.toString(); return this; } /** *

* he repository policy to apply to repositories created using the template. A repository policy is a permissions * policy associated with a repository to control access permissions. *

* * @param repositoryPolicy * he repository policy to apply to repositories created using the template. A repository policy is a * permissions policy associated with a repository to control access permissions. */ public void setRepositoryPolicy(String repositoryPolicy) { this.repositoryPolicy = repositoryPolicy; } /** *

* he repository policy to apply to repositories created using the template. A repository policy is a permissions * policy associated with a repository to control access permissions. *

* * @return he repository policy to apply to repositories created using the template. A repository policy is a * permissions policy associated with a repository to control access permissions. */ public String getRepositoryPolicy() { return this.repositoryPolicy; } /** *

* he repository policy to apply to repositories created using the template. A repository policy is a permissions * policy associated with a repository to control access permissions. *

* * @param repositoryPolicy * he repository policy to apply to repositories created using the template. A repository policy is a * permissions policy associated with a repository to control access permissions. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryCreationTemplate withRepositoryPolicy(String repositoryPolicy) { setRepositoryPolicy(repositoryPolicy); return this; } /** *

* The lifecycle policy to use for repositories created using the template. *

* * @param lifecyclePolicy * The lifecycle policy to use for repositories created using the template. */ public void setLifecyclePolicy(String lifecyclePolicy) { this.lifecyclePolicy = lifecyclePolicy; } /** *

* The lifecycle policy to use for repositories created using the template. *

* * @return The lifecycle policy to use for repositories created using the template. */ public String getLifecyclePolicy() { return this.lifecyclePolicy; } /** *

* The lifecycle policy to use for repositories created using the template. *

* * @param lifecyclePolicy * The lifecycle policy to use for repositories created using the template. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryCreationTemplate withLifecyclePolicy(String lifecyclePolicy) { setLifecyclePolicy(lifecyclePolicy); return this; } /** *

* A list of enumerable Strings representing the repository creation scenarios that this template will apply * towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION *

* * @return A list of enumerable Strings representing the repository creation scenarios that this template will apply * towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION * @see RCTAppliedFor */ public java.util.List getAppliedFor() { return appliedFor; } /** *

* A list of enumerable Strings representing the repository creation scenarios that this template will apply * towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION *

* * @param appliedFor * A list of enumerable Strings representing the repository creation scenarios that this template will apply * towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION * @see RCTAppliedFor */ public void setAppliedFor(java.util.Collection appliedFor) { if (appliedFor == null) { this.appliedFor = null; return; } this.appliedFor = new java.util.ArrayList(appliedFor); } /** *

* A list of enumerable Strings representing the repository creation scenarios that this template will apply * towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAppliedFor(java.util.Collection)} or {@link #withAppliedFor(java.util.Collection)} if you want to * override the existing values. *

* * @param appliedFor * A list of enumerable Strings representing the repository creation scenarios that this template will apply * towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION * @return Returns a reference to this object so that method calls can be chained together. * @see RCTAppliedFor */ public RepositoryCreationTemplate withAppliedFor(String... appliedFor) { if (this.appliedFor == null) { setAppliedFor(new java.util.ArrayList(appliedFor.length)); } for (String ele : appliedFor) { this.appliedFor.add(ele); } return this; } /** *

* A list of enumerable Strings representing the repository creation scenarios that this template will apply * towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION *

* * @param appliedFor * A list of enumerable Strings representing the repository creation scenarios that this template will apply * towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION * @return Returns a reference to this object so that method calls can be chained together. * @see RCTAppliedFor */ public RepositoryCreationTemplate withAppliedFor(java.util.Collection appliedFor) { setAppliedFor(appliedFor); return this; } /** *

* A list of enumerable Strings representing the repository creation scenarios that this template will apply * towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION *

* * @param appliedFor * A list of enumerable Strings representing the repository creation scenarios that this template will apply * towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION * @return Returns a reference to this object so that method calls can be chained together. * @see RCTAppliedFor */ public RepositoryCreationTemplate withAppliedFor(RCTAppliedFor... appliedFor) { java.util.ArrayList appliedForCopy = new java.util.ArrayList(appliedFor.length); for (RCTAppliedFor value : appliedFor) { appliedForCopy.add(value.toString()); } if (getAppliedFor() == null) { setAppliedFor(appliedForCopy); } else { getAppliedFor().addAll(appliedForCopy); } return this; } /** *

* The ARN of the role to be assumed by Amazon ECR. *

* * @param customRoleArn * The ARN of the role to be assumed by Amazon ECR. */ public void setCustomRoleArn(String customRoleArn) { this.customRoleArn = customRoleArn; } /** *

* The ARN of the role to be assumed by Amazon ECR. *

* * @return The ARN of the role to be assumed by Amazon ECR. */ public String getCustomRoleArn() { return this.customRoleArn; } /** *

* The ARN of the role to be assumed by Amazon ECR. *

* * @param customRoleArn * The ARN of the role to be assumed by Amazon ECR. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryCreationTemplate withCustomRoleArn(String customRoleArn) { setCustomRoleArn(customRoleArn); return this; } /** *

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

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

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

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

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

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

* The date and time, in JavaScript date format, when the repository creation template was last updated. *

* * @param updatedAt * The date and time, in JavaScript date format, when the repository creation template was last updated. */ public void setUpdatedAt(java.util.Date updatedAt) { this.updatedAt = updatedAt; } /** *

* The date and time, in JavaScript date format, when the repository creation template was last updated. *

* * @return The date and time, in JavaScript date format, when the repository creation template was last updated. */ public java.util.Date getUpdatedAt() { return this.updatedAt; } /** *

* The date and time, in JavaScript date format, when the repository creation template was last updated. *

* * @param updatedAt * The date and time, in JavaScript date format, when the repository creation template was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryCreationTemplate withUpdatedAt(java.util.Date updatedAt) { setUpdatedAt(updatedAt); 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 (getPrefix() != null) sb.append("Prefix: ").append(getPrefix()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getEncryptionConfiguration() != null) sb.append("EncryptionConfiguration: ").append(getEncryptionConfiguration()).append(","); if (getResourceTags() != null) sb.append("ResourceTags: ").append(getResourceTags()).append(","); if (getImageTagMutability() != null) sb.append("ImageTagMutability: ").append(getImageTagMutability()).append(","); if (getRepositoryPolicy() != null) sb.append("RepositoryPolicy: ").append(getRepositoryPolicy()).append(","); if (getLifecyclePolicy() != null) sb.append("LifecyclePolicy: ").append(getLifecyclePolicy()).append(","); if (getAppliedFor() != null) sb.append("AppliedFor: ").append(getAppliedFor()).append(","); if (getCustomRoleArn() != null) sb.append("CustomRoleArn: ").append(getCustomRoleArn()).append(","); if (getCreatedAt() != null) sb.append("CreatedAt: ").append(getCreatedAt()).append(","); if (getUpdatedAt() != null) sb.append("UpdatedAt: ").append(getUpdatedAt()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RepositoryCreationTemplate == false) return false; RepositoryCreationTemplate other = (RepositoryCreationTemplate) obj; if (other.getPrefix() == null ^ this.getPrefix() == null) return false; if (other.getPrefix() != null && other.getPrefix().equals(this.getPrefix()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getEncryptionConfiguration() == null ^ this.getEncryptionConfiguration() == null) return false; if (other.getEncryptionConfiguration() != null && other.getEncryptionConfiguration().equals(this.getEncryptionConfiguration()) == false) return false; if (other.getResourceTags() == null ^ this.getResourceTags() == null) return false; if (other.getResourceTags() != null && other.getResourceTags().equals(this.getResourceTags()) == 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.getRepositoryPolicy() == null ^ this.getRepositoryPolicy() == null) return false; if (other.getRepositoryPolicy() != null && other.getRepositoryPolicy().equals(this.getRepositoryPolicy()) == false) return false; if (other.getLifecyclePolicy() == null ^ this.getLifecyclePolicy() == null) return false; if (other.getLifecyclePolicy() != null && other.getLifecyclePolicy().equals(this.getLifecyclePolicy()) == false) return false; if (other.getAppliedFor() == null ^ this.getAppliedFor() == null) return false; if (other.getAppliedFor() != null && other.getAppliedFor().equals(this.getAppliedFor()) == false) return false; if (other.getCustomRoleArn() == null ^ this.getCustomRoleArn() == null) return false; if (other.getCustomRoleArn() != null && other.getCustomRoleArn().equals(this.getCustomRoleArn()) == 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.getUpdatedAt() == null ^ this.getUpdatedAt() == null) return false; if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPrefix() == null) ? 0 : getPrefix().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getEncryptionConfiguration() == null) ? 0 : getEncryptionConfiguration().hashCode()); hashCode = prime * hashCode + ((getResourceTags() == null) ? 0 : getResourceTags().hashCode()); hashCode = prime * hashCode + ((getImageTagMutability() == null) ? 0 : getImageTagMutability().hashCode()); hashCode = prime * hashCode + ((getRepositoryPolicy() == null) ? 0 : getRepositoryPolicy().hashCode()); hashCode = prime * hashCode + ((getLifecyclePolicy() == null) ? 0 : getLifecyclePolicy().hashCode()); hashCode = prime * hashCode + ((getAppliedFor() == null) ? 0 : getAppliedFor().hashCode()); hashCode = prime * hashCode + ((getCustomRoleArn() == null) ? 0 : getCustomRoleArn().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); return hashCode; } @Override public RepositoryCreationTemplate clone() { try { return (RepositoryCreationTemplate) 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.RepositoryCreationTemplateMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy