vectorize_client.models.source_connector_input_config

Vectorize API

API for Vectorize services (Beta)

The version of the OpenAPI document: 0.1.2 Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

  1# coding: utf-8
  2
  3"""
  4    Vectorize API
  5
  6    API for Vectorize services (Beta)
  7
  8    The version of the OpenAPI document: 0.1.2
  9    Generated by OpenAPI Generator (https://openapi-generator.tech)
 10
 11    Do not edit the class manually.
 12"""  # noqa: E501
 13
 14
 15from __future__ import annotations
 16import json
 17import pprint
 18from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
 19from typing import Any, List, Optional
 20from vectorize_client.models.awss3_config import AWSS3Config
 21from vectorize_client.models.azureblob_config import AZUREBLOBConfig
 22from vectorize_client.models.confluence_config import CONFLUENCEConfig
 23from vectorize_client.models.discord_config import DISCORDConfig
 24from vectorize_client.models.docusign_config import DOCUSIGNConfig
 25from vectorize_client.models.dropbox_config import DROPBOXConfig
 26from vectorize_client.models.firecrawl_config import FIRECRAWLConfig
 27from vectorize_client.models.fireflies_config import FIREFLIESConfig
 28from vectorize_client.models.gcs_config import GCSConfig
 29from vectorize_client.models.github_config import GITHUBConfig
 30from vectorize_client.models.gmail_config import GMAILConfig
 31from vectorize_client.models.googledrive_config import GOOGLEDRIVEConfig
 32from vectorize_client.models.googledriveoauth_config import GOOGLEDRIVEOAUTHConfig
 33from vectorize_client.models.googledriveoauthmulti_config import GOOGLEDRIVEOAUTHMULTIConfig
 34from vectorize_client.models.googledriveoauthmulticustom_config import GOOGLEDRIVEOAUTHMULTICUSTOMConfig
 35from vectorize_client.models.intercom_config import INTERCOMConfig
 36from vectorize_client.models.notion_config import NOTIONConfig
 37from vectorize_client.models.onedrive_config import ONEDRIVEConfig
 38from vectorize_client.models.sharepoint_config import SHAREPOINTConfig
 39from vectorize_client.models.webcrawler_config import WEBCRAWLERConfig
 40from vectorize_client.models.zoom_config import ZOOMConfig
 41from vectorize_client.models.zoomadmin_config import ZOOMADMINConfig
 42from pydantic import StrictStr, Field
 43from typing import Union, List, Set, Optional, Dict
 44from typing_extensions import Literal, Self
 45
 46SOURCECONNECTORINPUTCONFIG_ONE_OF_SCHEMAS = ["AWSS3Config", "AZUREBLOBConfig", "CONFLUENCEConfig", "DISCORDConfig", "DOCUSIGNConfig", "DROPBOXConfig", "FIRECRAWLConfig", "FIREFLIESConfig", "GCSConfig", "GITHUBConfig", "GMAILConfig", "GOOGLEDRIVEConfig", "GOOGLEDRIVEOAUTHConfig", "GOOGLEDRIVEOAUTHMULTICUSTOMConfig", "GOOGLEDRIVEOAUTHMULTIConfig", "INTERCOMConfig", "NOTIONConfig", "ONEDRIVEConfig", "SHAREPOINTConfig", "WEBCRAWLERConfig", "ZOOMADMINConfig", "ZOOMConfig"]
 47
 48class SourceConnectorInputConfig(BaseModel):
 49    """
 50    Configuration specific to the connector type
 51    """
 52    # data type: AWSS3Config
 53    oneof_schema_1_validator: Optional[AWSS3Config] = None
 54    # data type: AZUREBLOBConfig
 55    oneof_schema_2_validator: Optional[AZUREBLOBConfig] = None
 56    # data type: CONFLUENCEConfig
 57    oneof_schema_3_validator: Optional[CONFLUENCEConfig] = None
 58    # data type: DISCORDConfig
 59    oneof_schema_4_validator: Optional[DISCORDConfig] = None
 60    # data type: DROPBOXConfig
 61    oneof_schema_5_validator: Optional[DROPBOXConfig] = None
 62    # data type: GOOGLEDRIVEOAUTHConfig
 63    oneof_schema_6_validator: Optional[GOOGLEDRIVEOAUTHConfig] = None
 64    # data type: GOOGLEDRIVEConfig
 65    oneof_schema_7_validator: Optional[GOOGLEDRIVEConfig] = None
 66    # data type: GOOGLEDRIVEOAUTHMULTIConfig
 67    oneof_schema_8_validator: Optional[GOOGLEDRIVEOAUTHMULTIConfig] = None
 68    # data type: GOOGLEDRIVEOAUTHMULTICUSTOMConfig
 69    oneof_schema_9_validator: Optional[GOOGLEDRIVEOAUTHMULTICUSTOMConfig] = None
 70    # data type: FIRECRAWLConfig
 71    oneof_schema_10_validator: Optional[FIRECRAWLConfig] = None
 72    # data type: GCSConfig
 73    oneof_schema_11_validator: Optional[GCSConfig] = None
 74    # data type: ZOOMConfig
 75    oneof_schema_12_validator: Optional[ZOOMConfig] = None
 76    # data type: ZOOMADMINConfig
 77    oneof_schema_13_validator: Optional[ZOOMADMINConfig] = None
 78    # data type: INTERCOMConfig
 79    oneof_schema_14_validator: Optional[INTERCOMConfig] = None
 80    # data type: NOTIONConfig
 81    oneof_schema_15_validator: Optional[NOTIONConfig] = None
 82    # data type: ONEDRIVEConfig
 83    oneof_schema_16_validator: Optional[ONEDRIVEConfig] = None
 84    # data type: SHAREPOINTConfig
 85    oneof_schema_17_validator: Optional[SHAREPOINTConfig] = None
 86    # data type: WEBCRAWLERConfig
 87    oneof_schema_18_validator: Optional[WEBCRAWLERConfig] = None
 88    # data type: GITHUBConfig
 89    oneof_schema_19_validator: Optional[GITHUBConfig] = None
 90    # data type: FIREFLIESConfig
 91    oneof_schema_20_validator: Optional[FIREFLIESConfig] = None
 92    # data type: DOCUSIGNConfig
 93    oneof_schema_21_validator: Optional[DOCUSIGNConfig] = None
 94    # data type: GMAILConfig
 95    oneof_schema_22_validator: Optional[GMAILConfig] = None
 96    actual_instance: Optional[Union[AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig]] = None
 97    one_of_schemas: Set[str] = { "AWSS3Config", "AZUREBLOBConfig", "CONFLUENCEConfig", "DISCORDConfig", "DOCUSIGNConfig", "DROPBOXConfig", "FIRECRAWLConfig", "FIREFLIESConfig", "GCSConfig", "GITHUBConfig", "GMAILConfig", "GOOGLEDRIVEConfig", "GOOGLEDRIVEOAUTHConfig", "GOOGLEDRIVEOAUTHMULTICUSTOMConfig", "GOOGLEDRIVEOAUTHMULTIConfig", "INTERCOMConfig", "NOTIONConfig", "ONEDRIVEConfig", "SHAREPOINTConfig", "WEBCRAWLERConfig", "ZOOMADMINConfig", "ZOOMConfig" }
 98
 99    model_config = ConfigDict(
100        validate_assignment=True,
101        protected_namespaces=(),
102    )
103
104
105    def __init__(self, *args, **kwargs) -> None:
106        if args:
107            if len(args) > 1:
108                raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
109            if kwargs:
110                raise ValueError("If a position argument is used, keyword arguments cannot be used.")
111            super().__init__(actual_instance=args[0])
112        else:
113            super().__init__(**kwargs)
114
115    @field_validator('actual_instance')
116    def actual_instance_must_validate_oneof(cls, v):
117        instance = SourceConnectorInputConfig.model_construct()
118        error_messages = []
119        match = 0
120        # validate data type: AWSS3Config
121        if not isinstance(v, AWSS3Config):
122            error_messages.append(f"Error! Input type `{type(v)}` is not `AWSS3Config`")
123        else:
124            match += 1
125        # validate data type: AZUREBLOBConfig
126        if not isinstance(v, AZUREBLOBConfig):
127            error_messages.append(f"Error! Input type `{type(v)}` is not `AZUREBLOBConfig`")
128        else:
129            match += 1
130        # validate data type: CONFLUENCEConfig
131        if not isinstance(v, CONFLUENCEConfig):
132            error_messages.append(f"Error! Input type `{type(v)}` is not `CONFLUENCEConfig`")
133        else:
134            match += 1
135        # validate data type: DISCORDConfig
136        if not isinstance(v, DISCORDConfig):
137            error_messages.append(f"Error! Input type `{type(v)}` is not `DISCORDConfig`")
138        else:
139            match += 1
140        # validate data type: DROPBOXConfig
141        if not isinstance(v, DROPBOXConfig):
142            error_messages.append(f"Error! Input type `{type(v)}` is not `DROPBOXConfig`")
143        else:
144            match += 1
145        # validate data type: GOOGLEDRIVEOAUTHConfig
146        if not isinstance(v, GOOGLEDRIVEOAUTHConfig):
147            error_messages.append(f"Error! Input type `{type(v)}` is not `GOOGLEDRIVEOAUTHConfig`")
148        else:
149            match += 1
150        # validate data type: GOOGLEDRIVEConfig
151        if not isinstance(v, GOOGLEDRIVEConfig):
152            error_messages.append(f"Error! Input type `{type(v)}` is not `GOOGLEDRIVEConfig`")
153        else:
154            match += 1
155        # validate data type: GOOGLEDRIVEOAUTHMULTIConfig
156        if not isinstance(v, GOOGLEDRIVEOAUTHMULTIConfig):
157            error_messages.append(f"Error! Input type `{type(v)}` is not `GOOGLEDRIVEOAUTHMULTIConfig`")
158        else:
159            match += 1
160        # validate data type: GOOGLEDRIVEOAUTHMULTICUSTOMConfig
161        if not isinstance(v, GOOGLEDRIVEOAUTHMULTICUSTOMConfig):
162            error_messages.append(f"Error! Input type `{type(v)}` is not `GOOGLEDRIVEOAUTHMULTICUSTOMConfig`")
163        else:
164            match += 1
165        # validate data type: FIRECRAWLConfig
166        if not isinstance(v, FIRECRAWLConfig):
167            error_messages.append(f"Error! Input type `{type(v)}` is not `FIRECRAWLConfig`")
168        else:
169            match += 1
170        # validate data type: GCSConfig
171        if not isinstance(v, GCSConfig):
172            error_messages.append(f"Error! Input type `{type(v)}` is not `GCSConfig`")
173        else:
174            match += 1
175        # validate data type: ZOOMConfig
176        if not isinstance(v, ZOOMConfig):
177            error_messages.append(f"Error! Input type `{type(v)}` is not `ZOOMConfig`")
178        else:
179            match += 1
180        # validate data type: ZOOMADMINConfig
181        if not isinstance(v, ZOOMADMINConfig):
182            error_messages.append(f"Error! Input type `{type(v)}` is not `ZOOMADMINConfig`")
183        else:
184            match += 1
185        # validate data type: INTERCOMConfig
186        if not isinstance(v, INTERCOMConfig):
187            error_messages.append(f"Error! Input type `{type(v)}` is not `INTERCOMConfig`")
188        else:
189            match += 1
190        # validate data type: NOTIONConfig
191        if not isinstance(v, NOTIONConfig):
192            error_messages.append(f"Error! Input type `{type(v)}` is not `NOTIONConfig`")
193        else:
194            match += 1
195        # validate data type: ONEDRIVEConfig
196        if not isinstance(v, ONEDRIVEConfig):
197            error_messages.append(f"Error! Input type `{type(v)}` is not `ONEDRIVEConfig`")
198        else:
199            match += 1
200        # validate data type: SHAREPOINTConfig
201        if not isinstance(v, SHAREPOINTConfig):
202            error_messages.append(f"Error! Input type `{type(v)}` is not `SHAREPOINTConfig`")
203        else:
204            match += 1
205        # validate data type: WEBCRAWLERConfig
206        if not isinstance(v, WEBCRAWLERConfig):
207            error_messages.append(f"Error! Input type `{type(v)}` is not `WEBCRAWLERConfig`")
208        else:
209            match += 1
210        # validate data type: GITHUBConfig
211        if not isinstance(v, GITHUBConfig):
212            error_messages.append(f"Error! Input type `{type(v)}` is not `GITHUBConfig`")
213        else:
214            match += 1
215        # validate data type: FIREFLIESConfig
216        if not isinstance(v, FIREFLIESConfig):
217            error_messages.append(f"Error! Input type `{type(v)}` is not `FIREFLIESConfig`")
218        else:
219            match += 1
220        # validate data type: DOCUSIGNConfig
221        if not isinstance(v, DOCUSIGNConfig):
222            error_messages.append(f"Error! Input type `{type(v)}` is not `DOCUSIGNConfig`")
223        else:
224            match += 1
225        # validate data type: GMAILConfig
226        if not isinstance(v, GMAILConfig):
227            error_messages.append(f"Error! Input type `{type(v)}` is not `GMAILConfig`")
228        else:
229            match += 1
230        if match > 1:
231            # more than 1 match
232            raise ValueError("Multiple matches found when setting `actual_instance` in SourceConnectorInputConfig with oneOf schemas: AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig. Details: " + ", ".join(error_messages))
233        elif match == 0:
234            # no match
235            raise ValueError("No match found when setting `actual_instance` in SourceConnectorInputConfig with oneOf schemas: AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig. Details: " + ", ".join(error_messages))
236        else:
237            return v
238
239    @classmethod
240    def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
241        return cls.from_json(json.dumps(obj))
242
243    @classmethod
244    def from_json(cls, json_str: str) -> Self:
245        """Returns the object represented by the json string"""
246        instance = cls.model_construct()
247        error_messages = []
248        match = 0
249
250        # deserialize data into AWSS3Config
251        try:
252            instance.actual_instance = AWSS3Config.from_json(json_str)
253            match += 1
254        except (ValidationError, ValueError) as e:
255            error_messages.append(str(e))
256        # deserialize data into AZUREBLOBConfig
257        try:
258            instance.actual_instance = AZUREBLOBConfig.from_json(json_str)
259            match += 1
260        except (ValidationError, ValueError) as e:
261            error_messages.append(str(e))
262        # deserialize data into CONFLUENCEConfig
263        try:
264            instance.actual_instance = CONFLUENCEConfig.from_json(json_str)
265            match += 1
266        except (ValidationError, ValueError) as e:
267            error_messages.append(str(e))
268        # deserialize data into DISCORDConfig
269        try:
270            instance.actual_instance = DISCORDConfig.from_json(json_str)
271            match += 1
272        except (ValidationError, ValueError) as e:
273            error_messages.append(str(e))
274        # deserialize data into DROPBOXConfig
275        try:
276            instance.actual_instance = DROPBOXConfig.from_json(json_str)
277            match += 1
278        except (ValidationError, ValueError) as e:
279            error_messages.append(str(e))
280        # deserialize data into GOOGLEDRIVEOAUTHConfig
281        try:
282            instance.actual_instance = GOOGLEDRIVEOAUTHConfig.from_json(json_str)
283            match += 1
284        except (ValidationError, ValueError) as e:
285            error_messages.append(str(e))
286        # deserialize data into GOOGLEDRIVEConfig
287        try:
288            instance.actual_instance = GOOGLEDRIVEConfig.from_json(json_str)
289            match += 1
290        except (ValidationError, ValueError) as e:
291            error_messages.append(str(e))
292        # deserialize data into GOOGLEDRIVEOAUTHMULTIConfig
293        try:
294            instance.actual_instance = GOOGLEDRIVEOAUTHMULTIConfig.from_json(json_str)
295            match += 1
296        except (ValidationError, ValueError) as e:
297            error_messages.append(str(e))
298        # deserialize data into GOOGLEDRIVEOAUTHMULTICUSTOMConfig
299        try:
300            instance.actual_instance = GOOGLEDRIVEOAUTHMULTICUSTOMConfig.from_json(json_str)
301            match += 1
302        except (ValidationError, ValueError) as e:
303            error_messages.append(str(e))
304        # deserialize data into FIRECRAWLConfig
305        try:
306            instance.actual_instance = FIRECRAWLConfig.from_json(json_str)
307            match += 1
308        except (ValidationError, ValueError) as e:
309            error_messages.append(str(e))
310        # deserialize data into GCSConfig
311        try:
312            instance.actual_instance = GCSConfig.from_json(json_str)
313            match += 1
314        except (ValidationError, ValueError) as e:
315            error_messages.append(str(e))
316        # deserialize data into ZOOMConfig
317        try:
318            instance.actual_instance = ZOOMConfig.from_json(json_str)
319            match += 1
320        except (ValidationError, ValueError) as e:
321            error_messages.append(str(e))
322        # deserialize data into ZOOMADMINConfig
323        try:
324            instance.actual_instance = ZOOMADMINConfig.from_json(json_str)
325            match += 1
326        except (ValidationError, ValueError) as e:
327            error_messages.append(str(e))
328        # deserialize data into INTERCOMConfig
329        try:
330            instance.actual_instance = INTERCOMConfig.from_json(json_str)
331            match += 1
332        except (ValidationError, ValueError) as e:
333            error_messages.append(str(e))
334        # deserialize data into NOTIONConfig
335        try:
336            instance.actual_instance = NOTIONConfig.from_json(json_str)
337            match += 1
338        except (ValidationError, ValueError) as e:
339            error_messages.append(str(e))
340        # deserialize data into ONEDRIVEConfig
341        try:
342            instance.actual_instance = ONEDRIVEConfig.from_json(json_str)
343            match += 1
344        except (ValidationError, ValueError) as e:
345            error_messages.append(str(e))
346        # deserialize data into SHAREPOINTConfig
347        try:
348            instance.actual_instance = SHAREPOINTConfig.from_json(json_str)
349            match += 1
350        except (ValidationError, ValueError) as e:
351            error_messages.append(str(e))
352        # deserialize data into WEBCRAWLERConfig
353        try:
354            instance.actual_instance = WEBCRAWLERConfig.from_json(json_str)
355            match += 1
356        except (ValidationError, ValueError) as e:
357            error_messages.append(str(e))
358        # deserialize data into GITHUBConfig
359        try:
360            instance.actual_instance = GITHUBConfig.from_json(json_str)
361            match += 1
362        except (ValidationError, ValueError) as e:
363            error_messages.append(str(e))
364        # deserialize data into FIREFLIESConfig
365        try:
366            instance.actual_instance = FIREFLIESConfig.from_json(json_str)
367            match += 1
368        except (ValidationError, ValueError) as e:
369            error_messages.append(str(e))
370        # deserialize data into DOCUSIGNConfig
371        try:
372            instance.actual_instance = DOCUSIGNConfig.from_json(json_str)
373            match += 1
374        except (ValidationError, ValueError) as e:
375            error_messages.append(str(e))
376        # deserialize data into GMAILConfig
377        try:
378            instance.actual_instance = GMAILConfig.from_json(json_str)
379            match += 1
380        except (ValidationError, ValueError) as e:
381            error_messages.append(str(e))
382
383        if match > 1:
384            # more than 1 match
385            raise ValueError("Multiple matches found when deserializing the JSON string into SourceConnectorInputConfig with oneOf schemas: AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig. Details: " + ", ".join(error_messages))
386        elif match == 0:
387            # no match
388            raise ValueError("No match found when deserializing the JSON string into SourceConnectorInputConfig with oneOf schemas: AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig. Details: " + ", ".join(error_messages))
389        else:
390            return instance
391
392    def to_json(self) -> str:
393        """Returns the JSON representation of the actual instance"""
394        if self.actual_instance is None:
395            return "null"
396
397        if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
398            return self.actual_instance.to_json()
399        else:
400            return json.dumps(self.actual_instance)
401
402    def to_dict(self) -> Optional[Union[Dict[str, Any], AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig]]:
403        """Returns the dict representation of the actual instance"""
404        if self.actual_instance is None:
405            return None
406
407        if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
408            return self.actual_instance.to_dict()
409        else:
410            # primitive type
411            return self.actual_instance
412
413    def to_str(self) -> str:
414        """Returns the string representation of the actual instance"""
415        return pprint.pformat(self.model_dump())
SOURCECONNECTORINPUTCONFIG_ONE_OF_SCHEMAS = ['AWSS3Config', 'AZUREBLOBConfig', 'CONFLUENCEConfig', 'DISCORDConfig', 'DOCUSIGNConfig', 'DROPBOXConfig', 'FIRECRAWLConfig', 'FIREFLIESConfig', 'GCSConfig', 'GITHUBConfig', 'GMAILConfig', 'GOOGLEDRIVEConfig', 'GOOGLEDRIVEOAUTHConfig', 'GOOGLEDRIVEOAUTHMULTICUSTOMConfig', 'GOOGLEDRIVEOAUTHMULTIConfig', 'INTERCOMConfig', 'NOTIONConfig', 'ONEDRIVEConfig', 'SHAREPOINTConfig', 'WEBCRAWLERConfig', 'ZOOMADMINConfig', 'ZOOMConfig']
class SourceConnectorInputConfig(pydantic.main.BaseModel):
 49class SourceConnectorInputConfig(BaseModel):
 50    """
 51    Configuration specific to the connector type
 52    """
 53    # data type: AWSS3Config
 54    oneof_schema_1_validator: Optional[AWSS3Config] = None
 55    # data type: AZUREBLOBConfig
 56    oneof_schema_2_validator: Optional[AZUREBLOBConfig] = None
 57    # data type: CONFLUENCEConfig
 58    oneof_schema_3_validator: Optional[CONFLUENCEConfig] = None
 59    # data type: DISCORDConfig
 60    oneof_schema_4_validator: Optional[DISCORDConfig] = None
 61    # data type: DROPBOXConfig
 62    oneof_schema_5_validator: Optional[DROPBOXConfig] = None
 63    # data type: GOOGLEDRIVEOAUTHConfig
 64    oneof_schema_6_validator: Optional[GOOGLEDRIVEOAUTHConfig] = None
 65    # data type: GOOGLEDRIVEConfig
 66    oneof_schema_7_validator: Optional[GOOGLEDRIVEConfig] = None
 67    # data type: GOOGLEDRIVEOAUTHMULTIConfig
 68    oneof_schema_8_validator: Optional[GOOGLEDRIVEOAUTHMULTIConfig] = None
 69    # data type: GOOGLEDRIVEOAUTHMULTICUSTOMConfig
 70    oneof_schema_9_validator: Optional[GOOGLEDRIVEOAUTHMULTICUSTOMConfig] = None
 71    # data type: FIRECRAWLConfig
 72    oneof_schema_10_validator: Optional[FIRECRAWLConfig] = None
 73    # data type: GCSConfig
 74    oneof_schema_11_validator: Optional[GCSConfig] = None
 75    # data type: ZOOMConfig
 76    oneof_schema_12_validator: Optional[ZOOMConfig] = None
 77    # data type: ZOOMADMINConfig
 78    oneof_schema_13_validator: Optional[ZOOMADMINConfig] = None
 79    # data type: INTERCOMConfig
 80    oneof_schema_14_validator: Optional[INTERCOMConfig] = None
 81    # data type: NOTIONConfig
 82    oneof_schema_15_validator: Optional[NOTIONConfig] = None
 83    # data type: ONEDRIVEConfig
 84    oneof_schema_16_validator: Optional[ONEDRIVEConfig] = None
 85    # data type: SHAREPOINTConfig
 86    oneof_schema_17_validator: Optional[SHAREPOINTConfig] = None
 87    # data type: WEBCRAWLERConfig
 88    oneof_schema_18_validator: Optional[WEBCRAWLERConfig] = None
 89    # data type: GITHUBConfig
 90    oneof_schema_19_validator: Optional[GITHUBConfig] = None
 91    # data type: FIREFLIESConfig
 92    oneof_schema_20_validator: Optional[FIREFLIESConfig] = None
 93    # data type: DOCUSIGNConfig
 94    oneof_schema_21_validator: Optional[DOCUSIGNConfig] = None
 95    # data type: GMAILConfig
 96    oneof_schema_22_validator: Optional[GMAILConfig] = None
 97    actual_instance: Optional[Union[AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig]] = None
 98    one_of_schemas: Set[str] = { "AWSS3Config", "AZUREBLOBConfig", "CONFLUENCEConfig", "DISCORDConfig", "DOCUSIGNConfig", "DROPBOXConfig", "FIRECRAWLConfig", "FIREFLIESConfig", "GCSConfig", "GITHUBConfig", "GMAILConfig", "GOOGLEDRIVEConfig", "GOOGLEDRIVEOAUTHConfig", "GOOGLEDRIVEOAUTHMULTICUSTOMConfig", "GOOGLEDRIVEOAUTHMULTIConfig", "INTERCOMConfig", "NOTIONConfig", "ONEDRIVEConfig", "SHAREPOINTConfig", "WEBCRAWLERConfig", "ZOOMADMINConfig", "ZOOMConfig" }
 99
