org.apache.avro.protobuf

## Class ProtoConversions.TimestampMillisConversion

- java.lang.Object
- - org.apache.avro.Conversion<com.google.protobuf.Timestamp>
  - - org.apache.avro.protobuf.ProtoConversions.TimestampMillisConversion

- Enclosing class:
    ProtoConversions

      public static class ProtoConversions.TimestampMillisConversion
      extends Conversion<com.google.protobuf.Timestamp>

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimestampMillisConversion()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.protobuf.Timestamp` | `fromLong(Long millisFromEpoch, Schema schema, LogicalType type)`
    `Class<com.google.protobuf.Timestamp>` | `getConvertedType()` Return the Java class representing the logical type.
    `String` | `getLogicalTypeName()` Return the logical type this class converts.
    `Schema` | `getRecommendedSchema()`
    `Long` | `toLong(com.google.protobuf.Timestamp value, Schema schema, LogicalType type)`

    - ### Methods inherited from class org.apache.avro.Conversion

      `adjustAndSetValue, fromArray, fromBoolean, fromBytes, fromCharSequence, fromDouble, fromEnumSymbol, fromFixed, fromFloat, fromInt, fromMap, fromRecord, toArray, toBoolean, toBytes, toCharSequence, toDouble, toEnumSymbol, toFixed, toFloat, toInt, toMap, toRecord`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TimestampMillisConversion

          public TimestampMillisConversion()

  - ### Method Detail

    - #### getConvertedType

          public Class<com.google.protobuf.Timestamp> getConvertedType()

      Description copied from class: `Conversion`
      Return the Java class representing the logical type.
      Specified by:
        `getConvertedType` in class `Conversion<com.google.protobuf.Timestamp>`
      Returns:
        a Java class returned by from methods and accepted by to methods

    - #### getLogicalTypeName

          public String getLogicalTypeName()

      Description copied from class: `Conversion`
      Return the logical type this class converts.
      Specified by:
        `getLogicalTypeName` in class `Conversion<com.google.protobuf.Timestamp>`
      Returns:
        a String logical type name

    - #### fromLong

          public com.google.protobuf.Timestamp fromLong(Long millisFromEpoch,
                                                        Schema schema,
                                                        LogicalType type)
                                                 throws IllegalArgumentException

      Overrides:
        `fromLong` in class `Conversion<com.google.protobuf.Timestamp>`
      Throws:
        `IllegalArgumentException`

    - #### toLong

          public Long toLong(com.google.protobuf.Timestamp value,
                             Schema schema,
                             LogicalType type)

      Overrides:
        `toLong` in class `Conversion<com.google.protobuf.Timestamp>`

    - #### getRecommendedSchema

          public Schema getRecommendedSchema()

      Overrides:
        `getRecommendedSchema` in class `Conversion<com.google.protobuf.Timestamp>`

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.