com.amazonaws.services.iotanalytics.model.Datastore Maven / Gradle / Ivy
Show all versions of aws-java-sdk-iotanalytics 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.iotanalytics.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about a data store.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Datastore implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the data store.
*
*/
private String name;
/**
*
* Where data in a data store is stored.. You can choose serviceManagedS3
storage,
* customerManagedS3
storage, or iotSiteWiseMultiLayerStorage
storage. The default is
* serviceManagedS3
. You can't change the choice of Amazon S3 storage after your data store is created.
*
*/
private DatastoreStorage storage;
/**
*
* The ARN of the data store.
*
*/
private String arn;
/**
*
* The status of a data store:
*
*
* - CREATING
* -
*
* The data store is being created.
*
*
* - ACTIVE
* -
*
* The data store has been created and can be used.
*
*
* - DELETING
* -
*
* The data store is being deleted.
*
*
*
*/
private String status;
/**
*
* How long, in days, message data is kept for the data store. When customerManagedS3
storage is
* selected, this parameter is ignored.
*
*/
private RetentionPeriod retentionPeriod;
/**
*
* When the data store was created.
*
*/
private java.util.Date creationTime;
/**
*
* The last time the data store was updated.
*
*/
private java.util.Date lastUpdateTime;
/**
*
* The last time when a new message arrived in the data store.
*
*
* IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data store. Hence,
* the lastMessageArrivalTime
value is an approximation.
*
*
* This feature only applies to messages that arrived in the data store after October 23, 2020.
*
*/
private java.util.Date lastMessageArrivalTime;
/**
*
* Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.
*
*
* The default file format is JSON. You can specify only one format.
*
*
* You can't change the file format after you create the data store.
*
*/
private FileFormatConfiguration fileFormatConfiguration;
/**
*
* Contains information about the partition dimensions in a data store.
*
*/
private DatastorePartitions datastorePartitions;
/**
*
* The name of the data store.
*
*
* @param name
* The name of the data store.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the data store.
*
*
* @return The name of the data store.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the data store.
*
*
* @param name
* The name of the data store.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Datastore withName(String name) {
setName(name);
return this;
}
/**
*
* Where data in a data store is stored.. You can choose serviceManagedS3
storage,
* customerManagedS3
storage, or iotSiteWiseMultiLayerStorage
storage. The default is
* serviceManagedS3
. You can't change the choice of Amazon S3 storage after your data store is created.
*
*
* @param storage
* Where data in a data store is stored.. You can choose serviceManagedS3
storage,
* customerManagedS3
storage, or iotSiteWiseMultiLayerStorage
storage. The default
* is serviceManagedS3
. You can't change the choice of Amazon S3 storage after your data store
* is created.
*/
public void setStorage(DatastoreStorage storage) {
this.storage = storage;
}
/**
*
* Where data in a data store is stored.. You can choose serviceManagedS3
storage,
* customerManagedS3
storage, or iotSiteWiseMultiLayerStorage
storage. The default is
* serviceManagedS3
. You can't change the choice of Amazon S3 storage after your data store is created.
*
*
* @return Where data in a data store is stored.. You can choose serviceManagedS3
storage,
* customerManagedS3
storage, or iotSiteWiseMultiLayerStorage
storage. The default
* is serviceManagedS3
. You can't change the choice of Amazon S3 storage after your data store
* is created.
*/
public DatastoreStorage getStorage() {
return this.storage;
}
/**
*
* Where data in a data store is stored.. You can choose serviceManagedS3
storage,
* customerManagedS3
storage, or iotSiteWiseMultiLayerStorage
storage. The default is
* serviceManagedS3
. You can't change the choice of Amazon S3 storage after your data store is created.
*
*
* @param storage
* Where data in a data store is stored.. You can choose serviceManagedS3
storage,
* customerManagedS3
storage, or iotSiteWiseMultiLayerStorage
storage. The default
* is serviceManagedS3
. You can't change the choice of Amazon S3 storage after your data store
* is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Datastore withStorage(DatastoreStorage storage) {
setStorage(storage);
return this;
}
/**
*
* The ARN of the data store.
*
*
* @param arn
* The ARN of the data store.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The ARN of the data store.
*
*
* @return The ARN of the data store.
*/
public String getArn() {
return this.arn;
}
/**
*
* The ARN of the data store.
*
*
* @param arn
* The ARN of the data store.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Datastore withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The status of a data store:
*
*
* - CREATING
* -
*
* The data store is being created.
*
*
* - ACTIVE
* -
*
* The data store has been created and can be used.
*
*
* - DELETING
* -
*
* The data store is being deleted.
*
*
*
*
* @param status
* The status of a data store:
*
* - CREATING
* -
*
* The data store is being created.
*
*
* - ACTIVE
* -
*
* The data store has been created and can be used.
*
*
* - DELETING
* -
*
* The data store is being deleted.
*
*
* @see DatastoreStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of a data store:
*
*
* - CREATING
* -
*
* The data store is being created.
*
*
* - ACTIVE
* -
*
* The data store has been created and can be used.
*
*
* - DELETING
* -
*
* The data store is being deleted.
*
*
*
*
* @return The status of a data store:
*
* - CREATING
* -
*
* The data store is being created.
*
*
* - ACTIVE
* -
*
* The data store has been created and can be used.
*
*
* - DELETING
* -
*
* The data store is being deleted.
*
*
* @see DatastoreStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of a data store:
*
*
* - CREATING
* -
*
* The data store is being created.
*
*
* - ACTIVE
* -
*
* The data store has been created and can be used.
*
*
* - DELETING
* -
*
* The data store is being deleted.
*
*
*
*
* @param status
* The status of a data store:
*
* - CREATING
* -
*
* The data store is being created.
*
*
* - ACTIVE
* -
*
* The data store has been created and can be used.
*
*
* - DELETING
* -
*
* The data store is being deleted.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DatastoreStatus
*/
public Datastore withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status of a data store:
*
*
* - CREATING
* -
*
* The data store is being created.
*
*
* - ACTIVE
* -
*
* The data store has been created and can be used.
*
*
* - DELETING
* -
*
* The data store is being deleted.
*
*
*
*
* @param status
* The status of a data store:
*
* - CREATING
* -
*
* The data store is being created.
*
*
* - ACTIVE
* -
*
* The data store has been created and can be used.
*
*
* - DELETING
* -
*
* The data store is being deleted.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see DatastoreStatus
*/
public Datastore withStatus(DatastoreStatus status) {
this.status = status.toString();
return this;
}
/**
*
* How long, in days, message data is kept for the data store. When customerManagedS3
storage is
* selected, this parameter is ignored.
*
*
* @param retentionPeriod
* How long, in days, message data is kept for the data store. When customerManagedS3
storage is
* selected, this parameter is ignored.
*/
public void setRetentionPeriod(RetentionPeriod retentionPeriod) {
this.retentionPeriod = retentionPeriod;
}
/**
*
* How long, in days, message data is kept for the data store. When customerManagedS3
storage is
* selected, this parameter is ignored.
*
*
* @return How long, in days, message data is kept for the data store. When customerManagedS3
storage
* is selected, this parameter is ignored.
*/
public RetentionPeriod getRetentionPeriod() {
return this.retentionPeriod;
}
/**
*
* How long, in days, message data is kept for the data store. When customerManagedS3
storage is
* selected, this parameter is ignored.
*
*
* @param retentionPeriod
* How long, in days, message data is kept for the data store. When customerManagedS3
storage is
* selected, this parameter is ignored.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Datastore withRetentionPeriod(RetentionPeriod retentionPeriod) {
setRetentionPeriod(retentionPeriod);
return this;
}
/**
*
* When the data store was created.
*
*
* @param creationTime
* When the data store was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* When the data store was created.
*
*
* @return When the data store was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* When the data store was created.
*
*
* @param creationTime
* When the data store was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Datastore withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* The last time the data store was updated.
*
*
* @param lastUpdateTime
* The last time the data store was updated.
*/
public void setLastUpdateTime(java.util.Date lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
/**
*
* The last time the data store was updated.
*
*
* @return The last time the data store was updated.
*/
public java.util.Date getLastUpdateTime() {
return this.lastUpdateTime;
}
/**
*
* The last time the data store was updated.
*
*
* @param lastUpdateTime
* The last time the data store was updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Datastore withLastUpdateTime(java.util.Date lastUpdateTime) {
setLastUpdateTime(lastUpdateTime);
return this;
}
/**
*
* The last time when a new message arrived in the data store.
*
*
* IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data store. Hence,
* the lastMessageArrivalTime
value is an approximation.
*
*
* This feature only applies to messages that arrived in the data store after October 23, 2020.
*
*
* @param lastMessageArrivalTime
* The last time when a new message arrived in the data store.
*
* IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data store.
* Hence, the lastMessageArrivalTime
value is an approximation.
*
*
* This feature only applies to messages that arrived in the data store after October 23, 2020.
*/
public void setLastMessageArrivalTime(java.util.Date lastMessageArrivalTime) {
this.lastMessageArrivalTime = lastMessageArrivalTime;
}
/**
*
* The last time when a new message arrived in the data store.
*
*
* IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data store. Hence,
* the lastMessageArrivalTime
value is an approximation.
*
*
* This feature only applies to messages that arrived in the data store after October 23, 2020.
*
*
* @return The last time when a new message arrived in the data store.
*
* IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data
* store. Hence, the lastMessageArrivalTime
value is an approximation.
*
*
* This feature only applies to messages that arrived in the data store after October 23, 2020.
*/
public java.util.Date getLastMessageArrivalTime() {
return this.lastMessageArrivalTime;
}
/**
*
* The last time when a new message arrived in the data store.
*
*
* IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data store. Hence,
* the lastMessageArrivalTime
value is an approximation.
*
*
* This feature only applies to messages that arrived in the data store after October 23, 2020.
*
*
* @param lastMessageArrivalTime
* The last time when a new message arrived in the data store.
*
* IoT Analytics updates this value at most once per minute for Amazon Simple Storage Service one data store.
* Hence, the lastMessageArrivalTime
value is an approximation.
*
*
* This feature only applies to messages that arrived in the data store after October 23, 2020.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Datastore withLastMessageArrivalTime(java.util.Date lastMessageArrivalTime) {
setLastMessageArrivalTime(lastMessageArrivalTime);
return this;
}
/**
*
* Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.
*
*
* The default file format is JSON. You can specify only one format.
*
*
* You can't change the file format after you create the data store.
*
*
* @param fileFormatConfiguration
* Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.
*
* The default file format is JSON. You can specify only one format.
*
*
* You can't change the file format after you create the data store.
*/
public void setFileFormatConfiguration(FileFormatConfiguration fileFormatConfiguration) {
this.fileFormatConfiguration = fileFormatConfiguration;
}
/**
*
* Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.
*
*
* The default file format is JSON. You can specify only one format.
*
*
* You can't change the file format after you create the data store.
*
*
* @return Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.
*
* The default file format is JSON. You can specify only one format.
*
*
* You can't change the file format after you create the data store.
*/
public FileFormatConfiguration getFileFormatConfiguration() {
return this.fileFormatConfiguration;
}
/**
*
* Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.
*
*
* The default file format is JSON. You can specify only one format.
*
*
* You can't change the file format after you create the data store.
*
*
* @param fileFormatConfiguration
* Contains the configuration information of file formats. IoT Analytics data stores support JSON and Parquet.
*
* The default file format is JSON. You can specify only one format.
*
*
* You can't change the file format after you create the data store.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Datastore withFileFormatConfiguration(FileFormatConfiguration fileFormatConfiguration) {
setFileFormatConfiguration(fileFormatConfiguration);
return this;
}
/**
*
* Contains information about the partition dimensions in a data store.
*
*
* @param datastorePartitions
* Contains information about the partition dimensions in a data store.
*/
public void setDatastorePartitions(DatastorePartitions datastorePartitions) {
this.datastorePartitions = datastorePartitions;
}
/**
*
* Contains information about the partition dimensions in a data store.
*
*
* @return Contains information about the partition dimensions in a data store.
*/
public DatastorePartitions getDatastorePartitions() {
return this.datastorePartitions;
}
/**
*
* Contains information about the partition dimensions in a data store.
*
*
* @param datastorePartitions
* Contains information about the partition dimensions in a data store.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Datastore withDatastorePartitions(DatastorePartitions datastorePartitions) {
setDatastorePartitions(datastorePartitions);
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 (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getStorage() != null)
sb.append("Storage: ").append(getStorage()).append(",");
if (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getRetentionPeriod() != null)
sb.append("RetentionPeriod: ").append(getRetentionPeriod()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getLastUpdateTime() != null)
sb.append("LastUpdateTime: ").append(getLastUpdateTime()).append(",");
if (getLastMessageArrivalTime() != null)
sb.append("LastMessageArrivalTime: ").append(getLastMessageArrivalTime()).append(",");
if (getFileFormatConfiguration() != null)
sb.append("FileFormatConfiguration: ").append(getFileFormatConfiguration()).append(",");
if (getDatastorePartitions() != null)
sb.append("DatastorePartitions: ").append(getDatastorePartitions());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Datastore == false)
return false;
Datastore other = (Datastore) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getStorage() == null ^ this.getStorage() == null)
return false;
if (other.getStorage() != null && other.getStorage().equals(this.getStorage()) == false)
return false;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == 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.getRetentionPeriod() == null ^ this.getRetentionPeriod() == null)
return false;
if (other.getRetentionPeriod() != null && other.getRetentionPeriod().equals(this.getRetentionPeriod()) == 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.getLastUpdateTime() == null ^ this.getLastUpdateTime() == null)
return false;
if (other.getLastUpdateTime() != null && other.getLastUpdateTime().equals(this.getLastUpdateTime()) == false)
return false;
if (other.getLastMessageArrivalTime() == null ^ this.getLastMessageArrivalTime() == null)
return false;
if (other.getLastMessageArrivalTime() != null && other.getLastMessageArrivalTime().equals(this.getLastMessageArrivalTime()) == false)
return false;
if (other.getFileFormatConfiguration() == null ^ this.getFileFormatConfiguration() == null)
return false;
if (other.getFileFormatConfiguration() != null && other.getFileFormatConfiguration().equals(this.getFileFormatConfiguration()) == false)
return false;
if (other.getDatastorePartitions() == null ^ this.getDatastorePartitions() == null)
return false;
if (other.getDatastorePartitions() != null && other.getDatastorePartitions().equals(this.getDatastorePartitions()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getStorage() == null) ? 0 : getStorage().hashCode());
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getRetentionPeriod() == null) ? 0 : getRetentionPeriod().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getLastUpdateTime() == null) ? 0 : getLastUpdateTime().hashCode());
hashCode = prime * hashCode + ((getLastMessageArrivalTime() == null) ? 0 : getLastMessageArrivalTime().hashCode());
hashCode = prime * hashCode + ((getFileFormatConfiguration() == null) ? 0 : getFileFormatConfiguration().hashCode());
hashCode = prime * hashCode + ((getDatastorePartitions() == null) ? 0 : getDatastorePartitions().hashCode());
return hashCode;
}
@Override
public Datastore clone() {
try {
return (Datastore) 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.iotanalytics.model.transform.DatastoreMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}