/* * Copyright 2018-2023 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.lookoutequipment.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateLabelRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of a group of labels. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
*/ private String labelGroupName; /** ** The start time of the labeled event. *
*/ private java.util.Date startTime; /** ** The end time of the labeled event. *
*/ private java.util.Date endTime; /** ** Indicates whether a labeled event represents an anomaly. *
*/ private String rating; /** ** Provides additional information about the label. The fault code must be defined in the FaultCodes attribute of * the label group. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
*/ private String faultCode; /** ** Metadata providing additional information about the label. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
*/ private String notes; /** ** Indicates that a label pertains to a particular piece of equipment. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
*/ private String equipment; /** ** A unique identifier for the request to create a label. If you do not set the client request token, Lookout for * Equipment generates one. *
*/ private String clientToken; /** ** The name of a group of labels. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
* * @param labelGroupName * The name of a group of labels. ** Data in this field will be retained for service usage. Follow best practices for the security of your * data. */ public void setLabelGroupName(String labelGroupName) { this.labelGroupName = labelGroupName; } /** *
* The name of a group of labels. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
* * @return The name of a group of labels. ** Data in this field will be retained for service usage. Follow best practices for the security of your * data. */ public String getLabelGroupName() { return this.labelGroupName; } /** *
* The name of a group of labels. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
* * @param labelGroupName * The name of a group of labels. ** Data in this field will be retained for service usage. Follow best practices for the security of your * data. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLabelRequest withLabelGroupName(String labelGroupName) { setLabelGroupName(labelGroupName); return this; } /** *
* The start time of the labeled event. *
* * @param startTime * The start time of the labeled event. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** ** The start time of the labeled event. *
* * @return The start time of the labeled event. */ public java.util.Date getStartTime() { return this.startTime; } /** ** The start time of the labeled event. *
* * @param startTime * The start time of the labeled event. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLabelRequest withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** ** The end time of the labeled event. *
* * @param endTime * The end time of the labeled event. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** ** The end time of the labeled event. *
* * @return The end time of the labeled event. */ public java.util.Date getEndTime() { return this.endTime; } /** ** The end time of the labeled event. *
* * @param endTime * The end time of the labeled event. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLabelRequest withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** ** Indicates whether a labeled event represents an anomaly. *
* * @param rating * Indicates whether a labeled event represents an anomaly. * @see LabelRating */ public void setRating(String rating) { this.rating = rating; } /** ** Indicates whether a labeled event represents an anomaly. *
* * @return Indicates whether a labeled event represents an anomaly. * @see LabelRating */ public String getRating() { return this.rating; } /** ** Indicates whether a labeled event represents an anomaly. *
* * @param rating * Indicates whether a labeled event represents an anomaly. * @return Returns a reference to this object so that method calls can be chained together. * @see LabelRating */ public CreateLabelRequest withRating(String rating) { setRating(rating); return this; } /** ** Indicates whether a labeled event represents an anomaly. *
* * @param rating * Indicates whether a labeled event represents an anomaly. * @return Returns a reference to this object so that method calls can be chained together. * @see LabelRating */ public CreateLabelRequest withRating(LabelRating rating) { this.rating = rating.toString(); return this; } /** ** Provides additional information about the label. The fault code must be defined in the FaultCodes attribute of * the label group. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
* * @param faultCode * Provides additional information about the label. The fault code must be defined in the FaultCodes * attribute of the label group. ** Data in this field will be retained for service usage. Follow best practices for the security of your * data. */ public void setFaultCode(String faultCode) { this.faultCode = faultCode; } /** *
* Provides additional information about the label. The fault code must be defined in the FaultCodes attribute of * the label group. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
* * @return Provides additional information about the label. The fault code must be defined in the FaultCodes * attribute of the label group. ** Data in this field will be retained for service usage. Follow best practices for the security of your * data. */ public String getFaultCode() { return this.faultCode; } /** *
* Provides additional information about the label. The fault code must be defined in the FaultCodes attribute of * the label group. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
* * @param faultCode * Provides additional information about the label. The fault code must be defined in the FaultCodes * attribute of the label group. ** Data in this field will be retained for service usage. Follow best practices for the security of your * data. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLabelRequest withFaultCode(String faultCode) { setFaultCode(faultCode); return this; } /** *
* Metadata providing additional information about the label. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
* * @param notes * Metadata providing additional information about the label. ** Data in this field will be retained for service usage. Follow best practices for the security of your * data. */ public void setNotes(String notes) { this.notes = notes; } /** *
* Metadata providing additional information about the label. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
* * @return Metadata providing additional information about the label. ** Data in this field will be retained for service usage. Follow best practices for the security of your * data. */ public String getNotes() { return this.notes; } /** *
* Metadata providing additional information about the label. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
* * @param notes * Metadata providing additional information about the label. ** Data in this field will be retained for service usage. Follow best practices for the security of your * data. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLabelRequest withNotes(String notes) { setNotes(notes); return this; } /** *
* Indicates that a label pertains to a particular piece of equipment. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
* * @param equipment * Indicates that a label pertains to a particular piece of equipment. ** Data in this field will be retained for service usage. Follow best practices for the security of your * data. */ public void setEquipment(String equipment) { this.equipment = equipment; } /** *
* Indicates that a label pertains to a particular piece of equipment. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
* * @return Indicates that a label pertains to a particular piece of equipment. ** Data in this field will be retained for service usage. Follow best practices for the security of your * data. */ public String getEquipment() { return this.equipment; } /** *
* Indicates that a label pertains to a particular piece of equipment. *
** Data in this field will be retained for service usage. Follow best practices for the security of your data. *
* * @param equipment * Indicates that a label pertains to a particular piece of equipment. ** Data in this field will be retained for service usage. Follow best practices for the security of your * data. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLabelRequest withEquipment(String equipment) { setEquipment(equipment); return this; } /** *
* A unique identifier for the request to create a label. If you do not set the client request token, Lookout for * Equipment generates one. *
* * @param clientToken * A unique identifier for the request to create a label. If you do not set the client request token, Lookout * for Equipment generates one. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** A unique identifier for the request to create a label. If you do not set the client request token, Lookout for * Equipment generates one. *
* * @return A unique identifier for the request to create a label. If you do not set the client request token, * Lookout for Equipment generates one. */ public String getClientToken() { return this.clientToken; } /** ** A unique identifier for the request to create a label. If you do not set the client request token, Lookout for * Equipment generates one. *
* * @param clientToken * A unique identifier for the request to create a label. If you do not set the client request token, Lookout * for Equipment generates one. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateLabelRequest withClientToken(String clientToken) { setClientToken(clientToken); 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 (getLabelGroupName() != null) sb.append("LabelGroupName: ").append(getLabelGroupName()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getRating() != null) sb.append("Rating: ").append(getRating()).append(","); if (getFaultCode() != null) sb.append("FaultCode: ").append(getFaultCode()).append(","); if (getNotes() != null) sb.append("Notes: ").append(getNotes()).append(","); if (getEquipment() != null) sb.append("Equipment: ").append(getEquipment()).append(","); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateLabelRequest == false) return false; CreateLabelRequest other = (CreateLabelRequest) obj; if (other.getLabelGroupName() == null ^ this.getLabelGroupName() == null) return false; if (other.getLabelGroupName() != null && other.getLabelGroupName().equals(this.getLabelGroupName()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) return false; if (other.getRating() == null ^ this.getRating() == null) return false; if (other.getRating() != null && other.getRating().equals(this.getRating()) == false) return false; if (other.getFaultCode() == null ^ this.getFaultCode() == null) return false; if (other.getFaultCode() != null && other.getFaultCode().equals(this.getFaultCode()) == false) return false; if (other.getNotes() == null ^ this.getNotes() == null) return false; if (other.getNotes() != null && other.getNotes().equals(this.getNotes()) == false) return false; if (other.getEquipment() == null ^ this.getEquipment() == null) return false; if (other.getEquipment() != null && other.getEquipment().equals(this.getEquipment()) == false) return false; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLabelGroupName() == null) ? 0 : getLabelGroupName().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getRating() == null) ? 0 : getRating().hashCode()); hashCode = prime * hashCode + ((getFaultCode() == null) ? 0 : getFaultCode().hashCode()); hashCode = prime * hashCode + ((getNotes() == null) ? 0 : getNotes().hashCode()); hashCode = prime * hashCode + ((getEquipment() == null) ? 0 : getEquipment().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); return hashCode; } @Override public CreateLabelRequest clone() { return (CreateLabelRequest) super.clone(); } }