miro_api.models.board_with_links_and_last_opened

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
 14
 15from __future__ import annotations
 16import pprint
 17import re  # noqa: F401
 18import json
 19
 20from datetime import datetime
 21from pydantic import BaseModel, Field, StrictStr
 22from typing import Any, ClassVar, Dict, List, Optional
 23from miro_api.models.board_links import BoardLinks
 24from miro_api.models.board_member import BoardMember
 25from miro_api.models.board_policy import BoardPolicy
 26from miro_api.models.board_project import BoardProject
 27from miro_api.models.get_board_user_info_last_opened_by import GetBoardUserInfoLastOpenedBy
 28from miro_api.models.picture import Picture
 29from miro_api.models.team import Team
 30from miro_api.models.user_info_short import UserInfoShort
 31from typing import Optional, Set
 32from typing_extensions import Self
 33
 34
 35class BoardWithLinksAndLastOpened(BaseModel):
 36    """
 37    BoardWithLinksAndLastOpened
 38    """  # noqa: E501
 39
 40    id: StrictStr = Field(description="Unique identifier (ID) of the board.")
 41    name: StrictStr = Field(description="Name of the board.")
 42    description: StrictStr = Field(description="Description of the board.")
 43    team: Optional[Team] = None
 44    project: Optional[BoardProject] = None
 45    picture: Optional[Picture] = None
 46    policy: Optional[BoardPolicy] = None
 47    view_link: Optional[StrictStr] = Field(default=None, description="URL to view the board.", alias="viewLink")
 48    owner: Optional[UserInfoShort] = None
 49    current_user_membership: Optional[BoardMember] = Field(default=None, alias="currentUserMembership")
 50    created_at: Optional[datetime] = Field(
 51        default=None,
 52        description="Date and time when the board was created. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).",
 53        alias="createdAt",
 54    )
 55    created_by: Optional[UserInfoShort] = Field(default=None, alias="createdBy")
 56    last_opened_at: Optional[datetime] = Field(
 57        default=None,
 58        description="Date and time when the board was last opened by any user. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).",
 59        alias="lastOpenedAt",
 60    )
 61    last_opened_by: Optional[GetBoardUserInfoLastOpenedBy] = Field(default=None, alias="lastOpenedBy")
 62    modified_at: Optional[datetime] = Field(
 63        default=None,
 64        description="Date and time when the board was last modified. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).",
 65        alias="modifiedAt",
 66    )
 67    modified_by: Optional[UserInfoShort] = Field(default=None, alias="modifiedBy")
 68    links: Optional[BoardLinks] = None
 69    type: StrictStr = Field(description="Type of the object that is returned. In this case, type returns `board`.")
 70    additional_properties: Dict[str, Any] = {}
 71    __properties: ClassVar[List[str]] = [
 72        "id",
 73        "name",
 74        "description",
 75        "team",
 76        "project",
 77        "picture",
 78        "policy",
 79        "viewLink",
 80        "owner",
 81        "currentUserMembership",
 82        "createdAt",
 83        "createdBy",
 84        "lastOpenedAt",
 85        "lastOpenedBy",
 86        "modifiedAt",
 87        "modifiedBy",
 88        "links",
 89        "type",
 90    ]
 91
 92    model_config = {
 93        "populate_by_name": True,
 94        "validate_assignment": True,
 95        "protected_namespaces": (),
 96    }
 97
 98    def to_str(self) -> str:
 99        """Returns the string representation of the model using alias"""
