<reponame>sdnit-se/intersight-python<filename>intersight/models/softwarerepository_local_machine.py<gh_stars>10-100
# coding: utf-8

"""
    Cisco Intersight OpenAPI specification.

    The Cisco Intersight OpenAPI specification.

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


from pprint import pformat
from six import iteritems
import re


class SoftwarerepositoryLocalMachine(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 = {
        'object_type': 'str',
        'download_url': 'str',
        'part_size': 'int',
        'upload_id': 'str',
        'upload_url': 'str',
        'upload_urls': 'list[str]'
    }

    attribute_map = {
        'object_type': 'ObjectType',
        'download_url': 'DownloadUrl',
        'part_size': 'PartSize',
        'upload_id': 'UploadId',
        'upload_url': 'UploadUrl',
        'upload_urls': 'UploadUrls'
    }

    def __init__(self, object_type=None, download_url=None, part_size=None, upload_id=None, upload_url=None, upload_urls=None):
        """
        SoftwarerepositoryLocalMachine - a model defined in Swagger
        """

        self._object_type = None
        self._download_url = None
        self._part_size = None
        self._upload_id = None
        self._upload_url = None
        self._upload_urls = None

        if object_type is not None:
          self.object_type = object_type
        if download_url is not None:
          self.download_url = download_url
        if part_size is not None:
          self.part_size = part_size
        if upload_id is not None:
          self.upload_id = upload_id
        if upload_url is not None:
          self.upload_url = upload_url
        if upload_urls is not None:
          self.upload_urls = upload_urls

    @property
    def object_type(self):
        """
        Gets the object_type of this SoftwarerepositoryLocalMachine.
        The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the  ObjectType is optional.  The type is ambiguous when a managed object contains an array of nested documents, and the documents in the array are heterogeneous, i.e. the array can contain nested documents of different types.

        :return: The object_type of this SoftwarerepositoryLocalMachine.
        :rtype: str
        """
        return self._object_type

    @object_type.setter
    def object_type(self, object_type):
        """
        Sets the object_type of this SoftwarerepositoryLocalMachine.
        The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the  ObjectType is optional.  The type is ambiguous when a managed object contains an array of nested documents, and the documents in the array are heterogeneous, i.e. the array can contain nested documents of different types.

        :param object_type: The object_type of this SoftwarerepositoryLocalMachine.
        :type: str
        """

        self._object_type = object_type

    @property
    def download_url(self):
        """
        Gets the download_url of this SoftwarerepositoryLocalMachine.
        When import action in file MO is updated with 'GeneratePreSignedDownloadUrl', Intersight shall return a presigned URL in this property as part of the PATCH response. The user is expected to subsequently download the file using this URL.

        :return: The download_url of this SoftwarerepositoryLocalMachine.
        :rtype: str
        """
        return self._download_url

    @download_url.setter
    def download_url(self, download_url):
        """
        Sets the download_url of this SoftwarerepositoryLocalMachine.
        When import action in file MO is updated with 'GeneratePreSignedDownloadUrl', Intersight shall return a presigned URL in this property as part of the PATCH response. The user is expected to subsequently download the file using this URL.

        :param download_url: The download_url of this SoftwarerepositoryLocalMachine.
        :type: str
        """

        self._download_url = download_url

    @property
    def part_size(self):
        """
        Gets the part_size of this SoftwarerepositoryLocalMachine.
        Chunk size (in bytes) of the each part of file to be uploaded.

        :return: The part_size of this SoftwarerepositoryLocalMachine.
        :rtype: int
        """
        return self._part_size

    @part_size.setter
    def part_size(self, part_size):
        """
        Sets the part_size of this SoftwarerepositoryLocalMachine.
        Chunk size (in bytes) of the each part of file to be uploaded.

        :param part_size: The part_size of this SoftwarerepositoryLocalMachine.
        :type: int
        """

        self._part_size = part_size

    @property
    def upload_id(self):
        """
        Gets the upload_id of this SoftwarerepositoryLocalMachine.
        When the import action in file MO is updated with 'GeneratePreSignedUploadUrl', Intersight shall return a upload Id in this property as part of the PATCH response.

        :return: The upload_id of this SoftwarerepositoryLocalMachine.
        :rtype: str
        """
        return self._upload_id

    @upload_id.setter
    def upload_id(self, upload_id):
        """
        Sets the upload_id of this SoftwarerepositoryLocalMachine.
        When the import action in file MO is updated with 'GeneratePreSignedUploadUrl', Intersight shall return a upload Id in this property as part of the PATCH response.

        :param upload_id: The upload_id of this SoftwarerepositoryLocalMachine.
        :type: str
        """

        self._upload_id = upload_id

    @property
    def upload_url(self):
        """
        Gets the upload_url of this SoftwarerepositoryLocalMachine.
        When a file MO is created with 'LocalMachine' as the source, Intersight shall return a presigned URL in this property as part of the POST response. The user is expected to subsequently upload the file content using this URL. Once this upload has been completed, the user is expected to PATCH the Uploader object's transfer state to success.

        :return: The upload_url of this SoftwarerepositoryLocalMachine.
        :rtype: str
        """
        return self._upload_url

    @upload_url.setter
    def upload_url(self, upload_url):
        """
        Sets the upload_url of this SoftwarerepositoryLocalMachine.
        When a file MO is created with 'LocalMachine' as the source, Intersight shall return a presigned URL in this property as part of the POST response. The user is expected to subsequently upload the file content using this URL. Once this upload has been completed, the user is expected to PATCH the Uploader object's transfer state to success.

        :param upload_url: The upload_url of this SoftwarerepositoryLocalMachine.
        :type: str
        """

        self._upload_url = upload_url

    @property
    def upload_urls(self):
        """
        Gets the upload_urls of this SoftwarerepositoryLocalMachine.
        When an file MO is created with 'LocalMachine' as the source, Intersight shall return a list of presigned URLs in this property as part of the POST response. The user is expected to subsequently upload the file content in parts using these URLs. Once these uploads have been completed, the user is expected to PATCH the Uploader object's transfer state to success.

        :return: The upload_urls of this SoftwarerepositoryLocalMachine.
        :rtype: list[str]
        """
        return self._upload_urls

    @upload_urls.setter
    def upload_urls(self, upload_urls):
        """
        Sets the upload_urls of this SoftwarerepositoryLocalMachine.
        When an file MO is created with 'LocalMachine' as the source, Intersight shall return a list of presigned URLs in this property as part of the POST response. The user is expected to subsequently upload the file content in parts using these URLs. Once these uploads have been completed, the user is expected to PATCH the Uploader object's transfer state to success.

        :param upload_urls: The upload_urls of this SoftwarerepositoryLocalMachine.
        :type: list[str]
        """

        self._upload_urls = upload_urls

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

        for attr, _ in 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 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, SoftwarerepositoryLocalMachine):
            return False

        return self.__dict__ == other.__dict__

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

# coding: utf-8

"""
    Cisco Intersight OpenAPI specification.

    The Cisco Intersight OpenAPI specification.

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


