com.amazonaws.services.ioteventsdata.model.DetectorSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ioteventsdata 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.ioteventsdata.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about the detector (instance).
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DetectorSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the detector model that created this detector (instance).
*
*/
private String detectorModelName;
/**
*
* The value of the key (identifying the device or system) that caused the creation of this detector (instance).
*
*/
private String keyValue;
/**
*
* The version of the detector model that created this detector (instance).
*
*/
private String detectorModelVersion;
/**
*
* The current state of the detector (instance).
*
*/
private DetectorStateSummary state;
/**
*
* The time the detector (instance) was created.
*
*/
private java.util.Date creationTime;
/**
*
* The time the detector (instance) was last updated.
*
*/
private java.util.Date lastUpdateTime;
/**
*
* The name of the detector model that created this detector (instance).
*
*
* @param detectorModelName
* The name of the detector model that created this detector (instance).
*/
public void setDetectorModelName(String detectorModelName) {
this.detectorModelName = detectorModelName;
}
/**
*
* The name of the detector model that created this detector (instance).
*
*
* @return The name of the detector model that created this detector (instance).
*/
public String getDetectorModelName() {
return this.detectorModelName;
}
/**
*
* The name of the detector model that created this detector (instance).
*
*
* @param detectorModelName
* The name of the detector model that created this detector (instance).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DetectorSummary withDetectorModelName(String detectorModelName) {
setDetectorModelName(detectorModelName);
return this;
}
/**
*
* The value of the key (identifying the device or system) that caused the creation of this detector (instance).
*
*
* @param keyValue
* The value of the key (identifying the device or system) that caused the creation of this detector
* (instance).
*/
public void setKeyValue(String keyValue) {
this.keyValue = keyValue;
}
/**
*
* The value of the key (identifying the device or system) that caused the creation of this detector (instance).
*
*
* @return The value of the key (identifying the device or system) that caused the creation of this detector
* (instance).
*/
public String getKeyValue() {
return this.keyValue;
}
/**
*
* The value of the key (identifying the device or system) that caused the creation of this detector (instance).
*
*
* @param keyValue
* The value of the key (identifying the device or system) that caused the creation of this detector
* (instance).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DetectorSummary withKeyValue(String keyValue) {
setKeyValue(keyValue);
return this;
}
/**
*
* The version of the detector model that created this detector (instance).
*
*
* @param detectorModelVersion
* The version of the detector model that created this detector (instance).
*/
public void setDetectorModelVersion(String detectorModelVersion) {
this.detectorModelVersion = detectorModelVersion;
}
/**
*
* The version of the detector model that created this detector (instance).
*
*
* @return The version of the detector model that created this detector (instance).
*/
public String getDetectorModelVersion() {
return this.detectorModelVersion;
}
/**
*
* The version of the detector model that created this detector (instance).
*
*
* @param detectorModelVersion
* The version of the detector model that created this detector (instance).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DetectorSummary withDetectorModelVersion(String detectorModelVersion) {
setDetectorModelVersion(detectorModelVersion);
return this;
}
/**
*
* The current state of the detector (instance).
*
*
* @param state
* The current state of the detector (instance).
*/
public void setState(DetectorStateSummary state) {
this.state = state;
}
/**
*
* The current state of the detector (instance).
*
*
* @return The current state of the detector (instance).
*/
public DetectorStateSummary getState() {
return this.state;
}
/**
*
* The current state of the detector (instance).
*
*
* @param state
* The current state of the detector (instance).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DetectorSummary withState(DetectorStateSummary state) {
setState(state);
return this;
}
/**
*
* The time the detector (instance) was created.
*
*
* @param creationTime
* The time the detector (instance) was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* The time the detector (instance) was created.
*
*
* @return The time the detector (instance) was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* The time the detector (instance) was created.
*
*
* @param creationTime
* The time the detector (instance) was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DetectorSummary withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* The time the detector (instance) was last updated.
*
*
* @param lastUpdateTime
* The time the detector (instance) was last updated.
*/
public void setLastUpdateTime(java.util.Date lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
/**
*
* The time the detector (instance) was last updated.
*
*
* @return The time the detector (instance) was last updated.
*/
public java.util.Date getLastUpdateTime() {
return this.lastUpdateTime;
}
/**
*
* The time the detector (instance) was last updated.
*
*
* @param lastUpdateTime
* The time the detector (instance) was last updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DetectorSummary withLastUpdateTime(java.util.Date lastUpdateTime) {
setLastUpdateTime(lastUpdateTime);
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 (getDetectorModelName() != null)
sb.append("DetectorModelName: ").append(getDetectorModelName()).append(",");
if (getKeyValue() != null)
sb.append("KeyValue: ").append(getKeyValue()).append(",");
if (getDetectorModelVersion() != null)
sb.append("DetectorModelVersion: ").append(getDetectorModelVersion()).append(",");
if (getState() != null)
sb.append("State: ").append(getState()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getLastUpdateTime() != null)
sb.append("LastUpdateTime: ").append(getLastUpdateTime());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DetectorSummary == false)
return false;
DetectorSummary other = (DetectorSummary) obj;
if (other.getDetectorModelName() == null ^ this.getDetectorModelName() == null)
return false;
if (other.getDetectorModelName() != null && other.getDetectorModelName().equals(this.getDetectorModelName()) == false)
return false;
if (other.getKeyValue() == null ^ this.getKeyValue() == null)
return false;
if (other.getKeyValue() != null && other.getKeyValue().equals(this.getKeyValue()) == false)
return false;
if (other.getDetectorModelVersion() == null ^ this.getDetectorModelVersion() == null)
return false;
if (other.getDetectorModelVersion() != null && other.getDetectorModelVersion().equals(this.getDetectorModelVersion()) == false)
return false;
if (other.getState() == null ^ this.getState() == null)
return false;
if (other.getState() != null && other.getState().equals(this.getState()) == false)
return false;
if (other.getCreationTime() == null ^ this.getCreationTime() == null)
return false;
if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false)
return false;
if (other.getLastUpdateTime() == null ^ this.getLastUpdateTime() == null)
return false;
if (other.getLastUpdateTime() != null && other.getLastUpdateTime().equals(this.getLastUpdateTime()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDetectorModelName() == null) ? 0 : getDetectorModelName().hashCode());
hashCode = prime * hashCode + ((getKeyValue() == null) ? 0 : getKeyValue().hashCode());
hashCode = prime * hashCode + ((getDetectorModelVersion() == null) ? 0 : getDetectorModelVersion().hashCode());
hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getLastUpdateTime() == null) ? 0 : getLastUpdateTime().hashCode());
return hashCode;
}
@Override
public DetectorSummary clone() {
try {
return (DetectorSummary) 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.ioteventsdata.model.transform.DetectorSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}