class ObjectPropertyMember(ObjectMemberBase): memberType = fields.Constant("property") name = fields.String(example="important") value = fields.String(example="the value") title = fields.String( description="A human readable title of this object. Can be used for " "user interfaces.", )
class ObjectActionMember(ObjectMemberBase): memberType = fields.Constant("action") parameters = fields.Dict() name = fields.String(example="frobnicate_foo") title = fields.String( description="A human readable title of this object. Can be used for " "user interfaces.", )
class ObjectCollectionMember(ObjectMemberBase): memberType = fields.Constant("collection") value = fields.List(fields.Nested(LinkSchema())) name = fields.String(example="important_values") title = fields.String( description="A human readable title of this object. Can be used for " "user interfaces.", )
class UserObject(DomainObject): domainType = fields.Constant( "user_config", description="The domain type of the object.", ) extensions = fields.Nested(UserAttributes, description="The attributes of the user")
class DiscoveryBackgroundJobStatusObject(DomainObject): domainType = fields.Constant( "discovery_run", description="The domain type of the object", ) extensions = fields.Nested( BackgroundJobStatus, description="The attributes of the background job" )
class HostConfigSchema(DomainObject): domainType = fields.Constant( "host_config", required=True, description="The domain type of the object." ) members = fields.Nested(HostMembers, description="All the members of the host object.") extensions = fields.Nested( HostExtensions, description="All the data and metadata of this host.", )
class FolderCollection(DomainObjectCollection): domainType = fields.Constant( "folder_config", description="The domain type of the objects in the collection.", ) value = fields.List( fields.Nested(FolderSchema()), description="A list of folder objects.", )
class UserCollection(DomainObjectCollection): domainType = fields.Constant( "user_config", description="The domain type of the objects in the collection.", ) value = fields.List( fields.Nested(UserObject), description="A list of user objects.", )
class PasswordObject(DomainObject): domainType = fields.Constant( "password", description="The type of the domain-object.", ) extensions = fields.Nested( PasswordExtension, description="All the attributes of the domain object.", )
class HostConfigCollection(DomainObjectCollection): domainType = fields.Constant( "host_config", description="The domain type of the objects in the collection.", ) value = fields.List( fields.Nested(HostConfigSchema()), description="A list of host objects.", )
class RuleCollection(response_schemas.DomainObjectCollection): domainType = fields.Constant( "rule", description="Domain type of this object.", ) value: gui_fields.Field = fields.Nested( RuleObject, description="The collection itself. Each entry in here is part of the collection.", many=True, )
class RulesetObject(response_schemas.DomainObject): domainType = fields.Constant( "ruleset", description="Domain type of this object.", example="ruleset", ) extensions = fields.Nested( RulesetExtensions, description="Specific attributes related to rulesets.", )
class FolderSchema(Linkable): domainType = fields.Constant("folder_config", description="The domain type of the object.") id = fields.String(description="The full path of the folder, tilde-separated.") title = fields.String(description="The human readable title for this folder.") members = fields.Nested( FolderMembers(), description="Specific collections or actions applicable to this object.", ) extensions = fields.Nested( FolderExtensions(), description="Data and Meta-Data of this object.", )
class RuleObject(response_schemas.DomainObject): """The schema for sending data TO the API client. For the schema responsible for receiving data, see `InputRuleObject`. """ domainType = fields.Constant( "rule", description="Domain type of this object.", example="rule", ) extensions = fields.Nested( RuleExtensions, description="Attributes specific to rule objects.", )
class LinkSchema(BaseSchema): """A Link representation according to A-24 (2.7)""" domainType = fields.Constant("link", required=True) rel = fields.String( description=( "Indicates the nature of the relationship of the related resource to the " "resource that generated this representation" ), required=True, example="self", ) href = fields.String( description=( "The (absolute) address of the related resource. Any characters that are " "invalid in URLs must be URL encoded." ), required=True, example="https://.../api_resource", ) method = fields.String( description="The HTTP method to use to traverse the link (get, post, put or delete)", required=True, pattern="GET|PUT|POST|DELETE", example="GET", ) type = fields.String( description="The content-type that the linked resource will return", required=True, example="application/json", ) title = fields.String( description=( "string that the consuming application may use to render the link without " "having to traverse the link in advance" ), allow_none=True, example="The object itself", ) body_params = fields.Dict( description=( "A map of values that shall be sent in the request body. If this is present," "the request has to be sent with a content-type of 'application/json'." ), required=False, )
class Configuration(DomainObject): domainType = fields.Constant("config", required=True)
class ServiceGroup(DomainObject): domainType = fields.Constant( "service_group", required=True, description="The domain type of the object." )
class ContactGroup(DomainObject): domainType = fields.Constant( "contact_group", required=True, description="The domain type of the object." )
class RulesetCollection(response_schemas.DomainObjectCollection): domainType = fields.Constant( "ruleset", description="Domain type of this object.", example="ruleset", )
class SiteState(Linkable): domainType = fields.Constant("site-state", required=True) members = fields.Nested(SiteStateMembers, description="All the members of the host object.")
class ConcreteHostTagGroup(DomainObject): domainType = fields.Constant( "host_tag_group", required=True, description="The domain type of the object.", )