# coding: utf-8

"""
    Anyscale API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from anyscale_client.configuration import Configuration


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

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'application_template_id': 'str',
        'config_json': 'CreateAppConfigConfigurationSchema',
        'containerfile': 'str',
        'docker_image_name': 'str',
        'registry_login_secret': 'str'
    }

    attribute_map = {
        'application_template_id': 'application_template_id',
        'config_json': 'config_json',
        'containerfile': 'containerfile',
        'docker_image_name': 'docker_image_name',
        'registry_login_secret': 'registry_login_secret'
    }

    def __init__(self, application_template_id=None, config_json=None, containerfile=None, docker_image_name=None, registry_login_secret=None, local_vars_configuration=None):  # noqa: E501
        """CreateBuild - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._application_template_id = None
        self._config_json = None
        self._containerfile = None
        self._docker_image_name = None
        self._registry_login_secret = None
        self.discriminator = None

        self.application_template_id = application_template_id
        if config_json is not None:
            self.config_json = config_json
        if containerfile is not None:
            self.containerfile = containerfile
        if docker_image_name is not None:
            self.docker_image_name = docker_image_name
        if registry_login_secret is not None:
            self.registry_login_secret = registry_login_secret

    @property
    def application_template_id(self):
        """Gets the application_template_id of this CreateBuild.  # noqa: E501

        ID of the App Config this Build belongs to.  # noqa: E501

        :return: The application_template_id of this CreateBuild.  # noqa: E501
        :rtype: str
        """
        return self._application_template_id

    @application_template_id.setter
    def application_template_id(self, application_template_id):
        """Sets the application_template_id of this CreateBuild.

        ID of the App Config this Build belongs to.  # noqa: E501

        :param application_template_id: The application_template_id of this CreateBuild.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and application_template_id is None:  # noqa: E501
            raise ValueError("Invalid value for `application_template_id`, must not be `None`")  # noqa: E501

        self._application_template_id = application_template_id

    @property
    def config_json(self):
        """Gets the config_json of this CreateBuild.  # noqa: E501

        Config JSON to use to create a new Build.  # noqa: E501

        :return: The config_json of this CreateBuild.  # noqa: E501
        :rtype: CreateAppConfigConfigurationSchema
        """
        return self._config_json

    @config_json.setter
    def config_json(self, config_json):
        """Sets the config_json of this CreateBuild.

        Config JSON to use to create a new Build.  # noqa: E501

        :param config_json: The config_json of this CreateBuild.  # noqa: E501
        :type: CreateAppConfigConfigurationSchema
        """

        self._config_json = config_json

    @property
    def containerfile(self):
        """Gets the containerfile of this CreateBuild.  # noqa: E501

        The containerfile used to build the image.  # noqa: E501

        :return: The containerfile of this CreateBuild.  # noqa: E501
        :rtype: str
        """
        return self._containerfile

    @containerfile.setter
    def containerfile(self, containerfile):
        """Sets the containerfile of this CreateBuild.

        The containerfile used to build the image.  # noqa: E501

        :param containerfile: The containerfile of this CreateBuild.  # noqa: E501
        :type: str
        """

        self._containerfile = containerfile

    @property
    def docker_image_name(self):
        """Gets the docker_image_name of this CreateBuild.  # noqa: E501

        The name of the docker image for this build.  # noqa: E501

        :return: The docker_image_name of this CreateBuild.  # noqa: E501
        :rtype: str
        """
        return self._docker_image_name

    @docker_image_name.setter
    def docker_image_name(self, docker_image_name):
        """Sets the docker_image_name of this CreateBuild.

        The name of the docker image for this build.  # noqa: E501

        :param docker_image_name: The docker_image_name of this CreateBuild.  # noqa: E501
        :type: str
        """

        self._docker_image_name = docker_image_name

    @property
    def registry_login_secret(self):
        """Gets the registry_login_secret of this CreateBuild.  # noqa: E501

        The name or identifier of a secret containing credentials to authenticate to the docker registry hosting the image.  # noqa: E501

        :return: The registry_login_secret of this CreateBuild.  # noqa: E501
        :rtype: str
        """
        return self._registry_login_secret

    @registry_login_secret.setter
    def registry_login_secret(self, registry_login_secret):
        """Sets the registry_login_secret of this CreateBuild.

        The name or identifier of a secret containing credentials to authenticate to the docker registry hosting the image.  # noqa: E501

        :param registry_login_secret: The registry_login_secret of this CreateBuild.  # noqa: E501
        :type: str
        """

        self._registry_login_secret = registry_login_secret

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, CreateBuild):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, CreateBuild):
            return True

        return self.to_dict() != other.to_dict()
