Skip to content

System Config Template Storage Option Dto

immichpy.client.generated.models.system_config_template_storage_option_dto.SystemConfigTemplateStorageOptionDto pydantic-model

Bases: BaseModel

SystemConfigTemplateStorageOptionDto

Show JSON schema:
{
  "description": "SystemConfigTemplateStorageOptionDto",
  "properties": {
    "dayOptions": {
      "description": "Available day format options for storage template",
      "items": {
        "type": "string"
      },
      "title": "Dayoptions",
      "type": "array"
    },
    "hourOptions": {
      "description": "Available hour format options for storage template",
      "items": {
        "type": "string"
      },
      "title": "Houroptions",
      "type": "array"
    },
    "minuteOptions": {
      "description": "Available minute format options for storage template",
      "items": {
        "type": "string"
      },
      "title": "Minuteoptions",
      "type": "array"
    },
    "monthOptions": {
      "description": "Available month format options for storage template",
      "items": {
        "type": "string"
      },
      "title": "Monthoptions",
      "type": "array"
    },
    "presetOptions": {
      "description": "Available preset template options",
      "items": {
        "type": "string"
      },
      "title": "Presetoptions",
      "type": "array"
    },
    "secondOptions": {
      "description": "Available second format options for storage template",
      "items": {
        "type": "string"
      },
      "title": "Secondoptions",
      "type": "array"
    },
    "weekOptions": {
      "description": "Available week format options for storage template",
      "items": {
        "type": "string"
      },
      "title": "Weekoptions",
      "type": "array"
    },
    "yearOptions": {
      "description": "Available year format options for storage template",
      "items": {
        "type": "string"
      },
      "title": "Yearoptions",
      "type": "array"
    }
  },
  "required": [
    "dayOptions",
    "hourOptions",
    "minuteOptions",
    "monthOptions",
    "presetOptions",
    "secondOptions",
    "weekOptions",
    "yearOptions"
  ],
  "title": "SystemConfigTemplateStorageOptionDto",
  "type": "object"
}

Config:

  • populate_by_name: True
  • validate_assignment: True
  • protected_namespaces: ()

Fields:

day_options pydantic-field

day_options: List[StrictStr]

Available day format options for storage template

hour_options pydantic-field

hour_options: List[StrictStr]

Available hour format options for storage template

minute_options pydantic-field

minute_options: List[StrictStr]

Available minute format options for storage template

month_options pydantic-field

month_options: List[StrictStr]

Available month format options for storage template

preset_options pydantic-field

preset_options: List[StrictStr]

Available preset template options

second_options pydantic-field

second_options: List[StrictStr]

Available second format options for storage template

week_options pydantic-field

week_options: List[StrictStr]

Available week format options for storage template

year_options pydantic-field

year_options: List[StrictStr]

Available year format options for storage template

from_dict classmethod

from_dict(obj: Optional[Dict[str, Any]]) -> Optional[Self]

Create an instance of SystemConfigTemplateStorageOptionDto from a dict

Source code in immichpy/client/generated/models/system_config_template_storage_option_dto.py
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
    """Create an instance of SystemConfigTemplateStorageOptionDto from a dict"""
    if obj is None:
        return None

    if not isinstance(obj, dict):
        return cls.model_validate(obj)

    _obj = cls.model_validate(
        {
            "dayOptions": obj.get("dayOptions"),
            "hourOptions": obj.get("hourOptions"),
            "minuteOptions": obj.get("minuteOptions"),
            "monthOptions": obj.get("monthOptions"),
            "presetOptions": obj.get("presetOptions"),
            "secondOptions": obj.get("secondOptions"),
            "weekOptions": obj.get("weekOptions"),
            "yearOptions": obj.get("yearOptions"),
        }
    )
    return _obj

from_json classmethod

from_json(json_str: str) -> Optional[Self]

Create an instance of SystemConfigTemplateStorageOptionDto from a JSON string

Source code in immichpy/client/generated/models/system_config_template_storage_option_dto.py
87
88
89
90
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
    """Create an instance of SystemConfigTemplateStorageOptionDto from a JSON string"""
    return cls.from_dict(json.loads(json_str))

to_dict

to_dict() -> Dict[str, Any]

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.
Source code in immichpy/client/generated/models/system_config_template_storage_option_dto.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
def to_dict(self) -> Dict[str, Any]:
    """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.
    """
    excluded_fields: Set[str] = set([])

    _dict = self.model_dump(
        by_alias=True,
        exclude=excluded_fields,
        exclude_none=True,
    )
    return _dict

to_json

to_json() -> str

Returns the JSON representation of the model using alias

Source code in immichpy/client/generated/models/system_config_template_storage_option_dto.py
82
83
84
85
def to_json(self) -> str:
    """Returns the JSON representation of the model using alias"""
    # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
    return json.dumps(self.to_dict())

to_str

to_str() -> str

Returns the string representation of the model using alias

Source code in immichpy/client/generated/models/system_config_template_storage_option_dto.py
78
79
80
def to_str(self) -> str:
    """Returns the string representation of the model using alias"""
    return pprint.pformat(self.model_dump(by_alias=True))