from pprint import pformat
from six import iteritems
import re


class SoftwarerepositoryLocalMachine(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 = {
        'object_type': 'str',
        'download_url': 'str',
        'part_size': 'int',
        'upload_id': 'str',
        'upload_url': 'str',
        'upload_urls': 'list[str]'
    }

    attribute_map = {
        'object_type': 'ObjectType',
        'download_url': 'DownloadUrl',
        'part_size': 'PartSize',
        'upload_id': 'UploadId',
        'upload_url': 'UploadUrl',
        'upload_urls': 'UploadUrls'
    }

    def __init__(self, object_type=None, download_url=None, part_size=None, upload_id=None, upload_url=None, upload_urls=None):
        """
        SoftwarerepositoryLocalMachine - a model defined in Swagger
        """

        self._object_type = None
        self._download_url = None
        self._part_size = None
        self._upload_id = None
        self._upload_url = None
        self._upload_urls = None

        if object_type is not None:
          self.object_type = object_type
        if download_url is not None:
          self.download_url = download_url
        if part_size is not None:
          self.part_size = part_size
        if upload_id is not None:
          self.upload_id = upload_id
        if upload_url is not None:
          self.upload_url = upload_url
        if upload_urls is not None:
          self.upload_urls = upload_urls

    @property
    def object_type(self):
        """
        Gets the object_type of this SoftwarerepositoryLocalMachine.
        The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the  ObjectType is optional.  The type is ambiguous when a managed object contains an array of nested documents, and the documents in the array are heterogeneous, i.e. the array can contain nested documents of different types.

        :return: The object_type of this SoftwarerepositoryLocalMachine.
        :rtype: str
        """
        return self._object_type

    @object_type.setter
    def object_type(self, object_type):
        """
        Sets the object_type of this SoftwarerepositoryLocalMachine.
        The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the  ObjectType is optional.  The type is ambiguous when a managed object contains an array of nested documents, and the documents in the array are heterogeneous, i.e. the array can contain nested documents of different types.

        :param object_type: The object_type of this SoftwarerepositoryLocalMachine.
        :type: str
        """

        self._object_type = object_type

    @property
    def download_url(self):
        """
        Gets the download_url of this SoftwarerepositoryLocalMachine.
        When import action in file MO is updated with 'GeneratePreSignedDownloadUrl', Intersight shall return a presigned URL in this property as part of the PATCH response. The user is expected to subsequently download the file using this URL.

        :return: The download_url of this SoftwarerepositoryLocalMachine.
        :rtype: str
        """
        return self._download_url

    @download_url.setter
    def download_url(self, download_url):
        """
        Sets the download_url of this SoftwarerepositoryLocalMachine.
        When import action in file MO is updated with 'GeneratePreSignedDownloadUrl', Intersight shall return a presigned URL in this property as part of the PATCH response. The user is expected to subsequently download the file using this URL.

        :param download_url: The download_url of this SoftwarerepositoryLocalMachine.
        :type: str
        """

        self._download_url = download_url

    @property
    def part_size(self):
        """
        Gets the part_size of this SoftwarerepositoryLocalMachine.
        Chunk size (in bytes) of the each part of file to be uploaded.

        :return: The part_size of this SoftwarerepositoryLocalMachine.
        :rtype: int
        """
        return self._part_size

    @part_size.setter
    def part_size(self, part_size):
        """
        Sets the part_size of this SoftwarerepositoryLocalMachine.
        Chunk size (in bytes) of the each part of file to be uploaded.

        :param part_size: The part_size of this SoftwarerepositoryLocalMachine.
        :type: int
        """

        self._part_size = part_size

    @property
    def upload_id(self):
        """
        Gets the upload_id of this SoftwarerepositoryLocalMachine.
        When the import action in file MO is updated with 'GeneratePreSignedUploadUrl', Intersight shall return a upload Id in this property as part of the PATCH response.

        :return: The upload_id of this SoftwarerepositoryLocalMachine.
        :rtype: str
        """
        return self._upload_id

    @upload_id.setter
    def upload_id(self, upload_id):
        """
        Sets the upload_id of this SoftwarerepositoryLocalMachine.
        When the import action in file MO is updated with 'GeneratePreSignedUploadUrl', Intersight shall return a upload Id in this property as part of the PATCH response.

        :param upload_id: The upload_id of this SoftwarerepositoryLocalMachine.
        :type: str
        """

        self._upload_id = upload_id

    @property
    def upload_url(self):
        """
        Gets the upload_url of this SoftwarerepositoryLocalMachine.
        When a file MO is created with 'LocalMachine' as the source, Intersight shall return a presigned URL in this property as part of the POST response. The user is expected to subsequently upload the file content using this URL. Once this upload has been completed, the user is expected to PATCH the Uploader object's transfer state to success.

        :return: The upload_url of this SoftwarerepositoryLocalMachine.
        :rtype: str
        """
        return self._upload_url

    @upload_url.setter
    def upload_url(self, upload_url):
        """
        Sets the upload_url of this SoftwarerepositoryLocalMachine.
        When a file MO is created with 'LocalMachine' as the source, Intersight shall return a presigned URL in this property as part of the POST response. The user is expected to subsequently upload the file content using this URL. Once this upload has been completed, the user is expected to PATCH the Uploader object's transfer state to success.

        :param upload_url: The upload_url of this SoftwarerepositoryLocalMachine.
        :type: str
        """

        self._upload_url = upload_url

    @property
    def upload_urls(self):
        """
        Gets the upload_urls of this SoftwarerepositoryLocalMachine.
        When an file MO is created with 'LocalMachine' as the source, Intersight shall return a list of presigned URLs in this property as part of the POST response. The user is expected to subsequently upload the file content in parts using these URLs. Once these uploads have been completed, the user is expected to PATCH the Uploader object's transfer state to success.

        :return: The upload_urls of this SoftwarerepositoryLocalMachine.
        :rtype: list[str]
        """
        return self._upload_urls

    @upload_urls.setter
    def upload_urls(self, upload_urls):
        """
        Sets the upload_urls of this SoftwarerepositoryLocalMachine.
        When an file MO is created with 'LocalMachine' as the source, Intersight shall return a list of presigned URLs in this property as part of the POST response. The user is expected to subsequently upload the file content in parts using these URLs. Once these uploads have been completed, the user is expected to PATCH the Uploader object's transfer state to success.

        :param upload_urls: The upload_urls of this SoftwarerepositoryLocalMachine.
        :type: list[str]
        """

        self._upload_urls = upload_urls

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

        for attr, _ in 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 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, SoftwarerepositoryLocalMachine):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other
