miro_api.models.service_provider_config_response

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, StrictStr
 20from typing import Any, ClassVar, Dict, List, Optional
 21from miro_api.models.service_provider_config_response_authentication_schemes_inner import (
 22    ServiceProviderConfigResponseAuthenticationSchemesInner,
 23)
 24from miro_api.models.service_provider_config_response_bulk import ServiceProviderConfigResponseBulk
 25from miro_api.models.service_provider_config_response_change_password import ServiceProviderConfigResponseChangePassword
 26from miro_api.models.service_provider_config_response_etag import ServiceProviderConfigResponseEtag
 27from miro_api.models.service_provider_config_response_filter import ServiceProviderConfigResponseFilter
 28from miro_api.models.service_provider_config_response_patch import ServiceProviderConfigResponsePatch
 29from miro_api.models.service_provider_config_response_sort import ServiceProviderConfigResponseSort
 30from typing import Optional, Set
 31from typing_extensions import Self
 32
 33
 34class ServiceProviderConfigResponse(BaseModel):
 35    """
 36    Supported operations and SCIM API basic configuration.
 37    """  # noqa: E501
 38
 39    schemas: Optional[List[StrictStr]] = Field(
 40        default=None,
 41        description="An array of URNs that identify the schema(s) that define the structure of this response. <br><br> In this case, it contains urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig, which indicates that this is a SCIM ServiceProviderConfig response.",
 42    )
 43    documentation_uri: Optional[StrictStr] = Field(
 44        default=None, description="A link to Miro SCIM documentation.", alias="documentationUri"
 45    )
 46    patch: Optional[ServiceProviderConfigResponsePatch] = None
 47    bulk: Optional[ServiceProviderConfigResponseBulk] = None
 48    filter: Optional[ServiceProviderConfigResponseFilter] = None
 49    change_password: Optional[ServiceProviderConfigResponseChangePassword] = Field(default=None, alias="changePassword")
 50    sort: Optional[ServiceProviderConfigResponseSort] = None
 51    etag: Optional[ServiceProviderConfigResponseEtag] = None
 52    authentication_schemes: Optional[List[ServiceProviderConfigResponseAuthenticationSchemesInner]] = Field(
 53        default=None, description="A list of supported authentication schemes.", alias="authenticationSchemes"
 54    )
 55    additional_properties: Dict[str, Any] = {}
 56    __properties: ClassVar[List[str]] = [
 57        "schemas",
 58        "documentationUri",
 59        "patch",
 60        "bulk",
 61        "filter",
 62        "changePassword",
 63        "sort",
 64        "etag",
 65        "authenticationSchemes",
 66    ]
 67
 68    model_config = {
 69        "populate_by_name": True,
 70        "validate_assignment": True,
 71        "protected_namespaces": (),
 72    }
 73
 74    def to_str(self) -> str:
 75        """Returns the string representation of the model using alias"""
 76        return pprint.pformat(self.model_dump(by_alias=True))
 77
 78    def to_json(self) -> str:
 79        """Returns the JSON representation of the model using alias"""
 80        # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
 81        return json.dumps(self.to_dict())
 82
 83    @classmethod
 84    def from_json(cls, json_str: str) -> Optional[Self]:
 85        """Create an instance of ServiceProviderConfigResponse from a JSON string"""
 86        return cls.from_dict(json.loads(json_str))
 87
 88    def to_dict(self) -> Dict[str, Any]:
 89        """Return the dictionary representation of the model using alias.
 90
 91        This has the following differences from calling pydantic's
 92        `self.model_dump(by_alias=True)`:
 93
 94        * `None` is only added to the output dict for nullable fields that
 95          were set at model initialization. Other fields with value `None`
 96          are ignored.
 97        * Fields in `self.additional_properties` are added to the output dict.
 98        """
 99        excluded_fields: Set[str] = set(
100            [
101                "additional_properties",
102            ]
103        )
104
105        _dict = self.model_dump(
106            by_alias=True,
107            exclude=excluded_fields,
108            exclude_none=True,
109        )
110        # override the default output from pydantic by calling `to_dict()` of patch
111        if self.patch:
112            _dict["patch"] = self.patch.to_dict()
113        # override the default output from pydantic by calling `to_dict()` of bulk
114        if self.bulk:
115            _dict["bulk"] = self.bulk.to_dict()
116        # override the default output from pydantic by calling `to_dict()` of filter
117        if self.filter:
118            _dict["filter"] = self.filter.to_dict()
119        # override the default output from pydantic by calling `to_dict()` of change_password
120        if self.change_password:
121            _dict["changePassword"] = self.change_password.to_dict()
122        # override the default output from pydantic by calling `to_dict()` of sort
123        if self.sort:
124            _dict["sort"] = self.sort.to_dict()
125        # override the default output from pydantic by calling `to_dict()` of etag
126        if self.etag:
127            _dict["etag"] = self.etag.to_dict()
128        # override the default output from pydantic by calling `to_dict()` of each item in authentication_schemes (list)
129        _items = []
130        if self.authentication_schemes:
131            for _item in self.authentication_schemes:
132                if _item:
133                    _items.append(_item.to_dict())
134            _dict["authenticationSchemes"] = _items
135        # puts key-value pairs in additional_properties in the top level
136        if self.additional_properties is not None:
137            for _key, _value in self.additional_properties.items():
138                _dict[_key] = _value
139
140        return _dict
141
142    @classmethod
143    def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
144        """Create an instance of ServiceProviderConfigResponse from a dict"""
145        if obj is None:
146            return None
147
148        if not isinstance(obj, dict):
149            return cls.model_validate(obj)
150
151        _obj = cls.model_validate(
152            {
153                "schemas": obj.get("schemas"),
154                "documentationUri": obj.get("documentationUri"),
155                "patch": (
156                    ServiceProviderConfigResponsePatch.from_dict(obj["patch"]) if obj.get("patch") is not None else None
157                ),
158                "bulk": (
159                    ServiceProviderConfigResponseBulk.from_dict(obj["bulk"]) if obj.get("bulk") is not None else None
160                ),
161                "filter": (
162                    ServiceProviderConfigResponseFilter.from_dict(obj["filter"])
163                    if obj.get("filter") is not None
164                    else None
165                ),
166                "changePassword": (
167                    ServiceProviderConfigResponseChangePassword.from_dict(obj["changePassword"])
168                    if obj.get("changePassword") is not None
169                    else None
170                ),
171                "sort": (
172                    ServiceProviderConfigResponseSort.from_dict(obj["sort"]) if obj.get("sort") is not None else None
173                ),
174                "etag": (
175                    ServiceProviderConfigResponseEtag.from_dict(obj["etag"]) if obj.get("etag") is not None else None
176                ),
177                "authenticationSchemes": (
178                    [
179                        ServiceProviderConfigResponseAuthenticationSchemesInner.from_dict(_item)
180                        for _item in obj["authenticationSchemes"]
181                    ]
182                    if obj.get("authenticationSchemes") is not None
183                    else None
184                ),
185            }
186        )
187        # store additional fields in additional_properties
188        for _key in obj.keys():
189            if _key not in cls.__properties:
190                _obj.additional_properties[_key] = obj.get(_key)
191
192        return _obj
class ServiceProviderConfigResponse(pydantic.main.BaseModel):
 35class ServiceProviderConfigResponse(BaseModel):
 36    """
 37    Supported operations and SCIM API basic configuration.
 38    """  # noqa: E501
 39
 40    schemas: Optional[List[StrictStr]] = Field(
 41        default=None,
 42        description="An array of URNs that identify the schema(s) that define the structure of this response. <br><br> In this case, it contains urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig, which indicates that this is a SCIM ServiceProviderConfig response.",
 43    )
 44    documentation_uri: Optional[StrictStr] = Field(
 45        default=None, description="A link to Miro SCIM documentation.", alias="documentationUri"
 46    )
 47    patch: Optional[ServiceProviderConfigResponsePatch] = None
 48    bulk: Optional[ServiceProviderConfigResponseBulk] = None
 49    filter: Optional[ServiceProviderConfigResponseFilter] = None
 50    change_password: Optional[ServiceProviderConfigResponseChangePassword] = Field(default=None, alias="changePassword")
 51    sort: Optional[ServiceProviderConfigResponseSort] = None
 52    etag: Optional[ServiceProviderConfigResponseEtag] = None
 53    authentication_schemes: Optional[List[ServiceProviderConfigResponseAuthenticationSchemesInner]] = Field(
 54        default=None, description="A list of supported authentication schemes.", alias="authenticationSchemes"
 55    )
 56    additional_properties: Dict[str, Any] = {}
 57    __properties: ClassVar[List[str]] = [
 58        "schemas",
 59        "documentationUri",
 60        "patch",
 61        "bulk",
 62        "filter",
 63        "changePassword",
 64        "sort",
 65        "etag",
 66        "authenticationSchemes",
 67    ]
 68
 69    model_config = {
 70        "populate_by_name": True,
 71        "validate_assignment": True,
 72        "protected_namespaces": (),
 73    }
 74
 75    def to_str(self) -> str:
 76        """Returns the string representation of the model using alias"""
 77        return pprint.pformat(self.model_dump(by_alias=True))
 78
 79    def to_json(self) -> str:
 80        """Returns the JSON representation of the model using alias"""
 81        # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
 82        return json.dumps(self.to_dict())
 83
 84    @classmethod
 85    def from_json(cls, json_str: str) -> Optional[Self]:
 86        """Create an instance of ServiceProviderConfigResponse from a JSON string"""
 87        return cls.from_dict(json.loads(json_str))
 88
 89    def to_dict(self) -> Dict[str, Any]:
 90        """Return the dictionary representation of the model using alias.
 91
 92        This has the following differences from calling pydantic's
 93        `self.model_dump(by_alias=True)`:
 94
 95        * `None` is only added to the output dict for nullable fields that
 96          were set at model initialization. Other fields with value `None`
 97          are ignored.
 98        * Fields in `self.additional_properties` are added to the output dict.
 99        """
