com.amazonaws.services.greengrassv2.model.CreateComponentVersionResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-greengrassv2 Show documentation
/*
* 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;
/**
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateComponentVersionResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The ARN of the component
* version.
*
*/
private String arn;
/**
*
* The name of the component.
*
*/
private String componentName;
/**
*
* 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 status of the component version in IoT Greengrass V2. This status is different from the status of the
* component on a core device.
*
*/
private CloudComponentStatus status;
/**
*
* 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 CreateComponentVersionResult withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The name of the component.
*
*
* @param componentName
* The name of the component.
*/
public void setComponentName(String componentName) {
this.componentName = componentName;
}
/**
*
* The name of the component.
*
*
* @return The name of the component.
*/
public String getComponentName() {
return this.componentName;
}
/**
*
* The name of the component.
*
*
* @param componentName
* The name of the component.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateComponentVersionResult withComponentName(String componentName) {
setComponentName(componentName);
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 CreateComponentVersionResult 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 CreateComponentVersionResult withCreationTimestamp(java.util.Date creationTimestamp) {
setCreationTimestamp(creationTimestamp);
return this;
}
/**
*
* The status of the component version in IoT Greengrass V2. This status is different from the status of the
* component on a core device.
*
*
* @param status
* The status of the component version in IoT Greengrass V2. This status is different from the status of the
* component on a core device.
*/
public void setStatus(CloudComponentStatus status) {
this.status = status;
}
/**
*
* The status of the component version in IoT Greengrass V2. This status is different from the status of the
* component on a core device.
*
*
* @return The status of the component version in IoT Greengrass V2. This status is different from the status of the
* component on a core device.
*/
public CloudComponentStatus getStatus() {
return this.status;
}
/**
*
* The status of the component version in IoT Greengrass V2. This status is different from the status of the
* component on a core device.
*
*
* @param status
* The status of the component version in IoT Greengrass V2. This status is different from the status of the
* component on a core device.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateComponentVersionResult withStatus(CloudComponentStatus status) {
setStatus(status);
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 (getComponentName() != null)
sb.append("ComponentName: ").append(getComponentName()).append(",");
if (getComponentVersion() != null)
sb.append("ComponentVersion: ").append(getComponentVersion()).append(",");
if (getCreationTimestamp() != null)
sb.append("CreationTimestamp: ").append(getCreationTimestamp()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateComponentVersionResult == false)
return false;
CreateComponentVersionResult other = (CreateComponentVersionResult) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getComponentName() == null ^ this.getComponentName() == null)
return false;
if (other.getComponentName() != null && other.getComponentName().equals(this.getComponentName()) == 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.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == 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 + ((getComponentName() == null) ? 0 : getComponentName().hashCode());
hashCode = prime * hashCode + ((getComponentVersion() == null) ? 0 : getComponentVersion().hashCode());
hashCode = prime * hashCode + ((getCreationTimestamp() == null) ? 0 : getCreationTimestamp().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
return hashCode;
}
@Override
public CreateComponentVersionResult clone() {
try {
return (CreateComponentVersionResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}