com.amazonaws.services.comprehend.model.EndpointProperties Maven / Gradle / Ivy
Show all versions of aws-java-sdk-comprehend Show documentation
/*
* 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.comprehend.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Specifies information about the specified endpoint. For information about endpoints, see Managing endpoints.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class EndpointProperties implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Number (ARN) of the endpoint.
*
*/
private String endpointArn;
/**
*
* Specifies the status of the endpoint. Because the endpoint updates and creation are asynchronous, so customers
* will need to wait for the endpoint to be Ready
status before making inference requests.
*
*/
private String status;
/**
*
* Specifies a reason for failure in cases of Failed
status.
*
*/
private String message;
/**
*
* The Amazon Resource Number (ARN) of the model to which the endpoint is attached.
*
*/
private String modelArn;
/**
*
* ARN of the new model to use for updating an existing endpoint. This ARN is going to be different from the model
* ARN when the update is in progress
*
*/
private String desiredModelArn;
/**
*
* The desired number of inference units to be used by the model using this endpoint. Each inference unit represents
* of a throughput of 100 characters per second.
*
*/
private Integer desiredInferenceUnits;
/**
*
* The number of inference units currently used by the model using this endpoint.
*
*/
private Integer currentInferenceUnits;
/**
*
* The creation date and time of the endpoint.
*
*/
private java.util.Date creationTime;
/**
*
* The date and time that the endpoint was last modified.
*
*/
private java.util.Date lastModifiedTime;
/**
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to trained custom models
* encrypted with a customer managed key (ModelKmsKeyId).
*
*/
private String dataAccessRoleArn;
/**
*
* Data access role ARN to use in case the new model is encrypted with a customer KMS key.
*
*/
private String desiredDataAccessRoleArn;
/**
*
* The Amazon Resource Number (ARN) of the flywheel
*
*/
private String flywheelArn;
/**
*
* The Amazon Resource Number (ARN) of the endpoint.
*
*
* @param endpointArn
* The Amazon Resource Number (ARN) of the endpoint.
*/
public void setEndpointArn(String endpointArn) {
this.endpointArn = endpointArn;
}
/**
*
* The Amazon Resource Number (ARN) of the endpoint.
*
*
* @return The Amazon Resource Number (ARN) of the endpoint.
*/
public String getEndpointArn() {
return this.endpointArn;
}
/**
*
* The Amazon Resource Number (ARN) of the endpoint.
*
*
* @param endpointArn
* The Amazon Resource Number (ARN) of the endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointProperties withEndpointArn(String endpointArn) {
setEndpointArn(endpointArn);
return this;
}
/**
*
* Specifies the status of the endpoint. Because the endpoint updates and creation are asynchronous, so customers
* will need to wait for the endpoint to be Ready
status before making inference requests.
*
*
* @param status
* Specifies the status of the endpoint. Because the endpoint updates and creation are asynchronous, so
* customers will need to wait for the endpoint to be Ready
status before making inference
* requests.
* @see EndpointStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* Specifies the status of the endpoint. Because the endpoint updates and creation are asynchronous, so customers
* will need to wait for the endpoint to be Ready
status before making inference requests.
*
*
* @return Specifies the status of the endpoint. Because the endpoint updates and creation are asynchronous, so
* customers will need to wait for the endpoint to be Ready
status before making inference
* requests.
* @see EndpointStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* Specifies the status of the endpoint. Because the endpoint updates and creation are asynchronous, so customers
* will need to wait for the endpoint to be Ready
status before making inference requests.
*
*
* @param status
* Specifies the status of the endpoint. Because the endpoint updates and creation are asynchronous, so
* customers will need to wait for the endpoint to be Ready
status before making inference
* requests.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EndpointStatus
*/
public EndpointProperties withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* Specifies the status of the endpoint. Because the endpoint updates and creation are asynchronous, so customers
* will need to wait for the endpoint to be Ready
status before making inference requests.
*
*
* @param status
* Specifies the status of the endpoint. Because the endpoint updates and creation are asynchronous, so
* customers will need to wait for the endpoint to be Ready
status before making inference
* requests.
* @return Returns a reference to this object so that method calls can be chained together.
* @see EndpointStatus
*/
public EndpointProperties withStatus(EndpointStatus status) {
this.status = status.toString();
return this;
}
/**
*
* Specifies a reason for failure in cases of Failed
status.
*
*
* @param message
* Specifies a reason for failure in cases of Failed
status.
*/
public void setMessage(String message) {
this.message = message;
}
/**
*
* Specifies a reason for failure in cases of Failed
status.
*
*
* @return Specifies a reason for failure in cases of Failed
status.
*/
public String getMessage() {
return this.message;
}
/**
*
* Specifies a reason for failure in cases of Failed
status.
*
*
* @param message
* Specifies a reason for failure in cases of Failed
status.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointProperties withMessage(String message) {
setMessage(message);
return this;
}
/**
*
* The Amazon Resource Number (ARN) of the model to which the endpoint is attached.
*
*
* @param modelArn
* The Amazon Resource Number (ARN) of the model to which the endpoint is attached.
*/
public void setModelArn(String modelArn) {
this.modelArn = modelArn;
}
/**
*
* The Amazon Resource Number (ARN) of the model to which the endpoint is attached.
*
*
* @return The Amazon Resource Number (ARN) of the model to which the endpoint is attached.
*/
public String getModelArn() {
return this.modelArn;
}
/**
*
* The Amazon Resource Number (ARN) of the model to which the endpoint is attached.
*
*
* @param modelArn
* The Amazon Resource Number (ARN) of the model to which the endpoint is attached.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointProperties withModelArn(String modelArn) {
setModelArn(modelArn);
return this;
}
/**
*
* ARN of the new model to use for updating an existing endpoint. This ARN is going to be different from the model
* ARN when the update is in progress
*
*
* @param desiredModelArn
* ARN of the new model to use for updating an existing endpoint. This ARN is going to be different from the
* model ARN when the update is in progress
*/
public void setDesiredModelArn(String desiredModelArn) {
this.desiredModelArn = desiredModelArn;
}
/**
*
* ARN of the new model to use for updating an existing endpoint. This ARN is going to be different from the model
* ARN when the update is in progress
*
*
* @return ARN of the new model to use for updating an existing endpoint. This ARN is going to be different from the
* model ARN when the update is in progress
*/
public String getDesiredModelArn() {
return this.desiredModelArn;
}
/**
*
* ARN of the new model to use for updating an existing endpoint. This ARN is going to be different from the model
* ARN when the update is in progress
*
*
* @param desiredModelArn
* ARN of the new model to use for updating an existing endpoint. This ARN is going to be different from the
* model ARN when the update is in progress
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointProperties withDesiredModelArn(String desiredModelArn) {
setDesiredModelArn(desiredModelArn);
return this;
}
/**
*
* The desired number of inference units to be used by the model using this endpoint. Each inference unit represents
* of a throughput of 100 characters per second.
*
*
* @param desiredInferenceUnits
* The desired number of inference units to be used by the model using this endpoint. Each inference unit
* represents of a throughput of 100 characters per second.
*/
public void setDesiredInferenceUnits(Integer desiredInferenceUnits) {
this.desiredInferenceUnits = desiredInferenceUnits;
}
/**
*
* The desired number of inference units to be used by the model using this endpoint. Each inference unit represents
* of a throughput of 100 characters per second.
*
*
* @return The desired number of inference units to be used by the model using this endpoint. Each inference unit
* represents of a throughput of 100 characters per second.
*/
public Integer getDesiredInferenceUnits() {
return this.desiredInferenceUnits;
}
/**
*
* The desired number of inference units to be used by the model using this endpoint. Each inference unit represents
* of a throughput of 100 characters per second.
*
*
* @param desiredInferenceUnits
* The desired number of inference units to be used by the model using this endpoint. Each inference unit
* represents of a throughput of 100 characters per second.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointProperties withDesiredInferenceUnits(Integer desiredInferenceUnits) {
setDesiredInferenceUnits(desiredInferenceUnits);
return this;
}
/**
*
* The number of inference units currently used by the model using this endpoint.
*
*
* @param currentInferenceUnits
* The number of inference units currently used by the model using this endpoint.
*/
public void setCurrentInferenceUnits(Integer currentInferenceUnits) {
this.currentInferenceUnits = currentInferenceUnits;
}
/**
*
* The number of inference units currently used by the model using this endpoint.
*
*
* @return The number of inference units currently used by the model using this endpoint.
*/
public Integer getCurrentInferenceUnits() {
return this.currentInferenceUnits;
}
/**
*
* The number of inference units currently used by the model using this endpoint.
*
*
* @param currentInferenceUnits
* The number of inference units currently used by the model using this endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointProperties withCurrentInferenceUnits(Integer currentInferenceUnits) {
setCurrentInferenceUnits(currentInferenceUnits);
return this;
}
/**
*
* The creation date and time of the endpoint.
*
*
* @param creationTime
* The creation date and time of the endpoint.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* The creation date and time of the endpoint.
*
*
* @return The creation date and time of the endpoint.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* The creation date and time of the endpoint.
*
*
* @param creationTime
* The creation date and time of the endpoint.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointProperties withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* The date and time that the endpoint was last modified.
*
*
* @param lastModifiedTime
* The date and time that the endpoint was last modified.
*/
public void setLastModifiedTime(java.util.Date lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
}
/**
*
* The date and time that the endpoint was last modified.
*
*
* @return The date and time that the endpoint was last modified.
*/
public java.util.Date getLastModifiedTime() {
return this.lastModifiedTime;
}
/**
*
* The date and time that the endpoint was last modified.
*
*
* @param lastModifiedTime
* The date and time that the endpoint was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointProperties withLastModifiedTime(java.util.Date lastModifiedTime) {
setLastModifiedTime(lastModifiedTime);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to trained custom models
* encrypted with a customer managed key (ModelKmsKeyId).
*
*
* @param dataAccessRoleArn
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to trained custom
* models encrypted with a customer managed key (ModelKmsKeyId).
*/
public void setDataAccessRoleArn(String dataAccessRoleArn) {
this.dataAccessRoleArn = dataAccessRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to trained custom models
* encrypted with a customer managed key (ModelKmsKeyId).
*
*
* @return The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to trained
* custom models encrypted with a customer managed key (ModelKmsKeyId).
*/
public String getDataAccessRoleArn() {
return this.dataAccessRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to trained custom models
* encrypted with a customer managed key (ModelKmsKeyId).
*
*
* @param dataAccessRoleArn
* The Amazon Resource Name (ARN) of the IAM role that grants Amazon Comprehend read access to trained custom
* models encrypted with a customer managed key (ModelKmsKeyId).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointProperties withDataAccessRoleArn(String dataAccessRoleArn) {
setDataAccessRoleArn(dataAccessRoleArn);
return this;
}
/**
*
* Data access role ARN to use in case the new model is encrypted with a customer KMS key.
*
*
* @param desiredDataAccessRoleArn
* Data access role ARN to use in case the new model is encrypted with a customer KMS key.
*/
public void setDesiredDataAccessRoleArn(String desiredDataAccessRoleArn) {
this.desiredDataAccessRoleArn = desiredDataAccessRoleArn;
}
/**
*
* Data access role ARN to use in case the new model is encrypted with a customer KMS key.
*
*
* @return Data access role ARN to use in case the new model is encrypted with a customer KMS key.
*/
public String getDesiredDataAccessRoleArn() {
return this.desiredDataAccessRoleArn;
}
/**
*
* Data access role ARN to use in case the new model is encrypted with a customer KMS key.
*
*
* @param desiredDataAccessRoleArn
* Data access role ARN to use in case the new model is encrypted with a customer KMS key.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointProperties withDesiredDataAccessRoleArn(String desiredDataAccessRoleArn) {
setDesiredDataAccessRoleArn(desiredDataAccessRoleArn);
return this;
}
/**
*
* The Amazon Resource Number (ARN) of the flywheel
*
*
* @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
*
*
* @return The Amazon Resource Number (ARN) of the flywheel
*/
public String getFlywheelArn() {
return this.flywheelArn;
}
/**
*
* The Amazon Resource Number (ARN) of the flywheel
*
*
* @param flywheelArn
* The Amazon Resource Number (ARN) of the flywheel
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EndpointProperties withFlywheelArn(String flywheelArn) {
setFlywheelArn(flywheelArn);
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 (getEndpointArn() != null)
sb.append("EndpointArn: ").append(getEndpointArn()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getMessage() != null)
sb.append("Message: ").append(getMessage()).append(",");
if (getModelArn() != null)
sb.append("ModelArn: ").append(getModelArn()).append(",");
if (getDesiredModelArn() != null)
sb.append("DesiredModelArn: ").append(getDesiredModelArn()).append(",");
if (getDesiredInferenceUnits() != null)
sb.append("DesiredInferenceUnits: ").append(getDesiredInferenceUnits()).append(",");
if (getCurrentInferenceUnits() != null)
sb.append("CurrentInferenceUnits: ").append(getCurrentInferenceUnits()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getLastModifiedTime() != null)
sb.append("LastModifiedTime: ").append(getLastModifiedTime()).append(",");
if (getDataAccessRoleArn() != null)
sb.append("DataAccessRoleArn: ").append(getDataAccessRoleArn()).append(",");
if (getDesiredDataAccessRoleArn() != null)
sb.append("DesiredDataAccessRoleArn: ").append(getDesiredDataAccessRoleArn()).append(",");
if (getFlywheelArn() != null)
sb.append("FlywheelArn: ").append(getFlywheelArn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof EndpointProperties == false)
return false;
EndpointProperties other = (EndpointProperties) obj;
if (other.getEndpointArn() == null ^ this.getEndpointArn() == null)
return false;
if (other.getEndpointArn() != null && other.getEndpointArn().equals(this.getEndpointArn()) == 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.getMessage() == null ^ this.getMessage() == null)
return false;
if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == false)
return false;
if (other.getModelArn() == null ^ this.getModelArn() == null)
return false;
if (other.getModelArn() != null && other.getModelArn().equals(this.getModelArn()) == false)
return false;
if (other.getDesiredModelArn() == null ^ this.getDesiredModelArn() == null)
return false;
if (other.getDesiredModelArn() != null && other.getDesiredModelArn().equals(this.getDesiredModelArn()) == false)
return false;
if (other.getDesiredInferenceUnits() == null ^ this.getDesiredInferenceUnits() == null)
return false;
if (other.getDesiredInferenceUnits() != null && other.getDesiredInferenceUnits().equals(this.getDesiredInferenceUnits()) == false)
return false;
if (other.getCurrentInferenceUnits() == null ^ this.getCurrentInferenceUnits() == null)
return false;
if (other.getCurrentInferenceUnits() != null && other.getCurrentInferenceUnits().equals(this.getCurrentInferenceUnits()) == 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.getDataAccessRoleArn() == null ^ this.getDataAccessRoleArn() == null)
return false;
if (other.getDataAccessRoleArn() != null && other.getDataAccessRoleArn().equals(this.getDataAccessRoleArn()) == false)
return false;
if (other.getDesiredDataAccessRoleArn() == null ^ this.getDesiredDataAccessRoleArn() == null)
return false;
if (other.getDesiredDataAccessRoleArn() != null && other.getDesiredDataAccessRoleArn().equals(this.getDesiredDataAccessRoleArn()) == false)
return false;
if (other.getFlywheelArn() == null ^ this.getFlywheelArn() == null)
return false;
if (other.getFlywheelArn() != null && other.getFlywheelArn().equals(this.getFlywheelArn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEndpointArn() == null) ? 0 : getEndpointArn().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode());
hashCode = prime * hashCode + ((getModelArn() == null) ? 0 : getModelArn().hashCode());
hashCode = prime * hashCode + ((getDesiredModelArn() == null) ? 0 : getDesiredModelArn().hashCode());
hashCode = prime * hashCode + ((getDesiredInferenceUnits() == null) ? 0 : getDesiredInferenceUnits().hashCode());
hashCode = prime * hashCode + ((getCurrentInferenceUnits() == null) ? 0 : getCurrentInferenceUnits().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode());
hashCode = prime * hashCode + ((getDataAccessRoleArn() == null) ? 0 : getDataAccessRoleArn().hashCode());
hashCode = prime * hashCode + ((getDesiredDataAccessRoleArn() == null) ? 0 : getDesiredDataAccessRoleArn().hashCode());
hashCode = prime * hashCode + ((getFlywheelArn() == null) ? 0 : getFlywheelArn().hashCode());
return hashCode;
}
@Override
public EndpointProperties clone() {
try {
return (EndpointProperties) 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.comprehend.model.transform.EndpointPropertiesMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}