Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions phrasetms_client/models/uid_reference.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# coding: utf-8

"""
Phrase TMS API
Phrase TMS API

Welcome to Phrase's TMS API documentation. Please visit our [help center](https://support.phrase.com/hc/en-us/sections/5709662083612) for more information about the APIs. If you have any questions, please contact [Support](https://support.phrase.com/hc/requests/new). Please, include the `User-Agent` header with the name of your application or project. It might be a good idea to include some sort of contact information as well, so that we can get in touch if necessary. Examples of excellent `User-Agent` headers: > User-Agent: Example mobile app (example@phrase.com) <br/> User-Agent: ACME Inc Java 1.8 Client (http://acmeinc.com/contact) # noqa: E501
Welcome to Phrase's TMS API documentation. Please visit our [help center](https://support.phrase.com/hc/en-us/sections/5709662083612) for more information about the APIs. If you have any questions, please contact [Support](https://support.phrase.com/hc/requests/new). Please, include the `User-Agent` header with the name of your application or project. It might be a good idea to include some sort of contact information as well, so that we can get in touch if necessary. Examples of excellent `User-Agent` headers: > User-Agent: Example mobile app (example@phrase.com) <br/> User-Agent: ACME Inc Java 1.8 Client (http://acmeinc.com/contact) # noqa: E501

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

Do not edit the class manually.
Do not edit the class manually.
"""


Expand All @@ -18,18 +18,21 @@
import json


from typing import Optional
from pydantic import BaseModel, StrictStr

from pydantic import BaseModel, Field, StrictStr

class UidReference(BaseModel):
"""
UidReference
"""
uid: StrictStr = Field(...)

uid: Optional[StrictStr] = None
__properties = ["uid"]

class Config:
"""Pydantic configuration"""

allow_population_by_field_name = True
validate_assignment = True

Expand All @@ -48,10 +51,7 @@ def from_json(cls, json_str: str) -> UidReference:

def to_dict(self):
"""Returns the dictionary representation of the model using alias"""
_dict = self.dict(by_alias=True,
exclude={
},
exclude_none=True)
_dict = self.dict(by_alias=True, exclude={}, exclude_none=True)
return _dict

@classmethod
Expand All @@ -63,8 +63,7 @@ def from_dict(cls, obj: dict) -> UidReference:
if not isinstance(obj, dict):
return UidReference.parse_obj(obj)

_obj = UidReference.parse_obj({
"uid": obj.get("uid")
})
_obj = UidReference.parse_obj(
{"uid": obj.get("uid") if obj.get("uid") is not None else None}
)
return _obj