The watcher.api.controllers.v1.types Module

class watcher.api.controllers.v1.types.BooleanType[source]

Bases: wsme.types.UserType

A simple boolean type.

basetype

alias of unicode

static frombasetype(value)[source]
static validate(value)[source]
class watcher.api.controllers.v1.types.JsonPatchType(**kw)[source]

Bases: wsme.types.Base

A complex type that represents a single json-patch operation.

static internal_attrs()[source]

Returns a list of internal attributes.

Internal attributes can’t be added, replaced or removed. This method may be overwritten by derived class.

static mandatory_attrs()[source]

Retruns a list of mandatory attributes.

Mandatory attributes can’t be removed from the document. This method should be overwritten by derived class.

static validate(patch)[source]
class watcher.api.controllers.v1.types.JsonType[source]

Bases: wsme.types.UserType

A simple JSON type.

basetype

alias of unicode

static frombasetype(value)[source]
static validate(value)[source]
class watcher.api.controllers.v1.types.MultiType(*types)[source]

Bases: wsme.types.UserType

A complex type that represents one or more types.

Used for validating that a value is an instance of one of the types.

Parameters:types – Variable-length list of types.
validate(value)[source]
class watcher.api.controllers.v1.types.NameType[source]

Bases: wsme.types.UserType

A simple logical name type.

basetype

alias of unicode

static frombasetype(value)[source]
static validate(value)[source]
class watcher.api.controllers.v1.types.UuidOrNameType[source]

Bases: wsme.types.UserType

A simple UUID or logical name type.

basetype

alias of unicode

static frombasetype(value)[source]
static validate(value)[source]
class watcher.api.controllers.v1.types.UuidType[source]

Bases: wsme.types.UserType

A simple UUID type.

basetype

alias of unicode

static frombasetype(value)[source]
static validate(value)[source]