100        return pprint.pformat(self.model_dump(by_alias=True))
101
102    def to_json(self) -> str:
103        """Returns the JSON representation of the model using alias"""
104        # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
105        return json.dumps(self.to_dict())
106
107    @classmethod
108    def from_json(cls, json_str: str) -> Optional[Self]:
109        """Create an instance of BoardWithLinksAndLastOpened from a JSON string"""
110        return cls.from_dict(json.loads(json_str))
111
112    def to_dict(self) -> Dict[str, Any]:
113        """Return the dictionary representation of the model using alias.
114
115        This has the following differences from calling pydantic's
116        `self.model_dump(by_alias=True)`:
117
118        * `None` is only added to the output dict for nullable fields that
119          were set at model initialization. Other fields with value `None`
120          are ignored.
121        * Fields in `self.additional_properties` are added to the output dict.
122        """
123        excluded_fields: Set[str] = set(
124            [
125                "additional_properties",
126            ]
127        )
128
129        _dict = self.model_dump(
130            by_alias=True,
131            exclude=excluded_fields,
132            exclude_none=True,
133        )
134        # override the default output from pydantic by calling `to_dict()` of team
135        if self.team:
136            _dict["team"] = self.team.to_dict()
137        # override the default output from pydantic by calling `to_dict()` of project
138        if self.project:
139            _dict["project"] = self.project.to_dict()
140        # override the default output from pydantic by calling `to_dict()` of picture
141        if self.picture:
142            _dict["picture"] = self.picture.to_dict()
143        # override the default output from pydantic by calling `to_dict()` of policy
144        if self.policy:
145            _dict["policy"] = self.policy.to_dict()
146        # override the default output from pydantic by calling `to_dict()` of owner
147        if self.owner:
148            _dict["owner"] = self.owner.to_dict()
149        # override the default output from pydantic by calling `to_dict()` of current_user_membership
150        if self.current_user_membership:
151            _dict["currentUserMembership"] = self.current_user_membership.to_dict()
152        # override the default output from pydantic by calling `to_dict()` of created_by
153        if self.created_by:
154            _dict["createdBy"] = self.created_by.to_dict()
155        # override the default output from pydantic by calling `to_dict()` of last_opened_by
156        if self.last_opened_by:
157            _dict["lastOpenedBy"] = self.last_opened_by.to_dict()
158        # override the default output from pydantic by calling `to_dict()` of modified_by
159        if self.modified_by:
160            _dict["modifiedBy"] = self.modified_by.to_dict()
161        # override the default output from pydantic by calling `to_dict()` of links
162        if self.links:
163            _dict["links"] = self.links.to_dict()
164        # puts key-value pairs in additional_properties in the top level
165        if self.additional_properties is not None:
166            for _key, _value in self.additional_properties.items():
167                _dict[_key] = _value
168
169        return _dict
170
171    @classmethod
172    def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
173        """Create an instance of BoardWithLinksAndLastOpened from a dict"""
174        if obj is None:
175            return None
176
177        if not isinstance(obj, dict):
178            return cls.model_validate(obj)
179
180        _obj = cls.model_validate(
181            {
182                "id": obj.get("id"),
183                "name": obj.get("name"),
184                "description": obj.get("description"),
185                "team": Team.from_dict(obj["team"]) if obj.get("team") is not None else None,
186                "project": BoardProject.from_dict(obj["project"]) if obj.get("project") is not None else None,
187                "picture": Picture.from_dict(obj["picture"]) if obj.get("picture") is not None else None,
188                "policy": BoardPolicy.from_dict(obj["policy"]) if obj.get("policy") is not None else None,
189                "viewLink": obj.get("viewLink"),
190                "owner": UserInfoShort.from_dict(obj["owner"]) if obj.get("owner") is not None else None,
191                "currentUserMembership": (
192                    BoardMember.from_dict(obj["currentUserMembership"])
193                    if obj.get("currentUserMembership") is not None
194                    else None
195                ),
196                "createdAt": obj.get("createdAt"),
197                "createdBy": UserInfoShort.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None,
198                "lastOpenedAt": obj.get("lastOpenedAt"),
199                "lastOpenedBy": (
200                    GetBoardUserInfoLastOpenedBy.from_dict(obj["lastOpenedBy"])
201                    if obj.get("lastOpenedBy") is not None
202                    else None
203                ),
204                "modifiedAt": obj.get("modifiedAt"),
205                "modifiedBy": UserInfoShort.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None,
206                "links": BoardLinks.from_dict(obj["links"]) if obj.get("links") is not None else None,
207                "type": obj.get("type"),
208            }
209        )
210        # store additional fields in additional_properties
211        for _key in obj.keys():
212            if _key not in cls.__properties:
213                _obj.additional_properties[_key] = obj.get(_key)
214
215        return _obj
class BoardWithLinksAndLastOpened(pydantic.main.BaseModel):
 36class BoardWithLinksAndLastOpened(BaseModel):
 37    """
 38    BoardWithLinksAndLastOpened
 39    """  # noqa: E501
 40
 41    id: StrictStr = Field(description="Unique identifier (ID) of the board.")
 42    name: StrictStr = Field(description="Name of the board.")
 43    description: StrictStr = Field(description="Description of the board.")
 44    team: Optional[Team] = None
 45    project: Optional[BoardProject] = None
 46    picture: Optional[Picture] = None
 47    policy: Optional[BoardPolicy] = None
 48    view_link: Optional[StrictStr] = Field(default=None, description="URL to view the board.", alias="viewLink")
 49    owner: Optional[UserInfoShort] = None
 50    current_user_membership: Optional[BoardMember] = Field(default=None, alias="currentUserMembership")
 51    created_at: Optional[datetime] = Field(
 52        default=None,
 53        description="Date and time when the board was created. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).",
 54        alias="createdAt",
 55    )
 56    created_by: Optional[UserInfoShort] = Field(default=None, alias="createdBy")
 57    last_opened_at: Optional[datetime] = Field(
 58        default=None,
 59        description="Date and time when the board was last opened by any user. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).",
 60        alias="lastOpenedAt",
 61    )
 62    last_opened_by: Optional[GetBoardUserInfoLastOpenedBy] = Field(default=None, alias="lastOpenedBy")
 63    modified_at: Optional[datetime] = Field(
 64        default=None,
 65        description="Date and time when the board was last modified. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).",
 66        alias="modifiedAt",
 67    )
 68    modified_by: Optional[UserInfoShort] = Field(default=None, alias="modifiedBy")
 69    links: Optional[BoardLinks] = None
 70    type: StrictStr = Field(description="Type of the object that is returned. In this case, type returns `board`.")
 71    additional_properties: Dict[str, Any] = {}
 72    __properties: ClassVar[List[str]] = [
 73        "id",
 74        "name",
 75        "description",
 76        "team",
 77        "project",
 78        "picture",
 79        "policy",
 80        "viewLink",
 81        "owner",
 82        "currentUserMembership",
 83        "createdAt",
 84        "createdBy",
 85        "lastOpenedAt",
 86        "lastOpenedBy",
 87        "modifiedAt",
 88        "modifiedBy",
 89        "links",
 90        "type",
 91    ]
 92
 93    model_config = {
 94        "populate_by_name": True,
 95        "validate_assignment": True,
 96        "protected_namespaces": (),
 97    }
 98
 99    def to_str(self) -> str:
