# coding: utf-8

"""
    Octopus Server API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from octopus_deploy_swagger_client.models.variable_prompt_options import VariablePromptOptions  # noqa: F401,E501
from octopus_deploy_swagger_client.models.variable_resource_scope import VariableResourceScope  # noqa: F401,E501


class VariableResource(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 = {
        'id': 'str',
        'name': 'str',
        'value': 'str',
        'description': 'str',
        'scope': 'VariableResourceScope',
        'is_editable': 'bool',
        'prompt': 'VariablePromptOptions',
        'type': 'str',
        'is_sensitive': 'bool'
    }

    attribute_map = {
        'id': 'Id',
        'name': 'Name',
        'value': 'Value',
        'description': 'Description',
        'scope': 'Scope',
        'is_editable': 'IsEditable',
        'prompt': 'Prompt',
        'type': 'Type',
        'is_sensitive': 'IsSensitive'
    }

    def __init__(self, id=None, name=None, value=None, description=None, scope=None, is_editable=None, prompt=None, type=None, is_sensitive=None):  # noqa: E501
        """VariableResource - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._name = None
        self._value = None
        self._description = None
        self._scope = None
        self._is_editable = None
        self._prompt = None
        self._type = None
        self._is_sensitive = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if value is not None:
            self.value = value
        if description is not None:
            self.description = description
        if scope is not None:
            self.scope = scope
        if is_editable is not None:
            self.is_editable = is_editable
        if prompt is not None:
            self.prompt = prompt
        if type is not None:
            self.type = type
        if is_sensitive is not None:
            self.is_sensitive = is_sensitive

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


        :return: The id of this VariableResource.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this VariableResource.


        :param id: The id of this VariableResource.  # noqa: E501
        :type: str
        """

        self._id = id

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


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

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


        :param name: The name of this VariableResource.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The value of this VariableResource.  # noqa: E501
        :rtype: str
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this VariableResource.


        :param value: The value of this VariableResource.  # noqa: E501
        :type: str
        """

        self._value = value

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


        :return: The description of this VariableResource.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this VariableResource.


        :param description: The description of this VariableResource.  # noqa: E501
        :type: str
        """

        self._description = description

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


        :return: The scope of this VariableResource.  # noqa: E501
        :rtype: VariableResourceScope
        """
        return self._scope

    @scope.setter
    def scope(self, scope):
        """Sets the scope of this VariableResource.


        :param scope: The scope of this VariableResource.  # noqa: E501
        :type: VariableResourceScope
        """

        self._scope = scope

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


        :return: The is_editable of this VariableResource.  # noqa: E501
        :rtype: bool
        """
        return self._is_editable

    @is_editable.setter
    def is_editable(self, is_editable):
        """Sets the is_editable of this VariableResource.


        :param is_editable: The is_editable of this VariableResource.  # noqa: E501
        :type: bool
        """

        self._is_editable = is_editable

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


        :return: The prompt of this VariableResource.  # noqa: E501
        :rtype: VariablePromptOptions
        """
        return self._prompt

    @prompt.setter
    def prompt(self, prompt):
        """Sets the prompt of this VariableResource.


        :param prompt: The prompt of this VariableResource.  # noqa: E501
        :type: VariablePromptOptions
        """

        self._prompt = prompt

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


        :return: The type of this VariableResource.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this VariableResource.


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

        self._type = type

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


        :return: The is_sensitive of this VariableResource.  # noqa: E501
        :rtype: bool
        """
        return self._is_sensitive

    @is_sensitive.setter
    def is_sensitive(self, is_sensitive):
        """Sets the is_sensitive of this VariableResource.


        :param is_sensitive: The is_sensitive of this VariableResource.  # noqa: E501
        :type: bool
        """

        self._is_sensitive = is_sensitive

    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(VariableResource, 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, VariableResource):
            return False

        return self.__dict__ == other.__dict__

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