Class UnmanagedKeyStatus

  • All Implemented Interfaces:
    java.io.Externalizable , java.io.Serializable , java.lang.Comparable , org.apache.avro.generic.GenericContainer , org.apache.avro.generic.GenericRecord , org.apache.avro.generic.IndexedRecord , org.apache.avro.specific.SpecificRecord

    
    public class UnmanagedKeyStatus
    extends SpecificRecordBase implements SpecificRecord
                        

    Defines the key status and key rotation status data for master wrapping key.

    • Constructor Detail

      • UnmanagedKeyStatus

        UnmanagedKeyStatus()
        Default constructor.
      • UnmanagedKeyStatus

        UnmanagedKeyStatus(String tenantId, Integer total, Integer rotatedKeys, Instant createdTimestamp)
        All-args constructor.
        Parameters:
        tenantId - TenantId whose some wrapping keys are going to be rotated.
        total - Total number of keys that needs rotating in tenantId.
        rotatedKeys - Number of keys for tenantId that has been rotated.
        createdTimestamp - The date and time the key rotation request was created.
    • Method Detail

      • getTenantId

         String getTenantId()

        Gets the value of the 'tenantId' field.

        Returns:

        TenantId whose some wrapping keys are going to be rotated.

      • setTenantId

         void setTenantId(String value)

        Sets the value of the 'tenantId' field. TenantId whose some wrapping keys are going to be rotated.

        Parameters:
        value - the value to set.
      • getTotal

         int getTotal()

        Gets the value of the 'total' field.

        Returns:

        Total number of keys that needs rotating in tenantId.

      • setTotal

         void setTotal(int value)

        Sets the value of the 'total' field. Total number of keys that needs rotating in tenantId.

        Parameters:
        value - the value to set.
      • getRotatedKeys

         Integer getRotatedKeys()

        Gets the value of the 'rotatedKeys' field.

        Returns:

        Number of keys for tenantId that has been rotated. Null in case of key status.

      • setRotatedKeys

         void setRotatedKeys(Integer value)

        Sets the value of the 'rotatedKeys' field. Number of keys for tenantId that has been rotated. Null in case of key status.

        Parameters:
        value - the value to set.
      • getCreatedTimestamp

         Instant getCreatedTimestamp()

        Gets the value of the 'createdTimestamp' field.

        Returns:

        The date and time the key rotation request was created.

      • setCreatedTimestamp

         void setCreatedTimestamp(Instant value)

        Sets the value of the 'createdTimestamp' field. The date and time the key rotation request was created.

        Parameters:
        value - the value to set.
      • getEncoder

         static BinaryMessageEncoder<UnmanagedKeyStatus> getEncoder()

        Return the BinaryMessageEncoder instance used by this class.

        Returns:

        the message encoder used by this class

      • getDecoder

         static BinaryMessageDecoder<UnmanagedKeyStatus> getDecoder()

        Return the BinaryMessageDecoder instance used by this class.

        Returns:

        the message decoder used by this class

      • createDecoder

         static BinaryMessageDecoder<UnmanagedKeyStatus> createDecoder(SchemaStore resolver)

        Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.

        Parameters:
        resolver - a SchemaStore used to find schemas by fingerprint
        Returns:

        a BinaryMessageDecoder instance for this class backed by the given SchemaStore

      • toByteBuffer

         ByteBuffer toByteBuffer()

        Serializes this UnmanagedKeyStatus to a ByteBuffer.

        Returns:

        a buffer holding the serialized data for this instance

      • fromByteBuffer

         static UnmanagedKeyStatus fromByteBuffer(ByteBuffer b)

        Deserializes a UnmanagedKeyStatus from a ByteBuffer.

        Parameters:
        b - a byte buffer holding serialized data for an instance of this class
        Returns:

        a UnmanagedKeyStatus instance decoded from the given buffer

      • newBuilder

         static UnmanagedKeyStatus.Builder newBuilder(UnmanagedKeyStatus other)

        Creates a new UnmanagedKeyStatus RecordBuilder by copying an existing UnmanagedKeyStatus instance.

        Parameters:
        other - The existing instance to copy.
        Returns:

        A new UnmanagedKeyStatus RecordBuilder