100        """Returns the string representation of the model using alias"""
101        return pprint.pformat(self.model_dump(by_alias=True))
102
103    def to_json(self) -> str:
104        """Returns the JSON representation of the model using alias"""
105        # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
106        return json.dumps(self.to_dict())
107
108    @classmethod
109    def from_json(cls, json_str: str) -> Optional[Self]:
110        """Create an instance of BoardWithLinksAndLastOpened from a JSON string"""
111        return cls.from_dict(json.loads(json_str))
112
113    def to_dict(self) -> Dict[str, Any]:
114        """Return the dictionary representation of the model using alias.
115
116        This has the following differences from calling pydantic's
117        `self.model_dump(by_alias=True)`:
118
119        * `None` is only added to the output dict for nullable fields that
120          were set at model initialization. Other fields with value `None`
121          are ignored.
122        * Fields in `self.additional_properties` are added to the output dict.
123        """
124        excluded_fields: Set[str] = set(
125            [
126                "additional_properties",
127            ]
128        )
129
130        _dict = self.model_dump(
131            by_alias=True,
132            exclude=excluded_fields,
133            exclude_none=True,
134        )
135        # override the default output from pydantic by calling `to_dict()` of team
136        if self.team:
137            _dict["team"] = self.team.to_dict()
138        # override the default output from pydantic by calling `to_dict()` of project
139        if self.project:
140            _dict["project"] = self.project.to_dict()
141        # override the default output from pydantic by calling `to_dict()` of picture
142        if self.picture:
143            _dict["picture"] = self.picture.to_dict()
144        # override the default output from pydantic by calling `to_dict()` of policy
145        if self.policy:
146            _dict["policy"] = self.policy.to_dict()
147        # override the default output from pydantic by calling `to_dict()` of owner
148        if self.owner:
149            _dict["owner"] = self.owner.to_dict()
150        # override the default output from pydantic by calling `to_dict()` of current_user_membership
151        if self.current_user_membership:
152            _dict["currentUserMembership"] = self.current_user_membership.to_dict()
153        # override the default output from pydantic by calling `to_dict()` of created_by
154        if self.created_by:
155            _dict["createdBy"] = self.created_by.to_dict()
156        # override the default output from pydantic by calling `to_dict()` of last_opened_by
157        if self.last_opened_by:
158            _dict["lastOpenedBy"] = self.last_opened_by.to_dict()
159        # override the default output from pydantic by calling `to_dict()` of modified_by
160        if self.modified_by:
161            _dict["modifiedBy"] = self.modified_by.to_dict()
162        # override the default output from pydantic by calling `to_dict()` of links
163        if self.links:
164            _dict["links"] = self.links.to_dict()
165        # puts key-value pairs in additional_properties in the top level
166        if self.additional_properties is not None:
167            for _key, _value in self.additional_properties.items():
168                _dict[_key] = _value
169
170        return _dict
171
172    @classmethod
173    def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
174        """Create an instance of BoardWithLinksAndLastOpened from a dict"""
175        if obj is None:
176            return None
177
178        if not isinstance(obj, dict):
179            return cls.model_validate(obj)
180
181        _obj = cls.model_validate(
182            {
183                "id": obj.get("id"),
184                "name": obj.get("name"),
185                "description": obj.get("description"),
186                "team": Team.from_dict(obj["team"]) if obj.get("team") is not None else None,
187                "project": BoardProject.from_dict(obj["project"]) if obj.get("project") is not None else None,
188                "picture": Picture.from_dict(obj["picture"]) if obj.get("picture") is not None else None,
189                "policy": BoardPolicy.from_dict(obj["policy"]) if obj.get("policy") is not None else None,
190                "viewLink": obj.get("viewLink"),
191                "owner": UserInfoShort.from_dict(obj["owner"]) if obj.get("owner") is not None else None,
192                "currentUserMembership": (
193                    BoardMember.from_dict(obj["currentUserMembership"])
194                    if obj.get("currentUserMembership") is not None
195                    else None
196                ),
197                "createdAt": obj.get("createdAt"),
198                "createdBy": UserInfoShort.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None,
199                "lastOpenedAt": obj.get("lastOpenedAt"),
200                "lastOpenedBy": (
201                    GetBoardUserInfoLastOpenedBy.from_dict(obj["lastOpenedBy"])
202                    if obj.get("lastOpenedBy") is not None
203                    else None
204                ),
205                "modifiedAt": obj.get("modifiedAt"),
206                "modifiedBy": UserInfoShort.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None,
207                "links": BoardLinks.from_dict(obj["links"]) if obj.get("links") is not None else None,
208                "type": obj.get("type"),
209            }
210        )
211        # store additional fields in additional_properties
212        for _key in obj.keys():
213            if _key not in cls.__properties:
214                _obj.additional_properties[_key] = obj.get(_key)
215
216        return _obj

