Module mydata_did.v1_0.models.data_agreement_negotiation_accept_model
Expand source code
from marshmallow import fields
from aries_cloudagent.messaging.models.base import BaseModel, BaseModelSchema
from aries_cloudagent.messaging.valid import UUIDFour
from .data_agreement_negotiation_offer_model import (
DataAgreementProof,
DataAgreementProofSchema,
DataAgreementEvent,
DataAgreementEventSchema
)
class DataAgreementNegotiationAcceptBody(BaseModel):
"""Data Agreement Negotiation Accept Body"""
class Meta:
"""Data Agreement Negotiation Accept Body metadata"""
schema_class = "DataAgreementNegotiationAcceptBodySchema"
def __init__(
self,
*,
data_agreement_id: str = None,
event: DataAgreementEvent = None,
proof: DataAgreementProof = None,
**kwargs
):
"""Data Agreement Negotiation Accept Body init"""
super().__init__(**kwargs)
# Set attributes
self.data_agreement_id = data_agreement_id
self.event = event
self.proof = proof
class DataAgreementNegotiationAcceptBodySchema(BaseModelSchema):
"""Data Agreement Negotiation Accept Body schema"""
class Meta:
"""Data Agreement Negotiation Accept Body schema metadata"""
model_class = DataAgreementNegotiationAcceptBody
# Data agreement id
data_agreement_id = fields.Str(
data_key="id",
example=UUIDFour.EXAMPLE,
description="Data agreement identifier"
)
# Data agreement events
event = fields.Nested(DataAgreementEventSchema)
# Data agreement proof
proof = fields.Nested(DataAgreementProofSchema)
Classes
class DataAgreementNegotiationAcceptBody (*, data_agreement_id: str = None, event: DataAgreementEvent = None, proof: DataAgreementProof = None, **kwargs)
-
Data Agreement Negotiation Accept Body
Data Agreement Negotiation Accept Body init
Expand source code
class DataAgreementNegotiationAcceptBody(BaseModel): """Data Agreement Negotiation Accept Body""" class Meta: """Data Agreement Negotiation Accept Body metadata""" schema_class = "DataAgreementNegotiationAcceptBodySchema" def __init__( self, *, data_agreement_id: str = None, event: DataAgreementEvent = None, proof: DataAgreementProof = None, **kwargs ): """Data Agreement Negotiation Accept Body init""" super().__init__(**kwargs) # Set attributes self.data_agreement_id = data_agreement_id self.event = event self.proof = proof
Ancestors
- aries_cloudagent.messaging.models.base.BaseModel
- abc.ABC
Class variables
var Meta
-
Data Agreement Negotiation Accept Body metadata
class DataAgreementNegotiationAcceptBodySchema (*args, **kwargs)
-
Data Agreement Negotiation Accept Body schema
Initialize BaseModelSchema.
Raises
TypeError
- If model_class is not set on Meta
Expand source code
class DataAgreementNegotiationAcceptBodySchema(BaseModelSchema): """Data Agreement Negotiation Accept Body schema""" class Meta: """Data Agreement Negotiation Accept Body schema metadata""" model_class = DataAgreementNegotiationAcceptBody # Data agreement id data_agreement_id = fields.Str( data_key="id", example=UUIDFour.EXAMPLE, description="Data agreement identifier" ) # Data agreement events event = fields.Nested(DataAgreementEventSchema) # Data agreement proof proof = fields.Nested(DataAgreementProofSchema)
Ancestors
- aries_cloudagent.messaging.models.base.BaseModelSchema
- marshmallow.schema.Schema
- marshmallow.base.SchemaABC
Class variables
var Meta
-
Data Agreement Negotiation Accept Body schema metadata
var opts