miro_api.models.team_settings_changes
Miro Developer Platform
### Miro Developer Platform concepts - New to the Miro Developer Platform? Interested in learning more about platform concepts?? Read our introduction page and familiarize yourself with the Miro Developer Platform capabilities in a few minutes. ### Getting started with the Miro REST API - Quickstart (video): try the REST API in less than 3 minutes. - Quickstart (article): get started and try the REST API in less than 3 minutes. ### Miro REST API tutorials Check out our how-to articles with step-by-step instructions and code examples so you can: - Get started with OAuth 2.0 and Miro ### Miro App Examples Clone our Miro App Examples repository to get inspiration, customize, and explore apps built on top of Miro's Developer Platform 2.0.
The version of the OpenAPI document: v2.0 Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
1# coding: utf-8 2 3""" 4Miro Developer Platform 5 6<img src=\"https://content.pstmn.io/47449ea6-0ef7-4af2-bac1-e58a70e61c58/aW1hZ2UucG5n\" width=\"1685\" height=\"593\"> ### Miro Developer Platform concepts - New to the Miro Developer Platform? Interested in learning more about platform concepts?? [Read our introduction page](https://beta.developers.miro.com/docs/introduction) and familiarize yourself with the Miro Developer Platform capabilities in a few minutes. ### Getting started with the Miro REST API - [Quickstart (video):](https://beta.developers.miro.com/docs/try-out-the-rest-api-in-less-than-3-minutes) try the REST API in less than 3 minutes. - [Quickstart (article):](https://beta.developers.miro.com/docs/build-your-first-hello-world-app-1) get started and try the REST API in less than 3 minutes. ### Miro REST API tutorials Check out our how-to articles with step-by-step instructions and code examples so you can: - [Get started with OAuth 2.0 and Miro](https://beta.developers.miro.com/docs/getting-started-with-oauth) ### Miro App Examples Clone our [Miro App Examples repository](https://github.com/miroapp/app-examples) to get inspiration, customize, and explore apps built on top of Miro's Developer Platform 2.0. 7 8The version of the OpenAPI document: v2.0 9Generated by OpenAPI Generator (https://openapi-generator.tech) 10 11Do not edit the class manually. 12""" # noqa: E501 13 14from __future__ import annotations 15import pprint 16import re # noqa: F401 17import json 18 19from pydantic import BaseModel, Field 20from typing import Any, ClassVar, Dict, List, Optional 21from miro_api.models.team_account_discovery_settings_changes import TeamAccountDiscoverySettingsChanges 22from miro_api.models.team_collaboration_settings_changes import TeamCollaborationSettingsChanges 23from miro_api.models.team_copy_access_level_settings_changes import TeamCopyAccessLevelSettingsChanges 24from miro_api.models.team_invitation_settings_changes import TeamInvitationSettingsChanges 25from miro_api.models.team_sharing_policy_settings_changes import TeamSharingPolicySettingsChanges 26from typing import Optional, Set 27from typing_extensions import Self 28 29 30class TeamSettingsChanges(BaseModel): 31 """ 32 TeamSettingsChanges 33 """ # noqa: E501 34 35 team_account_discovery_settings: Optional[TeamAccountDiscoverySettingsChanges] = Field( 36 default=None, alias="teamAccountDiscoverySettings" 37 ) 38 team_collaboration_settings: Optional[TeamCollaborationSettingsChanges] = Field( 39 default=None, alias="teamCollaborationSettings" 40 ) 41 team_copy_access_level_settings: Optional[TeamCopyAccessLevelSettingsChanges] = Field( 42 default=None, alias="teamCopyAccessLevelSettings" 43 ) 44 team_invitation_settings: Optional[TeamInvitationSettingsChanges] = Field( 45 default=None, alias="teamInvitationSettings" 46 ) 47 team_sharing_policy_settings: Optional[TeamSharingPolicySettingsChanges] = Field( 48 default=None, alias="teamSharingPolicySettings" 49 ) 50 additional_properties: Dict[str, Any] = {} 51 __properties: ClassVar[List[str]] = [ 52 "teamAccountDiscoverySettings", 53 "teamCollaborationSettings", 54 "teamCopyAccessLevelSettings", 55 "teamInvitationSettings", 56 "teamSharingPolicySettings", 57 ] 58 59 model_config = { 60 "populate_by_name": True, 61 "validate_assignment": True, 62 "protected_namespaces": (), 63 } 64 65 def to_str(self) -> str: 66 """Returns the string representation of the model using alias""" 67 return pprint.pformat(self.model_dump(by_alias=True)) 68 69 def to_json(self) -> str: 70 """Returns the JSON representation of the model using alias""" 71 # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 72 return json.dumps(self.to_dict()) 73 74 @classmethod 75 def from_json(cls, json_str: str) -> Optional[Self]: 76 """Create an instance of TeamSettingsChanges from a JSON string""" 77 return cls.from_dict(json.loads(json_str)) 78 79 def to_dict(self) -> Dict[str, Any]: 80 """Return the dictionary representation of the model using alias. 81 82 This has the following differences from calling pydantic's 83 `self.model_dump(by_alias=True)`: 84 85 * `None` is only added to the output dict for nullable fields that 86 were set at model initialization. Other fields with value `None` 87 are ignored. 88 * Fields in `self.additional_properties` are added to the output dict. 89 """ 90 excluded_fields: Set[str] = set( 91 [ 92 "additional_properties", 93 ] 94 ) 95 96 _dict = self.model_dump( 97 by_alias=True, 98 exclude=excluded_fields, 99 exclude_none=True, 100 ) 101 # override the default output from pydantic by calling `to_dict()` of team_account_discovery_settings 102 if self.team_account_discovery_settings: 103 _dict["teamAccountDiscoverySettings"] = self.team_account_discovery_settings.to_dict() 104 # override the default output from pydantic by calling `to_dict()` of team_collaboration_settings 105 if self.team_collaboration_settings: 106 _dict["teamCollaborationSettings"] = self.team_collaboration_settings.to_dict() 107 # override the default output from pydantic by calling `to_dict()` of team_copy_access_level_settings 108 if self.team_copy_access_level_settings: 109 _dict["teamCopyAccessLevelSettings"] = self.team_copy_access_level_settings.to_dict() 110 # override the default output from pydantic by calling `to_dict()` of team_invitation_settings 111 if self.team_invitation_settings: 112 _dict["teamInvitationSettings"] = self.team_invitation_settings.to_dict() 113 # override the default output from pydantic by calling `to_dict()` of team_sharing_policy_settings 114 if self.team_sharing_policy_settings: 115 _dict["teamSharingPolicySettings"] = self.team_sharing_policy_settings.to_dict() 116 # puts key-value pairs in additional_properties in the top level 117 if self.additional_properties is not None: 118 for _key, _value in self.additional_properties.items(): 119 _dict[_key] = _value 120 121 return _dict 122 123 @classmethod 124 def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 125 """Create an instance of TeamSettingsChanges from a dict""" 126 if obj is None: 127 return None 128 129 if not isinstance(obj, dict): 130 return cls.model_validate(obj) 131 132 _obj = cls.model_validate( 133 { 134 "teamAccountDiscoverySettings": ( 135 TeamAccountDiscoverySettingsChanges.from_dict(obj["teamAccountDiscoverySettings"]) 136 if obj.get("teamAccountDiscoverySettings") is not None 137 else None 138 ), 139 "teamCollaborationSettings": ( 140 TeamCollaborationSettingsChanges.from_dict(obj["teamCollaborationSettings"]) 141 if obj.get("teamCollaborationSettings") is not None 142 else None 143 ), 144 "teamCopyAccessLevelSettings": ( 145 TeamCopyAccessLevelSettingsChanges.from_dict(obj["teamCopyAccessLevelSettings"]) 146 if obj.get("teamCopyAccessLevelSettings") is not None 147 else None 148 ), 149 "teamInvitationSettings": ( 150 TeamInvitationSettingsChanges.from_dict(obj["teamInvitationSettings"]) 151 if obj.get("teamInvitationSettings") is not None 152 else None 153 ), 154 "teamSharingPolicySettings": ( 155 TeamSharingPolicySettingsChanges.from_dict(obj["teamSharingPolicySettings"]) 156 if obj.get("teamSharingPolicySettings") is not None 157 else None 158 ), 159 } 160 ) 161 # store additional fields in additional_properties 162 for _key in obj.keys(): 163 if _key not in cls.__properties: 164 _obj.additional_properties[_key] = obj.get(_key) 165 166 return _obj
31class TeamSettingsChanges(BaseModel): 32 """ 33 TeamSettingsChanges 34 """ # noqa: E501 35 36 team_account_discovery_settings: Optional[TeamAccountDiscoverySettingsChanges] = Field( 37 default=None, alias="teamAccountDiscoverySettings" 38 ) 39 team_collaboration_settings: Optional[TeamCollaborationSettingsChanges] = Field( 40 default=None, alias="teamCollaborationSettings" 41 ) 42 team_copy_access_level_settings: Optional[TeamCopyAccessLevelSettingsChanges] = Field( 43 default=None, alias="teamCopyAccessLevelSettings" 44 ) 45 team_invitation_settings: Optional[TeamInvitationSettingsChanges] = Field( 46 default=None, alias="teamInvitationSettings" 47 ) 48 team_sharing_policy_settings: Optional[TeamSharingPolicySettingsChanges] = Field( 49 default=None, alias="teamSharingPolicySettings" 50 ) 51 additional_properties: Dict[str, Any] = {} 52 __properties: ClassVar[List[str]] = [ 53 "teamAccountDiscoverySettings", 54 "teamCollaborationSettings", 55 "teamCopyAccessLevelSettings", 56 "teamInvitationSettings", 57 "teamSharingPolicySettings", 58 ] 59 60 model_config = { 61 "populate_by_name": True, 62 "validate_assignment": True, 63 "protected_namespaces": (), 64 } 65 66 def to_str(self) -> str: 67 """Returns the string representation of the model using alias""" 68 return pprint.pformat(self.model_dump(by_alias=True)) 69 70 def to_json(self) -> str: 71 """Returns the JSON representation of the model using alias""" 72 # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 73 return json.dumps(self.to_dict()) 74 75 @classmethod 76 def from_json(cls, json_str: str) -> Optional[Self]: 77 """Create an instance of TeamSettingsChanges from a JSON string""" 78 return cls.from_dict(json.loads(json_str)) 79 80 def to_dict(self) -> Dict[str, Any]: 81 """Return the dictionary representation of the model using alias. 82 83 This has the following differences from calling pydantic's 84 `self.model_dump(by_alias=True)`: 85 86 * `None` is only added to the output dict for nullable fields that 87 were set at model initialization. Other fields with value `None` 88 are ignored. 89 * Fields in `self.additional_properties` are added to the output dict. 90 """ 91 excluded_fields: Set[str] = set( 92 [ 93 "additional_properties", 94 ] 95 ) 96 97 _dict = self.model_dump( 98 by_alias=True, 99 exclude=excluded_fields, 100 exclude_none=True, 101 ) 102 # override the default output from pydantic by calling `to_dict()` of team_account_discovery_settings 103 if self.team_account_discovery_settings: 104 _dict["teamAccountDiscoverySettings"] = self.team_account_discovery_settings.to_dict() 105 # override the default output from pydantic by calling `to_dict()` of team_collaboration_settings 106 if self.team_collaboration_settings: 107 _dict["teamCollaborationSettings"] = self.team_collaboration_settings.to_dict() 108 # override the default output from pydantic by calling `to_dict()` of team_copy_access_level_settings 109 if self.team_copy_access_level_settings: 110 _dict["teamCopyAccessLevelSettings"] = self.team_copy_access_level_settings.to_dict() 111 # override the default output from pydantic by calling `to_dict()` of team_invitation_settings 112 if self.team_invitation_settings: 113 _dict["teamInvitationSettings"] = self.team_invitation_settings.to_dict() 114 # override the default output from pydantic by calling `to_dict()` of team_sharing_policy_settings 115 if self.team_sharing_policy_settings: 116 _dict["teamSharingPolicySettings"] = self.team_sharing_policy_settings.to_dict() 117 # puts key-value pairs in additional_properties in the top level 118 if self.additional_properties is not None: 119 for _key, _value in self.additional_properties.items(): 120 _dict[_key] = _value 121 122 return _dict 123 124 @classmethod 125 def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 126 """Create an instance of TeamSettingsChanges from a dict""" 127 if obj is None: 128 return None 129 130 if not isinstance(obj, dict): 131 return cls.model_validate(obj) 132 133 _obj = cls.model_validate( 134 { 135 "teamAccountDiscoverySettings": ( 136 TeamAccountDiscoverySettingsChanges.from_dict(obj["teamAccountDiscoverySettings"]) 137 if obj.get("teamAccountDiscoverySettings") is not None 138 else None 139 ), 140 "teamCollaborationSettings": ( 141 TeamCollaborationSettingsChanges.from_dict(obj["teamCollaborationSettings"]) 142 if obj.get("teamCollaborationSettings") is not None 143 else None 144 ), 145 "teamCopyAccessLevelSettings": ( 146 TeamCopyAccessLevelSettingsChanges.from_dict(obj["teamCopyAccessLevelSettings"]) 147 if obj.get("teamCopyAccessLevelSettings") is not None 148 else None 149 ), 150 "teamInvitationSettings": ( 151 TeamInvitationSettingsChanges.from_dict(obj["teamInvitationSettings"]) 152 if obj.get("teamInvitationSettings") is not None 153 else None 154 ), 155 "teamSharingPolicySettings": ( 156 TeamSharingPolicySettingsChanges.from_dict(obj["teamSharingPolicySettings"]) 157 if obj.get("teamSharingPolicySettings") is not None 158 else None 159 ), 160 } 161 ) 162 # store additional fields in additional_properties 163 for _key in obj.keys(): 164 if _key not in cls.__properties: 165 _obj.additional_properties[_key] = obj.get(_key) 166 167 return _obj
TeamSettingsChanges
66 def to_str(self) -> str: 67 """Returns the string representation of the model using alias""" 68 return pprint.pformat(self.model_dump(by_alias=True))
Returns the string representation of the model using alias
70 def to_json(self) -> str: 71 """Returns the JSON representation of the model using alias""" 72 # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 73 return json.dumps(self.to_dict())
Returns the JSON representation of the model using alias
75 @classmethod 76 def from_json(cls, json_str: str) -> Optional[Self]: 77 """Create an instance of TeamSettingsChanges from a JSON string""" 78 return cls.from_dict(json.loads(json_str))
Create an instance of TeamSettingsChanges from a JSON string
80 def to_dict(self) -> Dict[str, Any]: 81 """Return the dictionary representation of the model using alias. 82 83 This has the following differences from calling pydantic's 84 `self.model_dump(by_alias=True)`: 85 86 * `None` is only added to the output dict for nullable fields that 87 were set at model initialization. Other fields with value `None` 88 are ignored. 89 * Fields in `self.additional_properties` are added to the output dict. 90 """ 91 excluded_fields: Set[str] = set( 92 [ 93 "additional_properties", 94 ] 95 ) 96 97 _dict = self.model_dump( 98 by_alias=True, 99 exclude=excluded_fields, 100 exclude_none=True, 101 ) 102 # override the default output from pydantic by calling `to_dict()` of team_account_discovery_settings 103 if self.team_account_discovery_settings: 104 _dict["teamAccountDiscoverySettings"] = self.team_account_discovery_settings.to_dict() 105 # override the default output from pydantic by calling `to_dict()` of team_collaboration_settings 106 if self.team_collaboration_settings: 107 _dict["teamCollaborationSettings"] = self.team_collaboration_settings.to_dict() 108 # override the default output from pydantic by calling `to_dict()` of team_copy_access_level_settings 109 if self.team_copy_access_level_settings: 110 _dict["teamCopyAccessLevelSettings"] = self.team_copy_access_level_settings.to_dict() 111 # override the default output from pydantic by calling `to_dict()` of team_invitation_settings 112 if self.team_invitation_settings: 113 _dict["teamInvitationSettings"] = self.team_invitation_settings.to_dict() 114 # override the default output from pydantic by calling `to_dict()` of team_sharing_policy_settings 115 if self.team_sharing_policy_settings: 116 _dict["teamSharingPolicySettings"] = self.team_sharing_policy_settings.to_dict() 117 # puts key-value pairs in additional_properties in the top level 118 if self.additional_properties is not None: 119 for _key, _value in self.additional_properties.items(): 120 _dict[_key] = _value 121 122 return _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):
Noneis only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNoneare ignored.- Fields in
self.additional_propertiesare added to the output dict.
124 @classmethod 125 def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 126 """Create an instance of TeamSettingsChanges from a dict""" 127 if obj is None: 128 return None 129 130 if not isinstance(obj, dict): 131 return cls.model_validate(obj) 132 133 _obj = cls.model_validate( 134 { 135 "teamAccountDiscoverySettings": ( 136 TeamAccountDiscoverySettingsChanges.from_dict(obj["teamAccountDiscoverySettings"]) 137 if obj.get("teamAccountDiscoverySettings") is not None 138 else None 139 ), 140 "teamCollaborationSettings": ( 141 TeamCollaborationSettingsChanges.from_dict(obj["teamCollaborationSettings"]) 142 if obj.get("teamCollaborationSettings") is not None 143 else None 144 ), 145 "teamCopyAccessLevelSettings": ( 146 TeamCopyAccessLevelSettingsChanges.from_dict(obj["teamCopyAccessLevelSettings"]) 147 if obj.get("teamCopyAccessLevelSettings") is not None 148 else None 149 ), 150 "teamInvitationSettings": ( 151 TeamInvitationSettingsChanges.from_dict(obj["teamInvitationSettings"]) 152 if obj.get("teamInvitationSettings") is not None 153 else None 154 ), 155 "teamSharingPolicySettings": ( 156 TeamSharingPolicySettingsChanges.from_dict(obj["teamSharingPolicySettings"]) 157 if obj.get("teamSharingPolicySettings") is not None 158 else None 159 ), 160 } 161 ) 162 # store additional fields in additional_properties 163 for _key in obj.keys(): 164 if _key not in cls.__properties: 165 _obj.additional_properties[_key] = obj.get(_key) 166 167 return _obj
Create an instance of TeamSettingsChanges from a dict
265def init_private_attributes(self: BaseModel, __context: Any) -> None: 266 """This function is meant to behave like a BaseModel method to initialise private attributes. 267 268 It takes context as an argument since that's what pydantic-core passes when calling it. 269 270 Args: 271 self: The BaseModel instance. 272 __context: The context. 273 """ 274 if getattr(self, '__pydantic_private__', None) is None: 275 pydantic_private = {} 276 for name, private_attr in self.__private_attributes__.items(): 277 default = private_attr.get_default() 278 if default is not PydanticUndefined: 279 pydantic_private[name] = default 280 object_setattr(self, '__pydantic_private__', pydantic_private)
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that's what pydantic-core passes when calling it.
Args: self: The BaseModel instance. __context: The context.
Inherited Members
- pydantic.main.BaseModel
- BaseModel
- model_extra
- model_fields_set
- model_construct
- model_copy
- model_dump
- model_dump_json
- model_json_schema
- model_parametrized_name
- model_rebuild
- model_validate
- model_validate_json
- model_validate_strings
- dict
- json
- parse_obj
- parse_raw
- parse_file
- from_orm
- construct
- copy
- schema
- schema_json
- validate
- update_forward_refs