# coding: utf-8

"""
    Zadara VPSA Storage Array REST API

     # Overview  This document outlines the methods available for administrating your Zadara Storage VPSA&#8482;. The Zadara Storage Array REST API   supports form-encoded, JSON, and XML requests, and can return either JSON or XML responses.  ## Usage  The majority of the APIs available require authentication which requires an API token to use. You can retrieve this token through the   Users section of your VPSA, or through the API using the \"Return a user's access key\" API in the Users Section below.  ## Authentication Methods  The authentication token can be passed either through the access_key parameter inside of the body of the REST API request, or   through the X-Access-Key header.  ## Timeouts  By default, all operations that don't complete within five seconds will return a message informing you that the action may take some  time to complete. When using the API, this can cause some actions, such as large volume creation, to be undesirably asynchronous.  You can specify your own timeout with the timeout parameter, in seconds, and a timeout value of -1 specifies an infinite timeout.  ## Specific Fields For Product  Some of the fields/actions used in the API should be used only for a specific product. The following tags are used to mark which   product responds to the fields/actions  VPSA Flash Array  VPSA Storage Array - Hybrid VPSA  ## Questions  If you have any questions or need support involving the REST API, please contact for assistance.   # noqa: E501

    OpenAPI spec version: 23.03-sp1
    Contact: support@zadarastorage.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from Vpsa.configuration import Configuration


class CreateZcsContainer(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'name': 'str',
        'imagename': 'str',
        'use_public_ip': 'str',
        'start': 'str',
        'volumes': 'list[str]',
        'ports': 'list[str]',
        'args': 'list[str]',
        'envvars': 'list[str]',
        'entrypoint': 'str',
        'link': 'list[str]',
        'memorypoolname': 'str'
    }

    attribute_map = {
        'name': 'name',
        'imagename': 'imagename',
        'use_public_ip': 'use_public_ip',
        'start': 'start',
        'volumes': 'volumes',
        'ports': 'ports',
        'args': 'args',
        'envvars': 'envvars',
        'entrypoint': 'entrypoint',
        'link': 'link',
        'memorypoolname': 'memorypoolname'
    }

    def __init__(self, name=None, imagename=None, use_public_ip=None, start=None, volumes=None, ports=None, args=None, envvars=None, entrypoint=None, link=None, memorypoolname=None, _configuration=None):  # noqa: E501
        """CreateZcsContainer - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._name = None
        self._imagename = None
        self._use_public_ip = None
        self._start = None
        self._volumes = None
        self._ports = None
        self._args = None
        self._envvars = None
        self._entrypoint = None
        self._link = None
        self._memorypoolname = None
        self.discriminator = None

        self.name = name
        self.imagename = imagename
        self.use_public_ip = use_public_ip
        if start is not None:
            self.start = start
        if volumes is not None:
            self.volumes = volumes
        if ports is not None:
            self.ports = ports
        if args is not None:
            self.args = args
        if envvars is not None:
            self.envvars = envvars
        if entrypoint is not None:
            self.entrypoint = entrypoint
        if link is not None:
            self.link = link
        if memorypoolname is not None:
            self.memorypoolname = memorypoolname

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

        A text label to assign to the ZCS container.  For example 'web-01', 'database', etc.  May not contain a single quote (') character.  Required.  # noqa: E501

        :return: The name of this CreateZcsContainer.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this CreateZcsContainer.

        A text label to assign to the ZCS container.  For example 'web-01', 'database', etc.  May not contain a single quote (') character.  Required.  # noqa: E501

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

        self._name = name

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


        :return: The imagename of this CreateZcsContainer.  # noqa: E501
        :rtype: str
        """
        return self._imagename

    @imagename.setter
    def imagename(self, imagename):
        """Sets the imagename of this CreateZcsContainer.


        :param imagename: The imagename of this CreateZcsContainer.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and imagename is None:
            raise ValueError("Invalid value for `imagename`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                imagename is not None and not re.search(r'^img-[0-9a-f]{8}$', imagename)):  # noqa: E501
            raise ValueError(r"Invalid value for `imagename`, must be a follow pattern or equal to `/^img-[0-9a-f]{8}$/`")  # noqa: E501

        self._imagename = imagename

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

        If set to 'YES', the ZCS container will listen on VPSA's public IP address (only valid on VPSAs with a public IP address).  If set to 'NO', the container will listen on the same private IP address that is used for addressing the storage.  Optional (set to 'NO' by default).  # noqa: E501

        :return: The use_public_ip of this CreateZcsContainer.  # noqa: E501
        :rtype: str
        """
        return self._use_public_ip

    @use_public_ip.setter
    def use_public_ip(self, use_public_ip):
        """Sets the use_public_ip of this CreateZcsContainer.

        If set to 'YES', the ZCS container will listen on VPSA's public IP address (only valid on VPSAs with a public IP address).  If set to 'NO', the container will listen on the same private IP address that is used for addressing the storage.  Optional (set to 'NO' by default).  # noqa: E501

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

        self._use_public_ip = use_public_ip

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

        If set to 'YES', the ZCS container will be started immediately after creation.  If 'NO', it will not be started. Required.  # noqa: E501

        :return: The start of this CreateZcsContainer.  # noqa: E501
        :rtype: str
        """
        return self._start

    @start.setter
    def start(self, start):
        """Sets the start of this CreateZcsContainer.

        If set to 'YES', the ZCS container will be started immediately after creation.  If 'NO', it will not be started. Required.  # noqa: E501

        :param start: The start of this CreateZcsContainer.  # noqa: E501
        :type: str
        """

        self._start = start

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

        Volumes to attach to container (access_type:vol-name:path)  # noqa: E501

        :return: The volumes of this CreateZcsContainer.  # noqa: E501
        :rtype: list[str]
        """
        return self._volumes

    @volumes.setter
    def volumes(self, volumes):
        """Sets the volumes of this CreateZcsContainer.

        Volumes to attach to container (access_type:vol-name:path)  # noqa: E501

        :param volumes: The volumes of this CreateZcsContainer.  # noqa: E501
        :type: list[str]
        """

        self._volumes = volumes

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

        Exposed ports  # noqa: E501

        :return: The ports of this CreateZcsContainer.  # noqa: E501
        :rtype: list[str]
        """
        return self._ports

    @ports.setter
    def ports(self, ports):
        """Sets the ports of this CreateZcsContainer.

        Exposed ports  # noqa: E501

        :param ports: The ports of this CreateZcsContainer.  # noqa: E501
        :type: list[str]
        """

        self._ports = ports

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

        A Python list of Python dictionaries that contain arguments to pass to the ZCS container entry point program or script as defined by \"entrypoint\".  If passed as a string, a conversion to a Python list via json.loads will be attempted.  Every list item should be a dictionary that contains one key, \"arg\", whose value is the argument to pass to the ZCS container.  For example, if the entrypoint is \"/usr/sbin/sshd\" these arguments will be passed to sshd.  e.g. ' [{\"arg\":\"-p 2222\"},{\"arg\":\"-f /etc/ssh/sshd_config\"}]'  # noqa: E501

        :return: The args of this CreateZcsContainer.  # noqa: E501
        :rtype: list[str]
        """
        return self._args

    @args.setter
    def args(self, args):
        """Sets the args of this CreateZcsContainer.

        A Python list of Python dictionaries that contain arguments to pass to the ZCS container entry point program or script as defined by \"entrypoint\".  If passed as a string, a conversion to a Python list via json.loads will be attempted.  Every list item should be a dictionary that contains one key, \"arg\", whose value is the argument to pass to the ZCS container.  For example, if the entrypoint is \"/usr/sbin/sshd\" these arguments will be passed to sshd.  e.g. ' [{\"arg\":\"-p 2222\"},{\"arg\":\"-f /etc/ssh/sshd_config\"}]'  # noqa: E501

        :param args: The args of this CreateZcsContainer.  # noqa: E501
        :type: list[str]
        """

        self._args = args

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

        Environment variables  # noqa: E501

        :return: The envvars of this CreateZcsContainer.  # noqa: E501
        :rtype: list[str]
        """
        return self._envvars

    @envvars.setter
    def envvars(self, envvars):
        """Sets the envvars of this CreateZcsContainer.

        Environment variables  # noqa: E501

        :param envvars: The envvars of this CreateZcsContainer.  # noqa: E501
        :type: list[str]
        """

        self._envvars = envvars

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

        The full path to the program or script inside the ZCS container to run when the container starts.  For exmple \"/usr/local/bin/entry.sh\"  # noqa: E501

        :return: The entrypoint of this CreateZcsContainer.  # noqa: E501
        :rtype: str
        """
        return self._entrypoint

    @entrypoint.setter
    def entrypoint(self, entrypoint):
        """Sets the entrypoint of this CreateZcsContainer.

        The full path to the program or script inside the ZCS container to run when the container starts.  For exmple \"/usr/local/bin/entry.sh\"  # noqa: E501

        :param entrypoint: The entrypoint of this CreateZcsContainer.  # noqa: E501
        :type: str
        """

        self._entrypoint = entrypoint

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

        A Python list that contain container identifiers that will be linked to the new container An example would be '[\"container-00000001\" , \"container-00000002\"]'  # noqa: E501

        :return: The link of this CreateZcsContainer.  # noqa: E501
        :rtype: list[str]
        """
        return self._link

    @link.setter
    def link(self, link):
        """Sets the link of this CreateZcsContainer.

        A Python list that contain container identifiers that will be linked to the new container An example would be '[\"container-00000001\" , \"container-00000002\"]'  # noqa: E501

        :param link: The link of this CreateZcsContainer.  # noqa: E501
        :type: list[str]
        """

        self._link = link

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

        Container memory pool  # noqa: E501

        :return: The memorypoolname of this CreateZcsContainer.  # noqa: E501
        :rtype: str
        """
        return self._memorypoolname

    @memorypoolname.setter
    def memorypoolname(self, memorypoolname):
        """Sets the memorypoolname of this CreateZcsContainer.

        Container memory pool  # noqa: E501

        :param memorypoolname: The memorypoolname of this CreateZcsContainer.  # noqa: E501
        :type: str
        """

        self._memorypoolname = memorypoolname

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(CreateZcsContainer, dict):
            for key, value in self.items():
                result[key] = 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, CreateZcsContainer):
            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, CreateZcsContainer):
            return True

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