All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.timestreamwrite.model.Table Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Timestream Write module holds the client classes that are used for communicating with Amazon Timestream Write Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 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.timestreamwrite.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Represents a database table in Timestream. Tables contain one or more related time series. You can modify the * retention duration of the memory store and the magnetic store for a table. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Table implements Serializable, Cloneable, StructuredPojo { /** *

* The Amazon Resource Name that uniquely identifies this table. *

*/ private String arn; /** *

* The name of the Timestream table. *

*/ private String tableName; /** *

* The name of the Timestream database that contains this table. *

*/ private String databaseName; /** *

* The current state of the table: *

*
    *
  • *

    * DELETING - The table is being deleted. *

    *
  • *
  • *

    * ACTIVE - The table is ready for use. *

    *
  • *
*/ private String tableStatus; /** *

* The retention duration for the memory store and magnetic store. *

*/ private RetentionProperties retentionProperties; /** *

* The time when the Timestream table was created. *

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

* The time when the Timestream table was last updated. *

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

* Contains properties to set on the table when enabling magnetic store writes. *

*/ private MagneticStoreWriteProperties magneticStoreWriteProperties; /** *

* The schema of the table. *

*/ private Schema schema; /** *

* The Amazon Resource Name that uniquely identifies this table. *

* * @param arn * The Amazon Resource Name that uniquely identifies this table. */ public void setArn(String arn) { this.arn = arn; } /** *

* The Amazon Resource Name that uniquely identifies this table. *

* * @return The Amazon Resource Name that uniquely identifies this table. */ public String getArn() { return this.arn; } /** *

* The Amazon Resource Name that uniquely identifies this table. *

* * @param arn * The Amazon Resource Name that uniquely identifies this table. * @return Returns a reference to this object so that method calls can be chained together. */ public Table withArn(String arn) { setArn(arn); return this; } /** *

* The name of the Timestream table. *

* * @param tableName * The name of the Timestream table. */ public void setTableName(String tableName) { this.tableName = tableName; } /** *

* The name of the Timestream table. *

* * @return The name of the Timestream table. */ public String getTableName() { return this.tableName; } /** *

* The name of the Timestream table. *

* * @param tableName * The name of the Timestream table. * @return Returns a reference to this object so that method calls can be chained together. */ public Table withTableName(String tableName) { setTableName(tableName); return this; } /** *

* The name of the Timestream database that contains this table. *

* * @param databaseName * The name of the Timestream database that contains this table. */ public void setDatabaseName(String databaseName) { this.databaseName = databaseName; } /** *

* The name of the Timestream database that contains this table. *

* * @return The name of the Timestream database that contains this table. */ public String getDatabaseName() { return this.databaseName; } /** *

* The name of the Timestream database that contains this table. *

* * @param databaseName * The name of the Timestream database that contains this table. * @return Returns a reference to this object so that method calls can be chained together. */ public Table withDatabaseName(String databaseName) { setDatabaseName(databaseName); return this; } /** *

* The current state of the table: *

*
    *
  • *

    * DELETING - The table is being deleted. *

    *
  • *
  • *

    * ACTIVE - The table is ready for use. *

    *
  • *
* * @param tableStatus * The current state of the table:

*
    *
  • *

    * DELETING - The table is being deleted. *

    *
  • *
  • *

    * ACTIVE - The table is ready for use. *

    *
  • * @see TableStatus */ public void setTableStatus(String tableStatus) { this.tableStatus = tableStatus; } /** *

    * The current state of the table: *

    *
      *
    • *

      * DELETING - The table is being deleted. *

      *
    • *
    • *

      * ACTIVE - The table is ready for use. *

      *
    • *
    * * @return The current state of the table:

    *
      *
    • *

      * DELETING - The table is being deleted. *

      *
    • *
    • *

      * ACTIVE - The table is ready for use. *

      *
    • * @see TableStatus */ public String getTableStatus() { return this.tableStatus; } /** *

      * The current state of the table: *

      *
        *
      • *

        * DELETING - The table is being deleted. *

        *
      • *
      • *

        * ACTIVE - The table is ready for use. *

        *
      • *
      * * @param tableStatus * The current state of the table:

      *
        *
      • *

        * DELETING - The table is being deleted. *

        *
      • *
      • *

        * ACTIVE - The table is ready for use. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see TableStatus */ public Table withTableStatus(String tableStatus) { setTableStatus(tableStatus); return this; } /** *

        * The current state of the table: *

        *
          *
        • *

          * DELETING - The table is being deleted. *

          *
        • *
        • *

          * ACTIVE - The table is ready for use. *

          *
        • *
        * * @param tableStatus * The current state of the table:

        *
          *
        • *

          * DELETING - The table is being deleted. *

          *
        • *
        • *

          * ACTIVE - The table is ready for use. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see TableStatus */ public Table withTableStatus(TableStatus tableStatus) { this.tableStatus = tableStatus.toString(); return this; } /** *

          * The retention duration for the memory store and magnetic store. *

          * * @param retentionProperties * The retention duration for the memory store and magnetic store. */ public void setRetentionProperties(RetentionProperties retentionProperties) { this.retentionProperties = retentionProperties; } /** *

          * The retention duration for the memory store and magnetic store. *

          * * @return The retention duration for the memory store and magnetic store. */ public RetentionProperties getRetentionProperties() { return this.retentionProperties; } /** *

          * The retention duration for the memory store and magnetic store. *

          * * @param retentionProperties * The retention duration for the memory store and magnetic store. * @return Returns a reference to this object so that method calls can be chained together. */ public Table withRetentionProperties(RetentionProperties retentionProperties) { setRetentionProperties(retentionProperties); return this; } /** *

          * The time when the Timestream table was created. *

          * * @param creationTime * The time when the Timestream table was created. */ public void setCreationTime(java.util.Date creationTime) { this.creationTime = creationTime; } /** *

          * The time when the Timestream table was created. *

          * * @return The time when the Timestream table was created. */ public java.util.Date getCreationTime() { return this.creationTime; } /** *

          * The time when the Timestream table was created. *

          * * @param creationTime * The time when the Timestream table was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Table withCreationTime(java.util.Date creationTime) { setCreationTime(creationTime); return this; } /** *

          * The time when the Timestream table was last updated. *

          * * @param lastUpdatedTime * The time when the Timestream table was last updated. */ public void setLastUpdatedTime(java.util.Date lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; } /** *

          * The time when the Timestream table was last updated. *

          * * @return The time when the Timestream table was last updated. */ public java.util.Date getLastUpdatedTime() { return this.lastUpdatedTime; } /** *

          * The time when the Timestream table was last updated. *

          * * @param lastUpdatedTime * The time when the Timestream table was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public Table withLastUpdatedTime(java.util.Date lastUpdatedTime) { setLastUpdatedTime(lastUpdatedTime); return this; } /** *

          * Contains properties to set on the table when enabling magnetic store writes. *

          * * @param magneticStoreWriteProperties * Contains properties to set on the table when enabling magnetic store writes. */ public void setMagneticStoreWriteProperties(MagneticStoreWriteProperties magneticStoreWriteProperties) { this.magneticStoreWriteProperties = magneticStoreWriteProperties; } /** *

          * Contains properties to set on the table when enabling magnetic store writes. *

          * * @return Contains properties to set on the table when enabling magnetic store writes. */ public MagneticStoreWriteProperties getMagneticStoreWriteProperties() { return this.magneticStoreWriteProperties; } /** *

          * Contains properties to set on the table when enabling magnetic store writes. *

          * * @param magneticStoreWriteProperties * Contains properties to set on the table when enabling magnetic store writes. * @return Returns a reference to this object so that method calls can be chained together. */ public Table withMagneticStoreWriteProperties(MagneticStoreWriteProperties magneticStoreWriteProperties) { setMagneticStoreWriteProperties(magneticStoreWriteProperties); return this; } /** *

          * The schema of the table. *

          * * @param schema * The schema of the table. */ public void setSchema(Schema schema) { this.schema = schema; } /** *

          * The schema of the table. *

          * * @return The schema of the table. */ public Schema getSchema() { return this.schema; } /** *

          * The schema of the table. *

          * * @param schema * The schema of the table. * @return Returns a reference to this object so that method calls can be chained together. */ public Table withSchema(Schema schema) { setSchema(schema); 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 (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getTableName() != null) sb.append("TableName: ").append(getTableName()).append(","); if (getDatabaseName() != null) sb.append("DatabaseName: ").append(getDatabaseName()).append(","); if (getTableStatus() != null) sb.append("TableStatus: ").append(getTableStatus()).append(","); if (getRetentionProperties() != null) sb.append("RetentionProperties: ").append(getRetentionProperties()).append(","); if (getCreationTime() != null) sb.append("CreationTime: ").append(getCreationTime()).append(","); if (getLastUpdatedTime() != null) sb.append("LastUpdatedTime: ").append(getLastUpdatedTime()).append(","); if (getMagneticStoreWriteProperties() != null) sb.append("MagneticStoreWriteProperties: ").append(getMagneticStoreWriteProperties()).append(","); if (getSchema() != null) sb.append("Schema: ").append(getSchema()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Table == false) return false; Table other = (Table) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getTableName() == null ^ this.getTableName() == null) return false; if (other.getTableName() != null && other.getTableName().equals(this.getTableName()) == false) return false; if (other.getDatabaseName() == null ^ this.getDatabaseName() == null) return false; if (other.getDatabaseName() != null && other.getDatabaseName().equals(this.getDatabaseName()) == false) return false; if (other.getTableStatus() == null ^ this.getTableStatus() == null) return false; if (other.getTableStatus() != null && other.getTableStatus().equals(this.getTableStatus()) == false) return false; if (other.getRetentionProperties() == null ^ this.getRetentionProperties() == null) return false; if (other.getRetentionProperties() != null && other.getRetentionProperties().equals(this.getRetentionProperties()) == 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.getLastUpdatedTime() == null ^ this.getLastUpdatedTime() == null) return false; if (other.getLastUpdatedTime() != null && other.getLastUpdatedTime().equals(this.getLastUpdatedTime()) == false) return false; if (other.getMagneticStoreWriteProperties() == null ^ this.getMagneticStoreWriteProperties() == null) return false; if (other.getMagneticStoreWriteProperties() != null && other.getMagneticStoreWriteProperties().equals(this.getMagneticStoreWriteProperties()) == false) return false; if (other.getSchema() == null ^ this.getSchema() == null) return false; if (other.getSchema() != null && other.getSchema().equals(this.getSchema()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getDatabaseName() == null) ? 0 : getDatabaseName().hashCode()); hashCode = prime * hashCode + ((getTableStatus() == null) ? 0 : getTableStatus().hashCode()); hashCode = prime * hashCode + ((getRetentionProperties() == null) ? 0 : getRetentionProperties().hashCode()); hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedTime() == null) ? 0 : getLastUpdatedTime().hashCode()); hashCode = prime * hashCode + ((getMagneticStoreWriteProperties() == null) ? 0 : getMagneticStoreWriteProperties().hashCode()); hashCode = prime * hashCode + ((getSchema() == null) ? 0 : getSchema().hashCode()); return hashCode; } @Override public Table clone() { try { return (Table) 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.timestreamwrite.model.transform.TableMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy