# coding: utf-8

"""
    \"Data Governance Center: REST API v2\"

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

    OpenAPI spec version: 2.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from swagger_client.models.json_add_or_change_view_assignment_rule_request import JsonAddOrChangeViewAssignmentRuleRequest  # noqa: F401,E501
from swagger_client.models.json_sharing_rule_request import JsonSharingRuleRequest  # noqa: F401,E501


class JsonChangeViewRequest(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',
        'description': 'str',
        'location': 'str',
        'config': 'str',
        'preferred': 'bool',
        'is_default': 'bool',
        'working_view': 'bool',
        'touch_view': 'bool',
        'resource_id': 'str',
        'assignment_rules': 'list[JsonAddOrChangeViewAssignmentRuleRequest]',
        'sharing_rules': 'list[JsonSharingRuleRequest]'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'description': 'description',
        'location': 'location',
        'config': 'config',
        'preferred': 'preferred',
        'is_default': 'isDefault',
        'working_view': 'workingView',
        'touch_view': 'touchView',
        'resource_id': 'resourceId',
        'assignment_rules': 'assignmentRules',
        'sharing_rules': 'sharingRules'
    }

    def __init__(self, id=None, name=None, description=None, location=None, config=None, preferred=None, is_default=None, working_view=None, touch_view=None, resource_id=None, assignment_rules=None, sharing_rules=None):  # noqa: E501
        """JsonChangeViewRequest - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._name = None
        self._description = None
        self._location = None
        self._config = None
        self._preferred = None
        self._is_default = None
        self._working_view = None
        self._touch_view = None
        self._resource_id = None
        self._assignment_rules = None
        self._sharing_rules = None
        self.discriminator = None

        self.id = id
        if name is not None:
            self.name = name
        if description is not None:
            self.description = description
        if location is not None:
            self.location = location
        if config is not None:
            self.config = config
        if preferred is not None:
            self.preferred = preferred
        if is_default is not None:
            self.is_default = is_default
        if working_view is not None:
            self.working_view = working_view
        if touch_view is not None:
            self.touch_view = touch_view
        if resource_id is not None:
            self.resource_id = resource_id
        if assignment_rules is not None:
            self.assignment_rules = assignment_rules
        if sharing_rules is not None:
            self.sharing_rules = sharing_rules

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

          # noqa: E501

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

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

          # noqa: E501

        :param id: The id of this JsonChangeViewRequest.  # noqa: E501
        :type: str
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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

          # noqa: E501

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

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

          # noqa: E501

        :param name: The name of this JsonChangeViewRequest.  # noqa: E501
        :type: str
        """
        if name is not None and len(name) > 255:
            raise ValueError("Invalid value for `name`, length must be less than or equal to `255`")  # noqa: E501
        if name is not None and len(name) < 1:
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")  # noqa: E501

        self._name = name

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

          # noqa: E501

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

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

          # noqa: E501

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

        self._description = description

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

          # noqa: E501

        :return: The location of this JsonChangeViewRequest.  # noqa: E501
        :rtype: str
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this JsonChangeViewRequest.

          # noqa: E501

        :param location: The location of this JsonChangeViewRequest.  # noqa: E501
        :type: str
        """

        self._location = location

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

          # noqa: E501

        :return: The config of this JsonChangeViewRequest.  # noqa: E501
        :rtype: str
        """
        return self._config

    @config.setter
    def config(self, config):
        """Sets the config of this JsonChangeViewRequest.

          # noqa: E501

        :param config: The config of this JsonChangeViewRequest.  # noqa: E501
        :type: str
        """

        self._config = config

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

          # noqa: E501

        :return: The preferred of this JsonChangeViewRequest.  # noqa: E501
        :rtype: bool
        """
        return self._preferred

    @preferred.setter
    def preferred(self, preferred):
        """Sets the preferred of this JsonChangeViewRequest.

          # noqa: E501

        :param preferred: The preferred of this JsonChangeViewRequest.  # noqa: E501
        :type: bool
        """

        self._preferred = preferred

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

          # noqa: E501

        :return: The is_default of this JsonChangeViewRequest.  # noqa: E501
        :rtype: bool
        """
        return self._is_default

    @is_default.setter
    def is_default(self, is_default):
        """Sets the is_default of this JsonChangeViewRequest.

          # noqa: E501

        :param is_default: The is_default of this JsonChangeViewRequest.  # noqa: E501
        :type: bool
        """

        self._is_default = is_default

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

          # noqa: E501

        :return: The working_view of this JsonChangeViewRequest.  # noqa: E501
        :rtype: bool
        """
        return self._working_view

    @working_view.setter
    def working_view(self, working_view):
        """Sets the working_view of this JsonChangeViewRequest.

          # noqa: E501

        :param working_view: The working_view of this JsonChangeViewRequest.  # noqa: E501
        :type: bool
        """

        self._working_view = working_view

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

          # noqa: E501

        :return: The touch_view of this JsonChangeViewRequest.  # noqa: E501
        :rtype: bool
        """
        return self._touch_view

    @touch_view.setter
    def touch_view(self, touch_view):
        """Sets the touch_view of this JsonChangeViewRequest.

          # noqa: E501

        :param touch_view: The touch_view of this JsonChangeViewRequest.  # noqa: E501
        :type: bool
        """

        self._touch_view = touch_view

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

          # noqa: E501

        :return: The resource_id of this JsonChangeViewRequest.  # noqa: E501
        :rtype: str
        """
        return self._resource_id

    @resource_id.setter
    def resource_id(self, resource_id):
        """Sets the resource_id of this JsonChangeViewRequest.

          # noqa: E501

        :param resource_id: The resource_id of this JsonChangeViewRequest.  # noqa: E501
        :type: str
        """

        self._resource_id = resource_id

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

          # noqa: E501

        :return: The assignment_rules of this JsonChangeViewRequest.  # noqa: E501
        :rtype: list[JsonAddOrChangeViewAssignmentRuleRequest]
        """
        return self._assignment_rules

    @assignment_rules.setter
    def assignment_rules(self, assignment_rules):
        """Sets the assignment_rules of this JsonChangeViewRequest.

          # noqa: E501

        :param assignment_rules: The assignment_rules of this JsonChangeViewRequest.  # noqa: E501
        :type: list[JsonAddOrChangeViewAssignmentRuleRequest]
        """

        self._assignment_rules = assignment_rules

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

          # noqa: E501

        :return: The sharing_rules of this JsonChangeViewRequest.  # noqa: E501
        :rtype: list[JsonSharingRuleRequest]
        """
        return self._sharing_rules

    @sharing_rules.setter
    def sharing_rules(self, sharing_rules):
        """Sets the sharing_rules of this JsonChangeViewRequest.

          # noqa: E501

        :param sharing_rules: The sharing_rules of this JsonChangeViewRequest.  # noqa: E501
        :type: list[JsonSharingRuleRequest]
        """

        self._sharing_rules = sharing_rules

    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

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

        return self.__dict__ == other.__dict__

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