otupy.core.message.Message
- class Message(content: Content, content_type: str = 'openc2', msg_type: MessageType = None, status: int = None, request_id: str = None, created: int = None, from_: str = None, to: [] = None, version: Version = '1.0', encoding: object = None)
Bases:
objectOpenC2 Message
The Message class embeds all Message fields that are defined in Table 3.1 of the Language Specification. It is just an internal structure that is not automatically serialized, since the use of the fields depends on the specific transport protocol.
Methods
Serialization to dictionary.
Attributes
Media Type that identifies the format of the content, including major version.
Creation date/time of the content.
Encoding format used to serialize the Message.
Authenticated identifier of the creator of or authority for execution of a message.
The type of OpenC2 Message.
A unique identifier created by the Producer and copied by Consumer into all Responses.
Populated with a numeric status code in Responses.
Authenticated identifier(s) of the authorized recipient(s) of a message.
OpenC2 version used to encode the Message.
Message body as specified by content_type and msg_type.
- __init__(content: Content, content_type: str = 'openc2', msg_type: MessageType = None, status: int = None, request_id: str = None, created: int = None, from_: str = None, to: [] = None, version: Version = '1.0', encoding: object = None) None
- content_type: str = 'openc2'
Media Type that identifies the format of the content, including major version.
- encoding: object = None
Encoding format used to serialize the Message.
This is is an additional field not envisioned by the Language Specification.
- from_: str = None
Authenticated identifier of the creator of or authority for execution of a message.
This field is named from in the Specification.
- msg_type: MessageType = None
The type of OpenC2 Message.
- request_id: str = None
A unique identifier created by the Producer and copied by Consumer into all Responses.
- to: [] = None
Authenticated identifier(s) of the authorized recipient(s) of a message.
- todict()
Serialization to dictionary.