Class SubStatementData

java.lang.Object
software.amazon.awssdk.services.redshiftdata.model.SubStatementData
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<SubStatementData.Builder,SubStatementData>

@Generated("software.amazon.awssdk:codegen") public final class SubStatementData extends Object implements SdkPojo, Serializable, ToCopyableBuilder<SubStatementData.Builder,SubStatementData>

Information about an SQL statement.

See Also:
  • Method Details

    • createdAt

      public final Instant createdAt()

      The date and time (UTC) the statement was created.

      Returns:
      The date and time (UTC) the statement was created.
    • duration

      public final Long duration()

      The amount of time in nanoseconds that the statement ran.

      Returns:
      The amount of time in nanoseconds that the statement ran.
    • error

      public final String error()

      The error message from the cluster if the SQL statement encountered an error while running.

      Returns:
      The error message from the cluster if the SQL statement encountered an error while running.
    • hasResultSet

      public final Boolean hasResultSet()

      A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set.

      Returns:
      A value that indicates whether the statement has a result set. The result set can be empty. The value is true for an empty result set.
    • id

      public final String id()

      The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query.

      Returns:
      The identifier of the SQL statement. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API. A suffix indicates the number of the SQL statement. For example, d9b6c0c9-0747-4bf4-b142-e8883122f766:2 has a suffix of :2 that indicates the second SQL statement of a batch query.
    • queryString

      public final String queryString()

      The SQL statement text.

      Returns:
      The SQL statement text.
    • redshiftQueryId

      public final Long redshiftQueryId()

      The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.

      Returns:
      The SQL statement identifier. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.
    • resultRows

      public final Long resultRows()

      Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A -1 indicates the value is null.

      Returns:
      Either the number of rows returned from the SQL statement or the number of rows affected. If result size is greater than zero, the result rows can be the number of rows affected by SQL statements such as INSERT, UPDATE, DELETE, COPY, and others. A -1 indicates the value is null.
    • resultSize

      public final Long resultSize()

      The size in bytes of the returned results. A -1 indicates the value is null.

      Returns:
      The size in bytes of the returned results. A -1 indicates the value is null.
    • status

      public final StatementStatusString status()

      The status of the SQL statement. An example is the that the SQL statement finished.

      If the service returns an enum value that is not available in the current SDK version, status will return StatementStatusString.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The status of the SQL statement. An example is the that the SQL statement finished.
      See Also:
    • statusAsString

      public final String statusAsString()

      The status of the SQL statement. An example is the that the SQL statement finished.

      If the service returns an enum value that is not available in the current SDK version, status will return StatementStatusString.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The status of the SQL statement. An example is the that the SQL statement finished.
      See Also:
    • updatedAt

      public final Instant updatedAt()

      The date and time (UTC) that the statement metadata was last updated.

      Returns:
      The date and time (UTC) that the statement metadata was last updated.
    • toBuilder

      public SubStatementData.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<SubStatementData.Builder,SubStatementData>
      Returns:
      a builder for type T
    • builder

      public static SubStatementData.Builder builder()
    • serializableBuilderClass

      public static Class<? extends SubStatementData.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.