# 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 V1DatastoreUploadObject(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 = {
        'expiry_time': 'str',
        'key': 'str',
        'part_count': 'str',
        'upload_id': 'str',
        'urls': 'list[V1PresignedUploadUrl]'
    }

    attribute_map = {
        'expiry_time': 'expiryTime',
        'key': 'key',
        'part_count': 'partCount',
        'upload_id': 'uploadId',
        'urls': 'urls'
    }

    def __init__(self, expiry_time: 'str' = None, key: 'str' = None, part_count: 'str' = None, upload_id: 'str' = None, urls: 'list[V1PresignedUploadUrl]' = None, _configuration=None):  # noqa: E501
        """V1DatastoreUploadObject - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._expiry_time = None
        self._key = None
        self._part_count = None
        self._upload_id = None
        self._urls = None
        self.discriminator = None

        if expiry_time is not None:
            self.expiry_time = expiry_time
        if key is not None:
            self.key = key
        if part_count is not None:
            self.part_count = part_count
        if upload_id is not None:
            self.upload_id = upload_id
        if urls is not None:
            self.urls = urls

    @property
    def expiry_time(self) -> 'str':
        """Gets the expiry_time of this V1DatastoreUploadObject.  # noqa: E501

        expiry_time refers to the Unix timestamp (rounded down to the nearest second) at which the presigned upload urls will not be available for download.  # noqa: E501

        :return: The expiry_time of this V1DatastoreUploadObject.  # noqa: E501
        :rtype: str
        """
        return self._expiry_time

    @expiry_time.setter
    def expiry_time(self, expiry_time: 'str'):
        """Sets the expiry_time of this V1DatastoreUploadObject.

        expiry_time refers to the Unix timestamp (rounded down to the nearest second) at which the presigned upload urls will not be available for download.  # noqa: E501

        :param expiry_time: The expiry_time of this V1DatastoreUploadObject.  # noqa: E501
        :type: str
        """

        self._expiry_time = expiry_time

    @property
    def key(self) -> 'str':
        """Gets the key of this V1DatastoreUploadObject.  # noqa: E501

        the relative file path/name which refers to this object.  # noqa: E501

        :return: The key of this V1DatastoreUploadObject.  # noqa: E501
        :rtype: str
        """
        return self._key

    @key.setter
    def key(self, key: 'str'):
        """Sets the key of this V1DatastoreUploadObject.

        the relative file path/name which refers to this object.  # noqa: E501

        :param key: The key of this V1DatastoreUploadObject.  # noqa: E501
        :type: str
        """

        self._key = key

    @property
    def part_count(self) -> 'str':
        """Gets the part_count of this V1DatastoreUploadObject.  # noqa: E501

        how many presigned upload URLs are needed for the object.  # noqa: E501

        :return: The part_count of this V1DatastoreUploadObject.  # noqa: E501
        :rtype: str
        """
        return self._part_count

    @part_count.setter
    def part_count(self, part_count: 'str'):
        """Sets the part_count of this V1DatastoreUploadObject.

        how many presigned upload URLs are needed for the object.  # noqa: E501

        :param part_count: The part_count of this V1DatastoreUploadObject.  # noqa: E501
        :type: str
        """

        self._part_count = part_count

    @property
    def upload_id(self) -> 'str':
        """Gets the upload_id of this V1DatastoreUploadObject.  # noqa: E501

        upload_id is the grid upload ID which is assigned to track this upload.  # noqa: E501

        :return: The upload_id of this V1DatastoreUploadObject.  # noqa: E501
        :rtype: str
        """
        return self._upload_id

    @upload_id.setter
    def upload_id(self, upload_id: 'str'):
        """Sets the upload_id of this V1DatastoreUploadObject.

        upload_id is the grid upload ID which is assigned to track this upload.  # noqa: E501

        :param upload_id: The upload_id of this V1DatastoreUploadObject.  # noqa: E501
        :type: str
        """

        self._upload_id = upload_id

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

        urls refers to an array of messages containing the part number and url for each presigned url part. If ``len(urls) > 0`` then this is a multi-part upload and a complete multipart-upload request call must be made to finalize the upload.  # noqa: E501

        :return: The urls of this V1DatastoreUploadObject.  # noqa: E501
        :rtype: list[V1PresignedUploadUrl]
        """
        return self._urls

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

        urls refers to an array of messages containing the part number and url for each presigned url part. If ``len(urls) > 0`` then this is a multi-part upload and a complete multipart-upload request call must be made to finalize the upload.  # noqa: E501

        :param urls: The urls of this V1DatastoreUploadObject.  # noqa: E501
        :type: list[V1PresignedUploadUrl]
        """

        self._urls = urls

    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(V1DatastoreUploadObject, 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: 'V1DatastoreUploadObject') -> bool:
        """Returns true if both objects are equal"""
        if not isinstance(other, V1DatastoreUploadObject):
            return False

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

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

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