ApplicationRoleConnection

Application role connection attached to a user.

Attributes

metadata_values : None, dict of (str, str) items

Metadata key to attached value relation.

platform_name : None, str

The vanity name of the platform the application represents.

platform_user_name : None, str

The name of the user on the application's platform.

Methods

__new__(...)

Creates a new application role connection.

ParameterTypeOptionalKeyword onlyDescription
platform_name

None, str

The vanity name of the platform the application represents.

platform_user_name

None, str

The name of the user on the application's platform.

metadata_values

None, dict of (str, str) items

Metadata key to attached value relation.

Raises

TypeError

  • If a parameter's type is incorrect.

ValueError

  • If a parameter's value is incorrect.

copy()

Copies the application role connection.

Returns

new : instance<type<cls>>

copy_with(...)

Copies the application role connection with the given fields.

ParameterTypeOptionalKeyword onlyDescription
platform_name

None, str

The vanity name of the platform the application represents.

platform_user_name

None, str

The name of the user on the application's platform.

metadata_values

None, dict of (str, str) items

Metadata key to attached value relation.

Returns

new : instance<type<cls>>

Raises

TypeError

  • If a parameter's type is incorrect.

ValueError

  • If a parameter's value is incorrect.

from_data(data)

Creates an application role connection from the given data.

ParameterTypeDescription
data

dict of (str, object) items

Role connection data.

Returns

self : instance<cls>

to_data(...)

Converts the application role connection to json serializable object.

ParameterTypeOptionalKeyword onlyDefaultDescription
defaults

bool

False

Whether fields with their default value should be included as well.

Returns

data : dict of (str, object) items

translate_value(metadata)

Translates the given metadata's respective value .metadata_values to their type-correct representation. Returns None on failure.

ParameterTypeDescription
metadata

ApplicationRoleConnectionMetadata

Application role connection metadata to translate with.

Returns

translated_value : None, object

translate_values(metadatas)

Translates the .metadata_values of the role connection to their type-correct representation.

ParameterTypeDescription
metadatas

iterable of ApplicationRoleConnectionMetadata

Application role connection metadatas to translate with.

Returns

translated_values : dict of (ApplicationRoleConnectionMetadata, object) items

__eq__()

Returns whether the two role connections are equal.

__getattr__()

Drops a rich attribute error.

__hash__()

Returns the hash value of the role connection.

__repr__()

Returns the role connection's representation.