# coding: utf-8

"""
    DigitalRebar Provision Server

    # An RestFUL API-driven Provisioner and DHCP server  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from drppy_client.configuration import Configuration


class Trigger(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 = {
        'all_in_filter': 'bool',
        'available': 'bool',
        'blueprint': 'str',
        'bundle': 'str',
        'created_at': 'datetime',
        'created_by': 'str',
        'description': 'str',
        'documentation': 'str',
        'enabled': 'bool',
        'endpoint': 'str',
        'errors': 'list[str]',
        'filter': 'str',
        'filter_count': 'int',
        'last_modified_at': 'datetime',
        'last_modified_by': 'str',
        'merge_data_into_params': 'bool',
        'meta': 'Meta',
        'name': 'str',
        'params': 'dict(str, object)',
        'profiles': 'list[str]',
        'queue_mode': 'bool',
        'read_only': 'bool',
        'store_data_in_parameter': 'str',
        'trigger_provider': 'str',
        'validated': 'bool',
        'work_order_params': 'dict(str, object)',
        'work_order_profiles': 'list[str]'
    }

    attribute_map = {
        'all_in_filter': 'AllInFilter',
        'available': 'Available',
        'blueprint': 'Blueprint',
        'bundle': 'Bundle',
        'created_at': 'CreatedAt',
        'created_by': 'CreatedBy',
        'description': 'Description',
        'documentation': 'Documentation',
        'enabled': 'Enabled',
        'endpoint': 'Endpoint',
        'errors': 'Errors',
        'filter': 'Filter',
        'filter_count': 'FilterCount',
        'last_modified_at': 'LastModifiedAt',
        'last_modified_by': 'LastModifiedBy',
        'merge_data_into_params': 'MergeDataIntoParams',
        'meta': 'Meta',
        'name': 'Name',
        'params': 'Params',
        'profiles': 'Profiles',
        'queue_mode': 'QueueMode',
        'read_only': 'ReadOnly',
        'store_data_in_parameter': 'StoreDataInParameter',
        'trigger_provider': 'TriggerProvider',
        'validated': 'Validated',
        'work_order_params': 'WorkOrderParams',
        'work_order_profiles': 'WorkOrderProfiles'
    }

    def __init__(self, all_in_filter=None, available=None, blueprint=None, bundle=None, created_at=None, created_by=None, description=None, documentation=None, enabled=None, endpoint=None, errors=None, filter=None, filter_count=None, last_modified_at=None, last_modified_by=None, merge_data_into_params=None, meta=None, name=None, params=None, profiles=None, queue_mode=None, read_only=None, store_data_in_parameter=None, trigger_provider=None, validated=None, work_order_params=None, work_order_profiles=None, _configuration=None):  # noqa: E501
        """Trigger - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._all_in_filter = None
        self._available = None
        self._blueprint = None
        self._bundle = None
        self._created_at = None
        self._created_by = None
        self._description = None
        self._documentation = None
        self._enabled = None
        self._endpoint = None
        self._errors = None
        self._filter = None
        self._filter_count = None
        self._last_modified_at = None
        self._last_modified_by = None
        self._merge_data_into_params = None
        self._meta = None
        self._name = None
        self._params = None
        self._profiles = None
        self._queue_mode = None
        self._read_only = None
        self._store_data_in_parameter = None
        self._trigger_provider = None
        self._validated = None
        self._work_order_params = None
        self._work_order_profiles = None
        self.discriminator = None

        if all_in_filter is not None:
            self.all_in_filter = all_in_filter
        if available is not None:
            self.available = available
        if blueprint is not None:
            self.blueprint = blueprint
        if bundle is not None:
            self.bundle = bundle
        if created_at is not None:
            self.created_at = created_at
        if created_by is not None:
            self.created_by = created_by
        if description is not None:
            self.description = description
        if documentation is not None:
            self.documentation = documentation
        if enabled is not None:
            self.enabled = enabled
        if endpoint is not None:
            self.endpoint = endpoint
        if errors is not None:
            self.errors = errors
        if filter is not None:
            self.filter = filter
        if filter_count is not None:
            self.filter_count = filter_count
        if last_modified_at is not None:
            self.last_modified_at = last_modified_at
        if last_modified_by is not None:
            self.last_modified_by = last_modified_by
        if merge_data_into_params is not None:
            self.merge_data_into_params = merge_data_into_params
        if meta is not None:
            self.meta = meta
        self.name = name
        if params is not None:
            self.params = params
        if profiles is not None:
            self.profiles = profiles
        if queue_mode is not None:
            self.queue_mode = queue_mode
        if read_only is not None:
            self.read_only = read_only
        if store_data_in_parameter is not None:
            self.store_data_in_parameter = store_data_in_parameter
        if trigger_provider is not None:
            self.trigger_provider = trigger_provider
        if validated is not None:
            self.validated = validated
        if work_order_params is not None:
            self.work_order_params = work_order_params
        if work_order_profiles is not None:
            self.work_order_profiles = work_order_profiles

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

        AllInFilter if true cause a work_order created for all machines in the filter  # noqa: E501

        :return: The all_in_filter of this Trigger.  # noqa: E501
        :rtype: bool
        """
        return self._all_in_filter

    @all_in_filter.setter
    def all_in_filter(self, all_in_filter):
        """Sets the all_in_filter of this Trigger.

        AllInFilter if true cause a work_order created for all machines in the filter  # noqa: E501

        :param all_in_filter: The all_in_filter of this Trigger.  # noqa: E501
        :type: bool
        """

        self._all_in_filter = all_in_filter

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

        Available tracks whether or not the model passed validation.  # noqa: E501

        :return: The available of this Trigger.  # noqa: E501
        :rtype: bool
        """
        return self._available

    @available.setter
    def available(self, available):
        """Sets the available of this Trigger.

        Available tracks whether or not the model passed validation.  # noqa: E501

        :param available: The available of this Trigger.  # noqa: E501
        :type: bool
        """

        self._available = available

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

        Blueprint is template to apply  # noqa: E501

        :return: The blueprint of this Trigger.  # noqa: E501
        :rtype: str
        """
        return self._blueprint

    @blueprint.setter
    def blueprint(self, blueprint):
        """Sets the blueprint of this Trigger.

        Blueprint is template to apply  # noqa: E501

        :param blueprint: The blueprint of this Trigger.  # noqa: E501
        :type: str
        """

        self._blueprint = blueprint

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

        Bundle tracks the name of the store containing this object. This field is read-only, and cannot be changed via the API.  # noqa: E501

        :return: The bundle of this Trigger.  # noqa: E501
        :rtype: str
        """
        return self._bundle

    @bundle.setter
    def bundle(self, bundle):
        """Sets the bundle of this Trigger.

        Bundle tracks the name of the store containing this object. This field is read-only, and cannot be changed via the API.  # noqa: E501

        :param bundle: The bundle of this Trigger.  # noqa: E501
        :type: str
        """

        self._bundle = bundle

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

        CreatedAt is the time that this object was created.  # noqa: E501

        :return: The created_at of this Trigger.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Trigger.

        CreatedAt is the time that this object was created.  # noqa: E501

        :param created_at: The created_at of this Trigger.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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

        CreatedBy stores the value of the user that created this object. Note: This value is stored ONLY if the object was created by a user which means that `currentUserName` needs to be populated in the authBlob  # noqa: E501

        :return: The created_by of this Trigger.  # noqa: E501
        :rtype: str
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this Trigger.

        CreatedBy stores the value of the user that created this object. Note: This value is stored ONLY if the object was created by a user which means that `currentUserName` needs to be populated in the authBlob  # noqa: E501

        :param created_by: The created_by of this Trigger.  # noqa: E501
        :type: str
        """

        self._created_by = created_by

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

        Description is a string for providing a simple description  # noqa: E501

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

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

        Description is a string for providing a simple description  # noqa: E501

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

        self._description = description

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

        Documentation is a string for providing additional in depth information.  # noqa: E501

        :return: The documentation of this Trigger.  # noqa: E501
        :rtype: str
        """
        return self._documentation

    @documentation.setter
    def documentation(self, documentation):
        """Sets the documentation of this Trigger.

        Documentation is a string for providing additional in depth information.  # noqa: E501

        :param documentation: The documentation of this Trigger.  # noqa: E501
        :type: str
        """

        self._documentation = documentation

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

        Enabled is this Trigger enabled  # noqa: E501

        :return: The enabled of this Trigger.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this Trigger.

        Enabled is this Trigger enabled  # noqa: E501

        :param enabled: The enabled of this Trigger.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

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

        Endpoint tracks the owner of the object among DRP endpoints  # noqa: E501

        :return: The endpoint of this Trigger.  # noqa: E501
        :rtype: str
        """
        return self._endpoint

    @endpoint.setter
    def endpoint(self, endpoint):
        """Sets the endpoint of this Trigger.

        Endpoint tracks the owner of the object among DRP endpoints  # noqa: E501

        :param endpoint: The endpoint of this Trigger.  # noqa: E501
        :type: str
        """

        self._endpoint = endpoint

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

        If there are any errors in the validation process, they will be available here.  # noqa: E501

        :return: The errors of this Trigger.  # noqa: E501
        :rtype: list[str]
        """
        return self._errors

    @errors.setter
    def errors(self, errors):
        """Sets the errors of this Trigger.

        If there are any errors in the validation process, they will be available here.  # noqa: E501

        :param errors: The errors of this Trigger.  # noqa: E501
        :type: list[str]
        """

        self._errors = errors

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

        Filter is a \"list\"-style filter string to find machines to apply the cron too Filter is already assumed to have WorkOrderMode == true && Runnable == true  # noqa: E501

        :return: The filter of this Trigger.  # noqa: E501
        :rtype: str
        """
        return self._filter

    @filter.setter
    def filter(self, filter):
        """Sets the filter of this Trigger.

        Filter is a \"list\"-style filter string to find machines to apply the cron too Filter is already assumed to have WorkOrderMode == true && Runnable == true  # noqa: E501

        :param filter: The filter of this Trigger.  # noqa: E501
        :type: str
        """

        self._filter = filter

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

        FilterCount defines the number of machines to apply the work_order to.  Only one work_order per trigger fire.  # noqa: E501

        :return: The filter_count of this Trigger.  # noqa: E501
        :rtype: int
        """
        return self._filter_count

    @filter_count.setter
    def filter_count(self, filter_count):
        """Sets the filter_count of this Trigger.

        FilterCount defines the number of machines to apply the work_order to.  Only one work_order per trigger fire.  # noqa: E501

        :param filter_count: The filter_count of this Trigger.  # noqa: E501
        :type: int
        """

        self._filter_count = filter_count

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

        LastModifiedAt is the time that this object was last modified.  # noqa: E501

        :return: The last_modified_at of this Trigger.  # noqa: E501
        :rtype: datetime
        """
        return self._last_modified_at

    @last_modified_at.setter
    def last_modified_at(self, last_modified_at):
        """Sets the last_modified_at of this Trigger.

        LastModifiedAt is the time that this object was last modified.  # noqa: E501

        :param last_modified_at: The last_modified_at of this Trigger.  # noqa: E501
        :type: datetime
        """

        self._last_modified_at = last_modified_at

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

        LastModifiedBy stores the value of the user that last modified this object. NOTE: This value is populated ONLY if the object was modified by a user which means any actions done using machine tokens will not get tracked  # noqa: E501

        :return: The last_modified_by of this Trigger.  # 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 Trigger.

        LastModifiedBy stores the value of the user that last modified this object. NOTE: This value is populated ONLY if the object was modified by a user which means any actions done using machine tokens will not get tracked  # noqa: E501

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

        self._last_modified_by = last_modified_by

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

        MergeDataIntoParams if true causes the data from the trigger to be merged into the Params of the work_order.  # noqa: E501

        :return: The merge_data_into_params of this Trigger.  # noqa: E501
        :rtype: bool
        """
        return self._merge_data_into_params

    @merge_data_into_params.setter
    def merge_data_into_params(self, merge_data_into_params):
        """Sets the merge_data_into_params of this Trigger.

        MergeDataIntoParams if true causes the data from the trigger to be merged into the Params of the work_order.  # noqa: E501

        :param merge_data_into_params: The merge_data_into_params of this Trigger.  # noqa: E501
        :type: bool
        """

        self._merge_data_into_params = merge_data_into_params

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


        :return: The meta of this Trigger.  # noqa: E501
        :rtype: Meta
        """
        return self._meta

    @meta.setter
    def meta(self, meta):
        """Sets the meta of this Trigger.


        :param meta: The meta of this Trigger.  # noqa: E501
        :type: Meta
        """

        self._meta = meta

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

        Name is the key of this particular Trigger.  # noqa: E501

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

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

        Name is the key of this particular Trigger.  # noqa: E501

        :param name: The name of this Trigger.  # 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 params(self):
        """Gets the params of this Trigger.  # noqa: E501

        Params holds the values of parameters on the object.  The field is a key / value store of the parameters. The key is the name of a parameter.  The key is of type string. The value is the value of the parameter.  The type of the value is defined by the parameter object.  If the key doesn't reference a parameter, the type of the object can be anything.  The system will enforce the named parameter's value's type.  Go calls the \"anything\" parameters as \"interface {}\".  Hence, the type of this field is a map[string]interface{}.  # noqa: E501

        :return: The params of this Trigger.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._params

    @params.setter
    def params(self, params):
        """Sets the params of this Trigger.

        Params holds the values of parameters on the object.  The field is a key / value store of the parameters. The key is the name of a parameter.  The key is of type string. The value is the value of the parameter.  The type of the value is defined by the parameter object.  If the key doesn't reference a parameter, the type of the object can be anything.  The system will enforce the named parameter's value's type.  Go calls the \"anything\" parameters as \"interface {}\".  Hence, the type of this field is a map[string]interface{}.  # noqa: E501

        :param params: The params of this Trigger.  # noqa: E501
        :type: dict(str, object)
        """

        self._params = params

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

        Profiles is an array of profiles to apply to this object in order when looking for a parameter during rendering.  # noqa: E501

        :return: The profiles of this Trigger.  # noqa: E501
        :rtype: list[str]
        """
        return self._profiles

    @profiles.setter
    def profiles(self, profiles):
        """Sets the profiles of this Trigger.

        Profiles is an array of profiles to apply to this object in order when looking for a parameter during rendering.  # noqa: E501

        :param profiles: The profiles of this Trigger.  # noqa: E501
        :type: list[str]
        """

        self._profiles = profiles

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

        QueueMode if true causes work_orders to be created without a machine, but with a filter for delayed operation  # noqa: E501

        :return: The queue_mode of this Trigger.  # noqa: E501
        :rtype: bool
        """
        return self._queue_mode

    @queue_mode.setter
    def queue_mode(self, queue_mode):
        """Sets the queue_mode of this Trigger.

        QueueMode if true causes work_orders to be created without a machine, but with a filter for delayed operation  # noqa: E501

        :param queue_mode: The queue_mode of this Trigger.  # noqa: E501
        :type: bool
        """

        self._queue_mode = queue_mode

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

        ReadOnly tracks if the store for this object is read-only. This flag is informational, and cannot be changed via the API.  # noqa: E501

        :return: The read_only of this Trigger.  # noqa: E501
        :rtype: bool
        """
        return self._read_only

    @read_only.setter
    def read_only(self, read_only):
        """Sets the read_only of this Trigger.

        ReadOnly tracks if the store for this object is read-only. This flag is informational, and cannot be changed via the API.  # noqa: E501

        :param read_only: The read_only of this Trigger.  # noqa: E501
        :type: bool
        """

        self._read_only = read_only

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

        StoreDataInParameter if set tells the triggers data to be stored in the parameter in the Params of the work_order.  # noqa: E501

        :return: The store_data_in_parameter of this Trigger.  # noqa: E501
        :rtype: str
        """
        return self._store_data_in_parameter

    @store_data_in_parameter.setter
    def store_data_in_parameter(self, store_data_in_parameter):
        """Sets the store_data_in_parameter of this Trigger.

        StoreDataInParameter if set tells the triggers data to be stored in the parameter in the Params of the work_order.  # noqa: E501

        :param store_data_in_parameter: The store_data_in_parameter of this Trigger.  # noqa: E501
        :type: str
        """

        self._store_data_in_parameter = store_data_in_parameter

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

        TriggerProvider is the name of the method of this trigger  # noqa: E501

        :return: The trigger_provider of this Trigger.  # noqa: E501
        :rtype: str
        """
        return self._trigger_provider

    @trigger_provider.setter
    def trigger_provider(self, trigger_provider):
        """Sets the trigger_provider of this Trigger.

        TriggerProvider is the name of the method of this trigger  # noqa: E501

        :param trigger_provider: The trigger_provider of this Trigger.  # noqa: E501
        :type: str
        """

        self._trigger_provider = trigger_provider

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

        Validated tracks whether or not the model has been validated.  # noqa: E501

        :return: The validated of this Trigger.  # noqa: E501
        :rtype: bool
        """
        return self._validated

    @validated.setter
    def validated(self, validated):
        """Sets the validated of this Trigger.

        Validated tracks whether or not the model has been validated.  # noqa: E501

        :param validated: The validated of this Trigger.  # noqa: E501
        :type: bool
        """

        self._validated = validated

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

        WorkOrderParams that have been directly set on the Trigger and will be moved to the work order.  # noqa: E501

        :return: The work_order_params of this Trigger.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._work_order_params

    @work_order_params.setter
    def work_order_params(self, work_order_params):
        """Sets the work_order_params of this Trigger.

        WorkOrderParams that have been directly set on the Trigger and will be moved to the work order.  # noqa: E501

        :param work_order_params: The work_order_params of this Trigger.  # noqa: E501
        :type: dict(str, object)
        """

        self._work_order_params = work_order_params

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

        WorkOrderProfiles to apply to this machine in order when looking for a parameter during rendering.  # noqa: E501

        :return: The work_order_profiles of this Trigger.  # noqa: E501
        :rtype: list[str]
        """
        return self._work_order_profiles

    @work_order_profiles.setter
    def work_order_profiles(self, work_order_profiles):
        """Sets the work_order_profiles of this Trigger.

        WorkOrderProfiles to apply to this machine in order when looking for a parameter during rendering.  # noqa: E501

        :param work_order_profiles: The work_order_profiles of this Trigger.  # noqa: E501
        :type: list[str]
        """

        self._work_order_profiles = work_order_profiles

    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(Trigger, 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, Trigger):
            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, Trigger):
            return True

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