# coding: utf-8 Cisco Intersight OpenAPI specification.      The Cisco Intersight OpenAPI specification.      OpenAPI spec version: 1.0.9-1461          Generated by: https://github.com/swagger-api/swagger-codegen.git 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. SoftwarerepositoryLocalMachine - a model defined in Swagger Gets the object_type of this SoftwarerepositoryLocalMachine.         The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the  ObjectType is optional.  The type is ambiguous when a managed object contains an array of nested documents, and the documents in the array are heterogeneous, i.e. the array can contain nested documents of different types.          :return: The object_type of this SoftwarerepositoryLocalMachine.         :rtype: str Sets the object_type of this SoftwarerepositoryLocalMachine.         The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the  ObjectType is optional.  The type is ambiguous when a managed object contains an array of nested documents, and the documents in the array are heterogeneous, i.e. the array can contain nested documents of different types.          :param object_type: The object_type of this SoftwarerepositoryLocalMachine.         :type: str Gets the download_url of this SoftwarerepositoryLocalMachine.         When import action in file MO is updated with 'GeneratePreSignedDownloadUrl', Intersight shall return a presigned URL in this property as part of the PATCH response. The user is expected to subsequently download the file using this URL.          :return: The download_url of this SoftwarerepositoryLocalMachine.         :rtype: str Sets the download_url of this SoftwarerepositoryLocalMachine.         When import action in file MO is updated with 'GeneratePreSignedDownloadUrl', Intersight shall return a presigned URL in this property as part of the PATCH response. The user is expected to subsequently download the file using this URL.          :param download_url: The download_url of this SoftwarerepositoryLocalMachine.         :type: str Gets the part_size of this SoftwarerepositoryLocalMachine.         Chunk size (in bytes) of the each part of file to be uploaded.          :return: The part_size of this SoftwarerepositoryLocalMachine.         :rtype: int Sets the part_size of this SoftwarerepositoryLocalMachine.         Chunk size (in bytes) of the each part of file to be uploaded.          :param part_size: The part_size of this SoftwarerepositoryLocalMachine.         :type: int Gets the upload_id of this SoftwarerepositoryLocalMachine.         When the import action in file MO is updated with 'GeneratePreSignedUploadUrl', Intersight shall return a upload Id in this property as part of the PATCH response.          :return: The upload_id of this SoftwarerepositoryLocalMachine.         :rtype: str Sets the upload_id of this SoftwarerepositoryLocalMachine.         When the import action in file MO is updated with 'GeneratePreSignedUploadUrl', Intersight shall return a upload Id in this property as part of the PATCH response.          :param upload_id: The upload_id of this SoftwarerepositoryLocalMachine.         :type: str Gets the upload_url of this SoftwarerepositoryLocalMachine.         When a file MO is created with 'LocalMachine' as the source, Intersight shall return a presigned URL in this property as part of the POST response. The user is expected to subsequently upload the file content using this URL. Once this upload has been completed, the user is expected to PATCH the Uploader object's transfer state to success.          :return: The upload_url of this SoftwarerepositoryLocalMachine.         :rtype: str Sets the upload_url of this SoftwarerepositoryLocalMachine.         When a file MO is created with 'LocalMachine' as the source, Intersight shall return a presigned URL in this property as part of the POST response. The user is expected to subsequently upload the file content using this URL. Once this upload has been completed, the user is expected to PATCH the Uploader object's transfer state to success.          :param upload_url: The upload_url of this SoftwarerepositoryLocalMachine.         :type: str Gets the upload_urls of this SoftwarerepositoryLocalMachine.         When an file MO is created with 'LocalMachine' as the source, Intersight shall return a list of presigned URLs in this property as part of the POST response. The user is expected to subsequently upload the file content in parts using these URLs. Once these uploads have been completed, the user is expected to PATCH the Uploader object's transfer state to success.          :return: The upload_urls of this SoftwarerepositoryLocalMachine.         :rtype: list[str] Sets the upload_urls of this SoftwarerepositoryLocalMachine.         When an file MO is created with 'LocalMachine' as the source, Intersight shall return a list of presigned URLs in this property as part of the POST response. The user is expected to subsequently upload the file content in parts using these URLs. Once these uploads have been completed, the user is expected to PATCH the Uploader object's transfer state to success.          :param upload_urls: The upload_urls of this SoftwarerepositoryLocalMachine.         :type: list[str] Returns the model properties as a dict Returns the string representation of the model For `print` and `pprint` Returns true if both objects are equal Returns true if both objects are not equal