UpdateRoleInfo¶
- pydantic model openapi_client.models.update_role_info.UpdateRoleInfo¶
Request body for PUT /roles/{id}. Which properties are required depends on the update-attributes query parameter: - When update-attributes is omitted or set to “all” (the default), every property is optional. Any property left out keeps its current stored value, and an empty body is a valid no-op. - When update-attributes names a specific list of attributes, each named attribute must be present in this body AND must be truthy. In that mode an empty string, an empty array, or an empty object is rejected with IPV-1008, even though the same value is accepted in “all” mode. Unrecognised properties are ignored rather than rejected.
- Fields:
- field role_name: Optional[StrictStr] = None (alias 'RoleName')¶
New name for the role. Written only when it differs from the current name, and validated for uniqueness. Must not begin with “SystemRole” (rejected with ROLE-1003).
- field role_description: Optional[StrictStr] = None (alias 'RoleDescription')¶
New description. Written only when it differs from the current value.
- field role_permissions: Optional[List[StrictStr]] = None (alias 'RolePermissions')¶
Replacement permission list, each entry in the form “<service>.<action>”. Validated against the permission catalog; unknown entries are rejected with ROLE-1001. Redundant lower-level permissions are stripped automatically.
- field users_attached: Optional[List[StrictStr]] = None (alias 'UsersAttached')¶
Replacement list of attached user IDs. Must resolve to a non-empty list and must remain a superset of RoleManagers; violating either rule fails with ROLE-1009, which the handler returns as HTTP 500 rather than 400.
- field role_managers: Optional[List[StrictStr]] = None (alias 'RoleManagers')¶
Replacement list of role managers. Applied only when non-empty. Members are added to UsersAttached automatically.
Replacement UI navigation configuration. Applied only when non-empty. Stored verbatim without inspection.
- to_str()¶
Returns the string representation of the model using alias
- Return type:
str
- to_json()¶
Returns the JSON representation of the model using alias
- Return type:
str
- classmethod from_json(json_str)¶
Create an instance of UpdateRoleInfo from a JSON string
- Return type:
Optional[Self]
- to_dict()¶
Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic’s self.model_dump(by_alias=True):
None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
- Return type:
Dict[str,Any]
- classmethod from_dict(obj)¶
Create an instance of UpdateRoleInfo from a dict
- Return type:
Optional[Self]