BoardWithLinksAndLastOpened

id: typing.Annotated[str, Strict(strict=True)]
name: typing.Annotated[str, Strict(strict=True)]
description: typing.Annotated[str, Strict(strict=True)]
team: Optional[miro_api.models.team.Team]
picture: Optional[miro_api.models.picture.Picture]
current_user_membership: Optional[miro_api.models.board_member.BoardMember]
created_at: Optional[datetime.datetime]
last_opened_at: Optional[datetime.datetime]
modified_at: Optional[datetime.datetime]
type: typing.Annotated[str, Strict(strict=True)]
additional_properties: Dict[str, Any]
model_config = {'populate_by_name': True, 'validate_assignment': True, 'protected_namespaces': ()}
def to_str(self) -> str:
 99    def to_str(self) -> str:
100        """Returns the string representation of the model using alias"""
101        return pprint.pformat(self.model_dump(by_alias=True))

Returns the string representation of the model using alias

def to_json(self) -> str:
103    def to_json(self) -> str:
104        """Returns the JSON representation of the model using alias"""
105        # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
106        return json.dumps(self.to_dict())

Returns the JSON representation of the model using alias

@classmethod
def from_json(cls, json_str: str) -> Optional[typing_extensions.Self]:
108    @classmethod
109    def from_json(cls, json_str: str) -> Optional[Self]:
110        """Create an instance of BoardWithLinksAndLastOpened from a JSON string"""
111        return cls.from_dict(json.loads(json_str))