100    model_config = ConfigDict(
101        validate_assignment=True,
102        protected_namespaces=(),
103    )
104
105
106    def __init__(self, *args, **kwargs) -> None:
107        if args:
108            if len(args) > 1:
109                raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
110            if kwargs:
111                raise ValueError("If a position argument is used, keyword arguments cannot be used.")
112            super().__init__(actual_instance=args[0])
113        else:
114            super().__init__(**kwargs)
115
116    @field_validator('actual_instance')
117    def actual_instance_must_validate_oneof(cls, v):
118        instance = SourceConnectorInputConfig.model_construct()
119        error_messages = []
120        match = 0
121        # validate data type: AWSS3Config
122        if not isinstance(v, AWSS3Config):
123            error_messages.append(f"Error! Input type `{type(v)}` is not `AWSS3Config`")
124        else:
125            match += 1
126        # validate data type: AZUREBLOBConfig
127        if not isinstance(v, AZUREBLOBConfig):
128            error_messages.append(f"Error! Input type `{type(v)}` is not `AZUREBLOBConfig`")
129        else:
130            match += 1
131        # validate data type: CONFLUENCEConfig
132        if not isinstance(v, CONFLUENCEConfig):
133            error_messages.append(f"Error! Input type `{type(v)}` is not `CONFLUENCEConfig`")
134        else:
135            match += 1
136        # validate data type: DISCORDConfig
137        if not isinstance(v, DISCORDConfig):
138            error_messages.append(f"Error! Input type `{type(v)}` is not `DISCORDConfig`")
139        else:
140            match += 1
141        # validate data type: DROPBOXConfig
142        if not isinstance(v, DROPBOXConfig):
143            error_messages.append(f"Error! Input type `{type(v)}` is not `DROPBOXConfig`")
144        else:
145            match += 1
146        # validate data type: GOOGLEDRIVEOAUTHConfig
147        if not isinstance(v, GOOGLEDRIVEOAUTHConfig):
148            error_messages.append(f"Error! Input type `{type(v)}` is not `GOOGLEDRIVEOAUTHConfig`")
149        else:
150            match += 1
151        # validate data type: GOOGLEDRIVEConfig
152        if not isinstance(v, GOOGLEDRIVEConfig):
153            error_messages.append(f"Error! Input type `{type(v)}` is not `GOOGLEDRIVEConfig`")
154        else:
155            match += 1
156        # validate data type: GOOGLEDRIVEOAUTHMULTIConfig
157        if not isinstance(v, GOOGLEDRIVEOAUTHMULTIConfig):
158            error_messages.append(f"Error! Input type `{type(v)}` is not `GOOGLEDRIVEOAUTHMULTIConfig`")
159        else:
160            match += 1
161        # validate data type: GOOGLEDRIVEOAUTHMULTICUSTOMConfig
162        if not isinstance(v, GOOGLEDRIVEOAUTHMULTICUSTOMConfig):
163            error_messages.append(f"Error! Input type `{type(v)}` is not `GOOGLEDRIVEOAUTHMULTICUSTOMConfig`")
164        else:
165            match += 1
166        # validate data type: FIRECRAWLConfig
167        if not isinstance(v, FIRECRAWLConfig):
168            error_messages.append(f"Error! Input type `{type(v)}` is not `FIRECRAWLConfig`")
169        else:
170            match += 1
171        # validate data type: GCSConfig
172        if not isinstance(v, GCSConfig):
173            error_messages.append(f"Error! Input type `{type(v)}` is not `GCSConfig`")
174        else:
175            match += 1
176        # validate data type: ZOOMConfig
177        if not isinstance(v, ZOOMConfig):
178            error_messages.append(f"Error! Input type `{type(v)}` is not `ZOOMConfig`")
179        else:
180            match += 1
181        # validate data type: ZOOMADMINConfig
182        if not isinstance(v, ZOOMADMINConfig):
183            error_messages.append(f"Error! Input type `{type(v)}` is not `ZOOMADMINConfig`")
184        else:
185            match += 1
186        # validate data type: INTERCOMConfig
187        if not isinstance(v, INTERCOMConfig):
188            error_messages.append(f"Error! Input type `{type(v)}` is not `INTERCOMConfig`")
189        else:
190            match += 1
191        # validate data type: NOTIONConfig
192        if not isinstance(v, NOTIONConfig):
193            error_messages.append(f"Error! Input type `{type(v)}` is not `NOTIONConfig`")
194        else:
195            match += 1
196        # validate data type: ONEDRIVEConfig
197        if not isinstance(v, ONEDRIVEConfig):
198            error_messages.append(f"Error! Input type `{type(v)}` is not `ONEDRIVEConfig`")
199        else:
200            match += 1
201        # validate data type: SHAREPOINTConfig
202        if not isinstance(v, SHAREPOINTConfig):
203            error_messages.append(f"Error! Input type `{type(v)}` is not `SHAREPOINTConfig`")
204        else:
205            match += 1
206        # validate data type: WEBCRAWLERConfig
207        if not isinstance(v, WEBCRAWLERConfig):
208            error_messages.append(f"Error! Input type `{type(v)}` is not `WEBCRAWLERConfig`")
209        else:
210            match += 1
211        # validate data type: GITHUBConfig
212        if not isinstance(v, GITHUBConfig):
213            error_messages.append(f"Error! Input type `{type(v)}` is not `GITHUBConfig`")
214        else:
215            match += 1
216        # validate data type: FIREFLIESConfig
217        if not isinstance(v, FIREFLIESConfig):
218            error_messages.append(f"Error! Input type `{type(v)}` is not `FIREFLIESConfig`")
219        else:
220            match += 1
221        # validate data type: DOCUSIGNConfig
222        if not isinstance(v, DOCUSIGNConfig):
223            error_messages.append(f"Error! Input type `{type(v)}` is not `DOCUSIGNConfig`")
224        else:
225            match += 1
226        # validate data type: GMAILConfig
227        if not isinstance(v, GMAILConfig):
228            error_messages.append(f"Error! Input type `{type(v)}` is not `GMAILConfig`")
229        else:
230            match += 1
231        if match > 1:
232            # more than 1 match
233            raise ValueError("Multiple matches found when setting `actual_instance` in SourceConnectorInputConfig with oneOf schemas: AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig. Details: " + ", ".join(error_messages))
234        elif match == 0:
235            # no match
236            raise ValueError("No match found when setting `actual_instance` in SourceConnectorInputConfig with oneOf schemas: AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig. Details: " + ", ".join(error_messages))
237        else:
238            return v
239
240    @classmethod
241    def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
242        return cls.from_json(json.dumps(obj))
243
244    @classmethod
245    def from_json(cls, json_str: str) -> Self:
246        """Returns the object represented by the json string"""
247        instance = cls.model_construct()
248        error_messages = []
249        match = 0
250
251        # deserialize data into AWSS3Config
252        try:
253            instance.actual_instance = AWSS3Config.from_json(json_str)
254            match += 1
255        except (ValidationError, ValueError) as e:
256            error_messages.append(str(e))
257        # deserialize data into AZUREBLOBConfig
258        try:
259            instance.actual_instance = AZUREBLOBConfig.from_json(json_str)
260            match += 1
261        except (ValidationError, ValueError) as e:
262            error_messages.append(str(e))
263        # deserialize data into CONFLUENCEConfig
264        try:
265            instance.actual_instance = CONFLUENCEConfig.from_json(json_str)
266            match += 1
267        except (ValidationError, ValueError) as e:
268            error_messages.append(str(e))
269        # deserialize data into DISCORDConfig
270        try:
271            instance.actual_instance = DISCORDConfig.from_json(json_str)
272            match += 1
273        except (ValidationError, ValueError) as e:
274            error_messages.append(str(e))
275        # deserialize data into DROPBOXConfig
276        try:
277            instance.actual_instance = DROPBOXConfig.from_json(json_str)
278            match += 1
279        except (ValidationError, ValueError) as e:
280            error_messages.append(str(e))
281        # deserialize data into GOOGLEDRIVEOAUTHConfig
282        try:
283            instance.actual_instance = GOOGLEDRIVEOAUTHConfig.from_json(json_str)
284            match += 1
285        except (ValidationError, ValueError) as e:
286            error_messages.append(str(e))
287        # deserialize data into GOOGLEDRIVEConfig
288        try:
289            instance.actual_instance = GOOGLEDRIVEConfig.from_json(json_str)
290            match += 1
291        except (ValidationError, ValueError) as e:
292            error_messages.append(str(e))
293        # deserialize data into GOOGLEDRIVEOAUTHMULTIConfig
294        try:
295            instance.actual_instance = GOOGLEDRIVEOAUTHMULTIConfig.from_json(json_str)
296            match += 1
297        except (ValidationError, ValueError) as e:
298            error_messages.append(str(e))
299        # deserialize data into GOOGLEDRIVEOAUTHMULTICUSTOMConfig
300        try:
301            instance.actual_instance = GOOGLEDRIVEOAUTHMULTICUSTOMConfig.from_json(json_str)
302            match += 1
303        except (ValidationError, ValueError) as e:
304            error_messages.append(str(e))
305        # deserialize data into FIRECRAWLConfig
306        try:
307            instance.actual_instance = FIRECRAWLConfig.from_json(json_str)
308            match += 1
309        except (ValidationError, ValueError) as e:
310            error_messages.append(str(e))
311        # deserialize data into GCSConfig
312        try:
313            instance.actual_instance = GCSConfig.from_json(json_str)
314            match += 1
315        except (ValidationError, ValueError) as e:
316            error_messages.append(str(e))
317        # deserialize data into ZOOMConfig
318        try:
319            instance.actual_instance = ZOOMConfig.from_json(json_str)
320            match += 1
321        except (ValidationError, ValueError) as e:
322            error_messages.append(str(e))
323        # deserialize data into ZOOMADMINConfig
324        try:
325            instance.actual_instance = ZOOMADMINConfig.from_json(json_str)
326            match += 1
327        except (ValidationError, ValueError) as e:
328            error_messages.append(str(e))
329        # deserialize data into INTERCOMConfig
330        try:
331            instance.actual_instance = INTERCOMConfig.from_json(json_str)
332            match += 1
333        except (ValidationError, ValueError) as e:
334            error_messages.append(str(e))
335        # deserialize data into NOTIONConfig
336        try:
337            instance.actual_instance = NOTIONConfig.from_json(json_str)
338            match += 1
339        except (ValidationError, ValueError) as e:
340            error_messages.append(str(e))
341        # deserialize data into ONEDRIVEConfig
342        try:
343            instance.actual_instance = ONEDRIVEConfig.from_json(json_str)
344            match += 1
345        except (ValidationError, ValueError) as e:
346            error_messages.append(str(e))
347        # deserialize data into SHAREPOINTConfig
348        try:
349            instance.actual_instance = SHAREPOINTConfig.from_json(json_str)
350            match += 1
351        except (ValidationError, ValueError) as e:
352            error_messages.append(str(e))
353        # deserialize data into WEBCRAWLERConfig
354        try:
355            instance.actual_instance = WEBCRAWLERConfig.from_json(json_str)
356            match += 1
357        except (ValidationError, ValueError) as e:
358            error_messages.append(str(e))
359        # deserialize data into GITHUBConfig
360        try:
361            instance.actual_instance = GITHUBConfig.from_json(json_str)
362            match += 1
363        except (ValidationError, ValueError) as e:
364            error_messages.append(str(e))
365        # deserialize data into FIREFLIESConfig
366        try:
367            instance.actual_instance = FIREFLIESConfig.from_json(json_str)
368            match += 1
369        except (ValidationError, ValueError) as e:
370            error_messages.append(str(e))
371        # deserialize data into DOCUSIGNConfig
372        try:
373            instance.actual_instance = DOCUSIGNConfig.from_json(json_str)
374            match += 1
375        except (ValidationError, ValueError) as e:
376            error_messages.append(str(e))
377        # deserialize data into GMAILConfig
378        try:
379            instance.actual_instance = GMAILConfig.from_json(json_str)
380            match += 1
381        except (ValidationError, ValueError) as e:
382            error_messages.append(str(e))
383
384        if match > 1:
385            # more than 1 match
386            raise ValueError("Multiple matches found when deserializing the JSON string into SourceConnectorInputConfig with oneOf schemas: AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig. Details: " + ", ".join(error_messages))
387        elif match == 0:
388            # no match
389            raise ValueError("No match found when deserializing the JSON string into SourceConnectorInputConfig with oneOf schemas: AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig. Details: " + ", ".join(error_messages))
390        else:
391            return instance
392
393    def to_json(self) -> str:
394        """Returns the JSON representation of the actual instance"""
395        if self.actual_instance is None:
396            return "null"
397
398        if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
399            return self.actual_instance.to_json()
400        else:
401            return json.dumps(self.actual_instance)
402
403    def to_dict(self) -> Optional[Union[Dict[str, Any], AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig]]:
404        """Returns the dict representation of the actual instance"""
405        if self.actual_instance is None:
406            return None
407
408        if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
409            return self.actual_instance.to_dict()
410        else:
411            # primitive type
412            return self.actual_instance
413
414    def to_str(self) -> str:
415        """Returns the string representation of the actual instance"""
416        return pprint.pformat(self.model_dump())

