# coding: utf-8 import pprint import re import six class ShowFunctionCodeResponse(object): """ Attributes: openapi_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. """ openapi_types = { 'func_urn': 'str', 'func_name': 'str', 'domain_id': 'str', 'runtime': 'str', 'code_type': 'str', 'code_url': 'str', 'code_filename': 'str', 'code_size': 'int', 'digest': 'str', 'last_modified': 'datetime', 'func_code': 'FuncCode', 'concurrency': 'int', 'depend_list': 'list[str]', 'strategy_config': 'StrategyConfig', 'dependencies': 'list[Dependency]' } attribute_map = { 'func_urn': 'func_urn', 'func_name': 'func_name', 'domain_id': 'domain_id', 'runtime': 'runtime', 'code_type': 'code_type', 'code_url': 'code_url', 'code_filename': 'code_filename', 'code_size': 'code_size', 'digest': 'digest', 'last_modified': 'last_modified', 'func_code': 'func_code', 'concurrency': 'concurrency', 'depend_list': 'depend_list', 'strategy_config': 'strategy_config', 'dependencies': 'dependencies' } def __init__(self, func_urn=None, func_name=None, domain_id=None, runtime=None, code_type=None, code_url=None, code_filename=None, code_size=None, digest=None, last_modified=None, func_code=None, concurrency=None, depend_list=None, strategy_config=None, dependencies=None): # noqa: E501 """ShowFunctionCodeResponse - a model defined in huaweicloud sdk""" self._func_urn = None self._func_name = None self._domain_id = None self._runtime = None self._code_type = None self._code_url = None self._code_filename = None self._code_size = None self._digest = None self._last_modified = None self._func_code = None self._concurrency = None self._depend_list = None self._strategy_config = None self._dependencies = None self.discriminator = None if func_urn is not None: self.func_urn = func_urn if func_name is not None: self.func_name = func_name if domain_id is not None: self.domain_id = domain_id if runtime is not None: self.runtime = runtime if code_type is not None: self.code_type = code_type if code_url is not None: self.code_url = code_url if code_filename is not None: self.code_filename = code_filename if code_size is not None: self.code_size = code_size if digest is not None: self.digest = digest if last_modified is not None: self.last_modified = last_modified if func_code is not None: self.func_code = func_code if concurrency is not None: self.concurrency = concurrency if depend_list is not None: self.depend_list = depend_list if strategy_config is not None: self.strategy_config = strategy_config if dependencies is not None: self.dependencies = dependencies @property def func_urn(self): """Gets the func_urn of this ShowFunctionCodeResponse. 函数的URN(Uniform Resource Name),唯一标识函数。 :return: The func_urn of this ShowFunctionCodeResponse. :rtype: str """ return self._func_urn @func_urn.setter def func_urn(self, func_urn): """Sets the func_urn of this ShowFunctionCodeResponse. 函数的URN(Uniform Resource Name),唯一标识函数。 :param func_urn: The func_urn of this ShowFunctionCodeResponse. :type: str """ self._func_urn = func_urn @property def func_name(self): """Gets the func_name of this ShowFunctionCodeResponse. 函数名称。 :return: The func_name of this ShowFunctionCodeResponse. :rtype: str """ return self._func_name @func_name.setter def func_name(self, func_name): """Sets the func_name of this ShowFunctionCodeResponse. 函数名称。 :param func_name: The func_name of this ShowFunctionCodeResponse. :type: str """ self._func_name = func_name @property def domain_id(self): """Gets the domain_id of this ShowFunctionCodeResponse. 域名id。 :return: The domain_id of this ShowFunctionCodeResponse. :rtype: str """ return self._domain_id @domain_id.setter def domain_id(self, domain_id): """Sets the domain_id of this ShowFunctionCodeResponse. 域名id。 :param domain_id: The domain_id of this ShowFunctionCodeResponse. :type: str """ self._domain_id = domain_id @property def runtime(self): """Gets the runtime of this ShowFunctionCodeResponse. FunctionGraph函数的执行环境 支持Node.js6.10、Python2.7、Python3.6、Java8、Go1.8、Node.js 8.10、C#.NET Core 2.0、C#.NET Core 2.1、PHP7.3。 Python2.7: Python语言2.7版本。 Python3.6: Pyton语言3.6版本。 Go1.8: Go语言1.8版本。 Java8: Java语言8版本。 Node.js6.10: Nodejs语言6.10版本。 Node.js8.10: Nodejs语言8.10版本。 C#(.NET Core 2.0): C#语言2.0版本。 C#(.NET Core 2.1): C#语言2.1版本。 C#(.NET Core 3.1): C#语言3.1版本。 Custom: 自定义运行时。 PHP7.3: Php语言7.3版本。 :return: The runtime of this ShowFunctionCodeResponse. :rtype: str """ return self._runtime @runtime.setter def runtime(self, runtime): """Sets the runtime of this ShowFunctionCodeResponse. FunctionGraph函数的执行环境 支持Node.js6.10、Python2.7、Python3.6、Java8、Go1.8、Node.js 8.10、C#.NET Core 2.0、C#.NET Core 2.1、PHP7.3。 Python2.7: Python语言2.7版本。 Python3.6: Pyton语言3.6版本。 Go1.8: Go语言1.8版本。 Java8: Java语言8版本。 Node.js6.10: Nodejs语言6.10版本。 Node.js8.10: Nodejs语言8.10版本。 C#(.NET Core 2.0): C#语言2.0版本。 C#(.NET Core 2.1): C#语言2.1版本。 C#(.NET Core 3.1): C#语言3.1版本。 Custom: 自定义运行时。 PHP7.3: Php语言7.3版本。 :param runtime: The runtime of this ShowFunctionCodeResponse. :type: str """ self._runtime = runtime @property def code_type(self): """Gets the code_type of this ShowFunctionCodeResponse. 函数代码类型,取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。 :return: The code_type of this ShowFunctionCodeResponse. :rtype: str """ return self._code_type @code_type.setter def code_type(self, code_type): """Sets the code_type of this ShowFunctionCodeResponse. 函数代码类型,取值有4种。 inline: UI在线编辑代码。 zip: 函数代码为zip包。 obs: 函数代码来源于obs存储。 jar: 函数代码为jar包,主要针对Java函数。 :param code_type: The code_type of this ShowFunctionCodeResponse. :type: str """ self._code_type = code_type @property def code_url(self): """Gets the code_url of this ShowFunctionCodeResponse. 当CodeType为obs时,该值为函数代码包在OBS上的地址,CodeType为其他值时,该字段为空。 :return: The code_url of this ShowFunctionCodeResponse. :rtype: str """ return self._code_url @code_url.setter def code_url(self, code_url): """Sets the code_url of this ShowFunctionCodeResponse. 当CodeType为obs时,该值为函数代码包在OBS上的地址,CodeType为其他值时,该字段为空。 :param code_url: The code_url of this ShowFunctionCodeResponse. :type: str """ self._code_url = code_url @property def code_filename(self): """Gets the code_filename of this ShowFunctionCodeResponse. 函数的文件名,当CodeType为jar/zip时必须提供该字段,inline和obs不需要提供。 :return: The code_filename of this ShowFunctionCodeResponse. :rtype: str """ return self._code_filename @code_filename.setter def code_filename(self, code_filename): """Sets the code_filename of this ShowFunctionCodeResponse. 函数的文件名,当CodeType为jar/zip时必须提供该字段,inline和obs不需要提供。 :param code_filename: The code_filename of this ShowFunctionCodeResponse. :type: str """ self._code_filename = code_filename @property def code_size(self): """Gets the code_size of this ShowFunctionCodeResponse. 函数大小,单位:字节。 :return: The code_size of this ShowFunctionCodeResponse. :rtype: int """ return self._code_size @code_size.setter def code_size(self, code_size): """Sets the code_size of this ShowFunctionCodeResponse. 函数大小,单位:字节。 :param code_size: The code_size of this ShowFunctionCodeResponse. :type: int """ self._code_size = code_size @property def digest(self): """Gets the digest of this ShowFunctionCodeResponse. 函数代码SHA512 hash值,用于判断函数是否变化。 :return: The digest of this ShowFunctionCodeResponse. :rtype: str """ return self._digest @digest.setter def digest(self, digest): """Sets the digest of this ShowFunctionCodeResponse. 函数代码SHA512 hash值,用于判断函数是否变化。 :param digest: The digest of this ShowFunctionCodeResponse. :type: str """ self._digest = digest @property def last_modified(self): """Gets the last_modified of this ShowFunctionCodeResponse. 函数最后一次更新时间。 :return: The last_modified of this ShowFunctionCodeResponse. :rtype: datetime """ return self._last_modified @last_modified.setter def last_modified(self, last_modified): """Sets the last_modified of this ShowFunctionCodeResponse. 函数最后一次更新时间。 :param last_modified: The last_modified of this ShowFunctionCodeResponse. :type: datetime """ self._last_modified = last_modified @property def func_code(self): """Gets the func_code of this ShowFunctionCodeResponse. :return: The func_code of this ShowFunctionCodeResponse. :rtype: FuncCode """ return self._func_code @func_code.setter def func_code(self, func_code): """Sets the func_code of this ShowFunctionCodeResponse. :param func_code: The func_code of this ShowFunctionCodeResponse. :type: FuncCode """ self._func_code = func_code @property def concurrency(self): """Gets the concurrency of this ShowFunctionCodeResponse. :return: The concurrency of this ShowFunctionCodeResponse. :rtype: int """ return self._concurrency @concurrency.setter def concurrency(self, concurrency): """Sets the concurrency of this ShowFunctionCodeResponse. :param concurrency: The concurrency of this ShowFunctionCodeResponse. :type: int """ self._concurrency = concurrency @property def depend_list(self): """Gets the depend_list of this ShowFunctionCodeResponse. 依赖id列表 :return: The depend_list of this ShowFunctionCodeResponse. :rtype: list[str] """ return self._depend_list @depend_list.setter def depend_list(self, depend_list): """Sets the depend_list of this ShowFunctionCodeResponse. 依赖id列表 :param depend_list: The depend_list of this ShowFunctionCodeResponse. :type: list[str] """ self._depend_list = depend_list @property def strategy_config(self): """Gets the strategy_config of this ShowFunctionCodeResponse. :return: The strategy_config of this ShowFunctionCodeResponse. :rtype: StrategyConfig """ return self._strategy_config @strategy_config.setter def strategy_config(self, strategy_config): """Sets the strategy_config of this ShowFunctionCodeResponse. :param strategy_config: The strategy_config of this ShowFunctionCodeResponse. :type: StrategyConfig """ self._strategy_config = strategy_config @property def dependencies(self): """Gets the dependencies of this ShowFunctionCodeResponse. 函数依赖代码包列表。 :return: The dependencies of this ShowFunctionCodeResponse. :rtype: list[Dependency] """ return self._dependencies @dependencies.setter def dependencies(self, dependencies): """Sets the dependencies of this ShowFunctionCodeResponse. 函数依赖代码包列表。 :param dependencies: The dependencies of this ShowFunctionCodeResponse. :type: list[Dependency] """ self._dependencies = dependencies def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_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 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, ShowFunctionCodeResponse): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other