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

com.amazonaws.services.imagebuilder.model.LifecyclePolicySummary Maven / Gradle / Ivy

/*
 * 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.imagebuilder.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Contains a summary of lifecycle policy resources. *

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

* The Amazon Resource Name (ARN) of the lifecycle policy summary resource. *

*/ private String arn; /** *

* The name of the lifecycle policy. *

*/ private String name; /** *

* Optional description for the lifecycle policy. *

*/ private String description; /** *

* The lifecycle policy resource status. *

*/ private String status; /** *

* The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle policy. *

*/ private String executionRole; /** *

* The type of resources the lifecycle policy targets. *

*/ private String resourceType; /** *

* The timestamp when Image Builder created the lifecycle policy resource. *

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

* The timestamp when Image Builder updated the lifecycle policy resource. *

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

* The timestamp for the last time Image Builder ran the lifecycle policy. *

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

* To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of * tags. Each tag consists of a key and an optional value, both of which you define. *

*/ private java.util.Map tags; /** *

* The Amazon Resource Name (ARN) of the lifecycle policy summary resource. *

* * @param arn * The Amazon Resource Name (ARN) of the lifecycle policy summary resource. */ public void setArn(String arn) { this.arn = arn; } /** *

* The Amazon Resource Name (ARN) of the lifecycle policy summary resource. *

* * @return The Amazon Resource Name (ARN) of the lifecycle policy summary resource. */ public String getArn() { return this.arn; } /** *

* The Amazon Resource Name (ARN) of the lifecycle policy summary resource. *

* * @param arn * The Amazon Resource Name (ARN) of the lifecycle policy summary resource. * @return Returns a reference to this object so that method calls can be chained together. */ public LifecyclePolicySummary withArn(String arn) { setArn(arn); return this; } /** *

* The name of the lifecycle policy. *

* * @param name * The name of the lifecycle policy. */ public void setName(String name) { this.name = name; } /** *

* The name of the lifecycle policy. *

* * @return The name of the lifecycle policy. */ public String getName() { return this.name; } /** *

* The name of the lifecycle policy. *

* * @param name * The name of the lifecycle policy. * @return Returns a reference to this object so that method calls can be chained together. */ public LifecyclePolicySummary withName(String name) { setName(name); return this; } /** *

* Optional description for the lifecycle policy. *

* * @param description * Optional description for the lifecycle policy. */ public void setDescription(String description) { this.description = description; } /** *

* Optional description for the lifecycle policy. *

* * @return Optional description for the lifecycle policy. */ public String getDescription() { return this.description; } /** *

* Optional description for the lifecycle policy. *

* * @param description * Optional description for the lifecycle policy. * @return Returns a reference to this object so that method calls can be chained together. */ public LifecyclePolicySummary withDescription(String description) { setDescription(description); return this; } /** *

* The lifecycle policy resource status. *

* * @param status * The lifecycle policy resource status. * @see LifecyclePolicyStatus */ public void setStatus(String status) { this.status = status; } /** *

* The lifecycle policy resource status. *

* * @return The lifecycle policy resource status. * @see LifecyclePolicyStatus */ public String getStatus() { return this.status; } /** *

* The lifecycle policy resource status. *

* * @param status * The lifecycle policy resource status. * @return Returns a reference to this object so that method calls can be chained together. * @see LifecyclePolicyStatus */ public LifecyclePolicySummary withStatus(String status) { setStatus(status); return this; } /** *

* The lifecycle policy resource status. *

* * @param status * The lifecycle policy resource status. * @return Returns a reference to this object so that method calls can be chained together. * @see LifecyclePolicyStatus */ public LifecyclePolicySummary withStatus(LifecyclePolicyStatus status) { this.status = status.toString(); return this; } /** *

* The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle policy. *

* * @param executionRole * The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle * policy. */ public void setExecutionRole(String executionRole) { this.executionRole = executionRole; } /** *

* The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle policy. *

* * @return The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle * policy. */ public String getExecutionRole() { return this.executionRole; } /** *

* The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle policy. *

* * @param executionRole * The name or Amazon Resource Name (ARN) of the IAM role that Image Builder uses to run the lifecycle * policy. * @return Returns a reference to this object so that method calls can be chained together. */ public LifecyclePolicySummary withExecutionRole(String executionRole) { setExecutionRole(executionRole); return this; } /** *

* The type of resources the lifecycle policy targets. *

* * @param resourceType * The type of resources the lifecycle policy targets. * @see LifecyclePolicyResourceType */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** *

* The type of resources the lifecycle policy targets. *

* * @return The type of resources the lifecycle policy targets. * @see LifecyclePolicyResourceType */ public String getResourceType() { return this.resourceType; } /** *

* The type of resources the lifecycle policy targets. *

* * @param resourceType * The type of resources the lifecycle policy targets. * @return Returns a reference to this object so that method calls can be chained together. * @see LifecyclePolicyResourceType */ public LifecyclePolicySummary withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** *

* The type of resources the lifecycle policy targets. *

