# 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.package_reference import PackageReference  # noqa: F401,E501
from octopus_deploy_swagger_client.models.property_value_resource import PropertyValueResource  # noqa: F401,E501


class DeploymentActionResource(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',
        'action_type': 'str',
        'is_disabled': 'bool',
        'can_be_used_for_project_versioning': 'bool',
        'is_required': 'bool',
        'worker_pool_id': 'str',
        'environments': 'list[str]',
        'excluded_environments': 'list[str]',
        'channels': 'list[str]',
        'tenant_tags': 'list[str]',
        'packages': 'list[PackageReference]',
        'properties': 'dict(str, PropertyValueResource)',
        'last_modified_on': 'datetime',
        'last_modified_by': 'str',
        'links': 'dict(str, str)'
    }

    attribute_map = {
        'id': 'Id',
        'name': 'Name',
        'action_type': 'ActionType',
        'is_disabled': 'IsDisabled',
        'can_be_used_for_project_versioning': 'CanBeUsedForProjectVersioning',
        'is_required': 'IsRequired',
        'worker_pool_id': 'WorkerPoolId',
        'environments': 'Environments',
        'excluded_environments': 'ExcludedEnvironments',
        'channels': 'Channels',
        'tenant_tags': 'TenantTags',
        'packages': 'Packages',
        'properties': 'Properties',
        'last_modified_on': 'LastModifiedOn',
        'last_modified_by': 'LastModifiedBy',
        'links': 'Links'
    }

    def __init__(self, id=None, name=None, action_type=None, is_disabled=None, can_be_used_for_project_versioning=None, is_required=None, worker_pool_id=None, environments=None, excluded_environments=None, channels=None, tenant_tags=None, packages=None, properties=None, last_modified_on=None, last_modified_by=None, links=None):  # noqa: E501
        """DeploymentActionResource - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._name = None
        self._action_type = None
        self._is_disabled = None
        self._can_be_used_for_project_versioning = None
        self._is_required = None
        self._worker_pool_id = None
        self._environments = None
        self._excluded_environments = None
        self._channels = None
        self._tenant_tags = None
        self._packages = None
        self._properties = None
        self._last_modified_on = None
        self._last_modified_by = None
        self._links = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if action_type is not None:
            self.action_type = action_type
        if is_disabled is not None:
            self.is_disabled = is_disabled
        if can_be_used_for_project_versioning is not None:
            self.can_be_used_for_project_versioning = can_be_used_for_project_versioning
        if is_required is not None:
            self.is_required = is_required
        if worker_pool_id is not None:
            self.worker_pool_id = worker_pool_id
        if environments is not None:
            self.environments = environments
        if excluded_environments is not None:
            self.excluded_environments = excluded_environments
        if channels is not None:
            self.channels = channels
        if tenant_tags is not None:
            self.tenant_tags = tenant_tags
        if packages is not None:
            self.packages = packages
        if properties is not None:
            self.properties = properties
        if last_modified_on is not None:
            self.last_modified_on = last_modified_on
        if last_modified_by is not None:
            self.last_modified_by = last_modified_by
        if links is not None:
            self.links = links

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


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

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


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

        self._id = id

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


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

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


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

        self._name = name

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


        :return: The action_type of this DeploymentActionResource.  # noqa: E501
        :rtype: str
        """
        return self._action_type

    @action_type.setter
    def action_type(self, action_type):
        """Sets the action_type of this DeploymentActionResource.


        :param action_type: The action_type of this DeploymentActionResource.  # noqa: E501
        :type: str
        """

        self._action_type = action_type

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


        :return: The is_disabled of this DeploymentActionResource.  # noqa: E501
        :rtype: bool
        """
        return self._is_disabled

    @is_disabled.setter
    def is_disabled(self, is_disabled):
        """Sets the is_disabled of this DeploymentActionResource.


        :param is_disabled: The is_disabled of this DeploymentActionResource.  # noqa: E501
        :type: bool
        """

        self._is_disabled = is_disabled

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


        :return: The can_be_used_for_project_versioning of this DeploymentActionResource.  # noqa: E501
        :rtype: bool
        """
        return self._can_be_used_for_project_versioning

    @can_be_used_for_project_versioning.setter
    def can_be_used_for_project_versioning(self, can_be_used_for_project_versioning):
        """Sets the can_be_used_for_project_versioning of this DeploymentActionResource.


        :param can_be_used_for_project_versioning: The can_be_used_for_project_versioning of this DeploymentActionResource.  # noqa: E501
        :type: bool
        """

        self._can_be_used_for_project_versioning = can_be_used_for_project_versioning

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


        :return: The is_required of this DeploymentActionResource.  # noqa: E501
        :rtype: bool
        """
        return self._is_required

    @is_required.setter
    def is_required(self, is_required):
        """Sets the is_required of this DeploymentActionResource.


        :param is_required: The is_required of this DeploymentActionResource.  # noqa: E501
        :type: bool
        """

        self._is_required = is_required

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


        :return: The worker_pool_id of this DeploymentActionResource.  # noqa: E501
        :rtype: str
        """
        return self._worker_pool_id

    @worker_pool_id.setter
    def worker_pool_id(self, worker_pool_id):
        """Sets the worker_pool_id of this DeploymentActionResource.


        :param worker_pool_id: The worker_pool_id of this DeploymentActionResource.  # noqa: E501
        :type: str
        """

        self._worker_pool_id = worker_pool_id

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


        :return: The environments of this DeploymentActionResource.  # noqa: E501
        :rtype: list[str]
        """
        return self._environments

    @environments.setter
    def environments(self, environments):
        """Sets the environments of this DeploymentActionResource.


        :param environments: The environments of this DeploymentActionResource.  # noqa: E501
        :type: list[str]
        """

        self._environments = environments

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


        :return: The excluded_environments of this DeploymentActionResource.  # noqa: E501
        :rtype: list[str]
        """
        return self._excluded_environments

    @excluded_environments.setter
    def excluded_environments(self, excluded_environments):
        """Sets the excluded_environments of this DeploymentActionResource.


        :param excluded_environments: The excluded_environments of this DeploymentActionResource.  # noqa: E501
        :type: list[str]
        """

        self._excluded_environments = excluded_environments

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


        :return: The channels of this DeploymentActionResource.  # noqa: E501
        :rtype: list[str]
        """
        return self._channels

    @channels.setter
    def channels(self, channels):
        """Sets the channels of this DeploymentActionResource.


        :param channels: The channels of this DeploymentActionResource.  # noqa: E501
        :type: list[str]
        """

        self._channels = channels

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


        :return: The tenant_tags of this DeploymentActionResource.  # noqa: E501
        :rtype: list[str]
        """
        return self._tenant_tags

    @tenant_tags.setter
    def tenant_tags(self, tenant_tags):
        """Sets the tenant_tags of this DeploymentActionResource.


        :param tenant_tags: The tenant_tags of this DeploymentActionResource.  # noqa: E501
        :type: list[str]
        """

        self._tenant_tags = tenant_tags

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


        :return: The packages of this DeploymentActionResource.  # noqa: E501
        :rtype: list[PackageReference]
        """
        return self._packages

    @packages.setter
    def packages(self, packages):
        """Sets the packages of this DeploymentActionResource.


        :param packages: The packages of this DeploymentActionResource.  # noqa: E501
        :type: list[PackageReference]
        """

        self._packages = packages

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


        :return: The properties of this DeploymentActionResource.  # noqa: E501
        :rtype: dict(str, PropertyValueResource)
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this DeploymentActionResource.


        :param properties: The properties of this DeploymentActionResource.  # noqa: E501
        :type: dict(str, PropertyValueResource)
        """

        self._properties = properties

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


        :return: The last_modified_on of this DeploymentActionResource.  # noqa: E501
        :rtype: datetime
        """
        return self._last_modified_on

    @last_modified_on.setter
    def last_modified_on(self, last_modified_on):
        """Sets the last_modified_on of this DeploymentActionResource.


        :param last_modified_on: The last_modified_on of this DeploymentActionResource.  # noqa: E501
        :type: datetime
        """

        self._last_modified_on = last_modified_on

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


        :return: The last_modified_by of this DeploymentActionResource.  # noqa: E501
        :rtype: str
        """
        return self._last_modified_by

    @last_modified_by.setter
    def last_modified_by(self, last_modified_by):
        """Sets the last_modified_by of this DeploymentActionResource.


        :param last_modified_by: The last_modified_by of this DeploymentActionResource.  # noqa: E501
        :type: str
        """

        self._last_modified_by = last_modified_by

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


        :return: The links of this DeploymentActionResource.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._links

    @links.setter
    def links(self, links):
        """Sets the links of this DeploymentActionResource.


        :param links: The links of this DeploymentActionResource.  # noqa: E501
        :type: dict(str, str)
        """

        self._links = links

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

        return self.__dict__ == other.__dict__

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