pyrestsdk.type.model package

Subpackages

Module contents

Houses Models

class pyrestsdk.type.model.BaseEntity(client: A)[source]

Bases: object

Base Entity Type

property Client: A

Gets the client

abstract property as_dict: Dict

Gets the object as it’s dict representation

abstract property as_json: str

Gest the object’s json representation

abstract classmethod from_json(entry: Dict) S[source]

Converts Json to class type

class pyrestsdk.type.model.HeaderOption(Name: str, Value: Any)[source]

Bases: Option

Header Option Type

class pyrestsdk.type.model.HeaderOptionCollection[source]

Bases: OptionsCollection[HeaderOption]

Header Option Collection Type

class pyrestsdk.type.model.Option(Name: str, Value: Any)[source]

Bases: object

Option Type

Name: str
Value: Any
as_dict() Dict[str, Any][source]

Gets the object as it’s dict representation

to_json() str[source]

Gets the ojbect as it’s JSON representation

class pyrestsdk.type.model.OptionsCollection[source]

Bases: TypeCollection[O]

Option Collection Type

as_dict() Dict[str, Any][source]

Gets the object as it’s dict representation

as_list() List[O][source]

Gets the object as it’s list representation

class pyrestsdk.type.model.QueryOption(Name: str, Value: Any)[source]

Bases: Option

Query Option Type

class pyrestsdk.type.model.QueryOptionCollection[source]

Bases: OptionsCollection[QueryOption]

Query Option Collection Type

class pyrestsdk.type.model.TypeCollection[source]

Bases: MutableSequence[T]

Type Collection Type

append(_TypeCollection__option: T) None[source]

Append object to the end of the list.

clear() None[source]

Clears the collection

count(value: T) int[source]

Return number of occurrences of value.

extend(values: Iterable | OC) None[source]

Extend list by appending elements from the iterable.

index(item, *args) int[source]

Return first index of value.

Raises ValueError if the value is not present.

insert(index: int, value: T) None[source]

Insert object before index.

remove(value: T) None[source]

Remove first occurrence of value.

Raises ValueError if the value is not present.

reverse() None[source]

Reverses the order of the collection

sort(*args, **kwds)[source]

Sort the list in ascending order and return None.

The sort is in-place (i.e. the list itself is modified) and stable (i.e. the order of two equal elements is maintained).

If a key function is given, apply it once to each list item and sort them, ascending or descending, according to their function values.

The reverse flag can be set to sort in descending order.