from datetime import date, datetime  # noqa: F401
from typing import Dict, List  # noqa: F401

from timestep.api.openai.v1 import util
from timestep.api.openai.v1.models.base_model import Model


class BatchRequestInput(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, custom_id=None, method=None, url=None):  # noqa: E501
        """BatchRequestInput - a model defined in OpenAPI

        :param custom_id: The custom_id of this BatchRequestInput.  # noqa: E501
        :type custom_id: str
        :param method: The method of this BatchRequestInput.  # noqa: E501
        :type method: str
        :param url: The url of this BatchRequestInput.  # noqa: E501
        :type url: str
        """
        self.openapi_types = {
            'custom_id': str,
            'method': str,
            'url': str
        }

        self.attribute_map = {
            'custom_id': 'custom_id',
            'method': 'method',
            'url': 'url'
        }

        self._custom_id = custom_id
        self._method = method
        self._url = url

    @classmethod
    def from_dict(cls, dikt) -> 'BatchRequestInput':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The BatchRequestInput of this BatchRequestInput.  # noqa: E501
        :rtype: BatchRequestInput
        """
        return util.deserialize_model(dikt, cls)

    @property
    def custom_id(self) -> str:
        """Gets the custom_id of this BatchRequestInput.

        A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.  # noqa: E501

        :return: The custom_id of this BatchRequestInput.
        :rtype: str
        """
        return self._custom_id

    @custom_id.setter
    def custom_id(self, custom_id: str):
        """Sets the custom_id of this BatchRequestInput.

        A developer-provided per-request id that will be used to match outputs to inputs. Must be unique for each request in a batch.  # noqa: E501

        :param custom_id: The custom_id of this BatchRequestInput.
        :type custom_id: str
        """

        self._custom_id = custom_id

    @property
    def method(self) -> str:
        """Gets the method of this BatchRequestInput.

        The HTTP method to be used for the request. Currently only `POST` is supported.  # noqa: E501

        :return: The method of this BatchRequestInput.
        :rtype: str
        """
        return self._method

    @method.setter
    def method(self, method: str):
        """Sets the method of this BatchRequestInput.

        The HTTP method to be used for the request. Currently only `POST` is supported.  # noqa: E501

        :param method: The method of this BatchRequestInput.
        :type method: str
        """
        allowed_values = ["POST"]  # noqa: E501
        if method not in allowed_values:
            raise ValueError(
                "Invalid value for `method` ({0}), must be one of {1}"
                .format(method, allowed_values)
            )

        self._method = method

    @property
    def url(self) -> str:
        """Gets the url of this BatchRequestInput.

        The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.  # noqa: E501

        :return: The url of this BatchRequestInput.
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url: str):
        """Sets the url of this BatchRequestInput.

        The OpenAI API relative URL to be used for the request. Currently `/v1/chat/completions`, `/v1/embeddings`, and `/v1/completions` are supported.  # noqa: E501

        :param url: The url of this BatchRequestInput.
        :type url: str
        """

        self._url = url
