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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
UnmanagedKeyStatus.Builder
RecordBuilder for UnmanagedKeyStatus instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public String
tenantId
public int
total
public Integer
rotatedKeys
public Instant
createdTimestamp
-
Constructor Summary
Constructors Constructor Description UnmanagedKeyStatus()
Default constructor. UnmanagedKeyStatus(String tenantId, Integer total, Integer rotatedKeys, Instant createdTimestamp)
All-args constructor.
-
Method Summary
Modifier and Type Method Description String
getTenantId()
Gets the value of the 'tenantId' field. void
setTenantId(String value)
Sets the value of the 'tenantId' field. int
getTotal()
Gets the value of the 'total' field. void
setTotal(int value)
Sets the value of the 'total' field. Integer
getRotatedKeys()
Gets the value of the 'rotatedKeys' field. void
setRotatedKeys(Integer value)
Sets the value of the 'rotatedKeys' field. Instant
getCreatedTimestamp()
Gets the value of the 'createdTimestamp' field. void
setCreatedTimestamp(Instant value)
Sets the value of the 'createdTimestamp' field. static Schema
getClassSchema()
static BinaryMessageEncoder<UnmanagedKeyStatus>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<UnmanagedKeyStatus>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<UnmanagedKeyStatus>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this UnmanagedKeyStatus to a ByteBuffer. static UnmanagedKeyStatus
fromByteBuffer(ByteBuffer b)
Deserializes a UnmanagedKeyStatus from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
Conversion<out Object>
getConversion(int field)
void
put(int field$, Object value$)
static UnmanagedKeyStatus.Builder
newBuilder()
Creates a new UnmanagedKeyStatus RecordBuilder. static UnmanagedKeyStatus.Builder
newBuilder(UnmanagedKeyStatus.Builder other)
Creates a new UnmanagedKeyStatus RecordBuilder by copying an existing Builder. static UnmanagedKeyStatus.Builder
newBuilder(UnmanagedKeyStatus other)
Creates a new UnmanagedKeyStatus RecordBuilder by copying an existing UnmanagedKeyStatus instance. void
writeExternal(ObjectOutput out)
void
readExternal(ObjectInput in)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, customDecode, customEncode, equals, hashCode, toString
-
Methods inherited from class org.apache.avro.generic.GenericRecord
hasField
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
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.
-
getClassSchema
static Schema getClassSchema()
-
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
-
getSpecificData
SpecificData getSpecificData()
-
getSchema
Schema getSchema()
-
getConversion
Conversion<out Object> getConversion(int field)
-
newBuilder
static UnmanagedKeyStatus.Builder newBuilder()
Creates a new UnmanagedKeyStatus RecordBuilder.
- Returns:
A new UnmanagedKeyStatus RecordBuilder
-
newBuilder
static UnmanagedKeyStatus.Builder newBuilder(UnmanagedKeyStatus.Builder other)
Creates a new UnmanagedKeyStatus RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.- Returns:
A new UnmanagedKeyStatus RecordBuilder
-
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
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
-
-
-