100        excluded_fields: Set[str] = set(
101            [
102                "additional_properties",
103            ]
104        )
105
106        _dict = self.model_dump(
107            by_alias=True,
108            exclude=excluded_fields,
109            exclude_none=True,
110        )
111        # override the default output from pydantic by calling `to_dict()` of patch
112        if self.patch:
113            _dict["patch"] = self.patch.to_dict()
114        # override the default output from pydantic by calling `to_dict()` of bulk
115        if self.bulk:
116            _dict["bulk"] = self.bulk.to_dict()
117        # override the default output from pydantic by calling `to_dict()` of filter
118        if self.filter:
119            _dict["filter"] = self.filter.to_dict()
120        # override the default output from pydantic by calling `to_dict()` of change_password
121        if self.change_password:
122            _dict["changePassword"] = self.change_password.to_dict()
123        # override the default output from pydantic by calling `to_dict()` of sort
124        if self.sort:
125            _dict["sort"] = self.sort.to_dict()
126        # override the default output from pydantic by calling `to_dict()` of etag
127        if self.etag:
128            _dict["etag"] = self.etag.to_dict()
129        # override the default output from pydantic by calling `to_dict()` of each item in authentication_schemes (list)
130        _items = []
131        if self.authentication_schemes:
132            for _item in self.authentication_schemes:
133                if _item:
134                    _items.append(_item.to_dict())
135            _dict["authenticationSchemes"] = _items
136        # puts key-value pairs in additional_properties in the top level
137        if self.additional_properties is not None:
138            for _key, _value in self.additional_properties.items():
139                _dict[_key] = _value
140
141        return _dict
142
143    @classmethod
144    def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
145        """Create an instance of ServiceProviderConfigResponse from a dict"""
146        if obj is None:
147            return None
148
149        if not isinstance(obj, dict):
150            return cls.model_validate(obj)
151
152        _obj = cls.model_validate(
153            {
154                "schemas": obj.get("schemas"),
155                "documentationUri": obj.get("documentationUri"),
156                "patch": (
157                    ServiceProviderConfigResponsePatch.from_dict(obj["patch"]) if obj.get("patch") is not None else None
158                ),
159                "bulk": (
160                    ServiceProviderConfigResponseBulk.from_dict(obj["bulk"]) if obj.get("bulk") is not None else None
161                ),
162                "filter": (
163                    ServiceProviderConfigResponseFilter.from_dict(obj["filter"])
164                    if obj.get("filter") is not None
165                    else None
166                ),
167                "changePassword": (
168                    ServiceProviderConfigResponseChangePassword.from_dict(obj["changePassword"])
169                    if obj.get("changePassword") is not None
170                    else None
171                ),
172                "sort": (
173                    ServiceProviderConfigResponseSort.from_dict(obj["sort"]) if obj.get("sort") is not None else None
174                ),
175                "etag": (
176                    ServiceProviderConfigResponseEtag.from_dict(obj["etag"]) if obj.get("etag") is not None else None
177                ),
178                "authenticationSchemes": (
179                    [
180                        ServiceProviderConfigResponseAuthenticationSchemesInner.from_dict(_item)
181                        for _item in obj["authenticationSchemes"]
182                    ]
183                    if obj.get("authenticationSchemes") is not None
184                    else None
185                ),
186            }
187        )
188        # store additional fields in additional_properties
189        for _key in obj.keys():
190            if _key not in cls.__properties:
191                _obj.additional_properties[_key] = obj.get(_key)
192
193        return _obj

