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

com.amazonaws.services.greengrassv2.model.InstalledComponent 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 a component on a Greengrass core device. *

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

* The name of the component. *

*/ private String componentName; /** *

* The version of the component. *

*/ private String componentVersion; /** *

* The lifecycle state of the component. *

*/ private String lifecycleState; /** *

* A detailed response about the lifecycle state of the component that explains the reason why a component has an * error or is broken. *

*/ private String lifecycleStateDetails; /** *

* Whether or not the component is a root component. *

*/ private Boolean isRoot; /** *

* The status of how current the data is. *

*

* This response is based off of component state changes. The status reflects component disruptions and deployments. * If a component only sees a configuration update during a deployment, it might not undergo a state change and this * status would not be updated. *

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

* The last time the Greengrass core device sent a message containing a component's state to the Amazon Web Services * Cloud. *

*

* A component does not need to see a state change for this field to update. *

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

* The most recent deployment source that brought the component to the Greengrass core device. For a thing group * deployment or thing deployment, the source will be the ID of the last deployment that contained the component. * For local deployments it will be LOCAL. *

* *

* Any deployment will attempt to reinstall currently broken components on the device, which will update the last * installation source. *

*
*/ private String lastInstallationSource; /** *

* The status codes that indicate the reason for failure whenever the lifecycleState has an error or is * in a broken state. *

* *

* Greengrass nucleus v2.8.0 or later is required to get an accurate lifecycleStatusCodes response. * This response can be inaccurate in earlier Greengrass nucleus versions. *

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

* 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 InstalledComponent 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 InstalledComponent withComponentVersion(String componentVersion) { setComponentVersion(componentVersion); return this; } /** *

* The lifecycle state of the component. *

* * @param lifecycleState * The lifecycle state of the component. * @see InstalledComponentLifecycleState */ public void setLifecycleState(String lifecycleState) { this.lifecycleState = lifecycleState; } /** *

* The lifecycle state of the component. *

* * @return The lifecycle state of the component. * @see InstalledComponentLifecycleState */ public String getLifecycleState() { return this.lifecycleState; } /** *

* The lifecycle state of the component. *

* * @param lifecycleState * The lifecycle state of the component. * @return Returns a reference to this object so that method calls can be chained together. * @see InstalledComponentLifecycleState */ public InstalledComponent withLifecycleState(String lifecycleState) { setLifecycleState(lifecycleState); return this; } /** *

* The lifecycle state of the component. *

* * @param lifecycleState * The lifecycle state of the component. * @return Returns a reference to this object so that method calls can be chained together. * @see InstalledComponentLifecycleState */ public InstalledComponent withLifecycleState(InstalledComponentLifecycleState lifecycleState) { this.lifecycleState = lifecycleState.toString(); return this; } /** *

* A detailed response about the lifecycle state of the component that explains the reason why a component has an * error or is broken. *

* * @param lifecycleStateDetails * A detailed response about the lifecycle state of the component that explains the reason why a component * has an error or is broken. */ public void setLifecycleStateDetails(String lifecycleStateDetails) { this.lifecycleStateDetails = lifecycleStateDetails; } /** *

* A detailed response about the lifecycle state of the component that explains the reason why a component has an * error or is broken. *

* * @return A detailed response about the lifecycle state of the component that explains the reason why a component * has an error or is broken. */ public String getLifecycleStateDetails() { return this.lifecycleStateDetails; } /** *

* A detailed response about the lifecycle state of the component that explains the reason why a component has an * error or is broken. *

* * @param lifecycleStateDetails * A detailed response about the lifecycle state of the component that explains the reason why a component * has an error or is broken. * @return Returns a reference to this object so that method calls can be chained together. */ public InstalledComponent withLifecycleStateDetails(String lifecycleStateDetails) { setLifecycleStateDetails(lifecycleStateDetails); return this; } /** *

* Whether or not the component is a root component. *

* * @param isRoot * Whether or not the component is a root component. */ public void setIsRoot(Boolean isRoot) { this.isRoot = isRoot; } /** *

* Whether or not the component is a root component. *

* * @return Whether or not the component is a root component. */ public Boolean getIsRoot() { return this.isRoot; } /** *

* Whether or not the component is a root component. *

* * @param isRoot * Whether or not the component is a root component. * @return Returns a reference to this object so that method calls can be chained together. */ public InstalledComponent withIsRoot(Boolean isRoot) { setIsRoot(isRoot); return this; } /** *

* Whether or not the component is a root component. *

* * @return Whether or not the component is a root component. */ public Boolean isRoot() { return this.isRoot; } /** *

* The status of how current the data is. *

*

* This response is based off of component state changes. The status reflects component disruptions and deployments. * If a component only sees a configuration update during a deployment, it might not undergo a state change and this * status would not be updated. *

* * @param lastStatusChangeTimestamp * The status of how current the data is.

*

* This response is based off of component state changes. The status reflects component disruptions and * deployments. If a component only sees a configuration update during a deployment, it might not undergo a * state change and this status would not be updated. */ public void setLastStatusChangeTimestamp(java.util.Date lastStatusChangeTimestamp) { this.lastStatusChangeTimestamp = lastStatusChangeTimestamp; } /** *

* The status of how current the data is. *

*

* This response is based off of component state changes. The status reflects component disruptions and deployments. * If a component only sees a configuration update during a deployment, it might not undergo a state change and this * status would not be updated. *

* * @return The status of how current the data is.

*

* This response is based off of component state changes. The status reflects component disruptions and * deployments. If a component only sees a configuration update during a deployment, it might not undergo a * state change and this status would not be updated. */ public java.util.Date getLastStatusChangeTimestamp() { return this.lastStatusChangeTimestamp; } /** *

* The status of how current the data is. *

*

* This response is based off of component state changes. The status reflects component disruptions and deployments. * If a component only sees a configuration update during a deployment, it might not undergo a state change and this * status would not be updated. *

* * @param lastStatusChangeTimestamp * The status of how current the data is.

*

* This response is based off of component state changes. The status reflects component disruptions and * deployments. If a component only sees a configuration update during a deployment, it might not undergo a * state change and this status would not be updated. * @return Returns a reference to this object so that method calls can be chained together. */ public InstalledComponent withLastStatusChangeTimestamp(java.util.Date lastStatusChangeTimestamp) { setLastStatusChangeTimestamp(lastStatusChangeTimestamp); return this; } /** *

* The last time the Greengrass core device sent a message containing a component's state to the Amazon Web Services * Cloud. *

*

* A component does not need to see a state change for this field to update. *

* * @param lastReportedTimestamp * The last time the Greengrass core device sent a message containing a component's state to the Amazon Web * Services Cloud.

*

* A component does not need to see a state change for this field to update. */ public void setLastReportedTimestamp(java.util.Date lastReportedTimestamp) { this.lastReportedTimestamp = lastReportedTimestamp; } /** *

* The last time the Greengrass core device sent a message containing a component's state to the Amazon Web Services * Cloud. *

*

* A component does not need to see a state change for this field to update. *

* * @return The last time the Greengrass core device sent a message containing a component's state to the Amazon Web * Services Cloud.

*

* A component does not need to see a state change for this field to update. */ public java.util.Date getLastReportedTimestamp() { return this.lastReportedTimestamp; } /** *

* The last time the Greengrass core device sent a message containing a component's state to the Amazon Web Services * Cloud. *

*

* A component does not need to see a state change for this field to update. *

* * @param lastReportedTimestamp * The last time the Greengrass core device sent a message containing a component's state to the Amazon Web * Services Cloud.

*

* A component does not need to see a state change for this field to update. * @return Returns a reference to this object so that method calls can be chained together. */ public InstalledComponent withLastReportedTimestamp(java.util.Date lastReportedTimestamp) { setLastReportedTimestamp(lastReportedTimestamp); return this; } /** *

* The most recent deployment source that brought the component to the Greengrass core device. For a thing group * deployment or thing deployment, the source will be the ID of the last deployment that contained the component. * For local deployments it will be LOCAL. *

* *

* Any deployment will attempt to reinstall currently broken components on the device, which will update the last * installation source. *

*
* * @param lastInstallationSource * The most recent deployment source that brought the component to the Greengrass core device. For a thing * group deployment or thing deployment, the source will be the ID of the last deployment that contained the * component. For local deployments it will be LOCAL.

*

* Any deployment will attempt to reinstall currently broken components on the device, which will update the * last installation source. *

*/ public void setLastInstallationSource(String lastInstallationSource) { this.lastInstallationSource = lastInstallationSource; } /** *

* The most recent deployment source that brought the component to the Greengrass core device. For a thing group * deployment or thing deployment, the source will be the ID of the last deployment that contained the component. * For local deployments it will be LOCAL. *

* *

* Any deployment will attempt to reinstall currently broken components on the device, which will update the last * installation source. *

*
* * @return The most recent deployment source that brought the component to the Greengrass core device. For a thing * group deployment or thing deployment, the source will be the ID of the last deployment that contained the * component. For local deployments it will be LOCAL.

*

* Any deployment will attempt to reinstall currently broken components on the device, which will update the * last installation source. *

*/ public String getLastInstallationSource() { return this.lastInstallationSource; } /** *

* The most recent deployment source that brought the component to the Greengrass core device. For a thing group * deployment or thing deployment, the source will be the ID of the last deployment that contained the component. * For local deployments it will be LOCAL. *

* *

* Any deployment will attempt to reinstall currently broken components on the device, which will update the last * installation source. *

*
* * @param lastInstallationSource * The most recent deployment source that brought the component to the Greengrass core device. For a thing * group deployment or thing deployment, the source will be the ID of the last deployment that contained the * component. For local deployments it will be LOCAL.

*

* Any deployment will attempt to reinstall currently broken components on the device, which will update the * last installation source. *

* @return Returns a reference to this object so that method calls can be chained together. */ public InstalledComponent withLastInstallationSource(String lastInstallationSource) { setLastInstallationSource(lastInstallationSource); return this; } /** *

* The status codes that indicate the reason for failure whenever the lifecycleState has an error or is * in a broken state. *

* *

* Greengrass nucleus v2.8.0 or later is required to get an accurate lifecycleStatusCodes response. * This response can be inaccurate in earlier Greengrass nucleus versions. *

*
* * @return The status codes that indicate the reason for failure whenever the lifecycleState has an * error or is in a broken state.

*

* Greengrass nucleus v2.8.0 or later is required to get an accurate lifecycleStatusCodes * response. This response can be inaccurate in earlier Greengrass nucleus versions. *

*/ public java.util.List getLifecycleStatusCodes() { return lifecycleStatusCodes; } /** *

* The status codes that indicate the reason for failure whenever the lifecycleState has an error or is * in a broken state. *

* *

* Greengrass nucleus v2.8.0 or later is required to get an accurate lifecycleStatusCodes response. * This response can be inaccurate in earlier Greengrass nucleus versions. *

*
* * @param lifecycleStatusCodes * The status codes that indicate the reason for failure whenever the lifecycleState has an * error or is in a broken state.

*

* Greengrass nucleus v2.8.0 or later is required to get an accurate lifecycleStatusCodes * response. This response can be inaccurate in earlier Greengrass nucleus versions. *

*/ public void setLifecycleStatusCodes(java.util.Collection lifecycleStatusCodes) { if (lifecycleStatusCodes == null) { this.lifecycleStatusCodes = null; return; } this.lifecycleStatusCodes = new java.util.ArrayList(lifecycleStatusCodes); } /** *

* The status codes that indicate the reason for failure whenever the lifecycleState has an error or is * in a broken state. *

* *

* Greengrass nucleus v2.8.0 or later is required to get an accurate lifecycleStatusCodes response. * This response can be inaccurate in earlier Greengrass nucleus versions. *

*
*

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

* * @param lifecycleStatusCodes * The status codes that indicate the reason for failure whenever the lifecycleState has an * error or is in a broken state.

*

* Greengrass nucleus v2.8.0 or later is required to get an accurate lifecycleStatusCodes * response. This response can be inaccurate in earlier Greengrass nucleus versions. *

* @return Returns a reference to this object so that method calls can be chained together. */ public InstalledComponent withLifecycleStatusCodes(String... lifecycleStatusCodes) { if (this.lifecycleStatusCodes == null) { setLifecycleStatusCodes(new java.util.ArrayList(lifecycleStatusCodes.length)); } for (String ele : lifecycleStatusCodes) { this.lifecycleStatusCodes.add(ele); } return this; } /** *

* The status codes that indicate the reason for failure whenever the lifecycleState has an error or is * in a broken state. *

* *

* Greengrass nucleus v2.8.0 or later is required to get an accurate lifecycleStatusCodes response. * This response can be inaccurate in earlier Greengrass nucleus versions. *

*
* * @param lifecycleStatusCodes * The status codes that indicate the reason for failure whenever the lifecycleState has an * error or is in a broken state.

*

* Greengrass nucleus v2.8.0 or later is required to get an accurate lifecycleStatusCodes * response. This response can be inaccurate in earlier Greengrass nucleus versions. *

* @return Returns a reference to this object so that method calls can be chained together. */ public InstalledComponent withLifecycleStatusCodes(java.util.Collection lifecycleStatusCodes) { setLifecycleStatusCodes(lifecycleStatusCodes); 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 (getComponentName() != null) sb.append("ComponentName: ").append(getComponentName()).append(","); if (getComponentVersion() != null) sb.append("ComponentVersion: ").append(getComponentVersion()).append(","); if (getLifecycleState() != null) sb.append("LifecycleState: ").append(getLifecycleState()).append(","); if (getLifecycleStateDetails() != null) sb.append("LifecycleStateDetails: ").append(getLifecycleStateDetails()).append(","); if (getIsRoot() != null) sb.append("IsRoot: ").append(getIsRoot()).append(","); if (getLastStatusChangeTimestamp() != null) sb.append("LastStatusChangeTimestamp: ").append(getLastStatusChangeTimestamp()).append(","); if (getLastReportedTimestamp() != null) sb.append("LastReportedTimestamp: ").append(getLastReportedTimestamp()).append(","); if (getLastInstallationSource() != null) sb.append("LastInstallationSource: ").append(getLastInstallationSource()).append(","); if (getLifecycleStatusCodes() != null) sb.append("LifecycleStatusCodes: ").append(getLifecycleStatusCodes()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InstalledComponent == false) return false; InstalledComponent other = (InstalledComponent) obj; 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.getLifecycleState() == null ^ this.getLifecycleState() == null) return false; if (other.getLifecycleState() != null && other.getLifecycleState().equals(this.getLifecycleState()) == false) return false; if (other.getLifecycleStateDetails() == null ^ this.getLifecycleStateDetails() == null) return false; if (other.getLifecycleStateDetails() != null && other.getLifecycleStateDetails().equals(this.getLifecycleStateDetails()) == false) return false; if (other.getIsRoot() == null ^ this.getIsRoot() == null) return false; if (other.getIsRoot() != null && other.getIsRoot().equals(this.getIsRoot()) == false) return false; if (other.getLastStatusChangeTimestamp() == null ^ this.getLastStatusChangeTimestamp() == null) return false; if (other.getLastStatusChangeTimestamp() != null && other.getLastStatusChangeTimestamp().equals(this.getLastStatusChangeTimestamp()) == false) return false; if (other.getLastReportedTimestamp() == null ^ this.getLastReportedTimestamp() == null) return false; if (other.getLastReportedTimestamp() != null && other.getLastReportedTimestamp().equals(this.getLastReportedTimestamp()) == false) return false; if (other.getLastInstallationSource() == null ^ this.getLastInstallationSource() == null) return false; if (other.getLastInstallationSource() != null && other.getLastInstallationSource().equals(this.getLastInstallationSource()) == false) return false; if (other.getLifecycleStatusCodes() == null ^ this.getLifecycleStatusCodes() == null) return false; if (other.getLifecycleStatusCodes() != null && other.getLifecycleStatusCodes().equals(this.getLifecycleStatusCodes()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getComponentName() == null) ? 0 : getComponentName().hashCode()); hashCode = prime * hashCode + ((getComponentVersion() == null) ? 0 : getComponentVersion().hashCode()); hashCode = prime * hashCode + ((getLifecycleState() == null) ? 0 : getLifecycleState().hashCode()); hashCode = prime * hashCode + ((getLifecycleStateDetails() == null) ? 0 : getLifecycleStateDetails().hashCode()); hashCode = prime * hashCode + ((getIsRoot() == null) ? 0 : getIsRoot().hashCode()); hashCode = prime * hashCode + ((getLastStatusChangeTimestamp() == null) ? 0 : getLastStatusChangeTimestamp().hashCode()); hashCode = prime * hashCode + ((getLastReportedTimestamp() == null) ? 0 : getLastReportedTimestamp().hashCode()); hashCode = prime * hashCode + ((getLastInstallationSource() == null) ? 0 : getLastInstallationSource().hashCode()); hashCode = prime * hashCode + ((getLifecycleStatusCodes() == null) ? 0 : getLifecycleStatusCodes().hashCode()); return hashCode; } @Override public InstalledComponent clone() { try { return (InstalledComponent) 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.InstalledComponentMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy