Class CpkMetadata
-
- 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 CpkMetadata extends SpecificRecordBase implements SpecificRecord
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
CpkMetadata.Builder
RecordBuilder for CpkMetadata instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public CpkIdentifier
id
public CpkManifest
manifest
public String
mainBundle
public List<String>
libraries
public CorDappManifest
corDappManifest
public CpkType
type
public SecureHash
hash
public List<ByteBuffer>
corDappCertificates
public Instant
timestamp
public String
externalChannelsConfig
-
Constructor Summary
Constructors Constructor Description CpkMetadata()
Default constructor. CpkMetadata(CpkIdentifier id, CpkManifest manifest, String mainBundle, List<String> libraries, CorDappManifest corDappManifest, CpkType type, SecureHash hash, List<ByteBuffer> corDappCertificates, Instant timestamp, String externalChannelsConfig)
All-args constructor.
-
Method Summary
Modifier and Type Method Description CpkIdentifier
getId()
Gets the value of the 'id' field. void
setId(CpkIdentifier value)
Sets the value of the 'id' field. CpkManifest
getManifest()
Gets the value of the 'manifest' field. void
setManifest(CpkManifest value)
Sets the value of the 'manifest' field. String
getMainBundle()
Gets the value of the 'mainBundle' field. void
setMainBundle(String value)
Sets the value of the 'mainBundle' field. List<String>
getLibraries()
Gets the value of the 'libraries' field. void
setLibraries(List<String> value)
Sets the value of the 'libraries' field. CorDappManifest
getCorDappManifest()
Gets the value of the 'corDappManifest' field. void
setCorDappManifest(CorDappManifest value)
Sets the value of the 'corDappManifest' field. CpkType
getType()
Gets the value of the 'type' field. void
setType(CpkType value)
Sets the value of the 'type' field. SecureHash
getHash()
Gets the value of the 'hash' field. void
setHash(SecureHash value)
Sets the value of the 'hash' field. List<ByteBuffer>
getCorDappCertificates()
Gets the value of the 'corDappCertificates' field. void
setCorDappCertificates(List<ByteBuffer> value)
Sets the value of the 'corDappCertificates' field. Instant
getTimestamp()
Gets the value of the 'timestamp' field. void
setTimestamp(Instant value)
Sets the value of the 'timestamp' field. String
getExternalChannelsConfig()
Gets the value of the 'externalChannelsConfig' field. void
setExternalChannelsConfig(String value)
Sets the value of the 'externalChannelsConfig' field. static Schema
getClassSchema()
static BinaryMessageEncoder<CpkMetadata>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<CpkMetadata>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<CpkMetadata>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this CpkMetadata to a ByteBuffer. static CpkMetadata
fromByteBuffer(ByteBuffer b)
Deserializes a CpkMetadata from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
Conversion<out Object>
getConversion(int field)
void
put(int field$, Object value$)
static CpkMetadata.Builder
newBuilder()
Creates a new CpkMetadata RecordBuilder. static CpkMetadata.Builder
newBuilder(CpkMetadata.Builder other)
Creates a new CpkMetadata RecordBuilder by copying an existing Builder. static CpkMetadata.Builder
newBuilder(CpkMetadata other)
Creates a new CpkMetadata RecordBuilder by copying an existing CpkMetadata 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
-
CpkMetadata
CpkMetadata()
Default constructor.
-
CpkMetadata
CpkMetadata(CpkIdentifier id, CpkManifest manifest, String mainBundle, List<String> libraries, CorDappManifest corDappManifest, CpkType type, SecureHash hash, List<ByteBuffer> corDappCertificates, Instant timestamp, String externalChannelsConfig)
All-args constructor.- Parameters:
id
- The new value for idmanifest
- The new value for manifestmainBundle
- The new value for mainBundlelibraries
- The new value for librariescorDappManifest
- The new value for corDappManifesttype
- The new value for typehash
- The new value for hashcorDappCertificates
- The new value for corDappCertificatestimestamp
- Time ([Instant]) in milliseconds when the record was updated or added.externalChannelsConfig
- The new value for externalChannelsConfig
-
-
Method Detail
-
getId
CpkIdentifier getId()
Gets the value of the 'id' field.
-
setId
void setId(CpkIdentifier value)
Sets the value of the 'id' field.
- Parameters:
value
- the value to set.
-
getManifest
CpkManifest getManifest()
Gets the value of the 'manifest' field.
-
setManifest
void setManifest(CpkManifest value)
Sets the value of the 'manifest' field.
- Parameters:
value
- the value to set.
-
getMainBundle
String getMainBundle()
Gets the value of the 'mainBundle' field.
-
setMainBundle
void setMainBundle(String value)
Sets the value of the 'mainBundle' field.
- Parameters:
value
- the value to set.
-
getLibraries
List<String> getLibraries()
Gets the value of the 'libraries' field.
-
setLibraries
void setLibraries(List<String> value)
Sets the value of the 'libraries' field.
- Parameters:
value
- the value to set.
-
getCorDappManifest
CorDappManifest getCorDappManifest()
Gets the value of the 'corDappManifest' field.
-
setCorDappManifest
void setCorDappManifest(CorDappManifest value)
Sets the value of the 'corDappManifest' field.
- Parameters:
value
- the value to set.
-
setType
void setType(CpkType value)
Sets the value of the 'type' field.
- Parameters:
value
- the value to set.
-
getHash
SecureHash getHash()
Gets the value of the 'hash' field.
-
setHash
void setHash(SecureHash value)
Sets the value of the 'hash' field.
- Parameters:
value
- the value to set.
-
getCorDappCertificates
List<ByteBuffer> getCorDappCertificates()
Gets the value of the 'corDappCertificates' field.
-
setCorDappCertificates
void setCorDappCertificates(List<ByteBuffer> value)
Sets the value of the 'corDappCertificates' field.
- Parameters:
value
- the value to set.
-
getTimestamp
Instant getTimestamp()
Gets the value of the 'timestamp' field.
-
setTimestamp
void setTimestamp(Instant value)
Sets the value of the 'timestamp' field. Time ([Instant]) in milliseconds when the record was updated or added.
- Parameters:
value
- the value to set.
-
getExternalChannelsConfig
String getExternalChannelsConfig()
Gets the value of the 'externalChannelsConfig' field.
-
setExternalChannelsConfig
void setExternalChannelsConfig(String value)
Sets the value of the 'externalChannelsConfig' field.
- Parameters:
value
- the value to set.
-
getClassSchema
static Schema getClassSchema()
-
getEncoder
static BinaryMessageEncoder<CpkMetadata> getEncoder()
Return the BinaryMessageEncoder instance used by this class.
-
getDecoder
static BinaryMessageDecoder<CpkMetadata> getDecoder()
Return the BinaryMessageDecoder instance used by this class.
-
createDecoder
static BinaryMessageDecoder<CpkMetadata> 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
-
toByteBuffer
ByteBuffer toByteBuffer()
Serializes this CpkMetadata to a ByteBuffer.
-
fromByteBuffer
static CpkMetadata fromByteBuffer(ByteBuffer b)
Deserializes a CpkMetadata from a ByteBuffer.
- Parameters:
b
- a byte buffer holding serialized data for an instance of this class
-
getSpecificData
SpecificData getSpecificData()
-
getSchema
Schema getSchema()
-
getConversion
Conversion<out Object> getConversion(int field)
-
newBuilder
static CpkMetadata.Builder newBuilder()
Creates a new CpkMetadata RecordBuilder.
-
newBuilder
static CpkMetadata.Builder newBuilder(CpkMetadata.Builder other)
Creates a new CpkMetadata RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.
-
newBuilder
static CpkMetadata.Builder newBuilder(CpkMetadata other)
Creates a new CpkMetadata RecordBuilder by copying an existing CpkMetadata instance.
- Parameters:
other
- The existing instance to copy.
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
-
-
-