Supported operations and SCIM API basic configuration.

schemas: Optional[List[Annotated[str, Strict(strict=True)]]]
documentation_uri: Optional[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:
75    def to_str(self) -> str:
76        """Returns the string representation of the model using alias"""
77        return pprint.pformat(self.model_dump(by_alias=True))

Returns the string representation of the model using alias

def to_json(self) -> str:
79    def to_json(self) -> str:
80        """Returns the JSON representation of the model using alias"""
81        # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
82        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]:
84    @classmethod
85    def from_json(cls, json_str: str) -> Optional[Self]:
86        """Create an instance of ServiceProviderConfigResponse from a JSON string"""
87        return cls.from_dict(json.loads(json_str))

Create an instance of ServiceProviderConfigResponse from a JSON string

def to_dict(self) -> Dict[str, Any]:
 89    def to_dict(self) -> Dict[str, Any]:
 90        """Return the dictionary representation of the model using alias.
 91
 92        This has the following differences from calling pydantic's
 93        `self.model_dump(by_alias=True)`:
 94
 95        * `None` is only added to the output dict for nullable fields that
 96          were set at model initialization. Other fields with value `None`
 97          are ignored.
 98        * Fields in `self.additional_properties` are added to the output dict.
 99        """
100        excluded_fields: Set[str] = set(
101            [
102                "additional_properties",
103            ]
104        )
105
106        _dict = self.model_dump(
107            by_alias=True,
108            exclude=excluded_fields,
109            exclude_none=True,
110        )
111        # override the default output from pydantic by calling `to_dict()` of patch
112        if self.patch:
113            _dict["patch"] = self.patch.to_dict()
114        # override the default output from pydantic by calling `to_dict()` of bulk
115        if self.bulk:
116            _dict["bulk"] = self.bulk.to_dict()
117        # override the default output from pydantic by calling `to_dict()` of filter
118        if self.filter:
119            _dict["filter"] = self.filter.to_dict()
120        # override the default output from pydantic by calling `to_dict()` of change_password
121        if self.change_password:
122            _dict["changePassword"] = self.change_password.to_dict()
123        # override the default output from pydantic by calling `to_dict()` of sort
124        if self.sort:
125            _dict["sort"] = self.sort.to_dict()
126        # override the default output from pydantic by calling `to_dict()` of etag
127        if self.etag:
128            _dict["etag"] = self.etag.to_dict()
129        # override the default output from pydantic by calling `to_dict()` of each item in authentication_schemes (list)
130        _items = []
131        if self.authentication_schemes:
132            for _item in self.authentication_schemes:
133                if _item:
134                    _items.append(_item.to_dict())
135            _dict["authenticationSchemes"] = _items
136        # puts key-value pairs in additional_properties in the top level
137        if self.additional_properties is not None:
138            for _key, _value in self.additional_properties.items():
139                _dict[_key] = _value
140
141        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]:
143    @classmethod
144    def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
145        """Create an instance of ServiceProviderConfigResponse from a dict"""
146        if obj is None:
147            return None
148
149        if not isinstance(obj, dict):
150            return cls.model_validate(obj)
151
152        _obj = cls.model_validate(
153            {
154                "schemas": obj.get("schemas"),
155                "documentationUri": obj.get("documentationUri"),
156                "patch": (
157                    ServiceProviderConfigResponsePatch.from_dict(obj["patch"]) if obj.get("patch") is not None else None
158                ),
159                "bulk": (
160                    ServiceProviderConfigResponseBulk.from_dict(obj["bulk"]) if obj.get("bulk") is not None else None
161                ),
162                "filter": (
163                    ServiceProviderConfigResponseFilter.from_dict(obj["filter"])
164                    if obj.get("filter") is not None
165                    else None
166                ),
167                "changePassword": (
168                    ServiceProviderConfigResponseChangePassword.from_dict(obj["changePassword"])
169                    if obj.get("changePassword") is not None
170                    else None
171                ),
172                "sort": (
173                    ServiceProviderConfigResponseSort.from_dict(obj["sort"]) if obj.get("sort") is not None else None
174                ),
175                "etag": (
176                    ServiceProviderConfigResponseEtag.from_dict(obj["etag"]) if obj.get("etag") is not None else None
177                ),
178                "authenticationSchemes": (
179                    [
180                        ServiceProviderConfigResponseAuthenticationSchemesInner.from_dict(_item)
181                        for _item in obj["authenticationSchemes"]
182                    ]
183                    if obj.get("authenticationSchemes") is not None
184                    else None
185                ),
186            }
187        )
188        # store additional fields in additional_properties
189        for _key in obj.keys():
190            if _key not in cls.__properties:
191                _obj.additional_properties[_key] = obj.get(_key)
192
193        return _obj

