# coding: utf-8

"""
    Internal API

    SmartDiagnostics REST API for internal users only  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class ModelAssignmentCreateRequest(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 = {
        'parent_group_id': 'str',
        'model_id': 'str',
        'properties': 'list[SetPropertyChild]',
        'assigned_group_ids': 'list[str]'
    }

    attribute_map = {
        'parent_group_id': 'ParentGroupId',
        'model_id': 'ModelId',
        'properties': 'Properties',
        'assigned_group_ids': 'AssignedGroupIds'
    }

    def __init__(self, parent_group_id=None, model_id=None, properties=None, assigned_group_ids=None):  # noqa: E501
        """ModelAssignmentCreateRequest - a model defined in Swagger"""  # noqa: E501
        self._parent_group_id = None
        self._model_id = None
        self._properties = None
        self._assigned_group_ids = None
        self.discriminator = None
        self.parent_group_id = parent_group_id
        self.model_id = model_id
        self.properties = properties
        self.assigned_group_ids = assigned_group_ids

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

        The parent group under which the new analytics group and its assignment will be created  # noqa: E501

        :return: The parent_group_id of this ModelAssignmentCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._parent_group_id

    @parent_group_id.setter
    def parent_group_id(self, parent_group_id):
        """Sets the parent_group_id of this ModelAssignmentCreateRequest.

        The parent group under which the new analytics group and its assignment will be created  # noqa: E501

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

        self._parent_group_id = parent_group_id

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

        The Id of the model being assigned  # noqa: E501

        :return: The model_id of this ModelAssignmentCreateRequest.  # noqa: E501
        :rtype: str
        """
        return self._model_id

    @model_id.setter
    def model_id(self, model_id):
        """Sets the model_id of this ModelAssignmentCreateRequest.

        The Id of the model being assigned  # noqa: E501

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

        self._model_id = model_id

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

        Property values for the model being assigned  # noqa: E501

        :return: The properties of this ModelAssignmentCreateRequest.  # noqa: E501
        :rtype: list[SetPropertyChild]
        """
        return self._properties

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

        Property values for the model being assigned  # noqa: E501

        :param properties: The properties of this ModelAssignmentCreateRequest.  # noqa: E501
        :type: list[SetPropertyChild]
        """
        if properties is None:
            raise ValueError("Invalid value for `properties`, must not be `None`")  # noqa: E501

        self._properties = properties

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

        Groups that provide data for the model assignment. They must be the ParentGroupId or its descendants and must be Monitoring Point, Asset, or Group type.  # noqa: E501

        :return: The assigned_group_ids of this ModelAssignmentCreateRequest.  # noqa: E501
        :rtype: list[str]
        """
        return self._assigned_group_ids

    @assigned_group_ids.setter
    def assigned_group_ids(self, assigned_group_ids):
        """Sets the assigned_group_ids of this ModelAssignmentCreateRequest.

        Groups that provide data for the model assignment. They must be the ParentGroupId or its descendants and must be Monitoring Point, Asset, or Group type.  # noqa: E501

        :param assigned_group_ids: The assigned_group_ids of this ModelAssignmentCreateRequest.  # noqa: E501
        :type: list[str]
        """
        if assigned_group_ids is None:
            raise ValueError("Invalid value for `assigned_group_ids`, must not be `None`")  # noqa: E501

        self._assigned_group_ids = assigned_group_ids

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

        return self.__dict__ == other.__dict__

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