# coding: utf-8
"""
Asset Management API
Service for configuring, reading and managing assets, asset ~ and aspect types. # noqa: E501
"""
import pprint
import re
import six
from mindsphere_core.exceptions import MindsphereClientError
[docs]class ReplaceFileRequest(object):
"""
Attributes:
attribute_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.
"""
attribute_types = {
'if_match': 'str',
'file': 'file',
'scope': 'str',
'name': 'str',
'description': 'str',
'file_id': 'str'
}
attribute_map = {
'if_match': 'If-Match',
'file': 'file',
'scope': 'scope',
'name': 'name',
'description': 'description',
'file_id': 'fileId'
}
def __init__(self, if_match=None, file=None, scope=None, name=None, description=None, file_id=None):
self._if_match = if_match
self._file = file
self._scope = scope
self._name = name
self._description = description
self._file_id = file_id
self.discriminator = None
@property
def if_match(self):
"""Gets the if_match of this ReplaceFileRequest.
:return: The if_match of this ReplaceFileRequest.
:rtype: str
"""
return self._if_match
@if_match.setter
def if_match(self, if_match):
"""Sets the if_match of this ReplaceFileRequest.
:param if_match: The if_match of this ReplaceFileRequest.
:type: str
"""
self._if_match = if_match
@property
def file(self):
"""Gets the file of this ReplaceFileRequest.
:return: The file of this ReplaceFileRequest.
:rtype: file
"""
return self._file
@file.setter
def file(self, file):
"""Sets the file of this ReplaceFileRequest.
:param file: The file of this ReplaceFileRequest.
:type: file
"""
self._file = file
@property
def scope(self):
"""Gets the scope of this ReplaceFileRequest.
:return: The scope of this ReplaceFileRequest.
:rtype: str
"""
return self._scope
@scope.setter
def scope(self, scope):
"""Sets the scope of this ReplaceFileRequest.
:param scope: The scope of this ReplaceFileRequest.
:type: str
"""
self._scope = scope
@property
def name(self):
"""Gets the name of this ReplaceFileRequest.
:return: The name of this ReplaceFileRequest.
:rtype: str
"""
return self._name
@name.setter
def name(self, name):
"""Sets the name of this ReplaceFileRequest.
:param name: The name of this ReplaceFileRequest.
:type: str
"""
self._name = name
@property
def description(self):
"""Gets the description of this ReplaceFileRequest.
:return: The description of this ReplaceFileRequest.
:rtype: str
"""
return self._description
@description.setter
def description(self, description):
"""Sets the description of this ReplaceFileRequest.
:param description: The description of this ReplaceFileRequest.
:type: str
"""
self._description = description
@property
def file_id(self):
"""Gets the file_id of this ReplaceFileRequest.
:return: The file_id of this ReplaceFileRequest.
:rtype: str
"""
return self._file_id
@file_id.setter
def file_id(self, file_id):
"""Sets the file_id of this ReplaceFileRequest.
:param file_id: The file_id of this ReplaceFileRequest.
:type: str
"""
self._file_id = file_id
[docs] def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
for attr, _ in six.iteritems(self.attribute_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(ReplaceFileRequest, dict):
for key, value in self.items():
result[key] = value
return result
[docs] 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, ReplaceFileRequest):
return False
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""Returns true if both objects are not equal"""
return not self == other