vectorize_client.models.remove_user_from_source_connector_request
Vectorize API (Beta)
API for Vectorize services
The version of the OpenAPI document: 0.0.1 Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
1# coding: utf-8 2 3""" 4 Vectorize API (Beta) 5 6 API for Vectorize services 7 8 The version of the OpenAPI document: 0.0.1 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 pprint 17import re # noqa: F401 18import json 19 20from pydantic import BaseModel, ConfigDict, Field, StrictStr 21from typing import Any, ClassVar, Dict, List 22from typing import Optional, Set 23from typing_extensions import Self 24 25class RemoveUserFromSourceConnectorRequest(BaseModel): 26 """ 27 RemoveUserFromSourceConnectorRequest 28 """ # noqa: E501 29 user_id: StrictStr = Field(alias="userId") 30 __properties: ClassVar[List[str]] = ["userId"] 31 32 model_config = ConfigDict( 33 populate_by_name=True, 34 validate_assignment=True, 35 protected_namespaces=(), 36 ) 37 38 39 def to_str(self) -> str: 40 """Returns the string representation of the model using alias""" 41 return pprint.pformat(self.model_dump(by_alias=True)) 42 43 def to_json(self) -> str: 44 """Returns the JSON representation of the model using alias""" 45 # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 46 return json.dumps(self.to_dict()) 47 48 @classmethod 49 def from_json(cls, json_str: str) -> Optional[Self]: 50 """Create an instance of RemoveUserFromSourceConnectorRequest from a JSON string""" 51 return cls.from_dict(json.loads(json_str)) 52 53 def to_dict(self) -> Dict[str, Any]: 54 """Return the dictionary representation of the model using alias. 55 56 This has the following differences from calling pydantic's 57 `self.model_dump(by_alias=True)`: 58 59 * `None` is only added to the output dict for nullable fields that 60 were set at model initialization. Other fields with value `None` 61 are ignored. 62 """ 63 excluded_fields: Set[str] = set([ 64 ]) 65 66 _dict = self.model_dump( 67 by_alias=True, 68 exclude=excluded_fields, 69 exclude_none=True, 70 ) 71 return _dict 72 73 @classmethod 74 def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 75 """Create an instance of RemoveUserFromSourceConnectorRequest from a dict""" 76 if obj is None: 77 return None 78 79 if not isinstance(obj, dict): 80 return cls.model_validate(obj) 81 82 _obj = cls.model_validate({ 83 "userId": obj.get("userId") 84 }) 85 return _obj
class
RemoveUserFromSourceConnectorRequest(pydantic.main.BaseModel):
26class RemoveUserFromSourceConnectorRequest(BaseModel): 27 """ 28 RemoveUserFromSourceConnectorRequest 29 """ # noqa: E501 30 user_id: StrictStr = Field(alias="userId") 31 __properties: ClassVar[List[str]] = ["userId"] 32 33 model_config = ConfigDict( 34 populate_by_name=True, 35 validate_assignment=True, 36 protected_namespaces=(), 37 ) 38 39 40 def to_str(self) -> str: 41 """Returns the string representation of the model using alias""" 42 return pprint.pformat(self.model_dump(by_alias=True)) 43 44 def to_json(self) -> str: 45 """Returns the JSON representation of the model using alias""" 46 # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 return json.dumps(self.to_dict()) 48 49 @classmethod 50 def from_json(cls, json_str: str) -> Optional[Self]: 51 """Create an instance of RemoveUserFromSourceConnectorRequest from a JSON string""" 52 return cls.from_dict(json.loads(json_str)) 53 54 def to_dict(self) -> Dict[str, Any]: 55 """Return the dictionary representation of the model using alias. 56 57 This has the following differences from calling pydantic's 58 `self.model_dump(by_alias=True)`: 59 60 * `None` is only added to the output dict for nullable fields that 61 were set at model initialization. Other fields with value `None` 62 are ignored. 63 """ 64 excluded_fields: Set[str] = set([ 65 ]) 66 67 _dict = self.model_dump( 68 by_alias=True, 69 exclude=excluded_fields, 70 exclude_none=True, 71 ) 72 return _dict 73 74 @classmethod 75 def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 76 """Create an instance of RemoveUserFromSourceConnectorRequest from a dict""" 77 if obj is None: 78 return None 79 80 if not isinstance(obj, dict): 81 return cls.model_validate(obj) 82 83 _obj = cls.model_validate({ 84 "userId": obj.get("userId") 85 }) 86 return _obj
RemoveUserFromSourceConnectorRequest
model_config =
{'populate_by_name': True, 'validate_assignment': True, 'protected_namespaces': ()}
Configuration for the model, should be a dictionary conforming to [ConfigDict
][pydantic.config.ConfigDict].
def
to_str(self) -> str:
40 def to_str(self) -> str: 41 """Returns the string representation of the model using alias""" 42 return pprint.pformat(self.model_dump(by_alias=True))
Returns the string representation of the model using alias
def
to_json(self) -> str:
44 def to_json(self) -> str: 45 """Returns the JSON representation of the model using alias""" 46 # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead 47 return json.dumps(self.to_dict())
Returns the JSON representation of the model using alias
@classmethod
def
from_json(cls, json_str: str) -> Optional[Self]:
49 @classmethod 50 def from_json(cls, json_str: str) -> Optional[Self]: 51 """Create an instance of RemoveUserFromSourceConnectorRequest from a JSON string""" 52 return cls.from_dict(json.loads(json_str))
Create an instance of RemoveUserFromSourceConnectorRequest from a JSON string
def
to_dict(self) -> Dict[str, Any]:
54 def to_dict(self) -> Dict[str, Any]: 55 """Return the dictionary representation of the model using alias. 56 57 This has the following differences from calling pydantic's 58 `self.model_dump(by_alias=True)`: 59 60 * `None` is only added to the output dict for nullable fields that 61 were set at model initialization. Other fields with value `None` 62 are ignored. 63 """ 64 excluded_fields: Set[str] = set([ 65 ]) 66 67 _dict = self.model_dump( 68 by_alias=True, 69 exclude=excluded_fields, 70 exclude_none=True, 71 ) 72 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 valueNone
are ignored.
@classmethod
def
from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
74 @classmethod 75 def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: 76 """Create an instance of RemoveUserFromSourceConnectorRequest from a dict""" 77 if obj is None: 78 return None 79 80 if not isinstance(obj, dict): 81 return cls.model_validate(obj) 82 83 _obj = cls.model_validate({ 84 "userId": obj.get("userId") 85 }) 86 return _obj
Create an instance of RemoveUserFromSourceConnectorRequest from a dict