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

com.amazonaws.services.greengrassv2.model.ComponentLatestVersion Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS IoT Greengrass V2 module holds the client classes that are used for communicating with AWS IoT Greengrass V2 Service

The 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.greengrassv2.model;

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

/**
 * 

* Contains information about the latest version of a component. *

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

* The ARN of the component * version. *

*/ private String arn; /** *

* The version of the component. *

*/ private String componentVersion; /** *

* The time at which the component was created, expressed in ISO 8601 format. *

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

* The description of the component version. *

*/ private String description; /** *

* The publisher of the component version. *

*/ private String publisher; /** *

* The platforms that the component version supports. *

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

* The ARN of the component * version. *

* * @param arn * The ARN of the * component version. */ public void setArn(String arn) { this.arn = arn; } /** *

* The ARN of the component * version. *

* * @return The ARN of the * component version. */ public String getArn() { return this.arn; } /** *

* The ARN of the component * version. *

* * @param arn * The ARN of the * component version. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentLatestVersion withArn(String arn) { setArn(arn); return this; } /** *

* The version of the component. *

* * @param componentVersion * The version of the component. */ public void setComponentVersion(String componentVersion) { this.componentVersion = componentVersion; } /** *

* The version of the component. *

* * @return The version of the component. */ public String getComponentVersion() { return this.componentVersion; } /** *

* The version of the component. *

* * @param componentVersion * The version of the component. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentLatestVersion withComponentVersion(String componentVersion) { setComponentVersion(componentVersion); return this; } /** *

* The time at which the component was created, expressed in ISO 8601 format. *

* * @param creationTimestamp * The time at which the component was created, expressed in ISO 8601 format. */ public void setCreationTimestamp(java.util.Date creationTimestamp) { this.creationTimestamp = creationTimestamp; } /** *

* The time at which the component was created, expressed in ISO 8601 format. *

* * @return The time at which the component was created, expressed in ISO 8601 format. */ public java.util.Date getCreationTimestamp() { return this.creationTimestamp; } /** *

* The time at which the component was created, expressed in ISO 8601 format. *

* * @param creationTimestamp * The time at which the component was created, expressed in ISO 8601 format. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentLatestVersion withCreationTimestamp(java.util.Date creationTimestamp) { setCreationTimestamp(creationTimestamp); return this; } /** *

* The description of the component version. *

* * @param description * The description of the component version. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the component version. *

* * @return The description of the component version. */ public String getDescription() { return this.description; } /** *

* The description of the component version. *

* * @param description * The description of the component version. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentLatestVersion withDescription(String description) { setDescription(description); return this; } /** *

* The publisher of the component version. *

* * @param publisher * The publisher of the component version. */ public void setPublisher(String publisher) { this.publisher = publisher; } /** *

* The publisher of the component version. *

* * @return The publisher of the component version. */ public String getPublisher() { return this.publisher; } /** *

* The publisher of the component version. *

* * @param publisher * The publisher of the component version. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentLatestVersion withPublisher(String publisher) { setPublisher(publisher); return this; } /** *

* The platforms that the component version supports. *

* * @return The platforms that the component version supports. */ public java.util.List getPlatforms() { return platforms; } /** *

* The platforms that the component version supports. *

* * @param platforms * The platforms that the component version supports. */ public void setPlatforms(java.util.Collection platforms) { if (platforms == null) { this.platforms = null; return; } this.platforms = new java.util.ArrayList(platforms); } /** *

* The platforms that the component version supports. *

*

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

* * @param platforms * The platforms that the component version supports. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentLatestVersion withPlatforms(ComponentPlatform... platforms) { if (this.platforms == null) { setPlatforms(new java.util.ArrayList(platforms.length)); } for (ComponentPlatform ele : platforms) { this.platforms.add(ele); } return this; } /** *

* The platforms that the component version supports. *

* * @param platforms * The platforms that the component version supports. * @return Returns a reference to this object so that method calls can be chained together. */ public ComponentLatestVersion withPlatforms(java.util.Collection platforms) { setPlatforms(platforms); 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 (getComponentVersion() != null) sb.append("ComponentVersion: ").append(getComponentVersion()).append(","); if (getCreationTimestamp() != null) sb.append("CreationTimestamp: ").append(getCreationTimestamp()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getPublisher() != null) sb.append("Publisher: ").append(getPublisher()).append(","); if (getPlatforms() != null) sb.append("Platforms: ").append(getPlatforms()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ComponentLatestVersion == false) return false; ComponentLatestVersion other = (ComponentLatestVersion) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getComponentVersion() == null ^ this.getComponentVersion() == null) return false; if (other.getComponentVersion() != null && other.getComponentVersion().equals(this.getComponentVersion()) == false) return false; if (other.getCreationTimestamp() == null ^ this.getCreationTimestamp() == null) return false; if (other.getCreationTimestamp() != null && other.getCreationTimestamp().equals(this.getCreationTimestamp()) == 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.getPublisher() == null ^ this.getPublisher() == null) return false; if (other.getPublisher() != null && other.getPublisher().equals(this.getPublisher()) == false) return false; if (other.getPlatforms() == null ^ this.getPlatforms() == null) return false; if (other.getPlatforms() != null && other.getPlatforms().equals(this.getPlatforms()) == 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 + ((getComponentVersion() == null) ? 0 : getComponentVersion().hashCode()); hashCode = prime * hashCode + ((getCreationTimestamp() == null) ? 0 : getCreationTimestamp().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getPublisher() == null) ? 0 : getPublisher().hashCode()); hashCode = prime * hashCode + ((getPlatforms() == null) ? 0 : getPlatforms().hashCode()); return hashCode; } @Override public ComponentLatestVersion clone() { try { return (ComponentLatestVersion) 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.greengrassv2.model.transform.ComponentLatestVersionMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy