# coding: utf-8

"""
    external/v1/external_session_service.proto

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

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

    NOTE
    ----
    standard swagger-codegen-cli for this python client has been modified
    by custom templates. The purpose of these templates is to include
    typing information in the API and Model code. Please refer to the
    main grid repository for more info
"""


import pprint
import re  # noqa: F401
from typing import TYPE_CHECKING

import six

from grid.openapi.configuration import Configuration

if TYPE_CHECKING:
    from datetime import datetime
    from grid.openapi.models import *

class Body2(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 = {
        'objects': 'list[V1DatastoreUploadObject]'
    }

    attribute_map = {
        'objects': 'objects'
    }

    def __init__(self, objects: 'list[V1DatastoreUploadObject]' = None, _configuration=None):  # noqa: E501
        """Body2 - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._objects = None
        self.discriminator = None

        if objects is not None:
            self.objects = objects

    @property
    def objects(self) -> 'list[V1DatastoreUploadObject]':
        """Gets the objects of this Body2.  # noqa: E501

        objects essentially contains the a list of file blobs which we want to generate presigned urls for so they can be uploaded as part of the datastore.  # noqa: E501

        :return: The objects of this Body2.  # noqa: E501
        :rtype: list[V1DatastoreUploadObject]
        """
        return self._objects

    @objects.setter
    def objects(self, objects: 'list[V1DatastoreUploadObject]'):
        """Sets the objects of this Body2.

        objects essentially contains the a list of file blobs which we want to generate presigned urls for so they can be uploaded as part of the datastore.  # noqa: E501

        :param objects: The objects of this Body2.  # noqa: E501
        :type: list[V1DatastoreUploadObject]
        """

        self._objects = objects

    def to_dict(self) -> dict:
        """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(Body2, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self) -> str:
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self) -> str:
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other: 'Body2') -> bool:
        """Returns true if both objects are equal"""
        if not isinstance(other, Body2):
            return False

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

    def __ne__(self, other: 'Body2') -> bool:
        """Returns true if both objects are not equal"""
        if not isinstance(other, Body2):
            return True

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