Configuration specific to the connector type

SourceConnectorInputConfig(*args, **kwargs)
106    def __init__(self, *args, **kwargs) -> None:
107        if args:
108            if len(args) > 1:
109                raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
110            if kwargs:
111                raise ValueError("If a position argument is used, keyword arguments cannot be used.")
112            super().__init__(actual_instance=args[0])
113        else:
114            super().__init__(**kwargs)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

oneof_schema_1_validator: Optional[vectorize_client.models.awss3_config.AWSS3Config]
oneof_schema_2_validator: Optional[vectorize_client.models.azureblob_config.AZUREBLOBConfig]
oneof_schema_4_validator: Optional[vectorize_client.models.discord_config.DISCORDConfig]
oneof_schema_5_validator: Optional[vectorize_client.models.dropbox_config.DROPBOXConfig]
oneof_schema_10_validator: Optional[vectorize_client.models.firecrawl_config.FIRECRAWLConfig]
oneof_schema_11_validator: Optional[vectorize_client.models.gcs_config.GCSConfig]
oneof_schema_12_validator: Optional[vectorize_client.models.zoom_config.ZOOMConfig]
oneof_schema_13_validator: Optional[vectorize_client.models.zoomadmin_config.ZOOMADMINConfig]
oneof_schema_14_validator: Optional[vectorize_client.models.intercom_config.INTERCOMConfig]
oneof_schema_15_validator: Optional[vectorize_client.models.notion_config.NOTIONConfig]
oneof_schema_16_validator: Optional[vectorize_client.models.onedrive_config.ONEDRIVEConfig]
oneof_schema_17_validator: Optional[vectorize_client.models.sharepoint_config.SHAREPOINTConfig]
oneof_schema_18_validator: Optional[vectorize_client.models.webcrawler_config.WEBCRAWLERConfig]
oneof_schema_19_validator: Optional[vectorize_client.models.github_config.GITHUBConfig]
oneof_schema_20_validator: Optional[vectorize_client.models.fireflies_config.FIREFLIESConfig]
oneof_schema_21_validator: Optional[vectorize_client.models.docusign_config.DOCUSIGNConfig]
oneof_schema_22_validator: Optional[vectorize_client.models.gmail_config.GMAILConfig]
one_of_schemas: Set[str]
model_config = {'validate_assignment': True, 'protected_namespaces': ()}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

