/* * Copyright 2010-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.iot.model; import java.io.Serializable; /** *

* The summary of an ML Detect behavior model. *

*/ public class BehaviorModelTrainingSummary implements Serializable { /** *

* The name of the security profile. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9:_-]+
*/ private String securityProfileName; /** *

* The name of the behavior. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9:_-]+
*/ private String behaviorName; /** *

* The date a training model started collecting data. *

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

* The status of the behavior model. *

*

* Constraints:
* Allowed Values: PENDING_BUILD, ACTIVE, EXPIRED */ private String modelStatus; /** *

* The percentage of datapoints collected. *

*

* Constraints:
* Range: 0.0 - 100.0
*/ private Double datapointsCollectionPercentage; /** *

* The date the model was last refreshed. *

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

* The name of the security profile. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9:_-]+
* * @return

* The name of the security profile. *

*/ public String getSecurityProfileName() { return securityProfileName; } /** *

* The name of the security profile. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9:_-]+
* * @param securityProfileName

* The name of the security profile. *

*/ public void setSecurityProfileName(String securityProfileName) { this.securityProfileName = securityProfileName; } /** *

* The name of the security profile. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9:_-]+
* * @param securityProfileName

* The name of the security profile. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BehaviorModelTrainingSummary withSecurityProfileName(String securityProfileName) { this.securityProfileName = securityProfileName; return this; } /** *

* The name of the behavior. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9:_-]+
* * @return

* The name of the behavior. *

*/ public String getBehaviorName() { return behaviorName; } /** *

* The name of the behavior. *

*

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9:_-]+
* * @param behaviorName

* The name of the behavior. *

*/ public void setBehaviorName(String behaviorName) { this.behaviorName = behaviorName; } /** *

* The name of the behavior. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 128
* Pattern: [a-zA-Z0-9:_-]+
* * @param behaviorName

* The name of the behavior. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BehaviorModelTrainingSummary withBehaviorName(String behaviorName) { this.behaviorName = behaviorName; return this; } /** *

* The date a training model started collecting data. *

* * @return

* The date a training model started collecting data. *

*/ public java.util.Date getTrainingDataCollectionStartDate() { return trainingDataCollectionStartDate; } /** *

* The date a training model started collecting data. *

* * @param trainingDataCollectionStartDate

* The date a training model started collecting data. *

*/ public void setTrainingDataCollectionStartDate(java.util.Date trainingDataCollectionStartDate) { this.trainingDataCollectionStartDate = trainingDataCollectionStartDate; } /** *

* The date a training model started collecting data. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param trainingDataCollectionStartDate

* The date a training model started collecting data. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BehaviorModelTrainingSummary withTrainingDataCollectionStartDate( java.util.Date trainingDataCollectionStartDate) { this.trainingDataCollectionStartDate = trainingDataCollectionStartDate; return this; } /** *

* The status of the behavior model. *

*

* Constraints:
* Allowed Values: PENDING_BUILD, ACTIVE, EXPIRED * * @return

* The status of the behavior model. *

* @see ModelStatus */ public String getModelStatus() { return modelStatus; } /** *

* The status of the behavior model. *

*

* Constraints:
* Allowed Values: PENDING_BUILD, ACTIVE, EXPIRED * * @param modelStatus

* The status of the behavior model. *

* @see ModelStatus */ public void setModelStatus(String modelStatus) { this.modelStatus = modelStatus; } /** *

* The status of the behavior model. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: PENDING_BUILD, ACTIVE, EXPIRED * * @param modelStatus

* The status of the behavior model. *

* @return A reference to this updated object so that method calls can be * chained together. * @see ModelStatus */ public BehaviorModelTrainingSummary withModelStatus(String modelStatus) { this.modelStatus = modelStatus; return this; } /** *

* The status of the behavior model. *

*

* Constraints:
* Allowed Values: PENDING_BUILD, ACTIVE, EXPIRED * * @param modelStatus

* The status of the behavior model. *

* @see ModelStatus */ public void setModelStatus(ModelStatus modelStatus) { this.modelStatus = modelStatus.toString(); } /** *

* The status of the behavior model. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: PENDING_BUILD, ACTIVE, EXPIRED * * @param modelStatus

* The status of the behavior model. *

* @return A reference to this updated object so that method calls can be * chained together. * @see ModelStatus */ public BehaviorModelTrainingSummary withModelStatus(ModelStatus modelStatus) { this.modelStatus = modelStatus.toString(); return this; } /** *

* The percentage of datapoints collected. *

*

* Constraints:
* Range: 0.0 - 100.0
* * @return

* The percentage of datapoints collected. *

*/ public Double getDatapointsCollectionPercentage() { return datapointsCollectionPercentage; } /** *

* The percentage of datapoints collected. *

*

* Constraints:
* Range: 0.0 - 100.0
* * @param datapointsCollectionPercentage

* The percentage of datapoints collected. *

*/ public void setDatapointsCollectionPercentage(Double datapointsCollectionPercentage) { this.datapointsCollectionPercentage = datapointsCollectionPercentage; } /** *

* The percentage of datapoints collected. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Range: 0.0 - 100.0
* * @param datapointsCollectionPercentage

* The percentage of datapoints collected. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BehaviorModelTrainingSummary withDatapointsCollectionPercentage( Double datapointsCollectionPercentage) { this.datapointsCollectionPercentage = datapointsCollectionPercentage; return this; } /** *

* The date the model was last refreshed. *

* * @return

* The date the model was last refreshed. *

*/ public java.util.Date getLastModelRefreshDate() { return lastModelRefreshDate; } /** *

* The date the model was last refreshed. *

* * @param lastModelRefreshDate

* The date the model was last refreshed. *

*/ public void setLastModelRefreshDate(java.util.Date lastModelRefreshDate) { this.lastModelRefreshDate = lastModelRefreshDate; } /** *

* The date the model was last refreshed. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param lastModelRefreshDate

* The date the model was last refreshed. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BehaviorModelTrainingSummary withLastModelRefreshDate(java.util.Date lastModelRefreshDate) { this.lastModelRefreshDate = lastModelRefreshDate; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSecurityProfileName() != null) sb.append("securityProfileName: " + getSecurityProfileName() + ","); if (getBehaviorName() != null) sb.append("behaviorName: " + getBehaviorName() + ","); if (getTrainingDataCollectionStartDate() != null) sb.append("trainingDataCollectionStartDate: " + getTrainingDataCollectionStartDate() + ","); if (getModelStatus() != null) sb.append("modelStatus: " + getModelStatus() + ","); if (getDatapointsCollectionPercentage() != null) sb.append("datapointsCollectionPercentage: " + getDatapointsCollectionPercentage() + ","); if (getLastModelRefreshDate() != null) sb.append("lastModelRefreshDate: " + getLastModelRefreshDate()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSecurityProfileName() == null) ? 0 : getSecurityProfileName().hashCode()); hashCode = prime * hashCode + ((getBehaviorName() == null) ? 0 : getBehaviorName().hashCode()); hashCode = prime * hashCode + ((getTrainingDataCollectionStartDate() == null) ? 0 : getTrainingDataCollectionStartDate().hashCode()); hashCode = prime * hashCode + ((getModelStatus() == null) ? 0 : getModelStatus().hashCode()); hashCode = prime * hashCode + ((getDatapointsCollectionPercentage() == null) ? 0 : getDatapointsCollectionPercentage().hashCode()); hashCode = prime * hashCode + ((getLastModelRefreshDate() == null) ? 0 : getLastModelRefreshDate().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BehaviorModelTrainingSummary == false) return false; BehaviorModelTrainingSummary other = (BehaviorModelTrainingSummary) obj; if (other.getSecurityProfileName() == null ^ this.getSecurityProfileName() == null) return false; if (other.getSecurityProfileName() != null && other.getSecurityProfileName().equals(this.getSecurityProfileName()) == false) return false; if (other.getBehaviorName() == null ^ this.getBehaviorName() == null) return false; if (other.getBehaviorName() != null && other.getBehaviorName().equals(this.getBehaviorName()) == false) return false; if (other.getTrainingDataCollectionStartDate() == null ^ this.getTrainingDataCollectionStartDate() == null) return false; if (other.getTrainingDataCollectionStartDate() != null && other.getTrainingDataCollectionStartDate().equals( this.getTrainingDataCollectionStartDate()) == false) return false; if (other.getModelStatus() == null ^ this.getModelStatus() == null) return false; if (other.getModelStatus() != null && other.getModelStatus().equals(this.getModelStatus()) == false) return false; if (other.getDatapointsCollectionPercentage() == null ^ this.getDatapointsCollectionPercentage() == null) return false; if (other.getDatapointsCollectionPercentage() != null && other.getDatapointsCollectionPercentage().equals( this.getDatapointsCollectionPercentage()) == false) return false; if (other.getLastModelRefreshDate() == null ^ this.getLastModelRefreshDate() == null) return false; if (other.getLastModelRefreshDate() != null && other.getLastModelRefreshDate().equals(this.getLastModelRefreshDate()) == false) return false; return true; } }