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

software.amazon.awssdk.services.databasemigration.model.TableStatistics Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Database Migration Service module holds the client classes that are used for communicating with AWS Database Migration Service.

There is a newer version: 2.0.0-preview-11
Show newest version
/*
 * Copyright 2012-2017 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 software.amazon.awssdk.services.databasemigration.model;

import java.time.Instant;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Generated;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.core.protocol.ProtocolMarshaller;
import software.amazon.awssdk.core.protocol.StructuredPojo;
import software.amazon.awssdk.services.databasemigration.transform.TableStatisticsMarshaller;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

*/ @Generated("software.amazon.awssdk:codegen") public class TableStatistics implements StructuredPojo, ToCopyableBuilder { private final String schemaName; private final String tableName; private final Long inserts; private final Long deletes; private final Long updates; private final Long ddls; private final Long fullLoadRows; private final Long fullLoadCondtnlChkFailedRows; private final Long fullLoadErrorRows; private final Instant lastUpdateTime; private final String tableState; private final Long validationPendingRecords; private final Long validationFailedRecords; private final Long validationSuspendedRecords; private final String validationState; private TableStatistics(BuilderImpl builder) { this.schemaName = builder.schemaName; this.tableName = builder.tableName; this.inserts = builder.inserts; this.deletes = builder.deletes; this.updates = builder.updates; this.ddls = builder.ddls; this.fullLoadRows = builder.fullLoadRows; this.fullLoadCondtnlChkFailedRows = builder.fullLoadCondtnlChkFailedRows; this.fullLoadErrorRows = builder.fullLoadErrorRows; this.lastUpdateTime = builder.lastUpdateTime; this.tableState = builder.tableState; this.validationPendingRecords = builder.validationPendingRecords; this.validationFailedRecords = builder.validationFailedRecords; this.validationSuspendedRecords = builder.validationSuspendedRecords; this.validationState = builder.validationState; } /** *

* The schema name. *

* * @return The schema name. */ public String schemaName() { return schemaName; } /** *

* The name of the table. *

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

* The number of insert actions performed on a table. *

* * @return The number of insert actions performed on a table. */ public Long inserts() { return inserts; } /** *

* The number of delete actions performed on a table. *

* * @return The number of delete actions performed on a table. */ public Long deletes() { return deletes; } /** *

* The number of update actions performed on a table. *

* * @return The number of update actions performed on a table. */ public Long updates() { return updates; } /** *

* The Data Definition Language (DDL) used to build and modify the structure of your tables. *

* * @return The Data Definition Language (DDL) used to build and modify the structure of your tables. */ public Long ddls() { return ddls; } /** *

* The number of rows added during the Full Load operation. *

* * @return The number of rows added during the Full Load operation. */ public Long fullLoadRows() { return fullLoadRows; } /** *

* The number of rows that failed conditional checks during the Full Load operation (valid only for DynamoDB as a * target migrations). *

* * @return The number of rows that failed conditional checks during the Full Load operation (valid only for DynamoDB * as a target migrations). */ public Long fullLoadCondtnlChkFailedRows() { return fullLoadCondtnlChkFailedRows; } /** *

* The number of rows that failed to load during the Full Load operation (valid only for DynamoDB as a target * migrations). *

* * @return The number of rows that failed to load during the Full Load operation (valid only for DynamoDB as a * target migrations). */ public Long fullLoadErrorRows() { return fullLoadErrorRows; } /** *

* The last time the table was updated. *

* * @return The last time the table was updated. */ public Instant lastUpdateTime() { return lastUpdateTime; } /** *

* The state of the tables described. *

*

* Valid states: Table does not exist | Before load | Full load | Table completed | Table cancelled | Table error | * Table all | Table updates | Table is being reloaded *

* * @return The state of the tables described.

*

* Valid states: Table does not exist | Before load | Full load | Table completed | Table cancelled | Table * error | Table all | Table updates | Table is being reloaded */ public String tableState() { return tableState; } /** *

* The number of records that have yet to be validated. *

* * @return The number of records that have yet to be validated. */ public Long validationPendingRecords() { return validationPendingRecords; } /** *

* The number of records that failed validation. *

* * @return The number of records that failed validation. */ public Long validationFailedRecords() { return validationFailedRecords; } /** *

* The number of records that could not be validated. *

* * @return The number of records that could not be validated. */ public Long validationSuspendedRecords() { return validationSuspendedRecords; } /** *

* The validation state of the table. *

*

* The parameter can have the following values *

*
    *
  • *

    * Not enabled—Validation is not enabled for the table in the migration task. *

    *
  • *
  • *

    * Pending records—Some records in the table are waiting for validation. *

    *
  • *
  • *

    * Mismatched records—Some records in the table do not match between the source and target. *

    *
  • *
  • *

    * Suspended records—Some records in the table could not be validated. *

    *
  • *
  • *

    * No primary key—The table could not be validated because it had no primary key. *

    *
  • *
  • *

    * Table error—The table was not validated because it was in an error state and some data was not migrated. *

    *
  • *
  • *

    * Validated—All rows in the table were validated. If the table is updated, the status can change from Validated. *

    *
  • *
  • *

    * Error—The table could not be validated because of an unexpected error. *

    *
  • *
* * @return The validation state of the table.

*

* The parameter can have the following values *

*
    *
  • *

    * Not enabled—Validation is not enabled for the table in the migration task. *

    *
  • *
  • *

    * Pending records—Some records in the table are waiting for validation. *

    *
  • *
  • *

    * Mismatched records—Some records in the table do not match between the source and target. *

    *
  • *
  • *

    * Suspended records—Some records in the table could not be validated. *

    *
  • *
  • *

    * No primary key—The table could not be validated because it had no primary key. *

    *
  • *
  • *

    * Table error—The table was not validated because it was in an error state and some data was not migrated. *

    *
  • *
  • *

    * Validated—All rows in the table were validated. If the table is updated, the status can change from * Validated. *

    *
  • *
  • *

    * Error—The table could not be validated because of an unexpected error. *

    *
  • */ public String validationState() { return validationState; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(schemaName()); hashCode = 31 * hashCode + Objects.hashCode(tableName()); hashCode = 31 * hashCode + Objects.hashCode(inserts()); hashCode = 31 * hashCode + Objects.hashCode(deletes()); hashCode = 31 * hashCode + Objects.hashCode(updates()); hashCode = 31 * hashCode + Objects.hashCode(ddls()); hashCode = 31 * hashCode + Objects.hashCode(fullLoadRows()); hashCode = 31 * hashCode + Objects.hashCode(fullLoadCondtnlChkFailedRows()); hashCode = 31 * hashCode + Objects.hashCode(fullLoadErrorRows()); hashCode = 31 * hashCode + Objects.hashCode(lastUpdateTime()); hashCode = 31 * hashCode + Objects.hashCode(tableState()); hashCode = 31 * hashCode + Objects.hashCode(validationPendingRecords()); hashCode = 31 * hashCode + Objects.hashCode(validationFailedRecords()); hashCode = 31 * hashCode + Objects.hashCode(validationSuspendedRecords()); hashCode = 31 * hashCode + Objects.hashCode(validationState()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof TableStatistics)) { return false; } TableStatistics other = (TableStatistics) obj; return Objects.equals(schemaName(), other.schemaName()) && Objects.equals(tableName(), other.tableName()) && Objects.equals(inserts(), other.inserts()) && Objects.equals(deletes(), other.deletes()) && Objects.equals(updates(), other.updates()) && Objects.equals(ddls(), other.ddls()) && Objects.equals(fullLoadRows(), other.fullLoadRows()) && Objects.equals(fullLoadCondtnlChkFailedRows(), other.fullLoadCondtnlChkFailedRows()) && Objects.equals(fullLoadErrorRows(), other.fullLoadErrorRows()) && Objects.equals(lastUpdateTime(), other.lastUpdateTime()) && Objects.equals(tableState(), other.tableState()) && Objects.equals(validationPendingRecords(), other.validationPendingRecords()) && Objects.equals(validationFailedRecords(), other.validationFailedRecords()) && Objects.equals(validationSuspendedRecords(), other.validationSuspendedRecords()) && Objects.equals(validationState(), other.validationState()); } @Override public String toString() { StringBuilder sb = new StringBuilder("{"); if (schemaName() != null) { sb.append("SchemaName: ").append(schemaName()).append(","); } if (tableName() != null) { sb.append("TableName: ").append(tableName()).append(","); } if (inserts() != null) { sb.append("Inserts: ").append(inserts()).append(","); } if (deletes() != null) { sb.append("Deletes: ").append(deletes()).append(","); } if (updates() != null) { sb.append("Updates: ").append(updates()).append(","); } if (ddls() != null) { sb.append("Ddls: ").append(ddls()).append(","); } if (fullLoadRows() != null) { sb.append("FullLoadRows: ").append(fullLoadRows()).append(","); } if (fullLoadCondtnlChkFailedRows() != null) { sb.append("FullLoadCondtnlChkFailedRows: ").append(fullLoadCondtnlChkFailedRows()).append(","); } if (fullLoadErrorRows() != null) { sb.append("FullLoadErrorRows: ").append(fullLoadErrorRows()).append(","); } if (lastUpdateTime() != null) { sb.append("LastUpdateTime: ").append(lastUpdateTime()).append(","); } if (tableState() != null) { sb.append("TableState: ").append(tableState()).append(","); } if (validationPendingRecords() != null) { sb.append("ValidationPendingRecords: ").append(validationPendingRecords()).append(","); } if (validationFailedRecords() != null) { sb.append("ValidationFailedRecords: ").append(validationFailedRecords()).append(","); } if (validationSuspendedRecords() != null) { sb.append("ValidationSuspendedRecords: ").append(validationSuspendedRecords()).append(","); } if (validationState() != null) { sb.append("ValidationState: ").append(validationState()).append(","); } if (sb.length() > 1) { sb.setLength(sb.length() - 1); } sb.append("}"); return sb.toString(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "SchemaName": return Optional.of(clazz.cast(schemaName())); case "TableName": return Optional.of(clazz.cast(tableName())); case "Inserts": return Optional.of(clazz.cast(inserts())); case "Deletes": return Optional.of(clazz.cast(deletes())); case "Updates": return Optional.of(clazz.cast(updates())); case "Ddls": return Optional.of(clazz.cast(ddls())); case "FullLoadRows": return Optional.of(clazz.cast(fullLoadRows())); case "FullLoadCondtnlChkFailedRows": return Optional.of(clazz.cast(fullLoadCondtnlChkFailedRows())); case "FullLoadErrorRows": return Optional.of(clazz.cast(fullLoadErrorRows())); case "LastUpdateTime": return Optional.of(clazz.cast(lastUpdateTime())); case "TableState": return Optional.of(clazz.cast(tableState())); case "ValidationPendingRecords": return Optional.of(clazz.cast(validationPendingRecords())); case "ValidationFailedRecords": return Optional.of(clazz.cast(validationFailedRecords())); case "ValidationSuspendedRecords": return Optional.of(clazz.cast(validationSuspendedRecords())); case "ValidationState": return Optional.of(clazz.cast(validationState())); default: return Optional.empty(); } } @SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { TableStatisticsMarshaller.getInstance().marshall(this, protocolMarshaller); } public interface Builder extends CopyableBuilder { /** *

    * The schema name. *

    * * @param schemaName * The schema name. * @return Returns a reference to this object so that method calls can be chained together. */ Builder schemaName(String schemaName); /** *

    * The name of the table. *

    * * @param tableName * The name of the table. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tableName(String tableName); /** *

    * The number of insert actions performed on a table. *

    * * @param inserts * The number of insert actions performed on a table. * @return Returns a reference to this object so that method calls can be chained together. */ Builder inserts(Long inserts); /** *

    * The number of delete actions performed on a table. *

    * * @param deletes * The number of delete actions performed on a table. * @return Returns a reference to this object so that method calls can be chained together. */ Builder deletes(Long deletes); /** *

    * The number of update actions performed on a table. *

    * * @param updates * The number of update actions performed on a table. * @return Returns a reference to this object so that method calls can be chained together. */ Builder updates(Long updates); /** *

    * The Data Definition Language (DDL) used to build and modify the structure of your tables. *

    * * @param ddls * The Data Definition Language (DDL) used to build and modify the structure of your tables. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ddls(Long ddls); /** *

    * The number of rows added during the Full Load operation. *

    * * @param fullLoadRows * The number of rows added during the Full Load operation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder fullLoadRows(Long fullLoadRows); /** *

    * The number of rows that failed conditional checks during the Full Load operation (valid only for DynamoDB as * a target migrations). *

    * * @param fullLoadCondtnlChkFailedRows * The number of rows that failed conditional checks during the Full Load operation (valid only for * DynamoDB as a target migrations). * @return Returns a reference to this object so that method calls can be chained together. */ Builder fullLoadCondtnlChkFailedRows(Long fullLoadCondtnlChkFailedRows); /** *

    * The number of rows that failed to load during the Full Load operation (valid only for DynamoDB as a target * migrations). *

    * * @param fullLoadErrorRows * The number of rows that failed to load during the Full Load operation (valid only for DynamoDB as a * target migrations). * @return Returns a reference to this object so that method calls can be chained together. */ Builder fullLoadErrorRows(Long fullLoadErrorRows); /** *

    * The last time the table was updated. *

    * * @param lastUpdateTime * The last time the table was updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder lastUpdateTime(Instant lastUpdateTime); /** *

    * The state of the tables described. *

    *

    * Valid states: Table does not exist | Before load | Full load | Table completed | Table cancelled | Table * error | Table all | Table updates | Table is being reloaded *

    * * @param tableState * The state of the tables described.

    *

    * Valid states: Table does not exist | Before load | Full load | Table completed | Table cancelled | * Table error | Table all | Table updates | Table is being reloaded * @return Returns a reference to this object so that method calls can be chained together. */ Builder tableState(String tableState); /** *

    * The number of records that have yet to be validated. *

    * * @param validationPendingRecords * The number of records that have yet to be validated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder validationPendingRecords(Long validationPendingRecords); /** *

    * The number of records that failed validation. *

    * * @param validationFailedRecords * The number of records that failed validation. * @return Returns a reference to this object so that method calls can be chained together. */ Builder validationFailedRecords(Long validationFailedRecords); /** *

    * The number of records that could not be validated. *

    * * @param validationSuspendedRecords * The number of records that could not be validated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder validationSuspendedRecords(Long validationSuspendedRecords); /** *

    * The validation state of the table. *

    *

    * The parameter can have the following values *

    *
      *
    • *

      * Not enabled—Validation is not enabled for the table in the migration task. *

      *
    • *
    • *

      * Pending records—Some records in the table are waiting for validation. *

      *
    • *
    • *

      * Mismatched records—Some records in the table do not match between the source and target. *

      *
    • *
    • *

      * Suspended records—Some records in the table could not be validated. *

      *
    • *
    • *

      * No primary key—The table could not be validated because it had no primary key. *

      *
    • *
    • *

      * Table error—The table was not validated because it was in an error state and some data was not migrated. *

      *
    • *
    • *

      * Validated—All rows in the table were validated. If the table is updated, the status can change from * Validated. *

      *
    • *
    • *

      * Error—The table could not be validated because of an unexpected error. *

      *
    • *
    * * @param validationState * The validation state of the table.

    *

    * The parameter can have the following values *

    *
      *
    • *

      * Not enabled—Validation is not enabled for the table in the migration task. *

      *
    • *
    • *

      * Pending records—Some records in the table are waiting for validation. *

      *
    • *
    • *

      * Mismatched records—Some records in the table do not match between the source and target. *

      *
    • *
    • *

      * Suspended records—Some records in the table could not be validated. *

      *
    • *
    • *

      * No primary key—The table could not be validated because it had no primary key. *

      *
    • *
    • *

      * Table error—The table was not validated because it was in an error state and some data was not * migrated. *

      *
    • *
    • *

      * Validated—All rows in the table were validated. If the table is updated, the status can change from * Validated. *

      *
    • *
    • *

      * Error—The table could not be validated because of an unexpected error. *

      *
    • * @return Returns a reference to this object so that method calls can be chained together. */ Builder validationState(String validationState); } static final class BuilderImpl implements Builder { private String schemaName; private String tableName; private Long inserts; private Long deletes; private Long updates; private Long ddls; private Long fullLoadRows; private Long fullLoadCondtnlChkFailedRows; private Long fullLoadErrorRows; private Instant lastUpdateTime; private String tableState; private Long validationPendingRecords; private Long validationFailedRecords; private Long validationSuspendedRecords; private String validationState; private BuilderImpl() { } private BuilderImpl(TableStatistics model) { schemaName(model.schemaName); tableName(model.tableName); inserts(model.inserts); deletes(model.deletes); updates(model.updates); ddls(model.ddls); fullLoadRows(model.fullLoadRows); fullLoadCondtnlChkFailedRows(model.fullLoadCondtnlChkFailedRows); fullLoadErrorRows(model.fullLoadErrorRows); lastUpdateTime(model.lastUpdateTime); tableState(model.tableState); validationPendingRecords(model.validationPendingRecords); validationFailedRecords(model.validationFailedRecords); validationSuspendedRecords(model.validationSuspendedRecords); validationState(model.validationState); } public final String getSchemaName() { return schemaName; } @Override public final Builder schemaName(String schemaName) { this.schemaName = schemaName; return this; } public final void setSchemaName(String schemaName) { this.schemaName = schemaName; } public final String getTableName() { return tableName; } @Override public final Builder tableName(String tableName) { this.tableName = tableName; return this; } public final void setTableName(String tableName) { this.tableName = tableName; } public final Long getInserts() { return inserts; } @Override public final Builder inserts(Long inserts) { this.inserts = inserts; return this; } public final void setInserts(Long inserts) { this.inserts = inserts; } public final Long getDeletes() { return deletes; } @Override public final Builder deletes(Long deletes) { this.deletes = deletes; return this; } public final void setDeletes(Long deletes) { this.deletes = deletes; } public final Long getUpdates() { return updates; } @Override public final Builder updates(Long updates) { this.updates = updates; return this; } public final void setUpdates(Long updates) { this.updates = updates; } public final Long getDdls() { return ddls; } @Override public final Builder ddls(Long ddls) { this.ddls = ddls; return this; } public final void setDdls(Long ddls) { this.ddls = ddls; } public final Long getFullLoadRows() { return fullLoadRows; } @Override public final Builder fullLoadRows(Long fullLoadRows) { this.fullLoadRows = fullLoadRows; return this; } public final void setFullLoadRows(Long fullLoadRows) { this.fullLoadRows = fullLoadRows; } public final Long getFullLoadCondtnlChkFailedRows() { return fullLoadCondtnlChkFailedRows; } @Override public final Builder fullLoadCondtnlChkFailedRows(Long fullLoadCondtnlChkFailedRows) { this.fullLoadCondtnlChkFailedRows = fullLoadCondtnlChkFailedRows; return this; } public final void setFullLoadCondtnlChkFailedRows(Long fullLoadCondtnlChkFailedRows) { this.fullLoadCondtnlChkFailedRows = fullLoadCondtnlChkFailedRows; } public final Long getFullLoadErrorRows() { return fullLoadErrorRows; } @Override public final Builder fullLoadErrorRows(Long fullLoadErrorRows) { this.fullLoadErrorRows = fullLoadErrorRows; return this; } public final void setFullLoadErrorRows(Long fullLoadErrorRows) { this.fullLoadErrorRows = fullLoadErrorRows; } public final Instant getLastUpdateTime() { return lastUpdateTime; } @Override public final Builder lastUpdateTime(Instant lastUpdateTime) { this.lastUpdateTime = lastUpdateTime; return this; } public final void setLastUpdateTime(Instant lastUpdateTime) { this.lastUpdateTime = lastUpdateTime; } public final String getTableState() { return tableState; } @Override public final Builder tableState(String tableState) { this.tableState = tableState; return this; } public final void setTableState(String tableState) { this.tableState = tableState; } public final Long getValidationPendingRecords() { return validationPendingRecords; } @Override public final Builder validationPendingRecords(Long validationPendingRecords) { this.validationPendingRecords = validationPendingRecords; return this; } public final void setValidationPendingRecords(Long validationPendingRecords) { this.validationPendingRecords = validationPendingRecords; } public final Long getValidationFailedRecords() { return validationFailedRecords; } @Override public final Builder validationFailedRecords(Long validationFailedRecords) { this.validationFailedRecords = validationFailedRecords; return this; } public final void setValidationFailedRecords(Long validationFailedRecords) { this.validationFailedRecords = validationFailedRecords; } public final Long getValidationSuspendedRecords() { return validationSuspendedRecords; } @Override public final Builder validationSuspendedRecords(Long validationSuspendedRecords) { this.validationSuspendedRecords = validationSuspendedRecords; return this; } public final void setValidationSuspendedRecords(Long validationSuspendedRecords) { this.validationSuspendedRecords = validationSuspendedRecords; } public final String getValidationState() { return validationState; } @Override public final Builder validationState(String validationState) { this.validationState = validationState; return this; } public final void setValidationState(String validationState) { this.validationState = validationState; } @Override public TableStatistics build() { return new TableStatistics(this); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy