Module mydata_did.v1_0.messages.data_agreement_accept
Expand source code
from aries_cloudagent.messaging.agent_message import AgentMessage, AgentMessageSchema
from marshmallow import EXCLUDE, fields
from dexa_sdk.agreements.da.v1_0.models.da_instance_models import (
DataAgreementInstanceSchema,
DataAgreementInstanceModel
)
from ..message_types import DATA_AGREEMENT_NEGOTIATION_ACCEPT
class DataAgreementNegotiationAcceptMessage(AgentMessage):
"""
Message class for data agreement negotiation accept message.
"""
class Meta:
# Message type
message_type = DATA_AGREEMENT_NEGOTIATION_ACCEPT
# Message schema class
schema_class = "DataAgreementNegotiationAcceptMessageSchema"
def __init__(
self,
*,
body: DataAgreementInstanceModel,
**kwargs
):
"""
Initialize a DataAgreementNegotiationAcceptMessage message instance.
"""
super().__init__(**kwargs)
# Message body
self.body = body
class DataAgreementNegotiationAcceptMessageSchema(AgentMessageSchema):
"""
Schema class for data agreement negotiation accept message
"""
class Meta:
# The message class that this schema is for
model_class = DataAgreementNegotiationAcceptMessage
# Unknown fields to exclude from the schema (handled by marshmallow)
unknown = EXCLUDE
# Message body
body = fields.Nested(
DataAgreementInstanceSchema,
required=True
)
Classes
class DataAgreementNegotiationAcceptMessage (*, body: dexa_sdk.agreements.da.v1_0.models.da_instance_models.DataAgreementInstanceModel, **kwargs)
-
Message class for data agreement negotiation accept message.
Initialize a DataAgreementNegotiationAcceptMessage message instance.
Expand source code
class DataAgreementNegotiationAcceptMessage(AgentMessage): """ Message class for data agreement negotiation accept message. """ class Meta: # Message type message_type = DATA_AGREEMENT_NEGOTIATION_ACCEPT # Message schema class schema_class = "DataAgreementNegotiationAcceptMessageSchema" def __init__( self, *, body: DataAgreementInstanceModel, **kwargs ): """ Initialize a DataAgreementNegotiationAcceptMessage message instance. """ super().__init__(**kwargs) # Message body self.body = body
Ancestors
- aries_cloudagent.messaging.agent_message.AgentMessage
- aries_cloudagent.messaging.models.base.BaseModel
- abc.ABC
Class variables
var Meta
class DataAgreementNegotiationAcceptMessageSchema (*args, **kwargs)
-
Schema class for data agreement negotiation accept message
Initialize an instance of AgentMessageSchema.
Raises
TypeError
- If Meta.model_class has not been set
Expand source code
class DataAgreementNegotiationAcceptMessageSchema(AgentMessageSchema): """ Schema class for data agreement negotiation accept message """ class Meta: # The message class that this schema is for model_class = DataAgreementNegotiationAcceptMessage # Unknown fields to exclude from the schema (handled by marshmallow) unknown = EXCLUDE # Message body body = fields.Nested( DataAgreementInstanceSchema, required=True )
Ancestors
- aries_cloudagent.messaging.agent_message.AgentMessageSchema
- aries_cloudagent.messaging.models.base.BaseModelSchema
- marshmallow.schema.Schema
- marshmallow.base.SchemaABC
Class variables
var Meta
var opts