ApplicationRoleConnection
Application role connection attached to a user.
Attributes
None
, dict
of (str
, str
) itemsMetadata key to attached value relation.
None
, str
The vanity name of the platform the application represents.
None
, str
The name of the user on the application's platform.
Methods
(...)
__new__Creates a new application role connection.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
platform_name |
| The vanity name of the platform the application represents. | ||
platform_user_name |
| The name of the user on the application's platform. | ||
metadata_values |
| Metadata key to attached value relation. |
Raises
TypeError
- If a parameter's type is incorrect.
ValueError
- If a parameter's value is incorrect.
()
copyCopies the application role connection.
Returns
new : instance<type<cls>>
(...)
copy_withCopies the application role connection with the given fields.
Parameter | Type | Optional | Keyword only | Description |
---|---|---|---|---|
platform_name |
| The vanity name of the platform the application represents. | ||
platform_user_name |
| The name of the user on the application's platform. | ||
metadata_values |
| 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.
(data)
from_dataCreates an application role connection from the given data.
Parameter | Type | Description |
---|---|---|
data |
| Role connection data. |
Returns
self : instance<cls>
(...)
to_dataConverts the application role connection to json serializable object.
Parameter | Type | Optional | Keyword only | Default | Description |
---|---|---|---|---|---|
defaults |
|
| Whether fields with their default value should be included as well. |
Returns
data : dict
of (str
, object
) items
(metadata)
translate_valueTranslates the given metadata's respective value .metadata_values
to their type-correct representation. Returns None
on failure.
Parameter | Type | Description |
---|---|---|
metadata | Application role connection metadata to translate with. |
Returns
translated_value : None
, object
(metadatas)
translate_valuesTranslates the .metadata_values
of the role connection to their type-correct representation.
Parameter | Type | Description |
---|---|---|
metadatas |
| 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.