/* * 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.comprehend.model; import java.io.Serializable; /** *
* The flywheel properties. *
*/ public class FlywheelProperties implements Serializable { /** ** The Amazon Resource Number (ARN) of the flywheel. *
*
* Constraints:
* Length: - 256
* Pattern:
* arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:flywheel
* /[a-zA-Z0-9](-*[a-zA-Z0-9])*
*/
private String flywheelArn;
/**
*
* The Amazon Resource Number (ARN) of the active model version. *
*
* Constraints:
* Length: - 256
* Pattern:
* arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document
* -classifier
* |entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-
* Z0-9](-*[a-zA-Z0-9])*)?
*/
private String activeModelArn;
/**
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend permission to access the flywheel data. *
*
* Constraints:
* Length: 20 - 2048
* Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
*/
private String dataAccessRoleArn;
/**
*
* Configuration about the custom classifier associated with the flywheel. *
*/ private TaskConfig taskConfig; /** ** Amazon S3 URI of the data lake location. *
*
* Constraints:
* Length: - 1024
* Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
*/
private String dataLakeS3Uri;
/**
*
* Data security configuration. *
*/ private DataSecurityConfig dataSecurityConfig; /** ** The status of the flywheel. *
*
* Constraints:
* Allowed Values: CREATING, ACTIVE, UPDATING, DELETING, FAILED
*/
private String status;
/**
*
* Model type of the flywheel's model. *
*
* Constraints:
* Allowed Values: DOCUMENT_CLASSIFIER, ENTITY_RECOGNIZER
*/
private String modelType;
/**
*
* A description of the status of the flywheel. *
*/ private String message; /** ** Creation time of the flywheel. *
*/ private java.util.Date creationTime; /** ** Last modified time for the flywheel. *
*/ private java.util.Date lastModifiedTime; /** ** The most recent flywheel iteration. *
*
* Constraints:
* Length: - 63
* Pattern: [0-9]{8}T[0-9]{6}Z
*/
private String latestFlywheelIteration;
/**
*
* The Amazon Resource Number (ARN) of the flywheel. *
*
* Constraints:
* Length: - 256
* Pattern:
* arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:flywheel
* /[a-zA-Z0-9](-*[a-zA-Z0-9])*
*
* @return
* The Amazon Resource Number (ARN) of the flywheel. *
*/ public String getFlywheelArn() { return flywheelArn; } /** ** The Amazon Resource Number (ARN) of the flywheel. *
*
* Constraints:
* Length: - 256
* Pattern:
* arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:flywheel
* /[a-zA-Z0-9](-*[a-zA-Z0-9])*
*
* @param flywheelArn
* The Amazon Resource Number (ARN) of the flywheel. *
*/ public void setFlywheelArn(String flywheelArn) { this.flywheelArn = flywheelArn; } /** ** The Amazon Resource Number (ARN) of the flywheel. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 256
* Pattern:
* arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:flywheel
* /[a-zA-Z0-9](-*[a-zA-Z0-9])*
*
* @param flywheelArn
* The Amazon Resource Number (ARN) of the flywheel. *
* @return A reference to this updated object so that method calls can be * chained together. */ public FlywheelProperties withFlywheelArn(String flywheelArn) { this.flywheelArn = flywheelArn; return this; } /** ** The Amazon Resource Number (ARN) of the active model version. *
*
* Constraints:
* Length: - 256
* Pattern:
* arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document
* -classifier
* |entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-
* Z0-9](-*[a-zA-Z0-9])*)?
*
* @return
* The Amazon Resource Number (ARN) of the active model version. *
*/ public String getActiveModelArn() { return activeModelArn; } /** ** The Amazon Resource Number (ARN) of the active model version. *
*
* Constraints:
* Length: - 256
* Pattern:
* arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document
* -classifier
* |entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-
* Z0-9](-*[a-zA-Z0-9])*)?
*
* @param activeModelArn
* The Amazon Resource Number (ARN) of the active model version. *
*/ public void setActiveModelArn(String activeModelArn) { this.activeModelArn = activeModelArn; } /** ** The Amazon Resource Number (ARN) of the active model version. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 256
* Pattern:
* arn:aws(-[^:]+)?:comprehend:[a-zA-Z0-9-]*:[0-9]{12}:(document
* -classifier
* |entity-recognizer)/[a-zA-Z0-9](-*[a-zA-Z0-9])*(/version/[a-zA-
* Z0-9](-*[a-zA-Z0-9])*)?
*
* @param activeModelArn
* The Amazon Resource Number (ARN) of the active model version. *
* @return A reference to this updated object so that method calls can be * chained together. */ public FlywheelProperties withActiveModelArn(String activeModelArn) { this.activeModelArn = activeModelArn; return this; } /** ** The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend permission to access the flywheel data. *
*
* Constraints:
* Length: 20 - 2048
* Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
*
* @return
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend permission to access the flywheel data. *
*/ public String getDataAccessRoleArn() { return dataAccessRoleArn; } /** ** The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend permission to access the flywheel data. *
*
* Constraints:
* Length: 20 - 2048
* Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
*
* @param dataAccessRoleArn
* The Amazon Resource Name (ARN) of the IAM role that grants * Amazon Comprehend permission to access the flywheel data. *
*/ public void setDataAccessRoleArn(String dataAccessRoleArn) { this.dataAccessRoleArn = dataAccessRoleArn; } /** ** The Amazon Resource Name (ARN) of the IAM role that grants Amazon * Comprehend permission to access the flywheel data. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 20 - 2048
* Pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
*
* @param dataAccessRoleArn
* The Amazon Resource Name (ARN) of the IAM role that grants * Amazon Comprehend permission to access the flywheel data. *
* @return A reference to this updated object so that method calls can be * chained together. */ public FlywheelProperties withDataAccessRoleArn(String dataAccessRoleArn) { this.dataAccessRoleArn = dataAccessRoleArn; return this; } /** ** Configuration about the custom classifier associated with the flywheel. *
* * @return* Configuration about the custom classifier associated with the * flywheel. *
*/ public TaskConfig getTaskConfig() { return taskConfig; } /** ** Configuration about the custom classifier associated with the flywheel. *
* * @param taskConfig* Configuration about the custom classifier associated with the * flywheel. *
*/ public void setTaskConfig(TaskConfig taskConfig) { this.taskConfig = taskConfig; } /** ** Configuration about the custom classifier associated with the flywheel. *
** Returns a reference to this object so that method calls can be chained * together. * * @param taskConfig
* Configuration about the custom classifier associated with the * flywheel. *
* @return A reference to this updated object so that method calls can be * chained together. */ public FlywheelProperties withTaskConfig(TaskConfig taskConfig) { this.taskConfig = taskConfig; return this; } /** ** Amazon S3 URI of the data lake location. *
*
* Constraints:
* Length: - 1024
* Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
*
* @return
* Amazon S3 URI of the data lake location. *
*/ public String getDataLakeS3Uri() { return dataLakeS3Uri; } /** ** Amazon S3 URI of the data lake location. *
*
* Constraints:
* Length: - 1024
* Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
*
* @param dataLakeS3Uri
* Amazon S3 URI of the data lake location. *
*/ public void setDataLakeS3Uri(String dataLakeS3Uri) { this.dataLakeS3Uri = dataLakeS3Uri; } /** ** Amazon S3 URI of the data lake location. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 1024
* Pattern: s3://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/.*)?
*
* @param dataLakeS3Uri
* Amazon S3 URI of the data lake location. *
* @return A reference to this updated object so that method calls can be * chained together. */ public FlywheelProperties withDataLakeS3Uri(String dataLakeS3Uri) { this.dataLakeS3Uri = dataLakeS3Uri; return this; } /** ** Data security configuration. *
* * @return* Data security configuration. *
*/ public DataSecurityConfig getDataSecurityConfig() { return dataSecurityConfig; } /** ** Data security configuration. *
* * @param dataSecurityConfig* Data security configuration. *
*/ public void setDataSecurityConfig(DataSecurityConfig dataSecurityConfig) { this.dataSecurityConfig = dataSecurityConfig; } /** ** Data security configuration. *
** Returns a reference to this object so that method calls can be chained * together. * * @param dataSecurityConfig
* Data security configuration. *
* @return A reference to this updated object so that method calls can be * chained together. */ public FlywheelProperties withDataSecurityConfig(DataSecurityConfig dataSecurityConfig) { this.dataSecurityConfig = dataSecurityConfig; return this; } /** ** The status of the flywheel. *
*
* Constraints:
* Allowed Values: CREATING, ACTIVE, UPDATING, DELETING, FAILED
*
* @return
* The status of the flywheel. *
* @see FlywheelStatus */ public String getStatus() { return status; } /** ** The status of the flywheel. *
*
* Constraints:
* Allowed Values: CREATING, ACTIVE, UPDATING, DELETING, FAILED
*
* @param status
* The status of the flywheel. *
* @see FlywheelStatus */ public void setStatus(String status) { this.status = status; } /** ** The status of the flywheel. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: CREATING, ACTIVE, UPDATING, DELETING, FAILED
*
* @param status
* The status of the flywheel. *
* @return A reference to this updated object so that method calls can be * chained together. * @see FlywheelStatus */ public FlywheelProperties withStatus(String status) { this.status = status; return this; } /** ** The status of the flywheel. *
*
* Constraints:
* Allowed Values: CREATING, ACTIVE, UPDATING, DELETING, FAILED
*
* @param status
* The status of the flywheel. *
* @see FlywheelStatus */ public void setStatus(FlywheelStatus status) { this.status = status.toString(); } /** ** The status of the flywheel. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: CREATING, ACTIVE, UPDATING, DELETING, FAILED
*
* @param status
* The status of the flywheel. *
* @return A reference to this updated object so that method calls can be * chained together. * @see FlywheelStatus */ public FlywheelProperties withStatus(FlywheelStatus status) { this.status = status.toString(); return this; } /** ** Model type of the flywheel's model. *
*
* Constraints:
* Allowed Values: DOCUMENT_CLASSIFIER, ENTITY_RECOGNIZER
*
* @return
* Model type of the flywheel's model. *
* @see ModelType */ public String getModelType() { return modelType; } /** ** Model type of the flywheel's model. *
*
* Constraints:
* Allowed Values: DOCUMENT_CLASSIFIER, ENTITY_RECOGNIZER
*
* @param modelType
* Model type of the flywheel's model. *
* @see ModelType */ public void setModelType(String modelType) { this.modelType = modelType; } /** ** Model type of the flywheel's model. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: DOCUMENT_CLASSIFIER, ENTITY_RECOGNIZER
*
* @param modelType
* Model type of the flywheel's model. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ModelType */ public FlywheelProperties withModelType(String modelType) { this.modelType = modelType; return this; } /** ** Model type of the flywheel's model. *
*
* Constraints:
* Allowed Values: DOCUMENT_CLASSIFIER, ENTITY_RECOGNIZER
*
* @param modelType
* Model type of the flywheel's model. *
* @see ModelType */ public void setModelType(ModelType modelType) { this.modelType = modelType.toString(); } /** ** Model type of the flywheel's model. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: DOCUMENT_CLASSIFIER, ENTITY_RECOGNIZER
*
* @param modelType
* Model type of the flywheel's model. *
* @return A reference to this updated object so that method calls can be * chained together. * @see ModelType */ public FlywheelProperties withModelType(ModelType modelType) { this.modelType = modelType.toString(); return this; } /** ** A description of the status of the flywheel. *
* * @return* A description of the status of the flywheel. *
*/ public String getMessage() { return message; } /** ** A description of the status of the flywheel. *
* * @param message* A description of the status of the flywheel. *
*/ public void setMessage(String message) { this.message = message; } /** ** A description of the status of the flywheel. *
** Returns a reference to this object so that method calls can be chained * together. * * @param message
* A description of the status of the flywheel. *
* @return A reference to this updated object so that method calls can be * chained together. */ public FlywheelProperties withMessage(String message) { this.message = message; return this; } /** ** Creation time of the flywheel. *
* * @return* Creation time of the flywheel. *
*/ public java.util.Date getCreationTime() { return creationTime; } /** ** Creation time of the flywheel. *
* * @param creationTime* Creation time of the flywheel. *
*/ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** ** Creation time of the flywheel. *
** Returns a reference to this object so that method calls can be chained * together. * * @param creationTime
* Creation time of the flywheel. *
* @return A reference to this updated object so that method calls can be * chained together. */ public FlywheelProperties withCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; return this; } /** ** Last modified time for the flywheel. *
* * @return* Last modified time for the flywheel. *
*/ public java.util.Date getLastModifiedTime() { return lastModifiedTime; } /** ** Last modified time for the flywheel. *
* * @param lastModifiedTime* Last modified time for the flywheel. *
*/ public void setLastModifiedTime(java.util.Date lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; } /** ** Last modified time for the flywheel. *
** Returns a reference to this object so that method calls can be chained * together. * * @param lastModifiedTime
* Last modified time for the flywheel. *
* @return A reference to this updated object so that method calls can be * chained together. */ public FlywheelProperties withLastModifiedTime(java.util.Date lastModifiedTime) { this.lastModifiedTime = lastModifiedTime; return this; } /** ** The most recent flywheel iteration. *
*
* Constraints:
* Length: - 63
* Pattern: [0-9]{8}T[0-9]{6}Z
*
* @return
* The most recent flywheel iteration. *
*/ public String getLatestFlywheelIteration() { return latestFlywheelIteration; } /** ** The most recent flywheel iteration. *
*
* Constraints:
* Length: - 63
* Pattern: [0-9]{8}T[0-9]{6}Z
*
* @param latestFlywheelIteration
* The most recent flywheel iteration. *
*/ public void setLatestFlywheelIteration(String latestFlywheelIteration) { this.latestFlywheelIteration = latestFlywheelIteration; } /** ** The most recent flywheel iteration. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: - 63
* Pattern: [0-9]{8}T[0-9]{6}Z
*
* @param latestFlywheelIteration
* The most recent flywheel iteration. *
* @return A reference to this updated object so that method calls can be * chained together. */ public FlywheelProperties withLatestFlywheelIteration(String latestFlywheelIteration) { this.latestFlywheelIteration = latestFlywheelIteration; 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 (getFlywheelArn() != null) sb.append("FlywheelArn: " + getFlywheelArn() + ","); if (getActiveModelArn() != null) sb.append("ActiveModelArn: " + getActiveModelArn() + ","); if (getDataAccessRoleArn() != null) sb.append("DataAccessRoleArn: " + getDataAccessRoleArn() + ","); if (getTaskConfig() != null) sb.append("TaskConfig: " + getTaskConfig() + ","); if (getDataLakeS3Uri() != null) sb.append("DataLakeS3Uri: " + getDataLakeS3Uri() + ","); if (getDataSecurityConfig() != null) sb.append("DataSecurityConfig: " + getDataSecurityConfig() + ","); if (getStatus() != null) sb.append("Status: " + getStatus() + ","); if (getModelType() != null) sb.append("ModelType: " + getModelType() + ","); if (getMessage() != null) sb.append("Message: " + getMessage() + ","); if (getCreationTime() != null) sb.append("CreationTime: " + getCreationTime() + ","); if (getLastModifiedTime() != null) sb.append("LastModifiedTime: " + getLastModifiedTime() + ","); if (getLatestFlywheelIteration() != null) sb.append("LatestFlywheelIteration: " + getLatestFlywheelIteration()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFlywheelArn() == null) ? 0 : getFlywheelArn().hashCode()); hashCode = prime * hashCode + ((getActiveModelArn() == null) ? 0 : getActiveModelArn().hashCode()); hashCode = prime * hashCode + ((getDataAccessRoleArn() == null) ? 0 : getDataAccessRoleArn().hashCode()); hashCode = prime * hashCode + ((getTaskConfig() == null) ? 0 : getTaskConfig().hashCode()); hashCode = prime * hashCode + ((getDataLakeS3Uri() == null) ? 0 : getDataLakeS3Uri().hashCode()); hashCode = prime * hashCode + ((getDataSecurityConfig() == null) ? 0 : getDataSecurityConfig().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getModelType() == null) ? 0 : getModelType().hashCode()); hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode()); hashCode = prime * hashCode + ((getLatestFlywheelIteration() == null) ? 0 : getLatestFlywheelIteration() .hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof FlywheelProperties == false) return false; FlywheelProperties other = (FlywheelProperties) obj; if (other.getFlywheelArn() == null ^ this.getFlywheelArn() == null) return false; if (other.getFlywheelArn() != null && other.getFlywheelArn().equals(this.getFlywheelArn()) == false) return false; if (other.getActiveModelArn() == null ^ this.getActiveModelArn() == null) return false; if (other.getActiveModelArn() != null && other.getActiveModelArn().equals(this.getActiveModelArn()) == false) return false; if (other.getDataAccessRoleArn() == null ^ this.getDataAccessRoleArn() == null) return false; if (other.getDataAccessRoleArn() != null && other.getDataAccessRoleArn().equals(this.getDataAccessRoleArn()) == false) return false; if (other.getTaskConfig() == null ^ this.getTaskConfig() == null) return false; if (other.getTaskConfig() != null && other.getTaskConfig().equals(this.getTaskConfig()) == false) return false; if (other.getDataLakeS3Uri() == null ^ this.getDataLakeS3Uri() == null) return false; if (other.getDataLakeS3Uri() != null && other.getDataLakeS3Uri().equals(this.getDataLakeS3Uri()) == false) return false; if (other.getDataSecurityConfig() == null ^ this.getDataSecurityConfig() == null) return false; if (other.getDataSecurityConfig() != null && other.getDataSecurityConfig().equals(this.getDataSecurityConfig()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getModelType() == null ^ this.getModelType() == null) return false; if (other.getModelType() != null && other.getModelType().equals(this.getModelType()) == false) return false; if (other.getMessage() == null ^ this.getMessage() == null) return false; if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == 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.getLastModifiedTime() == null ^ this.getLastModifiedTime() == null) return false; if (other.getLastModifiedTime() != null && other.getLastModifiedTime().equals(this.getLastModifiedTime()) == false) return false; if (other.getLatestFlywheelIteration() == null ^ this.getLatestFlywheelIteration() == null) return false; if (other.getLatestFlywheelIteration() != null && other.getLatestFlywheelIteration().equals(this.getLatestFlywheelIteration()) == false) return false; return true; } }