# coding: utf-8
"""
    Snowflake Stage API

    The Snowflake Stage API is a REST API that you can use to access, update, and perform certain actions on stage resources in a Snowflake database.  # noqa: E501

    The version of the OpenAPI document: 0.0.1
    Contact: support@snowflake.com
    Generated by: https://openapi-generator.tech

    Do not edit this file manually.
"""

from __future__ import annotations
import pprint
import re  # noqa: F401
import json

from typing import Union

from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr

from typing import Any, ClassVar, Dict, List, Optional


class StageDirectoryTable(BaseModel):

    enable: Optional[StrictBool] = False

    refresh_on_create: Optional[StrictBool] = True

    auto_refresh: Optional[StrictBool] = False

    notification_integration: Optional[StrictStr] = None

    __properties = [
        "enable", "refresh_on_create", "auto_refresh",
        "notification_integration"
    ]

    class Config:
        populate_by_name = True
        validate_assignment = True

    def to_str(self) -> str:
        """Returns the string representation of the model using alias"""
        return pprint.pformat(self.dict(by_alias=True))

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        return json.dumps(self.to_dict())

    @classmethod
    def from_json(cls, json_str: str) -> StageDirectoryTable:
        """Create an instance of StageDirectoryTable from a JSON string"""
        return cls.from_dict(json.loads(json_str))

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

        return _dict

    @classmethod
    def from_dict(cls, obj: dict) -> StageDirectoryTable:
        """Create an instance of StageDirectoryTable from a dict"""

        if obj is None:
            return None

        if type(obj) is not dict:
            return StageDirectoryTable.parse_obj(obj)

        _obj = StageDirectoryTable.parse_obj({
            "enable":
            obj.get("enable") if obj.get("enable") is not None else False,
            "refresh_on_create":
            obj.get("refresh_on_create")
            if obj.get("refresh_on_create") is not None else True,
            "auto_refresh":
            obj.get("auto_refresh")
            if obj.get("auto_refresh") is not None else False,
            "notification_integration":
            obj.get("notification_integration"),
        })

        return _obj


from typing import Optional, List, Dict


class StageDirectoryTableModel():

    def __init__(
        self,  # optional properties
        enable: Optional[bool] = False,
        refresh_on_create: Optional[bool] = True,
        auto_refresh: Optional[bool] = False,
        notification_integration: Optional[str] = None,
    ):

        self.enable = enable
        self.refresh_on_create = refresh_on_create
        self.auto_refresh = auto_refresh
        self.notification_integration = notification_integration

    __properties = [
        "enable", "refresh_on_create", "auto_refresh",
        "notification_integration"
    ]

    def _to_model(self):
        return StageDirectoryTable(
            enable=self.enable,
            refresh_on_create=self.refresh_on_create,
            auto_refresh=self.auto_refresh,
            notification_integration=self.notification_integration,
        )

    @classmethod
    def _from_model(cls, model) -> StageDirectoryTableModel:
        return StageDirectoryTableModel(
            enable=model.enable,
            refresh_on_create=model.refresh_on_create,
            auto_refresh=model.auto_refresh,
            notification_integration=model.notification_integration,
        )

    def to_dict(self):
        """Returns the dictionary representation of the model using alias"""
        return self._to_model().to_dict()

    @classmethod
    def from_dict(cls, obj: dict) -> StageDirectoryTableModel:
        """Create an instance of StageDirectoryTable from a dict"""
        return cls._from_model(StageDirectoryTable.from_dict(obj))


StageDirectoryTable._model_class = StageDirectoryTableModel