Create an instance of ServiceProviderConfigResponse 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 = {'schemas': FieldInfo(annotation=Union[List[Annotated[str, Strict(strict=True)]], NoneType], required=False, description='An array of URNs that identify the schema(s) that define the structure of this response. <br><br> In this case, it contains urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig, which indicates that this is a SCIM ServiceProviderConfig response.'), 'documentation_uri': FieldInfo(annotation=Union[Annotated[str, Strict(strict=True)], NoneType], required=False, alias='documentationUri', alias_priority=2, description='A link to Miro SCIM documentation.'), 'patch': FieldInfo(annotation=Union[ServiceProviderConfigResponsePatch, NoneType], required=False), 'bulk': FieldInfo(annotation=Union[ServiceProviderConfigResponseBulk, NoneType], required=False), 'filter': FieldInfo(annotation=Union[ServiceProviderConfigResponseFilter, NoneType], required=False), 'change_password': FieldInfo(annotation=Union[ServiceProviderConfigResponseChangePassword, NoneType], required=False, alias='changePassword', alias_priority=2), 'sort': FieldInfo(annotation=Union[ServiceProviderConfigResponseSort, NoneType], required=False), 'etag': FieldInfo(annotation=Union[ServiceProviderConfigResponseEtag, NoneType], required=False), 'authentication_schemes': FieldInfo(annotation=Union[List[miro_api.models.service_provider_config_response_authentication_schemes_inner.ServiceProviderConfigResponseAuthenticationSchemesInner], NoneType], required=False, alias='authenticationSchemes', alias_priority=2, description='A list of supported authentication schemes.'), '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