class FolderSchema(Linkable): domainType = fields.Constant( "folder_config", required=True, ) id = fields.String() title = fields.String() members = fields.Nested(FolderMembers())
class FolderCollection(DomainObjectCollection): domainType = fields.Constant( "folder_config", description="The domain type of the objects in the collection.", ) value = fields.List( fields.Nested(ConcreteFolder), description="A list of folder objects.", )
class ActionResultScalar(ActionResultBase): resultType = fields.Constant('scalar') result = fields.Nested( Schema.from_dict( { 'links': fields.List( fields.Nested(LinkSchema), required=True, ), 'value': fields.String( required=True, example="Done.", ) }, name='ActionResultScalarValue', ))
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.Str( 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 ActionResultObject(ActionResultBase): resultType = fields.Constant('object') result = fields.Nested( Schema.from_dict( { 'links': fields.List( fields.Nested(LinkSchema), required=True, ), 'value': fields.Dict( required=True, example={'duration': '5 seconds.'}, ) }, name='ActionResultObjectValue', ))
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.Str( 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 media 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", ) arguments = fields.Dict( description= ("map that may be used as the basis for any data (arguments or properties) " "required to follow the link."), allow_none=True, )
class ServiceGroup(DomainObject): domainType = fields.Constant( "service_group", required=True, )
class ContactGroup(DomainObject): domainType = fields.Constant( "contact_group", required=True, )
class FolderSchema(Linkable): domainType = fields.Constant("folder_config") id = fields.String() title = fields.String() members = fields.Nested(FolderMembers()) extensions = fields.Dict()
class HostGroup(DomainObject): domainType = fields.Constant( "host_group", required=True, )
class ObjectCollectionMember(ObjectMemberBase): memberType = fields.Constant('collection') value = fields.List(fields.Nested(LinkSchema()))
class ConcreteHostTagGroup(DomainObject): domainType = fields.Constant( "host_tag_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 ObjectActionMember(ObjectMemberBase): memberType = fields.Constant('action') parameters = fields.Dict() name = fields.String(example="frobnicate_foo")
class HostConfigSchema(Linkable): domainType = fields.Constant("host_config", required=True) id = fields.String() title = fields.String() members = fields.Nested(HostMembers, description="All the members of the host object.")
class FolderCollection(DomainObjectCollection): domainType = fields.Constant("folder_config") value = fields.List(fields.Nested(ConcreteFolder))
class Configuration(DomainObject): domainType = fields.Constant("config", required=True)
class ActionResultScalar(ActionResultBase): resultType = fields.Constant('scalar') value = fields.String(required=True, allow_none=True, example="Done.", description="The return value of this action.")
class ActionResultObject(ActionResultBase): resultType = fields.Constant('object') value = fields.Dict(required=True, allow_none=True, example={'foo': 'bar'}, description="The return value of this action.")
class ObjectActionMember(ObjectMemberBase): memberType = fields.Constant('action')
class ObjectPropertyMember(ObjectMemberBase): memberType = fields.Constant('property')
class SiteState(Linkable): domainType = fields.Constant("site-state", required=True) members = fields.Nested(SiteStateMembers, description="All the members of the host object.")
class HostCollection(Linkable): domainType = fields.Constant("host_config", required=True) id = fields.String() title = fields.String() value = fields.List(fields.Nested(ConcreteHost))
class ConcreteHostTagGroup(DomainObject): domainType = fields.Constant( "host_tag_group", required=True, )
class ObjectCollectionMember(ObjectMemberBase): memberType = fields.Constant('collection') value = fields.List(fields.Nested(LinkSchema())) name = fields.String(example="important_values")
class ObjectPropertyMember(ObjectMemberBase): memberType = fields.Constant('property') name = fields.String(example="important_value")
class ServiceGroup(DomainObject): domainType = fields.Constant("service_group", required=True, description="The domain type of the object.")