@field_validator('actual_instance')
def actual_instance_must_validate_oneof(cls, v):
116    @field_validator('actual_instance')
117    def actual_instance_must_validate_oneof(cls, v):
118        instance = SourceConnectorInputConfig.model_construct()
119        error_messages = []
120        match = 0
121        # validate data type: AWSS3Config
122        if not isinstance(v, AWSS3Config):
123            error_messages.append(f"Error! Input type `{type(v)}` is not `AWSS3Config`")
124        else:
125            match += 1
126        # validate data type: AZUREBLOBConfig
127        if not isinstance(v, AZUREBLOBConfig):
128            error_messages.append(f"Error! Input type `{type(v)}` is not `AZUREBLOBConfig`")
129        else:
130            match += 1
131        # validate data type: CONFLUENCEConfig
132        if not isinstance(v, CONFLUENCEConfig):
133            error_messages.append(f"Error! Input type `{type(v)}` is not `CONFLUENCEConfig`")
134        else:
135            match += 1
136        # validate data type: DISCORDConfig
137        if not isinstance(v, DISCORDConfig):
138            error_messages.append(f"Error! Input type `{type(v)}` is not `DISCORDConfig`")
139        else:
140            match += 1
141        # validate data type: DROPBOXConfig
142        if not isinstance(v, DROPBOXConfig):
143            error_messages.append(f"Error! Input type `{type(v)}` is not `DROPBOXConfig`")
144        else:
145            match += 1
146        # validate data type: GOOGLEDRIVEOAUTHConfig
147        if not isinstance(v, GOOGLEDRIVEOAUTHConfig):
148            error_messages.append(f"Error! Input type `{type(v)}` is not `GOOGLEDRIVEOAUTHConfig`")
149        else:
150            match += 1
151        # validate data type: GOOGLEDRIVEConfig
152        if not isinstance(v, GOOGLEDRIVEConfig):
153            error_messages.append(f"Error! Input type `{type(v)}` is not `GOOGLEDRIVEConfig`")
154        else:
155            match += 1
156        # validate data type: GOOGLEDRIVEOAUTHMULTIConfig
157        if not isinstance(v, GOOGLEDRIVEOAUTHMULTIConfig):
158            error_messages.append(f"Error! Input type `{type(v)}` is not `GOOGLEDRIVEOAUTHMULTIConfig`")
159        else:
160            match += 1
161        # validate data type: GOOGLEDRIVEOAUTHMULTICUSTOMConfig
162        if not isinstance(v, GOOGLEDRIVEOAUTHMULTICUSTOMConfig):
163            error_messages.append(f"Error! Input type `{type(v)}` is not `GOOGLEDRIVEOAUTHMULTICUSTOMConfig`")
164        else:
165            match += 1
166        # validate data type: FIRECRAWLConfig
167        if not isinstance(v, FIRECRAWLConfig):
168            error_messages.append(f"Error! Input type `{type(v)}` is not `FIRECRAWLConfig`")
169        else:
170            match += 1
171        # validate data type: GCSConfig
172        if not isinstance(v, GCSConfig):
173            error_messages.append(f"Error! Input type `{type(v)}` is not `GCSConfig`")
174        else:
175            match += 1
176        # validate data type: ZOOMConfig
177        if not isinstance(v, ZOOMConfig):
178            error_messages.append(f"Error! Input type `{type(v)}` is not `ZOOMConfig`")
179        else:
180            match += 1
181        # validate data type: ZOOMADMINConfig
182        if not isinstance(v, ZOOMADMINConfig):
183            error_messages.append(f"Error! Input type `{type(v)}` is not `ZOOMADMINConfig`")
184        else:
185            match += 1
186        # validate data type: INTERCOMConfig
187        if not isinstance(v, INTERCOMConfig):
188            error_messages.append(f"Error! Input type `{type(v)}` is not `INTERCOMConfig`")
189        else:
190            match += 1
191        # validate data type: NOTIONConfig
192        if not isinstance(v, NOTIONConfig):
193            error_messages.append(f"Error! Input type `{type(v)}` is not `NOTIONConfig`")
194        else:
195            match += 1
196        # validate data type: ONEDRIVEConfig
197        if not isinstance(v, ONEDRIVEConfig):
198            error_messages.append(f"Error! Input type `{type(v)}` is not `ONEDRIVEConfig`")
199        else:
200            match += 1
201        # validate data type: SHAREPOINTConfig
202        if not isinstance(v, SHAREPOINTConfig):
203            error_messages.append(f"Error! Input type `{type(v)}` is not `SHAREPOINTConfig`")
204        else:
205            match += 1
206        # validate data type: WEBCRAWLERConfig
207        if not isinstance(v, WEBCRAWLERConfig):
208            error_messages.append(f"Error! Input type `{type(v)}` is not `WEBCRAWLERConfig`")
209        else:
210            match += 1
211        # validate data type: GITHUBConfig
212        if not isinstance(v, GITHUBConfig):
213            error_messages.append(f"Error! Input type `{type(v)}` is not `GITHUBConfig`")
214        else:
215            match += 1
216        # validate data type: FIREFLIESConfig
217        if not isinstance(v, FIREFLIESConfig):
218            error_messages.append(f"Error! Input type `{type(v)}` is not `FIREFLIESConfig`")
219        else:
220            match += 1
221        # validate data type: DOCUSIGNConfig
222        if not isinstance(v, DOCUSIGNConfig):
223            error_messages.append(f"Error! Input type `{type(v)}` is not `DOCUSIGNConfig`")
224        else:
225            match += 1
226        # validate data type: GMAILConfig
227        if not isinstance(v, GMAILConfig):
228            error_messages.append(f"Error! Input type `{type(v)}` is not `GMAILConfig`")
229        else:
230            match += 1
231        if match > 1:
232            # more than 1 match
233            raise ValueError("Multiple matches found when setting `actual_instance` in SourceConnectorInputConfig with oneOf schemas: AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig. Details: " + ", ".join(error_messages))
234        elif match == 0:
235            # no match
236            raise ValueError("No match found when setting `actual_instance` in SourceConnectorInputConfig with oneOf schemas: AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig. Details: " + ", ".join(error_messages))
237        else:
238            return v
@classmethod
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
240    @classmethod
241    def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
242        return cls.from_json(json.dumps(obj))
@classmethod
def from_json(cls, json_str: str) -> Self:
244    @classmethod
245    def from_json(cls, json_str: str) -> Self:
246        """Returns the object represented by the json string"""
247        instance = cls.model_construct()
248        error_messages = []
249        match = 0
250
251        # deserialize data into AWSS3Config
252        try:
253            instance.actual_instance = AWSS3Config.from_json(json_str)
254            match += 1
255        except (ValidationError, ValueError) as e:
256            error_messages.append(str(e))
257        # deserialize data into AZUREBLOBConfig
258        try:
259            instance.actual_instance = AZUREBLOBConfig.from_json(json_str)
260            match += 1
261        except (ValidationError, ValueError) as e:
262            error_messages.append(str(e))
263        # deserialize data into CONFLUENCEConfig
264        try:
265            instance.actual_instance = CONFLUENCEConfig.from_json(json_str)
266            match += 1
267        except (ValidationError, ValueError) as e:
268            error_messages.append(str(e))
269        # deserialize data into DISCORDConfig
270        try:
271            instance.actual_instance = DISCORDConfig.from_json(json_str)
272            match += 1
273        except (ValidationError, ValueError) as e:
274            error_messages.append(str(e))
275        # deserialize data into DROPBOXConfig
276        try:
277            instance.actual_instance = DROPBOXConfig.from_json(json_str)
278            match += 1
279        except (ValidationError, ValueError) as e:
280            error_messages.append(str(e))
281        # deserialize data into GOOGLEDRIVEOAUTHConfig
282        try:
283            instance.actual_instance = GOOGLEDRIVEOAUTHConfig.from_json(json_str)
284            match += 1
285        except (ValidationError, ValueError) as e:
286            error_messages.append(str(e))
287        # deserialize data into GOOGLEDRIVEConfig
288        try:
289            instance.actual_instance = GOOGLEDRIVEConfig.from_json(json_str)
290            match += 1
291        except (ValidationError, ValueError) as e:
292            error_messages.append(str(e))
293        # deserialize data into GOOGLEDRIVEOAUTHMULTIConfig
294        try:
295            instance.actual_instance = GOOGLEDRIVEOAUTHMULTIConfig.from_json(json_str)
296            match += 1
297        except (ValidationError, ValueError) as e:
298            error_messages.append(str(e))
299        # deserialize data into GOOGLEDRIVEOAUTHMULTICUSTOMConfig
300        try:
301            instance.actual_instance = GOOGLEDRIVEOAUTHMULTICUSTOMConfig.from_json(json_str)
302            match += 1
303        except (ValidationError, ValueError) as e:
304            error_messages.append(str(e))
305        # deserialize data into FIRECRAWLConfig
306        try:
307            instance.actual_instance = FIRECRAWLConfig.from_json(json_str)
308            match += 1
309        except (ValidationError, ValueError) as e:
310            error_messages.append(str(e))
311        # deserialize data into GCSConfig
312        try:
313            instance.actual_instance = GCSConfig.from_json(json_str)
314            match += 1
315        except (ValidationError, ValueError) as e:
316            error_messages.append(str(e))
317        # deserialize data into ZOOMConfig
318        try:
319            instance.actual_instance = ZOOMConfig.from_json(json_str)
320            match += 1
321        except (ValidationError, ValueError) as e:
322            error_messages.append(str(e))
323        # deserialize data into ZOOMADMINConfig
324        try:
325            instance.actual_instance = ZOOMADMINConfig.from_json(json_str)
326            match += 1
327        except (ValidationError, ValueError) as e:
328            error_messages.append(str(e))
329        # deserialize data into INTERCOMConfig
330        try:
331            instance.actual_instance = INTERCOMConfig.from_json(json_str)
332            match += 1
333        except (ValidationError, ValueError) as e:
334            error_messages.append(str(e))
335        # deserialize data into NOTIONConfig
336        try:
337            instance.actual_instance = NOTIONConfig.from_json(json_str)
338            match += 1
339        except (ValidationError, ValueError) as e:
340            error_messages.append(str(e))
341        # deserialize data into ONEDRIVEConfig
342        try:
343            instance.actual_instance = ONEDRIVEConfig.from_json(json_str)
344            match += 1
345        except (ValidationError, ValueError) as e:
346            error_messages.append(str(e))
347        # deserialize data into SHAREPOINTConfig
348        try:
349            instance.actual_instance = SHAREPOINTConfig.from_json(json_str)
350            match += 1
351        except (ValidationError, ValueError) as e:
352            error_messages.append(str(e))
353        # deserialize data into WEBCRAWLERConfig
354        try:
355            instance.actual_instance = WEBCRAWLERConfig.from_json(json_str)
356            match += 1
357        except (ValidationError, ValueError) as e:
358            error_messages.append(str(e))
359        # deserialize data into GITHUBConfig
360        try:
361            instance.actual_instance = GITHUBConfig.from_json(json_str)
362            match += 1
363        except (ValidationError, ValueError) as e:
364            error_messages.append(str(e))
365        # deserialize data into FIREFLIESConfig
366        try:
367            instance.actual_instance = FIREFLIESConfig.from_json(json_str)
368            match += 1
369        except (ValidationError, ValueError) as e:
370            error_messages.append(str(e))
371        # deserialize data into DOCUSIGNConfig
372        try:
373            instance.actual_instance = DOCUSIGNConfig.from_json(json_str)
374            match += 1
375        except (ValidationError, ValueError) as e:
376            error_messages.append(str(e))
377        # deserialize data into GMAILConfig
378        try:
379            instance.actual_instance = GMAILConfig.from_json(json_str)
380            match += 1
381        except (ValidationError, ValueError) as e:
382            error_messages.append(str(e))
383
384        if match > 1:
385            # more than 1 match
386            raise ValueError("Multiple matches found when deserializing the JSON string into SourceConnectorInputConfig with oneOf schemas: AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig. Details: " + ", ".join(error_messages))
387        elif match == 0:
388            # no match
389            raise ValueError("No match found when deserializing the JSON string into SourceConnectorInputConfig with oneOf schemas: AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig. Details: " + ", ".join(error_messages))
390        else:
391            return instance