* * @param resourceType * The type of resources the lifecycle policy targets. * @return Returns a reference to this object so that method calls can be chained together. * @see LifecyclePolicyResourceType */ public LifecyclePolicySummary withResourceType(LifecyclePolicyResourceType resourceType) { this.resourceType = resourceType.toString(); return this; } /** *

* The timestamp when Image Builder created the lifecycle policy resource. *

* * @param dateCreated * The timestamp when Image Builder created the lifecycle policy resource. */ public void setDateCreated(java.util.Date dateCreated) { this.dateCreated = dateCreated; } /** *

* The timestamp when Image Builder created the lifecycle policy resource. *

* * @return The timestamp when Image Builder created the lifecycle policy resource. */ public java.util.Date getDateCreated() { return this.dateCreated; } /** *

* The timestamp when Image Builder created the lifecycle policy resource. *

* * @param dateCreated * The timestamp when Image Builder created the lifecycle policy resource. * @return Returns a reference to this object so that method calls can be chained together. */ public LifecyclePolicySummary withDateCreated(java.util.Date dateCreated) { setDateCreated(dateCreated); return this; } /** *

* The timestamp when Image Builder updated the lifecycle policy resource. *

* * @param dateUpdated * The timestamp when Image Builder updated the lifecycle policy resource. */ public void setDateUpdated(java.util.Date dateUpdated) { this.dateUpdated = dateUpdated; } /** *

* The timestamp when Image Builder updated the lifecycle policy resource. *

* * @return The timestamp when Image Builder updated the lifecycle policy resource. */ public java.util.Date getDateUpdated() { return this.dateUpdated; } /** *

* The timestamp when Image Builder updated the lifecycle policy resource. *

* * @param dateUpdated * The timestamp when Image Builder updated the lifecycle policy resource. * @return Returns a reference to this object so that method calls can be chained together. */ public LifecyclePolicySummary withDateUpdated(java.util.Date dateUpdated) { setDateUpdated(dateUpdated); return this; } /** *

* The timestamp for the last time Image Builder ran the lifecycle policy. *

* * @param dateLastRun * The timestamp for the last time Image Builder ran the lifecycle policy. */ public void setDateLastRun(java.util.Date dateLastRun) { this.dateLastRun = dateLastRun; } /** *

* The timestamp for the last time Image Builder ran the lifecycle policy. *

* * @return The timestamp for the last time Image Builder ran the lifecycle policy. */ public java.util.Date getDateLastRun() { return this.dateLastRun; } /** *

* The timestamp for the last time Image Builder ran the lifecycle policy. *

* * @param dateLastRun * The timestamp for the last time Image Builder ran the lifecycle policy. * @return Returns a reference to this object so that method calls can be chained together. */ public LifecyclePolicySummary withDateLastRun(java.util.Date dateLastRun) { setDateLastRun(dateLastRun); return this; } /** *

* To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of * tags. Each tag consists of a key and an optional value, both of which you define. *

* * @return To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the * form of tags. Each tag consists of a key and an optional value, both of which you define. */ public java.util.Map getTags() { return tags; } /** *

* To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of * tags. Each tag consists of a key and an optional value, both of which you define. *

* * @param tags * To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the * form of tags. Each tag consists of a key and an optional value, both of which you define. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the form of * tags. Each tag consists of a key and an optional value, both of which you define. *

* * @param tags * To help manage your lifecycle policy resources, you can assign your own metadata to each resource in the * form of tags. Each tag consists of a key and an optional value, both of which you define. * @return Returns a reference to this object so that method calls can be chained together. */ public LifecyclePolicySummary withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see LifecyclePolicySummary#withTags * @returns a reference to this object so that method calls can be chained together. */ public LifecyclePolicySummary addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public LifecyclePolicySummary clearTagsEntries() { this.tags = null; 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getExecutionRole() != null) sb.append("ExecutionRole: ").append(getExecutionRole()).append(","); if (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getDateCreated() != null) sb.append("DateCreated: ").append(getDateCreated()).append(","); if (getDateUpdated() != null) sb.append("DateUpdated: ").append(getDateUpdated()).append(","); if (getDateLastRun() != null) sb.append("DateLastRun: ").append(getDateLastRun()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LifecyclePolicySummary == false) return false; LifecyclePolicySummary other = (LifecyclePolicySummary) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == 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.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getExecutionRole() == null ^ this.getExecutionRole() == null) return false; if (other.getExecutionRole() != null && other.getExecutionRole().equals(this.getExecutionRole()) == false) return false; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getDateCreated() == null ^ this.getDateCreated() == null) return false; if (other.getDateCreated() != null && other.getDateCreated().equals(this.getDateCreated()) == false) return false; if (other.getDateUpdated() == null ^ this.getDateUpdated() == null) return false; if (other.getDateUpdated() != null && other.getDateUpdated().equals(this.getDateUpdated()) == false) return false; if (other.getDateLastRun() == null ^ this.getDateLastRun() == null) return false; if (other.getDateLastRun() != null && other.getDateLastRun().equals(this.getDateLastRun()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getExecutionRole() == null) ? 0 : getExecutionRole().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getDateCreated() == null) ? 0 : getDateCreated().hashCode()); hashCode = prime * hashCode + ((getDateUpdated() == null) ? 0 : getDateUpdated().hashCode()); hashCode = prime * hashCode + ((getDateLastRun() == null) ? 0 : getDateLastRun().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public LifecyclePolicySummary clone() { try { return (LifecyclePolicySummary) 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.imagebuilder.model.transform.LifecyclePolicySummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy