com.amazonaws.services.iotdeviceadvisor.model.SuiteDefinitionInformation Maven / Gradle / Ivy
Show all versions of aws-java-sdk-iotdeviceadvisor Show documentation
/*
* Copyright 2017-2022 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.iotdeviceadvisor.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about the suite definition.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class SuiteDefinitionInformation implements Serializable, Cloneable, StructuredPojo {
/**
*
* Suite definition ID of the test suite.
*
*/
private String suiteDefinitionId;
/**
*
* Suite name of the test suite.
*
*/
private String suiteDefinitionName;
/**
*
* Specifies the devices that are under test for the test suite.
*
*/
private java.util.List defaultDevices;
/**
*
* Specifies if the test suite is intended for qualification.
*
*/
private Boolean intendedForQualification;
/**
*
* Verifies if the test suite is a long duration test.
*
*/
private Boolean isLongDurationTest;
/**
*
* Gets the MQTT protocol that is configured in the suite definition.
*
*/
private String protocol;
/**
*
* Date (in Unix epoch time) when the test suite was created.
*
*/
private java.util.Date createdAt;
/**
*
* Suite definition ID of the test suite.
*
*
* @param suiteDefinitionId
* Suite definition ID of the test suite.
*/
public void setSuiteDefinitionId(String suiteDefinitionId) {
this.suiteDefinitionId = suiteDefinitionId;
}
/**
*
* Suite definition ID of the test suite.
*
*
* @return Suite definition ID of the test suite.
*/
public String getSuiteDefinitionId() {
return this.suiteDefinitionId;
}
/**
*
* Suite definition ID of the test suite.
*
*
* @param suiteDefinitionId
* Suite definition ID of the test suite.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SuiteDefinitionInformation withSuiteDefinitionId(String suiteDefinitionId) {
setSuiteDefinitionId(suiteDefinitionId);
return this;
}
/**
*
* Suite name of the test suite.
*
*
* @param suiteDefinitionName
* Suite name of the test suite.
*/
public void setSuiteDefinitionName(String suiteDefinitionName) {
this.suiteDefinitionName = suiteDefinitionName;
}
/**
*
* Suite name of the test suite.
*
*
* @return Suite name of the test suite.
*/
public String getSuiteDefinitionName() {
return this.suiteDefinitionName;
}
/**
*
* Suite name of the test suite.
*
*
* @param suiteDefinitionName
* Suite name of the test suite.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SuiteDefinitionInformation withSuiteDefinitionName(String suiteDefinitionName) {
setSuiteDefinitionName(suiteDefinitionName);
return this;
}
/**
*
* Specifies the devices that are under test for the test suite.
*
*
* @return Specifies the devices that are under test for the test suite.
*/
public java.util.List getDefaultDevices() {
return defaultDevices;
}
/**
*
* Specifies the devices that are under test for the test suite.
*
*
* @param defaultDevices
* Specifies the devices that are under test for the test suite.
*/
public void setDefaultDevices(java.util.Collection defaultDevices) {
if (defaultDevices == null) {
this.defaultDevices = null;
return;
}
this.defaultDevices = new java.util.ArrayList(defaultDevices);
}
/**
*
* Specifies the devices that are under test for the test suite.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setDefaultDevices(java.util.Collection)} or {@link #withDefaultDevices(java.util.Collection)} if you want
* to override the existing values.
*
*
* @param defaultDevices
* Specifies the devices that are under test for the test suite.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SuiteDefinitionInformation withDefaultDevices(DeviceUnderTest... defaultDevices) {
if (this.defaultDevices == null) {
setDefaultDevices(new java.util.ArrayList(defaultDevices.length));
}
for (DeviceUnderTest ele : defaultDevices) {
this.defaultDevices.add(ele);
}
return this;
}
/**
*
* Specifies the devices that are under test for the test suite.
*
*
* @param defaultDevices
* Specifies the devices that are under test for the test suite.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SuiteDefinitionInformation withDefaultDevices(java.util.Collection defaultDevices) {
setDefaultDevices(defaultDevices);
return this;
}
/**
*
* Specifies if the test suite is intended for qualification.
*
*
* @param intendedForQualification
* Specifies if the test suite is intended for qualification.
*/
public void setIntendedForQualification(Boolean intendedForQualification) {
this.intendedForQualification = intendedForQualification;
}
/**
*
* Specifies if the test suite is intended for qualification.
*
*
* @return Specifies if the test suite is intended for qualification.
*/
public Boolean getIntendedForQualification() {
return this.intendedForQualification;
}
/**
*
* Specifies if the test suite is intended for qualification.
*
*
* @param intendedForQualification
* Specifies if the test suite is intended for qualification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SuiteDefinitionInformation withIntendedForQualification(Boolean intendedForQualification) {
setIntendedForQualification(intendedForQualification);
return this;
}
/**
*
* Specifies if the test suite is intended for qualification.
*
*
* @return Specifies if the test suite is intended for qualification.
*/
public Boolean isIntendedForQualification() {
return this.intendedForQualification;
}
/**
*
* Verifies if the test suite is a long duration test.
*
*
* @param isLongDurationTest
* Verifies if the test suite is a long duration test.
*/
public void setIsLongDurationTest(Boolean isLongDurationTest) {
this.isLongDurationTest = isLongDurationTest;
}
/**
*
* Verifies if the test suite is a long duration test.
*
*
* @return Verifies if the test suite is a long duration test.
*/
public Boolean getIsLongDurationTest() {
return this.isLongDurationTest;
}
/**
*
* Verifies if the test suite is a long duration test.
*
*
* @param isLongDurationTest
* Verifies if the test suite is a long duration test.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SuiteDefinitionInformation withIsLongDurationTest(Boolean isLongDurationTest) {
setIsLongDurationTest(isLongDurationTest);
return this;
}
/**
*
* Verifies if the test suite is a long duration test.
*
*
* @return Verifies if the test suite is a long duration test.
*/
public Boolean isLongDurationTest() {
return this.isLongDurationTest;
}
/**
*
* Gets the MQTT protocol that is configured in the suite definition.
*
*
* @param protocol
* Gets the MQTT protocol that is configured in the suite definition.
* @see Protocol
*/
public void setProtocol(String protocol) {
this.protocol = protocol;
}
/**
*
* Gets the MQTT protocol that is configured in the suite definition.
*
*
* @return Gets the MQTT protocol that is configured in the suite definition.
* @see Protocol
*/
public String getProtocol() {
return this.protocol;
}
/**
*
* Gets the MQTT protocol that is configured in the suite definition.
*
*
* @param protocol
* Gets the MQTT protocol that is configured in the suite definition.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Protocol
*/
public SuiteDefinitionInformation withProtocol(String protocol) {
setProtocol(protocol);
return this;
}
/**
*
* Gets the MQTT protocol that is configured in the suite definition.
*
*
* @param protocol
* Gets the MQTT protocol that is configured in the suite definition.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Protocol
*/
public SuiteDefinitionInformation withProtocol(Protocol protocol) {
this.protocol = protocol.toString();
return this;
}
/**
*
* Date (in Unix epoch time) when the test suite was created.
*
*
* @param createdAt
* Date (in Unix epoch time) when the test suite was created.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* Date (in Unix epoch time) when the test suite was created.
*
*
* @return Date (in Unix epoch time) when the test suite was created.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* Date (in Unix epoch time) when the test suite was created.
*
*
* @param createdAt
* Date (in Unix epoch time) when the test suite was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SuiteDefinitionInformation withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
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 (getSuiteDefinitionId() != null)
sb.append("SuiteDefinitionId: ").append(getSuiteDefinitionId()).append(",");
if (getSuiteDefinitionName() != null)
sb.append("SuiteDefinitionName: ").append(getSuiteDefinitionName()).append(",");
if (getDefaultDevices() != null)
sb.append("DefaultDevices: ").append(getDefaultDevices()).append(",");
if (getIntendedForQualification() != null)
sb.append("IntendedForQualification: ").append(getIntendedForQualification()).append(",");
if (getIsLongDurationTest() != null)
sb.append("IsLongDurationTest: ").append(getIsLongDurationTest()).append(",");
if (getProtocol() != null)
sb.append("Protocol: ").append(getProtocol()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SuiteDefinitionInformation == false)
return false;
SuiteDefinitionInformation other = (SuiteDefinitionInformation) obj;
if (other.getSuiteDefinitionId() == null ^ this.getSuiteDefinitionId() == null)
return false;
if (other.getSuiteDefinitionId() != null && other.getSuiteDefinitionId().equals(this.getSuiteDefinitionId()) == false)
return false;
if (other.getSuiteDefinitionName() == null ^ this.getSuiteDefinitionName() == null)
return false;
if (other.getSuiteDefinitionName() != null && other.getSuiteDefinitionName().equals(this.getSuiteDefinitionName()) == false)
return false;
if (other.getDefaultDevices() == null ^ this.getDefaultDevices() == null)
return false;
if (other.getDefaultDevices() != null && other.getDefaultDevices().equals(this.getDefaultDevices()) == false)
return false;
if (other.getIntendedForQualification() == null ^ this.getIntendedForQualification() == null)
return false;
if (other.getIntendedForQualification() != null && other.getIntendedForQualification().equals(this.getIntendedForQualification()) == false)
return false;
if (other.getIsLongDurationTest() == null ^ this.getIsLongDurationTest() == null)
return false;
if (other.getIsLongDurationTest() != null && other.getIsLongDurationTest().equals(this.getIsLongDurationTest()) == false)
return false;
if (other.getProtocol() == null ^ this.getProtocol() == null)
return false;
if (other.getProtocol() != null && other.getProtocol().equals(this.getProtocol()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSuiteDefinitionId() == null) ? 0 : getSuiteDefinitionId().hashCode());
hashCode = prime * hashCode + ((getSuiteDefinitionName() == null) ? 0 : getSuiteDefinitionName().hashCode());
hashCode = prime * hashCode + ((getDefaultDevices() == null) ? 0 : getDefaultDevices().hashCode());
hashCode = prime * hashCode + ((getIntendedForQualification() == null) ? 0 : getIntendedForQualification().hashCode());
hashCode = prime * hashCode + ((getIsLongDurationTest() == null) ? 0 : getIsLongDurationTest().hashCode());
hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
return hashCode;
}
@Override
public SuiteDefinitionInformation clone() {
try {
return (SuiteDefinitionInformation) 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.iotdeviceadvisor.model.transform.SuiteDefinitionInformationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}