Returns the object represented by the json string

def to_json(self) -> str:
393    def to_json(self) -> str:
394        """Returns the JSON representation of the actual instance"""
395        if self.actual_instance is None:
396            return "null"
397
398        if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
399            return self.actual_instance.to_json()
400        else:
401            return json.dumps(self.actual_instance)

Returns the JSON representation of the actual instance

403    def to_dict(self) -> Optional[Union[Dict[str, Any], AWSS3Config, AZUREBLOBConfig, CONFLUENCEConfig, DISCORDConfig, DOCUSIGNConfig, DROPBOXConfig, FIRECRAWLConfig, FIREFLIESConfig, GCSConfig, GITHUBConfig, GMAILConfig, GOOGLEDRIVEConfig, GOOGLEDRIVEOAUTHConfig, GOOGLEDRIVEOAUTHMULTICUSTOMConfig, GOOGLEDRIVEOAUTHMULTIConfig, INTERCOMConfig, NOTIONConfig, ONEDRIVEConfig, SHAREPOINTConfig, WEBCRAWLERConfig, ZOOMADMINConfig, ZOOMConfig]]:
404        """Returns the dict representation of the actual instance"""
405        if self.actual_instance is None:
406            return None
407
408        if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
409            return self.actual_instance.to_dict()
410        else:
411            # primitive type
412            return self.actual_instance

Returns the dict representation of the actual instance

def to_str(self) -> str:
414    def to_str(self) -> str:
415        """Returns the string representation of the actual instance"""
416        return pprint.pformat(self.model_dump())

Returns the string representation of the actual instance