Module mydata_did.v1_0.models.exchange_records.auditor_didcomm_transaction_record
Expand source code
from os import environ
from typing import Any
import typing
from marshmallow import fields, validate
from aries_cloudagent.messaging.models.base_record import BaseExchangeRecord, BaseExchangeSchema
from aries_cloudagent.messaging.valid import UUIDFour
class AuditorDIDCommTransactionRecord(BaseExchangeRecord):
"""
AuditorDIDCommTransactionRecord
Transaction record to keep track of audit operations against an Auditor.
"""
class Meta:
# Schema class
schema_class = "AuditorDIDCommTransactionRecordSchema"
# Record type
RECORD_TYPE = "auditor_didcomm_transaction_record"
# Wallet record identifier field
RECORD_ID_NAME = "auditor_didcomm_transaction_record_id"
# Webhook topic name for this record type
WEBHOOK_TOPIC = None
# Wallet record tags used for filtering
TAG_NAMES = {"~thread_id", "~connection_id"}
def __init__(
self,
*,
auditor_didcomm_transaction_record_id: str = None,
thread_id: str = None,
messages_list: typing.List[dict] = None,
connection_id: str = None,
**kwargs
):
super().__init__(auditor_didcomm_transaction_record_id, **kwargs)
self.thread_id = thread_id
self.messages_list = messages_list
self.connection_id = connection_id
@property
def auditor_didcomm_transaction_record_id(self) -> str:
"""
Returns transaction record identifier.
"""
return self._id
@property
def record_value(self) -> dict:
"""Accessor for JSON record value generated for this transaction record."""
return {
prop: getattr(self, prop)
for prop in (
"thread_id",
"messages_list",
"connection_id",
)
}
def __eq__(self, other: Any) -> bool:
"""Comparison between records."""
return super().__eq__(other)
class AuditorDIDCommTransactionRecordSchema(BaseExchangeSchema):
"""
AuditorDIDCommTransactionRecordSchema
Schema class for the AuditorDIDCommTransactionRecord class.
"""
class Meta:
# Model class
model_class = AuditorDIDCommTransactionRecord
# Wallet record identifier field
auditor_didcomm_transaction_record_id = fields.Str(
required=True,
description="Transaction record id",
example=UUIDFour.EXAMPLE,
)
# Parent message id of the transaction record
thread_id = fields.Str(
required=False,
description="Parent message identifier",
example=UUIDFour.EXAMPLE,
)
# List of messages for the transaction record
messages_list = fields.List(
fields.Dict(), required=False, description="Messages list")
# Connection identifier
connection_id = fields.Str(
required=False,
description="Connection identifier",
example=UUIDFour.EXAMPLE,
)
Classes
class AuditorDIDCommTransactionRecord (*, auditor_didcomm_transaction_record_id: str = None, thread_id: str = None, messages_list: List[dict] = None, connection_id: str = None, **kwargs)
-
AuditorDIDCommTransactionRecord
Transaction record to keep track of audit operations against an Auditor.
Initialize a new V10CredentialExchange.
Expand source code
class AuditorDIDCommTransactionRecord(BaseExchangeRecord): """ AuditorDIDCommTransactionRecord Transaction record to keep track of audit operations against an Auditor. """ class Meta: # Schema class schema_class = "AuditorDIDCommTransactionRecordSchema" # Record type RECORD_TYPE = "auditor_didcomm_transaction_record" # Wallet record identifier field RECORD_ID_NAME = "auditor_didcomm_transaction_record_id" # Webhook topic name for this record type WEBHOOK_TOPIC = None # Wallet record tags used for filtering TAG_NAMES = {"~thread_id", "~connection_id"} def __init__( self, *, auditor_didcomm_transaction_record_id: str = None, thread_id: str = None, messages_list: typing.List[dict] = None, connection_id: str = None, **kwargs ): super().__init__(auditor_didcomm_transaction_record_id, **kwargs) self.thread_id = thread_id self.messages_list = messages_list self.connection_id = connection_id @property def auditor_didcomm_transaction_record_id(self) -> str: """ Returns transaction record identifier. """ return self._id @property def record_value(self) -> dict: """Accessor for JSON record value generated for this transaction record.""" return { prop: getattr(self, prop) for prop in ( "thread_id", "messages_list", "connection_id", ) } def __eq__(self, other: Any) -> bool: """Comparison between records.""" return super().__eq__(other)
Ancestors
- aries_cloudagent.messaging.models.base_record.BaseExchangeRecord
- aries_cloudagent.messaging.models.base_record.BaseRecord
- aries_cloudagent.messaging.models.base.BaseModel
- abc.ABC
Class variables
var Meta
var RECORD_ID_NAME
var RECORD_TYPE
var TAG_NAMES
var WEBHOOK_TOPIC
Instance variables
var auditor_didcomm_transaction_record_id : str
-
Returns transaction record identifier.
Expand source code
@property def auditor_didcomm_transaction_record_id(self) -> str: """ Returns transaction record identifier. """ return self._id
var record_value : dict
-
Accessor for JSON record value generated for this transaction record.
Expand source code
@property def record_value(self) -> dict: """Accessor for JSON record value generated for this transaction record.""" return { prop: getattr(self, prop) for prop in ( "thread_id", "messages_list", "connection_id", ) }
class AuditorDIDCommTransactionRecordSchema (*args, **kwargs)
-
AuditorDIDCommTransactionRecordSchema
Schema class for the AuditorDIDCommTransactionRecord class.
Initialize BaseModelSchema.
Raises
TypeError
- If model_class is not set on Meta
Expand source code
class AuditorDIDCommTransactionRecordSchema(BaseExchangeSchema): """ AuditorDIDCommTransactionRecordSchema Schema class for the AuditorDIDCommTransactionRecord class. """ class Meta: # Model class model_class = AuditorDIDCommTransactionRecord # Wallet record identifier field auditor_didcomm_transaction_record_id = fields.Str( required=True, description="Transaction record id", example=UUIDFour.EXAMPLE, ) # Parent message id of the transaction record thread_id = fields.Str( required=False, description="Parent message identifier", example=UUIDFour.EXAMPLE, ) # List of messages for the transaction record messages_list = fields.List( fields.Dict(), required=False, description="Messages list") # Connection identifier connection_id = fields.Str( required=False, description="Connection identifier", example=UUIDFour.EXAMPLE, )
Ancestors
- aries_cloudagent.messaging.models.base_record.BaseExchangeSchema
- aries_cloudagent.messaging.models.base_record.BaseRecordSchema
- aries_cloudagent.messaging.models.base.BaseModelSchema
- marshmallow.schema.Schema
- marshmallow.base.SchemaABC
Class variables
var Meta
var opts