Create an instance of BoardWithLinksAndLastOpened from a JSON string

def to_dict(self) -> Dict[str, Any]:
113    def to_dict(self) -> Dict[str, Any]:
114        """Return the dictionary representation of the model using alias.
115
116        This has the following differences from calling pydantic's
117        `self.model_dump(by_alias=True)`:
118
119        * `None` is only added to the output dict for nullable fields that
120          were set at model initialization. Other fields with value `None`
121          are ignored.
122        * Fields in `self.additional_properties` are added to the output dict.
123        """
124        excluded_fields: Set[str] = set(
125            [
126                "additional_properties",
127            ]
128        )
129
130        _dict = self.model_dump(
131            by_alias=True,
132            exclude=excluded_fields,
133            exclude_none=True,
134        )
135        # override the default output from pydantic by calling `to_dict()` of team
136        if self.team:
137            _dict["team"] = self.team.to_dict()
138        # override the default output from pydantic by calling `to_dict()` of project
139        if self.project:
140            _dict["project"] = self.project.to_dict()
141        # override the default output from pydantic by calling `to_dict()` of picture
142        if self.picture:
143            _dict["picture"] = self.picture.to_dict()
144        # override the default output from pydantic by calling `to_dict()` of policy
145        if self.policy:
146            _dict["policy"] = self.policy.to_dict()
147        # override the default output from pydantic by calling `to_dict()` of owner
148        if self.owner:
149            _dict["owner"] = self.owner.to_dict()
150        # override the default output from pydantic by calling `to_dict()` of current_user_membership
151        if self.current_user_membership:
152            _dict["currentUserMembership"] = self.current_user_membership.to_dict()
153        # override the default output from pydantic by calling `to_dict()` of created_by
154        if self.created_by:
155            _dict["createdBy"] = self.created_by.to_dict()
156        # override the default output from pydantic by calling `to_dict()` of last_opened_by
157        if self.last_opened_by:
158            _dict["lastOpenedBy"] = self.last_opened_by.to_dict()
159        # override the default output from pydantic by calling `to_dict()` of modified_by
160        if self.modified_by:
161            _dict["modifiedBy"] = self.modified_by.to_dict()
162        # override the default output from pydantic by calling `to_dict()` of links
163        if self.links:
164            _dict["links"] = self.links.to_dict()
165        # puts key-value pairs in additional_properties in the top level
166        if self.additional_properties is not None:
167            for _key, _value in self.additional_properties.items():
168                _dict[_key] = _value
169
170        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):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.
  • Fields in self.additional_properties are added to the output dict.
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[typing_extensions.Self]:
172    @classmethod
173    def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
174        """Create an instance of BoardWithLinksAndLastOpened from a dict"""
175        if obj is None:
176            return None
177
178        if not isinstance(obj, dict):
179            return cls.model_validate(obj)
180
181        _obj = cls.model_validate(
182            {
183                "id": obj.get("id"),
184                "name": obj.get("name"),
185                "description": obj.get("description"),
186                "team": Team.from_dict(obj["team"]) if obj.get("team") is not None else None,
187                "project": BoardProject.from_dict(obj["project"]) if obj.get("project") is not None else None,
188                "picture": Picture.from_dict(obj["picture"]) if obj.get("picture") is not None else None,
189                "policy": BoardPolicy.from_dict(obj["policy"]) if obj.get("policy") is not None else None,
190                "viewLink": obj.get("viewLink"),
191                "owner": UserInfoShort.from_dict(obj["owner"]) if obj.get("owner") is not None else None,
192                "currentUserMembership": (
193                    BoardMember.from_dict(obj["currentUserMembership"])
194                    if obj.get("currentUserMembership") is not None
195                    else None
196                ),
197                "createdAt": obj.get("createdAt"),
198                "createdBy": UserInfoShort.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None,
199                "lastOpenedAt": obj.get("lastOpenedAt"),
200                "lastOpenedBy": (
201                    GetBoardUserInfoLastOpenedBy.from_dict(obj["lastOpenedBy"])
202                    if obj.get("lastOpenedBy") is not None
203                    else None
204                ),
205                "modifiedAt": obj.get("modifiedAt"),
206                "modifiedBy": UserInfoShort.from_dict(obj["modifiedBy"]) if obj.get("modifiedBy") is not None else None,
207                "links": BoardLinks.from_dict(obj["links"]) if obj.get("links") is not None else None,
208                "type": obj.get("type"),
209            }
210        )
211        # store additional fields in additional_properties
212        for _key in obj.keys():
213            if _key not in cls.__properties:
214                _obj.additional_properties[_key] = obj.get(_key)
215
216        return _obj

