# coding: utf-8

"""
    Vidispine API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 5.x
    Contact: info@vidispine.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six
from . import *

class AccessControlMergedType(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'access': 'list[AccessControlMergedTypeAccess]',
        'query': 'AccessControlMergedTypeQuery',
        'field': 'list[MetadataFieldPermissionType]',
        'field_group': 'list[MetadataFieldGroupPermissionType]'
    }

    attribute_map = {
        'access': 'access',
        'query': 'query',
        'field': 'field',
        'field_group': 'fieldGroup'
    }

    def __init__(self, access=None, query=None, field=None, field_group=None):  # noqa: E501
        """AccessControlMergedType - a model defined in OpenAPI"""  # noqa: E501

        self._access = None
        self._query = None
        self._field = None
        self._field_group = None
        self.discriminator = None

        if access is not None:
            self.access = access
        if query is not None:
            self.query = query
        if field is not None:
            self.field = field
        if field_group is not None:
            self.field_group = field_group

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


        :return: The access of this AccessControlMergedType.  # noqa: E501
        :rtype: list[AccessControlMergedTypeAccess]
        """
        return self._access

    @access.setter
    def access(self, access):
        """Sets the access of this AccessControlMergedType.


        :param access: The access of this AccessControlMergedType.  # noqa: E501
        :type: list[AccessControlMergedTypeAccess]
        """

        self._access = access

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


        :return: The query of this AccessControlMergedType.  # noqa: E501
        :rtype: AccessControlMergedTypeQuery
        """
        return self._query

    @query.setter
    def query(self, query):
        """Sets the query of this AccessControlMergedType.


        :param query: The query of this AccessControlMergedType.  # noqa: E501
        :type: AccessControlMergedTypeQuery
        """

        self._query = query

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


        :return: The field of this AccessControlMergedType.  # noqa: E501
        :rtype: list[MetadataFieldPermissionType]
        """
        return self._field

    @field.setter
    def field(self, field):
        """Sets the field of this AccessControlMergedType.


        :param field: The field of this AccessControlMergedType.  # noqa: E501
        :type: list[MetadataFieldPermissionType]
        """

        self._field = field

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


        :return: The field_group of this AccessControlMergedType.  # noqa: E501
        :rtype: list[MetadataFieldGroupPermissionType]
        """
        return self._field_group

    @field_group.setter
    def field_group(self, field_group):
        """Sets the field_group of this AccessControlMergedType.


        :param field_group: The field_group of this AccessControlMergedType.  # noqa: E501
        :type: list[MetadataFieldGroupPermissionType]
        """

        self._field_group = field_group

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

        for attr, _ in six.iteritems(self.openapi_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, AccessControlMergedType):
            return False

        return self.__dict__ == other.__dict__

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