Create an instance of BoardWithLinksAndLastOpened from a dict

def model_post_init(self: pydantic.main.BaseModel, __context: Any) -> None:
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.

model_fields = {'id': FieldInfo(annotation=str, required=True, description='Unique identifier (ID) of the board.', metadata=[Strict(strict=True)]), 'name': FieldInfo(annotation=str, required=True, description='Name of the board.', metadata=[Strict(strict=True)]), 'description': FieldInfo(annotation=str, required=True, description='Description of the board.', metadata=[Strict(strict=True)]), 'team': FieldInfo(annotation=Union[Team, NoneType], required=False), 'project': FieldInfo(annotation=Union[BoardProject, NoneType], required=False), 'picture': FieldInfo(annotation=Union[Picture, NoneType], required=False), 'policy': FieldInfo(annotation=Union[BoardPolicy, NoneType], required=False), 'view_link': FieldInfo(annotation=Union[Annotated[str, Strict(strict=True)], NoneType], required=False, alias='viewLink', alias_priority=2, description='URL to view the board.'), 'owner': FieldInfo(annotation=Union[UserInfoShort, NoneType], required=False), 'current_user_membership': FieldInfo(annotation=Union[BoardMember, NoneType], required=False, alias='currentUserMembership', alias_priority=2), 'created_at': FieldInfo(annotation=Union[datetime, NoneType], required=False, alias='createdAt', alias_priority=2, description='Date and time when the board was created. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).'), 'created_by': FieldInfo(annotation=Union[UserInfoShort, NoneType], required=False, alias='createdBy', alias_priority=2), 'last_opened_at': FieldInfo(annotation=Union[datetime, NoneType], required=False, alias='lastOpenedAt', alias_priority=2, description='Date and time when the board was last opened by any user. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).'), 'last_opened_by': FieldInfo(annotation=Union[GetBoardUserInfoLastOpenedBy, NoneType], required=False, alias='lastOpenedBy', alias_priority=2), 'modified_at': FieldInfo(annotation=Union[datetime, NoneType], required=False, alias='modifiedAt', alias_priority=2, description='Date and time when the board was last modified. Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).'), 'modified_by': FieldInfo(annotation=Union[UserInfoShort, NoneType], required=False, alias='modifiedBy', alias_priority=2), 'links': FieldInfo(annotation=Union[BoardLinks, NoneType], required=False), 'type': FieldInfo(annotation=str, required=True, description='Type of the object that is returned. In this case, type returns `board`.', metadata=[Strict(strict=True)]), 'additional_properties': FieldInfo(annotation=Dict[str, Any], required=False, default={})}
model_computed_fields = {}
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