release 3.0.29-beta source code for python
This commit is contained in:
parent
92aeb48315
commit
114bc594cc
46
CHANGELOG.md
46
CHANGELOG.md
|
@ -1,3 +1,49 @@
|
|||
## 3.0.29-beta 2020-12-31
|
||||
## HuaweiCloud SDK CloudIDE
|
||||
- ### Features
|
||||
- Support more interface: ShowAccountStatus
|
||||
- ### Bug Fix
|
||||
- None
|
||||
- ### Change
|
||||
- None
|
||||
|
||||
## HuaweiCloud SDK DCS
|
||||
- ### Features
|
||||
- None
|
||||
- ### Bug Fix
|
||||
- Modify the interface return data type to prevent deserialization failure:
|
||||
- ListSlowlog: change data type of `Tags` from Tag to ResourceTag.
|
||||
- ListInstances: change data type of `duration` from int32 to string.
|
||||
- ShowBigkeyScanTaskDetails: change data type of `db` from int32 to string.
|
||||
- ShowHotkeyTaskDetails: change data type of `db` from int32 to string.
|
||||
- ### Change
|
||||
- None
|
||||
|
||||
## HuaweiCloud SDK DGC
|
||||
- ### Features
|
||||
- Support `Data Lake Governance Center` service.
|
||||
- ### Bug Fix
|
||||
- None
|
||||
- ### Change
|
||||
- None
|
||||
|
||||
## HuaweiCloud SDK RDS
|
||||
- ### Features
|
||||
- None
|
||||
- ### Bug Fix
|
||||
- None
|
||||
- ### Change
|
||||
- Interface modification: response type of interface `CreateInstance` adjustment.
|
||||
|
||||
## HuaweiCloud SDK SMN
|
||||
- ### Features
|
||||
- None
|
||||
- ### Bug Fix
|
||||
- Modify the request parameters of interface `PublishMessage` from Object to Map<String, String>
|
||||
- ### Change
|
||||
- None
|
||||
|
||||
|
||||
## 3.0.28-beta 2020-12-28
|
||||
## HuaweiCloud SDK DCS
|
||||
- ### Features
|
||||
|
|
|
@ -1,3 +1,49 @@
|
|||
## 3.0.29-beta 2020-12-31
|
||||
## HuaweiCloud SDK CloudIDE
|
||||
- ### 新增特性
|
||||
- 新增支持接口:查询当前账号访问权限(ShowAccountStatus)
|
||||
- ### 解决问题
|
||||
- 无
|
||||
- ### 特性变更
|
||||
- 无
|
||||
|
||||
## HuaweiCloud SDK DCS
|
||||
- ### 新增特性
|
||||
- 无
|
||||
- ### 解决问题
|
||||
- 修正接口返回数据类型避免反序列化失败:
|
||||
- 查询所有实例列表接口:响应参数`Tags`类型调整 Tag → ResourceTag
|
||||
- 查询慢日志接口:响应参数`duration`类型调整 int32 → string
|
||||
- 查询大key分析详情接口:响应参数`db`类型调整 int32 → string
|
||||
- 查询热key分析详情接口:响应参数`db`类型调整 int32 → string
|
||||
- ### 特性变更
|
||||
- 无
|
||||
|
||||
## HuaweiCloud SDK DGC
|
||||
- ### 新增特性
|
||||
- 支持数据湖治理中心服务
|
||||
- ### 解决问题
|
||||
- 无
|
||||
- ### 特性变更
|
||||
- 无
|
||||
|
||||
## HuaweiCloud SDK RDS
|
||||
- ### 新增特性
|
||||
- 无
|
||||
- ### 解决问题
|
||||
- 无
|
||||
- ### 特性变更
|
||||
- 创建实例接口响应类型调整
|
||||
|
||||
## HuaweiCloud SDK SMN
|
||||
- ### 新增特性
|
||||
- 无
|
||||
- ### 解决问题
|
||||
- 修正消息发布接口请求参数:Object → Map<String, String>
|
||||
- ### 特性变更
|
||||
- 无
|
||||
|
||||
|
||||
## 3.0.28-beta 2020-12-28
|
||||
## HuaweiCloud SDK DCS
|
||||
- ### 新增特性
|
||||
|
|
10
README.md
10
README.md
|
@ -148,7 +148,7 @@ You must install `huaweicloudsdkcore` library no matter which product/service de
|
|||
|
||||
``` python
|
||||
# Initialize specified service client instance, take VpcClient for example
|
||||
client = VpcClient.new_builder(VpcClient) \
|
||||
client = VpcClient.new_builder() \
|
||||
.with_http_config(config) \
|
||||
.with_credentials(credentials) \
|
||||
.with_endpoint(endpoint) \
|
||||
|
@ -179,7 +179,7 @@ You must install `huaweicloudsdkcore` library no matter which product/service de
|
|||
|
||||
``` python
|
||||
# Initialize specified service client instance, take IamClient for example
|
||||
client = IamClient.new_builder(IamClient) \
|
||||
client = IamClient.new_builder() \
|
||||
.with_http_config(config) \
|
||||
.with_credentials(credentials) \
|
||||
.with_region(IamRegion.CN_NORTH_4) \
|
||||
|
@ -230,7 +230,7 @@ You must install `huaweicloudsdkcore` library no matter which product/service de
|
|||
|
||||
``` python
|
||||
# Initialize asynchronous client, take VpcAsyncClient for example
|
||||
vpc_client = VpcAsyncClient.new_builder(VpcAsyncClient) \
|
||||
vpc_client = VpcAsyncClient.new_builder() \
|
||||
.with_http_config(config) \
|
||||
.with_credentials(credentials) \
|
||||
.with_endpoint(endpoint) \
|
||||
|
@ -271,7 +271,7 @@ You must install `huaweicloudsdkcore` library no matter which product/service de
|
|||
base = base + "< Body: %s" % response.content
|
||||
logger.debug(base)
|
||||
|
||||
client = VpcClient.new_builder(VpcClient) \
|
||||
client = VpcClient.new_builder() \
|
||||
.with_http_config(config) \
|
||||
.with_credentials(credentials) \
|
||||
.with_endpoint(endpoint) \
|
||||
|
@ -322,7 +322,7 @@ You must install `huaweicloudsdkcore` library no matter which product/service de
|
|||
config.ignore_ssl_verification = True
|
||||
credentials = BasicCredentials(ak, sk, project_id)
|
||||
|
||||
vpc_client = VpcClient.new_builder(VpcClient) \
|
||||
vpc_client = VpcClient.new_builder() \
|
||||
.with_http_config(config) \
|
||||
.with_credentials(credentials) \
|
||||
.with_endpoint(endpoint) \
|
||||
|
|
10
README_CN.md
10
README_CN.md
|
@ -147,7 +147,7 @@
|
|||
|
||||
``` python
|
||||
# 初始化指定云服务的客户端 {Service}Client ,以初始化 VpcClient 为例
|
||||
client = VpcClient.new_builder(VpcClient) \
|
||||
client = VpcClient.new_builder() \
|
||||
.with_http_config(config) \
|
||||
.with_credentials(credentials) \
|
||||
.with_endpoint(endpoint) \
|
||||
|
@ -178,7 +178,7 @@
|
|||
|
||||
``` python
|
||||
# 初始化指定云服务的客户端 {Service}Client ,以初始化 IamClient 为例
|
||||
client = IamClient.new_builder(IamClient) \
|
||||
client = IamClient.new_builder() \
|
||||
.with_http_config(config) \
|
||||
.with_credentials(credentials) \
|
||||
.with_region(IamRegion.CN_NORTH_4) \
|
||||
|
@ -228,7 +228,7 @@
|
|||
|
||||
``` python
|
||||
# 初始化异步客户端,以初始化 VpcAsyncClient 为例
|
||||
vpc_client = VpcAsyncClient.new_builder(VpcAsyncClient) \
|
||||
vpc_client = VpcAsyncClient.new_builder() \
|
||||
.with_http_config(config) \
|
||||
.with_credentials(credentials) \
|
||||
.with_endpoint(endpoint) \
|
||||
|
@ -270,7 +270,7 @@
|
|||
base = base + "< Body: %s" % response.content
|
||||
logger.debug(base)
|
||||
|
||||
client = VpcClient.new_builder(VpcClient) \
|
||||
client = VpcClient.new_builder() \
|
||||
.with_http_config(config) \
|
||||
.with_credentials(credentials) \
|
||||
.with_endpoint(endpoint) \
|
||||
|
@ -321,7 +321,7 @@ if __name__ == "__main__":
|
|||
config.ignore_ssl_verification = True
|
||||
credentials = BasicCredentials(ak, sk, project_id)
|
||||
|
||||
vpc_client = VpcClient.new_builder(VpcClient) \
|
||||
vpc_client = VpcClient.new_builder() \
|
||||
.with_http_config(config) \
|
||||
.with_credentials(credentials) \
|
||||
.with_endpoint(endpoint) \
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkexample"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class ApigAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkapig.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "ApigClient":
|
||||
raise TypeError("client type error, support client type is ApigClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def associate_certificate_v2_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class ApigClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkapig.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "ApigClient":
|
||||
raise TypeError("client type error, support client type is ApigClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def associate_certificate_v2(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkapig"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class AsAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkas.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "AsClient":
|
||||
raise TypeError("client type error, support client type is AsClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def batch_delete_scaling_configs_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class AsClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkas.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "AsClient":
|
||||
raise TypeError("client type error, support client type is AsClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def batch_delete_scaling_configs(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkas"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class BcsAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkbcs.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "BcsClient":
|
||||
raise TypeError("client type error, support client type is BcsClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def batch_add_peers_to_channel_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class BcsClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkbcs.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "BcsClient":
|
||||
raise TypeError("client type error, support client type is BcsClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def batch_add_peers_to_channel(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkbcs"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class BmsAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkbms.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "BmsClient":
|
||||
raise TypeError("client type error, support client type is BmsClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def attach_baremetal_server_volume_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class BmsClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkbms.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "BmsClient":
|
||||
raise TypeError("client type error, support client type is BmsClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def attach_baremetal_server_volume(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkbms"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class BssAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkbss.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls, "GlobalCredentials")
|
||||
|
||||
if clazz.__name__ != "BssClient":
|
||||
raise TypeError("client type error, support client type is BssClient")
|
||||
|
||||
return ClientBuilder(clazz, "GlobalCredentials")
|
||||
|
||||
def list_conversions_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class BssClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkbss.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls, "GlobalCredentials")
|
||||
|
||||
if clazz.__name__ != "BssClient":
|
||||
raise TypeError("client type error, support client type is BssClient")
|
||||
|
||||
return ClientBuilder(clazz, "GlobalCredentials")
|
||||
|
||||
def list_conversions(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkbss"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class BssintlAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkbssintl.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls, "GlobalCredentials")
|
||||
|
||||
if clazz.__name__ != "BssintlClient":
|
||||
raise TypeError("client type error, support client type is BssintlClient")
|
||||
|
||||
return ClientBuilder(clazz, "GlobalCredentials")
|
||||
|
||||
def list_conversions_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class BssintlClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkbssintl.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls, "GlobalCredentials")
|
||||
|
||||
if clazz.__name__ != "BssintlClient":
|
||||
raise TypeError("client type error, support client type is BssintlClient")
|
||||
|
||||
return ClientBuilder(clazz, "GlobalCredentials")
|
||||
|
||||
def list_conversions(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkbssintl"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class CbrAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkcbr.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CbrClient":
|
||||
raise TypeError("client type error, support client type is CbrClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def add_member_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class CbrClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkcbr.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CbrClient":
|
||||
raise TypeError("client type error, support client type is CbrClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def add_member(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkcbr"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class CceAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkcce.v3.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CceClient":
|
||||
raise TypeError("client type error, support client type is CceClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def awake_cluster_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class CceClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkcce.v3.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CceClient":
|
||||
raise TypeError("client type error, support client type is CceClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def awake_cluster(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkcce"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class CesAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkces.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CesClient":
|
||||
raise TypeError("client type error, support client type is CesClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def batch_list_metric_data_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class CesClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkces.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CesClient":
|
||||
raise TypeError("client type error, support client type is CesClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def batch_list_metric_data(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkces"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class ClassroomAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkclassroom.v3.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "ClassroomClient":
|
||||
raise TypeError("client type error, support client type is ClassroomClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def list_classroom_members_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class ClassroomClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkclassroom.v3.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "ClassroomClient":
|
||||
raise TypeError("client type error, support client type is ClassroomClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def list_classroom_members(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkclassroom"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -6,6 +6,7 @@ from __future__ import absolute_import
|
|||
from huaweicloudsdkcloudide.v2.cloudide_client import CloudIDEClient
|
||||
from huaweicloudsdkcloudide.v2.cloudide_async_client import CloudIDEAsyncClient
|
||||
# import models into sdk package
|
||||
from huaweicloudsdkcloudide.v2.model.account_status import AccountStatus
|
||||
from huaweicloudsdkcloudide.v2.model.attributes import Attributes
|
||||
from huaweicloudsdkcloudide.v2.model.check_name_request import CheckNameRequest
|
||||
from huaweicloudsdkcloudide.v2.model.check_name_response import CheckNameResponse
|
||||
|
@ -35,6 +36,8 @@ from huaweicloudsdkcloudide.v2.model.recipe import Recipe
|
|||
from huaweicloudsdkcloudide.v2.model.resource_price import ResourcePrice
|
||||
from huaweicloudsdkcloudide.v2.model.role import Role
|
||||
from huaweicloudsdkcloudide.v2.model.role_action import RoleAction
|
||||
from huaweicloudsdkcloudide.v2.model.show_account_status_request import ShowAccountStatusRequest
|
||||
from huaweicloudsdkcloudide.v2.model.show_account_status_response import ShowAccountStatusResponse
|
||||
from huaweicloudsdkcloudide.v2.model.show_instance_request import ShowInstanceRequest
|
||||
from huaweicloudsdkcloudide.v2.model.show_instance_response import ShowInstanceResponse
|
||||
from huaweicloudsdkcloudide.v2.model.show_price_request import ShowPriceRequest
|
||||
|
@ -44,6 +47,7 @@ from huaweicloudsdkcloudide.v2.model.stacks import Stacks
|
|||
from huaweicloudsdkcloudide.v2.model.stacks_attribute import StacksAttribute
|
||||
from huaweicloudsdkcloudide.v2.model.stacks_config import StacksConfig
|
||||
from huaweicloudsdkcloudide.v2.model.stacks_tag import StacksTag
|
||||
from huaweicloudsdkcloudide.v2.model.start_instance_param import StartInstanceParam
|
||||
from huaweicloudsdkcloudide.v2.model.start_instance_request import StartInstanceRequest
|
||||
from huaweicloudsdkcloudide.v2.model.start_instance_response import StartInstanceResponse
|
||||
from huaweicloudsdkcloudide.v2.model.stop_instance_request import StopInstanceRequest
|
||||
|
|
|
@ -38,8 +38,14 @@ class CloudIDEAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkcloudide.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CloudIDEClient":
|
||||
raise TypeError("client type error, support client type is CloudIDEClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def list_project_templates_async(self, request):
|
||||
|
@ -171,6 +177,67 @@ class CloudIDEAsyncClient(Client):
|
|||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def show_account_status_async(self, request):
|
||||
"""查询当前账号访问权限
|
||||
|
||||
查询当前账号访问权限
|
||||
|
||||
:param ShowAccountStatusRequest request
|
||||
:return: ShowAccountStatusResponse
|
||||
"""
|
||||
return self.show_account_status_with_http_info(request)
|
||||
|
||||
def show_account_status_with_http_info(self, request):
|
||||
"""查询当前账号访问权限
|
||||
|
||||
查询当前账号访问权限
|
||||
|
||||
:param ShowAccountStatusRequest request
|
||||
:return: ShowAccountStatusResponse
|
||||
"""
|
||||
|
||||
all_params = []
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v2/permission/account/status',
|
||||
method='GET',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='ShowAccountStatusResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def show_price_async(self, request):
|
||||
"""获取技术栈计费信息
|
||||
|
||||
|
@ -507,7 +574,7 @@ class CloudIDEAsyncClient(Client):
|
|||
:return: ListInstancesResponse
|
||||
"""
|
||||
|
||||
all_params = ['limit', 'offset', 'search', 'sort_dir', 'sort_key']
|
||||
all_params = ['limit', 'offset', 'is_temporary', 'label', 'search', 'sort_dir', 'sort_key']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
|
@ -522,6 +589,10 @@ class CloudIDEAsyncClient(Client):
|
|||
query_params.append(('limit', local_var_params['limit']))
|
||||
if 'offset' in local_var_params:
|
||||
query_params.append(('offset', local_var_params['offset']))
|
||||
if 'is_temporary' in local_var_params:
|
||||
query_params.append(('is_temporary', local_var_params['is_temporary']))
|
||||
if 'label' in local_var_params:
|
||||
query_params.append(('label', local_var_params['label']))
|
||||
if 'search' in local_var_params:
|
||||
query_params.append(('search', local_var_params['search']))
|
||||
if 'sort_dir' in local_var_params:
|
||||
|
@ -712,7 +783,7 @@ class CloudIDEAsyncClient(Client):
|
|||
:return: StartInstanceResponse
|
||||
"""
|
||||
|
||||
all_params = ['instance_id']
|
||||
all_params = ['instance_id', 'start_instance_request_body']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
|
@ -731,6 +802,8 @@ class CloudIDEAsyncClient(Client):
|
|||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in local_var_params:
|
||||
body_params = local_var_params['body']
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
|
|
|
@ -38,8 +38,14 @@ class CloudIDEClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkcloudide.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CloudIDEClient":
|
||||
raise TypeError("client type error, support client type is CloudIDEClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def list_project_templates(self, request):
|
||||
|
@ -171,6 +177,67 @@ class CloudIDEClient(Client):
|
|||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def show_account_status(self, request):
|
||||
"""查询当前账号访问权限
|
||||
|
||||
查询当前账号访问权限
|
||||
|
||||
:param ShowAccountStatusRequest request
|
||||
:return: ShowAccountStatusResponse
|
||||
"""
|
||||
return self.show_account_status_with_http_info(request)
|
||||
|
||||
def show_account_status_with_http_info(self, request):
|
||||
"""查询当前账号访问权限
|
||||
|
||||
查询当前账号访问权限
|
||||
|
||||
:param ShowAccountStatusRequest request
|
||||
:return: ShowAccountStatusResponse
|
||||
"""
|
||||
|
||||
all_params = []
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v2/permission/account/status',
|
||||
method='GET',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='ShowAccountStatusResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def show_price(self, request):
|
||||
"""获取技术栈计费信息
|
||||
|
||||
|
@ -507,7 +574,7 @@ class CloudIDEClient(Client):
|
|||
:return: ListInstancesResponse
|
||||
"""
|
||||
|
||||
all_params = ['limit', 'offset', 'search', 'sort_dir', 'sort_key']
|
||||
all_params = ['limit', 'offset', 'is_temporary', 'label', 'search', 'sort_dir', 'sort_key']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
|
@ -522,6 +589,10 @@ class CloudIDEClient(Client):
|
|||
query_params.append(('limit', local_var_params['limit']))
|
||||
if 'offset' in local_var_params:
|
||||
query_params.append(('offset', local_var_params['offset']))
|
||||
if 'is_temporary' in local_var_params:
|
||||
query_params.append(('is_temporary', local_var_params['is_temporary']))
|
||||
if 'label' in local_var_params:
|
||||
query_params.append(('label', local_var_params['label']))
|
||||
if 'search' in local_var_params:
|
||||
query_params.append(('search', local_var_params['search']))
|
||||
if 'sort_dir' in local_var_params:
|
||||
|
@ -712,7 +783,7 @@ class CloudIDEClient(Client):
|
|||
:return: StartInstanceResponse
|
||||
"""
|
||||
|
||||
all_params = ['instance_id']
|
||||
all_params = ['instance_id', 'start_instance_request_body']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
|
@ -731,6 +802,8 @@ class CloudIDEClient(Client):
|
|||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in local_var_params:
|
||||
body_params = local_var_params['body']
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
# import models into model package
|
||||
from huaweicloudsdkcloudide.v2.model.account_status import AccountStatus
|
||||
from huaweicloudsdkcloudide.v2.model.attributes import Attributes
|
||||
from huaweicloudsdkcloudide.v2.model.check_name_request import CheckNameRequest
|
||||
from huaweicloudsdkcloudide.v2.model.check_name_response import CheckNameResponse
|
||||
|
@ -32,6 +33,8 @@ from huaweicloudsdkcloudide.v2.model.recipe import Recipe
|
|||
from huaweicloudsdkcloudide.v2.model.resource_price import ResourcePrice
|
||||
from huaweicloudsdkcloudide.v2.model.role import Role
|
||||
from huaweicloudsdkcloudide.v2.model.role_action import RoleAction
|
||||
from huaweicloudsdkcloudide.v2.model.show_account_status_request import ShowAccountStatusRequest
|
||||
from huaweicloudsdkcloudide.v2.model.show_account_status_response import ShowAccountStatusResponse
|
||||
from huaweicloudsdkcloudide.v2.model.show_instance_request import ShowInstanceRequest
|
||||
from huaweicloudsdkcloudide.v2.model.show_instance_response import ShowInstanceResponse
|
||||
from huaweicloudsdkcloudide.v2.model.show_price_request import ShowPriceRequest
|
||||
|
@ -41,6 +44,7 @@ from huaweicloudsdkcloudide.v2.model.stacks import Stacks
|
|||
from huaweicloudsdkcloudide.v2.model.stacks_attribute import StacksAttribute
|
||||
from huaweicloudsdkcloudide.v2.model.stacks_config import StacksConfig
|
||||
from huaweicloudsdkcloudide.v2.model.stacks_tag import StacksTag
|
||||
from huaweicloudsdkcloudide.v2.model.start_instance_param import StartInstanceParam
|
||||
from huaweicloudsdkcloudide.v2.model.start_instance_request import StartInstanceRequest
|
||||
from huaweicloudsdkcloudide.v2.model.start_instance_response import StartInstanceResponse
|
||||
from huaweicloudsdkcloudide.v2.model.stop_instance_request import StopInstanceRequest
|
||||
|
|
|
@ -0,0 +1,191 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class AccountStatus:
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'cur_org_create_role': 'bool',
|
||||
'cur_org_open': 'bool',
|
||||
'has_free_trial': 'bool',
|
||||
'show_manage': 'bool'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'cur_org_create_role': 'cur_org_create_role',
|
||||
'cur_org_open': 'cur_org_open',
|
||||
'has_free_trial': 'has_free_trial',
|
||||
'show_manage': 'show_manage'
|
||||
}
|
||||
|
||||
def __init__(self, cur_org_create_role=None, cur_org_open=None, has_free_trial=None, show_manage=None):
|
||||
"""AccountStatus - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
||||
self._cur_org_create_role = None
|
||||
self._cur_org_open = None
|
||||
self._has_free_trial = None
|
||||
self._show_manage = None
|
||||
self.discriminator = None
|
||||
|
||||
if cur_org_create_role is not None:
|
||||
self.cur_org_create_role = cur_org_create_role
|
||||
if cur_org_open is not None:
|
||||
self.cur_org_open = cur_org_open
|
||||
if has_free_trial is not None:
|
||||
self.has_free_trial = has_free_trial
|
||||
if show_manage is not None:
|
||||
self.show_manage = show_manage
|
||||
|
||||
@property
|
||||
def cur_org_create_role(self):
|
||||
"""Gets the cur_org_create_role of this AccountStatus.
|
||||
|
||||
是否有创建实例权限
|
||||
|
||||
:return: The cur_org_create_role of this AccountStatus.
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._cur_org_create_role
|
||||
|
||||
@cur_org_create_role.setter
|
||||
def cur_org_create_role(self, cur_org_create_role):
|
||||
"""Sets the cur_org_create_role of this AccountStatus.
|
||||
|
||||
是否有创建实例权限
|
||||
|
||||
:param cur_org_create_role: The cur_org_create_role of this AccountStatus.
|
||||
:type: bool
|
||||
"""
|
||||
self._cur_org_create_role = cur_org_create_role
|
||||
|
||||
@property
|
||||
def cur_org_open(self):
|
||||
"""Gets the cur_org_open of this AccountStatus.
|
||||
|
||||
账号所属租户是否开通服务
|
||||
|
||||
:return: The cur_org_open of this AccountStatus.
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._cur_org_open
|
||||
|
||||
@cur_org_open.setter
|
||||
def cur_org_open(self, cur_org_open):
|
||||
"""Sets the cur_org_open of this AccountStatus.
|
||||
|
||||
账号所属租户是否开通服务
|
||||
|
||||
:param cur_org_open: The cur_org_open of this AccountStatus.
|
||||
:type: bool
|
||||
"""
|
||||
self._cur_org_open = cur_org_open
|
||||
|
||||
@property
|
||||
def has_free_trial(self):
|
||||
"""Gets the has_free_trial of this AccountStatus.
|
||||
|
||||
免费试用
|
||||
|
||||
:return: The has_free_trial of this AccountStatus.
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._has_free_trial
|
||||
|
||||
@has_free_trial.setter
|
||||
def has_free_trial(self, has_free_trial):
|
||||
"""Sets the has_free_trial of this AccountStatus.
|
||||
|
||||
免费试用
|
||||
|
||||
:param has_free_trial: The has_free_trial of this AccountStatus.
|
||||
:type: bool
|
||||
"""
|
||||
self._has_free_trial = has_free_trial
|
||||
|
||||
@property
|
||||
def show_manage(self):
|
||||
"""Gets the show_manage of this AccountStatus.
|
||||
|
||||
是否有管理入口的权限
|
||||
|
||||
:return: The show_manage of this AccountStatus.
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._show_manage
|
||||
|
||||
@show_manage.setter
|
||||
def show_manage(self, show_manage):
|
||||
"""Sets the show_manage of this AccountStatus.
|
||||
|
||||
是否有管理入口的权限
|
||||
|
||||
:param show_manage: The show_manage of this AccountStatus.
|
||||
:type: bool
|
||||
"""
|
||||
self._show_manage = show_manage
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, AccountStatus):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -32,12 +32,15 @@ class InstanceParam:
|
|||
'label_tag': 'str',
|
||||
'plugin_enable_list': 'list[str]',
|
||||
'plugin_vars': 'dict(str, str)',
|
||||
'port_id': 'str',
|
||||
'private_ip': 'str',
|
||||
'pvc_quantity': 'str',
|
||||
'refresh_interval': 'str',
|
||||
'repository_id': 'int',
|
||||
'stack_id': 'str',
|
||||
'task_type': 'str',
|
||||
'token': 'str'
|
||||
'token': 'str',
|
||||
'vpc_id': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
|
@ -50,15 +53,18 @@ class InstanceParam:
|
|||
'label_tag': 'label_tag',
|
||||
'plugin_enable_list': 'plugin_enable_list',
|
||||
'plugin_vars': 'plugin_vars',
|
||||
'port_id': 'port_id',
|
||||
'private_ip': 'private_ip',
|
||||
'pvc_quantity': 'pvc_quantity',
|
||||
'refresh_interval': 'refresh_interval',
|
||||
'repository_id': 'repository_id',
|
||||
'stack_id': 'stack_id',
|
||||
'task_type': 'task_type',
|
||||
'token': 'token'
|
||||
'token': 'token',
|
||||
'vpc_id': 'vpc_id'
|
||||
}
|
||||
|
||||
def __init__(self, agent_id=None, arch=None, cpu_memory=None, description=None, display_name=None, is_temporary=None, label_tag=None, plugin_enable_list=None, plugin_vars=None, pvc_quantity=None, refresh_interval=None, repository_id=None, stack_id=None, task_type=None, token=None):
|
||||
def __init__(self, agent_id=None, arch=None, cpu_memory=None, description=None, display_name=None, is_temporary=None, label_tag=None, plugin_enable_list=None, plugin_vars=None, port_id=None, private_ip=None, pvc_quantity=None, refresh_interval=None, repository_id=None, stack_id=None, task_type=None, token=None, vpc_id=None):
|
||||
"""InstanceParam - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
@ -72,12 +78,15 @@ class InstanceParam:
|
|||
self._label_tag = None
|
||||
self._plugin_enable_list = None
|
||||
self._plugin_vars = None
|
||||
self._port_id = None
|
||||
self._private_ip = None
|
||||
self._pvc_quantity = None
|
||||
self._refresh_interval = None
|
||||
self._repository_id = None
|
||||
self._stack_id = None
|
||||
self._task_type = None
|
||||
self._token = None
|
||||
self._vpc_id = None
|
||||
self.discriminator = None
|
||||
|
||||
if agent_id is not None:
|
||||
|
@ -96,6 +105,10 @@ class InstanceParam:
|
|||
self.plugin_enable_list = plugin_enable_list
|
||||
if plugin_vars is not None:
|
||||
self.plugin_vars = plugin_vars
|
||||
if port_id is not None:
|
||||
self.port_id = port_id
|
||||
if private_ip is not None:
|
||||
self.private_ip = private_ip
|
||||
self.pvc_quantity = pvc_quantity
|
||||
self.refresh_interval = refresh_interval
|
||||
if repository_id is not None:
|
||||
|
@ -105,6 +118,8 @@ class InstanceParam:
|
|||
self.task_type = task_type
|
||||
if token is not None:
|
||||
self.token = token
|
||||
if vpc_id is not None:
|
||||
self.vpc_id = vpc_id
|
||||
|
||||
@property
|
||||
def agent_id(self):
|
||||
|
@ -304,6 +319,50 @@ class InstanceParam:
|
|||
"""
|
||||
self._plugin_vars = plugin_vars
|
||||
|
||||
@property
|
||||
def port_id(self):
|
||||
"""Gets the port_id of this InstanceParam.
|
||||
|
||||
云服务器对应的portId,标签为webshell-internal时使用
|
||||
|
||||
:return: The port_id of this InstanceParam.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._port_id
|
||||
|
||||
@port_id.setter
|
||||
def port_id(self, port_id):
|
||||
"""Sets the port_id of this InstanceParam.
|
||||
|
||||
云服务器对应的portId,标签为webshell-internal时使用
|
||||
|
||||
:param port_id: The port_id of this InstanceParam.
|
||||
:type: str
|
||||
"""
|
||||
self._port_id = port_id
|
||||
|
||||
@property
|
||||
def private_ip(self):
|
||||
"""Gets the private_ip of this InstanceParam.
|
||||
|
||||
云服务器ip,标签为webshell-internal时使用
|
||||
|
||||
:return: The private_ip of this InstanceParam.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._private_ip
|
||||
|
||||
@private_ip.setter
|
||||
def private_ip(self, private_ip):
|
||||
"""Sets the private_ip of this InstanceParam.
|
||||
|
||||
云服务器ip,标签为webshell-internal时使用
|
||||
|
||||
:param private_ip: The private_ip of this InstanceParam.
|
||||
:type: str
|
||||
"""
|
||||
self._private_ip = private_ip
|
||||
|
||||
@property
|
||||
def pvc_quantity(self):
|
||||
"""Gets the pvc_quantity of this InstanceParam.
|
||||
|
@ -436,6 +495,28 @@ class InstanceParam:
|
|||
"""
|
||||
self._token = token
|
||||
|
||||
@property
|
||||
def vpc_id(self):
|
||||
"""Gets the vpc_id of this InstanceParam.
|
||||
|
||||
云服务器对应的vpcId,标签为webshell-internal时使用
|
||||
|
||||
:return: The vpc_id of this InstanceParam.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._vpc_id
|
||||
|
||||
@vpc_id.setter
|
||||
def vpc_id(self, vpc_id):
|
||||
"""Sets the vpc_id of this InstanceParam.
|
||||
|
||||
云服务器对应的vpcId,标签为webshell-internal时使用
|
||||
|
||||
:param vpc_id: The vpc_id of this InstanceParam.
|
||||
:type: str
|
||||
"""
|
||||
self._vpc_id = vpc_id
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
result = {}
|
||||
|
|
|
@ -25,6 +25,8 @@ class ListInstancesRequest:
|
|||
openapi_types = {
|
||||
'limit': 'int',
|
||||
'offset': 'int',
|
||||
'is_temporary': 'bool',
|
||||
'label': 'str',
|
||||
'search': 'str',
|
||||
'sort_dir': 'str',
|
||||
'sort_key': 'str'
|
||||
|
@ -33,18 +35,22 @@ class ListInstancesRequest:
|
|||
attribute_map = {
|
||||
'limit': 'limit',
|
||||
'offset': 'offset',
|
||||
'is_temporary': 'is_temporary',
|
||||
'label': 'label',
|
||||
'search': 'search',
|
||||
'sort_dir': 'sort_dir',
|
||||
'sort_key': 'sort_key'
|
||||
}
|
||||
|
||||
def __init__(self, limit=30, offset=0, search=None, sort_dir='desc', sort_key='created_time'):
|
||||
def __init__(self, limit=30, offset=0, is_temporary=None, label=None, search=None, sort_dir='desc', sort_key='created_time'):
|
||||
"""ListInstancesRequest - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
||||
self._limit = None
|
||||
self._offset = None
|
||||
self._is_temporary = None
|
||||
self._label = None
|
||||
self._search = None
|
||||
self._sort_dir = None
|
||||
self._sort_key = None
|
||||
|
@ -54,6 +60,10 @@ class ListInstancesRequest:
|
|||
self.limit = limit
|
||||
if offset is not None:
|
||||
self.offset = offset
|
||||
if is_temporary is not None:
|
||||
self.is_temporary = is_temporary
|
||||
if label is not None:
|
||||
self.label = label
|
||||
if search is not None:
|
||||
self.search = search
|
||||
if sort_dir is not None:
|
||||
|
@ -101,6 +111,46 @@ class ListInstancesRequest:
|
|||
"""
|
||||
self._offset = offset
|
||||
|
||||
@property
|
||||
def is_temporary(self):
|
||||
"""Gets the is_temporary of this ListInstancesRequest.
|
||||
|
||||
|
||||
:return: The is_temporary of this ListInstancesRequest.
|
||||
:rtype: bool
|
||||
"""
|
||||
return self._is_temporary
|
||||
|
||||
@is_temporary.setter
|
||||
def is_temporary(self, is_temporary):
|
||||
"""Sets the is_temporary of this ListInstancesRequest.
|
||||
|
||||
|
||||
:param is_temporary: The is_temporary of this ListInstancesRequest.
|
||||
:type: bool
|
||||
"""
|
||||
self._is_temporary = is_temporary
|
||||
|
||||
@property
|
||||
def label(self):
|
||||
"""Gets the label of this ListInstancesRequest.
|
||||
|
||||
|
||||
:return: The label of this ListInstancesRequest.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._label
|
||||
|
||||
@label.setter
|
||||
def label(self, label):
|
||||
"""Sets the label of this ListInstancesRequest.
|
||||
|
||||
|
||||
:param label: The label of this ListInstancesRequest.
|
||||
:type: str
|
||||
"""
|
||||
self._label = label
|
||||
|
||||
@property
|
||||
def search(self):
|
||||
"""Gets the search of this ListInstancesRequest.
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class ShowAccountStatusRequest:
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
"""ShowAccountStatusRequest - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
self.discriminator = None
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, ShowAccountStatusRequest):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,135 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
from huaweicloudsdkcore.sdk_response import SdkResponse
|
||||
|
||||
|
||||
class ShowAccountStatusResponse(SdkResponse):
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'result': 'AccountStatus',
|
||||
'status': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'result': 'result',
|
||||
'status': 'status'
|
||||
}
|
||||
|
||||
def __init__(self, result=None, status=None):
|
||||
"""ShowAccountStatusResponse - a model defined in huaweicloud sdk"""
|
||||
|
||||
super().__init__()
|
||||
|
||||
self._result = None
|
||||
self._status = None
|
||||
self.discriminator = None
|
||||
|
||||
if result is not None:
|
||||
self.result = result
|
||||
if status is not None:
|
||||
self.status = status
|
||||
|
||||
@property
|
||||
def result(self):
|
||||
"""Gets the result of this ShowAccountStatusResponse.
|
||||
|
||||
|
||||
:return: The result of this ShowAccountStatusResponse.
|
||||
:rtype: AccountStatus
|
||||
"""
|
||||
return self._result
|
||||
|
||||
@result.setter
|
||||
def result(self, result):
|
||||
"""Sets the result of this ShowAccountStatusResponse.
|
||||
|
||||
|
||||
:param result: The result of this ShowAccountStatusResponse.
|
||||
:type: AccountStatus
|
||||
"""
|
||||
self._result = result
|
||||
|
||||
@property
|
||||
def status(self):
|
||||
"""Gets the status of this ShowAccountStatusResponse.
|
||||
|
||||
状态
|
||||
|
||||
:return: The status of this ShowAccountStatusResponse.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._status
|
||||
|
||||
@status.setter
|
||||
def status(self, status):
|
||||
"""Sets the status of this ShowAccountStatusResponse.
|
||||
|
||||
状态
|
||||
|
||||
:param status: The status of this ShowAccountStatusResponse.
|
||||
:type: str
|
||||
"""
|
||||
self._status = status
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, ShowAccountStatusResponse):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,137 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class StartInstanceParam:
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'plugin_enable_list': 'list[str]',
|
||||
'plugin_vars': 'dict(str, str)'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'plugin_enable_list': 'plugin_enable_list',
|
||||
'plugin_vars': 'plugin_vars'
|
||||
}
|
||||
|
||||
def __init__(self, plugin_enable_list=None, plugin_vars=None):
|
||||
"""StartInstanceParam - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
||||
self._plugin_enable_list = None
|
||||
self._plugin_vars = None
|
||||
self.discriminator = None
|
||||
|
||||
if plugin_enable_list is not None:
|
||||
self.plugin_enable_list = plugin_enable_list
|
||||
if plugin_vars is not None:
|
||||
self.plugin_vars = plugin_vars
|
||||
|
||||
@property
|
||||
def plugin_enable_list(self):
|
||||
"""Gets the plugin_enable_list of this StartInstanceParam.
|
||||
|
||||
场景插件列表
|
||||
|
||||
:return: The plugin_enable_list of this StartInstanceParam.
|
||||
:rtype: list[str]
|
||||
"""
|
||||
return self._plugin_enable_list
|
||||
|
||||
@plugin_enable_list.setter
|
||||
def plugin_enable_list(self, plugin_enable_list):
|
||||
"""Sets the plugin_enable_list of this StartInstanceParam.
|
||||
|
||||
场景插件列表
|
||||
|
||||
:param plugin_enable_list: The plugin_enable_list of this StartInstanceParam.
|
||||
:type: list[str]
|
||||
"""
|
||||
self._plugin_enable_list = plugin_enable_list
|
||||
|
||||
@property
|
||||
def plugin_vars(self):
|
||||
"""Gets the plugin_vars of this StartInstanceParam.
|
||||
|
||||
场景插件参数
|
||||
|
||||
:return: The plugin_vars of this StartInstanceParam.
|
||||
:rtype: dict(str, str)
|
||||
"""
|
||||
return self._plugin_vars
|
||||
|
||||
@plugin_vars.setter
|
||||
def plugin_vars(self, plugin_vars):
|
||||
"""Sets the plugin_vars of this StartInstanceParam.
|
||||
|
||||
场景插件参数
|
||||
|
||||
:param plugin_vars: The plugin_vars of this StartInstanceParam.
|
||||
:type: dict(str, str)
|
||||
"""
|
||||
self._plugin_vars = plugin_vars
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, StartInstanceParam):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -23,22 +23,27 @@ class StartInstanceRequest:
|
|||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'instance_id': 'str'
|
||||
'instance_id': 'str',
|
||||
'body': 'StartInstanceParam'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'instance_id': 'instance_id'
|
||||
'instance_id': 'instance_id',
|
||||
'body': 'body'
|
||||
}
|
||||
|
||||
def __init__(self, instance_id=None):
|
||||
def __init__(self, instance_id=None, body=None):
|
||||
"""StartInstanceRequest - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
||||
self._instance_id = None
|
||||
self._body = None
|
||||
self.discriminator = None
|
||||
|
||||
self.instance_id = instance_id
|
||||
if body is not None:
|
||||
self.body = body
|
||||
|
||||
@property
|
||||
def instance_id(self):
|
||||
|
@ -60,6 +65,26 @@ class StartInstanceRequest:
|
|||
"""
|
||||
self._instance_id = instance_id
|
||||
|
||||
@property
|
||||
def body(self):
|
||||
"""Gets the body of this StartInstanceRequest.
|
||||
|
||||
|
||||
:return: The body of this StartInstanceRequest.
|
||||
:rtype: StartInstanceParam
|
||||
"""
|
||||
return self._body
|
||||
|
||||
@body.setter
|
||||
def body(self, body):
|
||||
"""Sets the body of this StartInstanceRequest.
|
||||
|
||||
|
||||
:param body: The body of this StartInstanceRequest.
|
||||
:type: StartInstanceParam
|
||||
"""
|
||||
self._body = body
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
result = {}
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkcloudide"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class CloudPipelineAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkcloudpipeline.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CloudPipelineClient":
|
||||
raise TypeError("client type error, support client type is CloudPipelineClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def batch_show_pipelines_status_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class CloudPipelineClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkcloudpipeline.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CloudPipelineClient":
|
||||
raise TypeError("client type error, support client type is CloudPipelineClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def batch_show_pipelines_status(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkcloudpipeline"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class CloudtestAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkcloudtest.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CloudtestClient":
|
||||
raise TypeError("client type error, support client type is CloudtestClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def create_plan_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class CloudtestClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkcloudtest.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CloudtestClient":
|
||||
raise TypeError("client type error, support client type is CloudtestClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def create_plan(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkcloudtest"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -22,7 +22,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkcore"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class CtsAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkcts.v3.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CtsClient":
|
||||
raise TypeError("client type error, support client type is CtsClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def create_tracker_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class CtsClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkcts.v3.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "CtsClient":
|
||||
raise TypeError("client type error, support client type is CtsClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def create_tracker(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkcts"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class DcsAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkdcs.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "DcsClient":
|
||||
raise TypeError("client type error, support client type is DcsClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def batch_create_or_delete_tags_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class DcsClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkdcs.v2.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "DcsClient":
|
||||
raise TypeError("client type error, support client type is DcsClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def batch_create_or_delete_tags(self, request):
|
||||
|
|
|
@ -26,7 +26,7 @@ class BigkeysBody:
|
|||
'name': 'str',
|
||||
'type': 'str',
|
||||
'shard': 'str',
|
||||
'db': 'str',
|
||||
'db': 'int',
|
||||
'size': 'int',
|
||||
'unit': 'str'
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ class BigkeysBody:
|
|||
大key所在的db
|
||||
|
||||
:return: The db of this BigkeysBody.
|
||||
:rtype: str
|
||||
:rtype: int
|
||||
"""
|
||||
return self._db
|
||||
|
||||
|
@ -150,7 +150,7 @@ class BigkeysBody:
|
|||
大key所在的db
|
||||
|
||||
:param db: The db of this BigkeysBody.
|
||||
:type: str
|
||||
:type: int
|
||||
"""
|
||||
self._db = db
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class HotkeysBody:
|
|||
'name': 'str',
|
||||
'type': 'str',
|
||||
'shard': 'str',
|
||||
'db': 'str',
|
||||
'db': 'int',
|
||||
'size': 'int',
|
||||
'unit': 'str',
|
||||
'freq': 'int'
|
||||
|
@ -119,7 +119,7 @@ class HotkeysBody:
|
|||
def shard(self):
|
||||
"""Gets the shard of this HotkeysBody.
|
||||
|
||||
大key所在的分片,仅在实例类型为集群时支持,格式为ip:port
|
||||
热key所在的分片,仅在实例类型为集群时支持,格式为ip:port
|
||||
|
||||
:return: The shard of this HotkeysBody.
|
||||
:rtype: str
|
||||
|
@ -130,7 +130,7 @@ class HotkeysBody:
|
|||
def shard(self, shard):
|
||||
"""Sets the shard of this HotkeysBody.
|
||||
|
||||
大key所在的分片,仅在实例类型为集群时支持,格式为ip:port
|
||||
热key所在的分片,仅在实例类型为集群时支持,格式为ip:port
|
||||
|
||||
:param shard: The shard of this HotkeysBody.
|
||||
:type: str
|
||||
|
@ -141,10 +141,10 @@ class HotkeysBody:
|
|||
def db(self):
|
||||
"""Gets the db of this HotkeysBody.
|
||||
|
||||
大key所在的db
|
||||
热key所在的db
|
||||
|
||||
:return: The db of this HotkeysBody.
|
||||
:rtype: str
|
||||
:rtype: int
|
||||
"""
|
||||
return self._db
|
||||
|
||||
|
@ -152,10 +152,10 @@ class HotkeysBody:
|
|||
def db(self, db):
|
||||
"""Sets the db of this HotkeysBody.
|
||||
|
||||
大key所在的db
|
||||
热key所在的db
|
||||
|
||||
:param db: The db of this HotkeysBody.
|
||||
:type: str
|
||||
:type: int
|
||||
"""
|
||||
self._db = db
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class InstanceListInfo:
|
|||
'name': 'str',
|
||||
'spec_code': 'str',
|
||||
'status': 'str',
|
||||
'tags': 'list[Tag]',
|
||||
'tags': 'list[ResourceTag]',
|
||||
'enterprise_project_id': 'str'
|
||||
}
|
||||
|
||||
|
@ -890,7 +890,7 @@ class InstanceListInfo:
|
|||
实例标签键值。
|
||||
|
||||
:return: The tags of this InstanceListInfo.
|
||||
:rtype: list[Tag]
|
||||
:rtype: list[ResourceTag]
|
||||
"""
|
||||
return self._tags
|
||||
|
||||
|
@ -901,7 +901,7 @@ class InstanceListInfo:
|
|||
实例标签键值。
|
||||
|
||||
:param tags: The tags of this InstanceListInfo.
|
||||
:type: list[Tag]
|
||||
:type: list[ResourceTag]
|
||||
"""
|
||||
self._tags = tags
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ class SlowlogItem:
|
|||
'id': 'int',
|
||||
'command': 'str',
|
||||
'start_time': 'str',
|
||||
'duration': 'int',
|
||||
'duration': 'str',
|
||||
'shard_name': 'str'
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,7 @@ class SlowlogItem:
|
|||
持续时间,单位是ms
|
||||
|
||||
:return: The duration of this SlowlogItem.
|
||||
:rtype: int
|
||||
:rtype: str
|
||||
"""
|
||||
return self._duration
|
||||
|
||||
|
@ -145,7 +145,7 @@ class SlowlogItem:
|
|||
持续时间,单位是ms
|
||||
|
||||
:param duration: The duration of this SlowlogItem.
|
||||
:type: int
|
||||
:type: str
|
||||
"""
|
||||
self._duration = duration
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkdcs"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class DdsAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkdds.v3.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "DdsClient":
|
||||
raise TypeError("client type error, support client type is DdsClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def add_sharding_node_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class DdsClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkdds.v3.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "DdsClient":
|
||||
raise TypeError("client type error, support client type is DdsClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def add_sharding_node(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkdds"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -38,8 +38,14 @@ class DevStarAsyncClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkdevstar.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls, "GlobalCredentials")
|
||||
|
||||
if clazz.__name__ != "DevStarClient":
|
||||
raise TypeError("client type error, support client type is DevStarClient")
|
||||
|
||||
return ClientBuilder(clazz, "GlobalCredentials")
|
||||
|
||||
def download_application_code_async(self, request):
|
||||
|
|
|
@ -38,8 +38,14 @@ class DevStarClient(Client):
|
|||
self.model_package = importlib.import_module("huaweicloudsdkdevstar.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@staticmethod
|
||||
def new_builder(clazz):
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls, "GlobalCredentials")
|
||||
|
||||
if clazz.__name__ != "DevStarClient":
|
||||
raise TypeError("client type error, support client type is DevStarClient")
|
||||
|
||||
return ClientBuilder(clazz, "GlobalCredentials")
|
||||
|
||||
def download_application_code(self, request):
|
||||
|
|
|
@ -4,7 +4,7 @@ from os import path
|
|||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkdevstar"
|
||||
VERSION = "3.0.28-beta"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
Copyright (c) Huawei Technologies Co., Ltd. 2020-present. All rights reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -0,0 +1 @@
|
|||
See detailed information in [huaweicloud-sdk-python-v3](https://github.com/huaweicloud/huaweicloud-sdk-python-v3).
|
|
@ -0,0 +1,26 @@
|
|||
# coding: utf-8
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
# import DgcClient
|
||||
from huaweicloudsdkdgc.v1.dgc_client import DgcClient
|
||||
from huaweicloudsdkdgc.v1.dgc_async_client import DgcAsyncClient
|
||||
# import models into sdk package
|
||||
from huaweicloudsdkdgc.v1.model.connection_info import ConnectionInfo
|
||||
from huaweicloudsdkdgc.v1.model.connection_param import ConnectionParam
|
||||
from huaweicloudsdkdgc.v1.model.create_connection_request import CreateConnectionRequest
|
||||
from huaweicloudsdkdgc.v1.model.create_connection_response import CreateConnectionResponse
|
||||
from huaweicloudsdkdgc.v1.model.delete_connction_request import DeleteConnctionRequest
|
||||
from huaweicloudsdkdgc.v1.model.delete_connction_response import DeleteConnctionResponse
|
||||
from huaweicloudsdkdgc.v1.model.export_connections_request import ExportConnectionsRequest
|
||||
from huaweicloudsdkdgc.v1.model.export_connections_response import ExportConnectionsResponse
|
||||
from huaweicloudsdkdgc.v1.model.import_connection_req import ImportConnectionReq
|
||||
from huaweicloudsdkdgc.v1.model.import_connections_request import ImportConnectionsRequest
|
||||
from huaweicloudsdkdgc.v1.model.import_connections_response import ImportConnectionsResponse
|
||||
from huaweicloudsdkdgc.v1.model.list_connections_request import ListConnectionsRequest
|
||||
from huaweicloudsdkdgc.v1.model.list_connections_response import ListConnectionsResponse
|
||||
from huaweicloudsdkdgc.v1.model.show_connection_request import ShowConnectionRequest
|
||||
from huaweicloudsdkdgc.v1.model.show_connection_response import ShowConnectionResponse
|
||||
from huaweicloudsdkdgc.v1.model.update_connection_request import UpdateConnectionRequest
|
||||
from huaweicloudsdkdgc.v1.model.update_connection_response import UpdateConnectionResponse
|
||||
|
|
@ -0,0 +1,511 @@
|
|||
# coding: utf-8
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import datetime
|
||||
import re
|
||||
import importlib
|
||||
|
||||
import six
|
||||
|
||||
from huaweicloudsdkcore.client import Client, ClientBuilder
|
||||
from huaweicloudsdkcore.exceptions import exceptions
|
||||
from huaweicloudsdkcore.utils import http_utils
|
||||
from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
|
||||
|
||||
|
||||
class DgcAsyncClient(Client):
|
||||
"""
|
||||
:param configuration: .Configuration object for this client
|
||||
:param pool_threads: The number of threads to use for async requests
|
||||
to the API. More threads means more concurrent API requests.
|
||||
"""
|
||||
|
||||
PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
|
||||
NATIVE_TYPES_MAPPING = {
|
||||
'int': int,
|
||||
'long': int if six.PY3 else long,
|
||||
'float': float,
|
||||
'str': str,
|
||||
'bool': bool,
|
||||
'date': datetime.date,
|
||||
'datetime': datetime.datetime,
|
||||
'object': object,
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
super(DgcAsyncClient, self).__init__()
|
||||
self.model_package = importlib.import_module("huaweicloudsdkdgc.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "DgcClient":
|
||||
raise TypeError("client type error, support client type is DgcClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def create_connection_async(self, request):
|
||||
"""创建连接
|
||||
|
||||
|
||||
:param CreateConnectionRequest request
|
||||
:return: CreateConnectionResponse
|
||||
"""
|
||||
return self.create_connection_with_http_info(request)
|
||||
|
||||
def create_connection_with_http_info(self, request):
|
||||
"""创建连接
|
||||
|
||||
|
||||
:param CreateConnectionRequest request
|
||||
:return: CreateConnectionResponse
|
||||
"""
|
||||
|
||||
all_params = ['body']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in local_var_params:
|
||||
body_params = local_var_params['body']
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json;charset=UTF-8'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections',
|
||||
method='POST',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='CreateConnectionResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def delete_connction_async(self, request):
|
||||
"""删除连接
|
||||
|
||||
|
||||
:param DeleteConnctionRequest request
|
||||
:return: DeleteConnctionResponse
|
||||
"""
|
||||
return self.delete_connction_with_http_info(request)
|
||||
|
||||
def delete_connction_with_http_info(self, request):
|
||||
"""删除连接
|
||||
|
||||
|
||||
:param DeleteConnctionRequest request
|
||||
:return: DeleteConnctionResponse
|
||||
"""
|
||||
|
||||
all_params = ['connection_name']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'connection_name' in local_var_params:
|
||||
path_params['connection_name'] = local_var_params['connection_name']
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections/{connection_name}',
|
||||
method='DELETE',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='DeleteConnctionResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def export_connections_async(self, request):
|
||||
"""导出连接
|
||||
|
||||
|
||||
:param ExportConnectionsRequest request
|
||||
:return: ExportConnectionsResponse
|
||||
"""
|
||||
return self.export_connections_with_http_info(request)
|
||||
|
||||
def export_connections_with_http_info(self, request):
|
||||
"""导出连接
|
||||
|
||||
|
||||
:param ExportConnectionsRequest request
|
||||
:return: ExportConnectionsResponse
|
||||
"""
|
||||
|
||||
all_params = []
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections/export',
|
||||
method='POST',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='ExportConnectionsResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def import_connections_async(self, request):
|
||||
"""导入连接
|
||||
|
||||
|
||||
:param ImportConnectionsRequest request
|
||||
:return: ImportConnectionsResponse
|
||||
"""
|
||||
return self.import_connections_with_http_info(request)
|
||||
|
||||
def import_connections_with_http_info(self, request):
|
||||
"""导入连接
|
||||
|
||||
|
||||
:param ImportConnectionsRequest request
|
||||
:return: ImportConnectionsResponse
|
||||
"""
|
||||
|
||||
all_params = ['body']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in local_var_params:
|
||||
body_params = local_var_params['body']
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json;charset=UTF-8'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections/import',
|
||||
method='POST',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='ImportConnectionsResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def list_connections_async(self, request):
|
||||
"""查询连接列表
|
||||
|
||||
|
||||
:param ListConnectionsRequest request
|
||||
:return: ListConnectionsResponse
|
||||
"""
|
||||
return self.list_connections_with_http_info(request)
|
||||
|
||||
def list_connections_with_http_info(self, request):
|
||||
"""查询连接列表
|
||||
|
||||
|
||||
:param ListConnectionsRequest request
|
||||
:return: ListConnectionsResponse
|
||||
"""
|
||||
|
||||
all_params = []
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections',
|
||||
method='GET',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='ListConnectionsResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def show_connection_async(self, request):
|
||||
"""查询连接详情
|
||||
|
||||
|
||||
:param ShowConnectionRequest request
|
||||
:return: ShowConnectionResponse
|
||||
"""
|
||||
return self.show_connection_with_http_info(request)
|
||||
|
||||
def show_connection_with_http_info(self, request):
|
||||
"""查询连接详情
|
||||
|
||||
|
||||
:param ShowConnectionRequest request
|
||||
:return: ShowConnectionResponse
|
||||
"""
|
||||
|
||||
all_params = ['connection_name']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'connection_name' in local_var_params:
|
||||
path_params['connection_name'] = local_var_params['connection_name']
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections/{connection_name}',
|
||||
method='GET',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='ShowConnectionResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def update_connection_async(self, request):
|
||||
"""修改连接
|
||||
|
||||
|
||||
:param UpdateConnectionRequest request
|
||||
:return: UpdateConnectionResponse
|
||||
"""
|
||||
return self.update_connection_with_http_info(request)
|
||||
|
||||
def update_connection_with_http_info(self, request):
|
||||
"""修改连接
|
||||
|
||||
|
||||
:param UpdateConnectionRequest request
|
||||
:return: UpdateConnectionResponse
|
||||
"""
|
||||
|
||||
all_params = ['connection_name', 'body']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'connection_name' in local_var_params:
|
||||
path_params['connection_name'] = local_var_params['connection_name']
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in local_var_params:
|
||||
body_params = local_var_params['body']
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json;charset=UTF-8'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections/{connection_name}',
|
||||
method='PUT',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='UpdateConnectionResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
|
||||
post_params=None, response_type=None, response_headers=None, auth_settings=None,
|
||||
collection_formats=None, request_type=None):
|
||||
"""Makes the HTTP request and returns deserialized data.
|
||||
|
||||
:param resource_path: Path to method endpoint.
|
||||
:param method: Method to call.
|
||||
:param path_params: Path parameters in the url.
|
||||
:param query_params: Query parameters in the url.
|
||||
:param header_params: Header parameters to be
|
||||
placed in the request header.
|
||||
:param body: Request body.
|
||||
:param post_params dict: Request post form parameters,
|
||||
for `application/x-www-form-urlencoded`, `multipart/form-data`.
|
||||
:param auth_settings list: Auth Settings names for the request.
|
||||
:param response_type: Response data type.
|
||||
:param response_headers: Header should be added to response data.
|
||||
:param collection_formats: dict of collection formats for path, query,
|
||||
header, and post parameters.
|
||||
:param request_type: Request data type.
|
||||
:return:
|
||||
Return the response directly.
|
||||
"""
|
||||
return self.do_http_request(
|
||||
method=method,
|
||||
resource_path=resource_path,
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body,
|
||||
post_params=post_params,
|
||||
response_type=response_type,
|
||||
response_headers=response_headers,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request_type,
|
||||
async_request=True)
|
|
@ -0,0 +1,509 @@
|
|||
# coding: utf-8
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import datetime
|
||||
import re
|
||||
import importlib
|
||||
|
||||
import six
|
||||
|
||||
from huaweicloudsdkcore.client import Client, ClientBuilder
|
||||
from huaweicloudsdkcore.exceptions import exceptions
|
||||
from huaweicloudsdkcore.utils import http_utils
|
||||
from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest
|
||||
|
||||
|
||||
class DgcClient(Client):
|
||||
"""
|
||||
:param configuration: .Configuration object for this client
|
||||
:param pool_threads: The number of threads to use for async requests
|
||||
to the API. More threads means more concurrent API requests.
|
||||
"""
|
||||
|
||||
PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
|
||||
NATIVE_TYPES_MAPPING = {
|
||||
'int': int,
|
||||
'long': int if six.PY3 else long,
|
||||
'float': float,
|
||||
'str': str,
|
||||
'bool': bool,
|
||||
'date': datetime.date,
|
||||
'datetime': datetime.datetime,
|
||||
'object': object,
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
super(DgcClient, self).__init__()
|
||||
self.model_package = importlib.import_module("huaweicloudsdkdgc.v1.model")
|
||||
self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'}
|
||||
|
||||
@classmethod
|
||||
def new_builder(cls, clazz=None):
|
||||
if clazz is None:
|
||||
return ClientBuilder(cls)
|
||||
|
||||
if clazz.__name__ != "DgcClient":
|
||||
raise TypeError("client type error, support client type is DgcClient")
|
||||
|
||||
return ClientBuilder(clazz)
|
||||
|
||||
def create_connection(self, request):
|
||||
"""创建连接
|
||||
|
||||
|
||||
:param CreateConnectionRequest request
|
||||
:return: CreateConnectionResponse
|
||||
"""
|
||||
return self.create_connection_with_http_info(request)
|
||||
|
||||
def create_connection_with_http_info(self, request):
|
||||
"""创建连接
|
||||
|
||||
|
||||
:param CreateConnectionRequest request
|
||||
:return: CreateConnectionResponse
|
||||
"""
|
||||
|
||||
all_params = ['body']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in local_var_params:
|
||||
body_params = local_var_params['body']
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json;charset=UTF-8'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections',
|
||||
method='POST',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='CreateConnectionResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def delete_connction(self, request):
|
||||
"""删除连接
|
||||
|
||||
|
||||
:param DeleteConnctionRequest request
|
||||
:return: DeleteConnctionResponse
|
||||
"""
|
||||
return self.delete_connction_with_http_info(request)
|
||||
|
||||
def delete_connction_with_http_info(self, request):
|
||||
"""删除连接
|
||||
|
||||
|
||||
:param DeleteConnctionRequest request
|
||||
:return: DeleteConnctionResponse
|
||||
"""
|
||||
|
||||
all_params = ['connection_name']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'connection_name' in local_var_params:
|
||||
path_params['connection_name'] = local_var_params['connection_name']
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections/{connection_name}',
|
||||
method='DELETE',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='DeleteConnctionResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def export_connections(self, request):
|
||||
"""导出连接
|
||||
|
||||
|
||||
:param ExportConnectionsRequest request
|
||||
:return: ExportConnectionsResponse
|
||||
"""
|
||||
return self.export_connections_with_http_info(request)
|
||||
|
||||
def export_connections_with_http_info(self, request):
|
||||
"""导出连接
|
||||
|
||||
|
||||
:param ExportConnectionsRequest request
|
||||
:return: ExportConnectionsResponse
|
||||
"""
|
||||
|
||||
all_params = []
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections/export',
|
||||
method='POST',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='ExportConnectionsResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def import_connections(self, request):
|
||||
"""导入连接
|
||||
|
||||
|
||||
:param ImportConnectionsRequest request
|
||||
:return: ImportConnectionsResponse
|
||||
"""
|
||||
return self.import_connections_with_http_info(request)
|
||||
|
||||
def import_connections_with_http_info(self, request):
|
||||
"""导入连接
|
||||
|
||||
|
||||
:param ImportConnectionsRequest request
|
||||
:return: ImportConnectionsResponse
|
||||
"""
|
||||
|
||||
all_params = ['body']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in local_var_params:
|
||||
body_params = local_var_params['body']
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json;charset=UTF-8'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections/import',
|
||||
method='POST',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='ImportConnectionsResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def list_connections(self, request):
|
||||
"""查询连接列表
|
||||
|
||||
|
||||
:param ListConnectionsRequest request
|
||||
:return: ListConnectionsResponse
|
||||
"""
|
||||
return self.list_connections_with_http_info(request)
|
||||
|
||||
def list_connections_with_http_info(self, request):
|
||||
"""查询连接列表
|
||||
|
||||
|
||||
:param ListConnectionsRequest request
|
||||
:return: ListConnectionsResponse
|
||||
"""
|
||||
|
||||
all_params = []
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections',
|
||||
method='GET',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='ListConnectionsResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def show_connection(self, request):
|
||||
"""查询连接详情
|
||||
|
||||
|
||||
:param ShowConnectionRequest request
|
||||
:return: ShowConnectionResponse
|
||||
"""
|
||||
return self.show_connection_with_http_info(request)
|
||||
|
||||
def show_connection_with_http_info(self, request):
|
||||
"""查询连接详情
|
||||
|
||||
|
||||
:param ShowConnectionRequest request
|
||||
:return: ShowConnectionResponse
|
||||
"""
|
||||
|
||||
all_params = ['connection_name']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'connection_name' in local_var_params:
|
||||
path_params['connection_name'] = local_var_params['connection_name']
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections/{connection_name}',
|
||||
method='GET',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='ShowConnectionResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def update_connection(self, request):
|
||||
"""修改连接
|
||||
|
||||
|
||||
:param UpdateConnectionRequest request
|
||||
:return: UpdateConnectionResponse
|
||||
"""
|
||||
return self.update_connection_with_http_info(request)
|
||||
|
||||
def update_connection_with_http_info(self, request):
|
||||
"""修改连接
|
||||
|
||||
|
||||
:param UpdateConnectionRequest request
|
||||
:return: UpdateConnectionResponse
|
||||
"""
|
||||
|
||||
all_params = ['connection_name', 'body']
|
||||
local_var_params = {}
|
||||
for attr in request.attribute_map:
|
||||
if hasattr(request, attr):
|
||||
local_var_params[attr] = getattr(request, attr)
|
||||
|
||||
collection_formats = {}
|
||||
|
||||
path_params = {}
|
||||
if 'connection_name' in local_var_params:
|
||||
path_params['connection_name'] = local_var_params['connection_name']
|
||||
|
||||
query_params = []
|
||||
|
||||
header_params = {}
|
||||
|
||||
form_params = {}
|
||||
|
||||
body_params = None
|
||||
if 'body' in local_var_params:
|
||||
body_params = local_var_params['body']
|
||||
if isinstance(request, SdkStreamRequest):
|
||||
body_params = request.get_file_stream()
|
||||
|
||||
response_headers = []
|
||||
|
||||
header_params['Content-Type'] = http_utils.select_header_content_type(
|
||||
['application/json;charset=UTF-8'])
|
||||
|
||||
auth_settings = []
|
||||
|
||||
return self.call_api(
|
||||
resource_path='/v1/{project_id}/connections/{connection_name}',
|
||||
method='PUT',
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body_params,
|
||||
post_params=form_params,
|
||||
response_type='UpdateConnectionResponse',
|
||||
response_headers=response_headers,
|
||||
auth_settings=auth_settings,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request.__class__.__name__)
|
||||
|
||||
|
||||
def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None,
|
||||
post_params=None, response_type=None, response_headers=None, auth_settings=None,
|
||||
collection_formats=None, request_type=None):
|
||||
"""Makes the HTTP request and returns deserialized data.
|
||||
|
||||
:param resource_path: Path to method endpoint.
|
||||
:param method: Method to call.
|
||||
:param path_params: Path parameters in the url.
|
||||
:param query_params: Query parameters in the url.
|
||||
:param header_params: Header parameters to be placed in the request header.
|
||||
:param body: Request body.
|
||||
:param post_params dict: Request post form parameters,
|
||||
for `application/x-www-form-urlencoded`, `multipart/form-data`.
|
||||
:param auth_settings list: Auth Settings names for the request.
|
||||
:param response_type: Response data type.
|
||||
:param response_headers: Header should be added to response data.
|
||||
:param collection_formats: dict of collection formats for path, query,
|
||||
header, and post parameters.
|
||||
:param request_type: Request data type.
|
||||
:return:
|
||||
Return the response directly.
|
||||
"""
|
||||
return self.do_http_request(
|
||||
method=method,
|
||||
resource_path=resource_path,
|
||||
path_params=path_params,
|
||||
query_params=query_params,
|
||||
header_params=header_params,
|
||||
body=body,
|
||||
post_params=post_params,
|
||||
response_type=response_type,
|
||||
response_headers=response_headers,
|
||||
collection_formats=collection_formats,
|
||||
request_type=request_type)
|
|
@ -0,0 +1,19 @@
|
|||
import json
|
||||
|
||||
from huaweicloudsdkcore.exceptions import exceptions
|
||||
|
||||
class DgcError:
|
||||
def __init__(self, request_id=None, error_code=None, error_msg=None):
|
||||
self.error_msg = error_msg
|
||||
self.error_code = error_code
|
||||
self.request_id = request_id
|
||||
|
||||
def handle_exception(response_body):
|
||||
dgc_error = DgcError()
|
||||
|
||||
dgc_error_dict = json.loads(response_body)
|
||||
for key in dgc_error_dict:
|
||||
if type(dgc_error_dict[key]) == dict and "error_code" in dgc_error_dict[key] and "error_msg" in \
|
||||
dgc_error_dict[key]:
|
||||
dgc_error = DgcError("0a04ffbcb5db120ce371f27e078e8980", dgc_error_dict[key]["error_code"], dgc_error_dict[key]["error_msg"])
|
||||
return dgc_error
|
|
@ -0,0 +1,22 @@
|
|||
# coding: utf-8
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
# import models into model package
|
||||
from huaweicloudsdkdgc.v1.model.connection_info import ConnectionInfo
|
||||
from huaweicloudsdkdgc.v1.model.connection_param import ConnectionParam
|
||||
from huaweicloudsdkdgc.v1.model.create_connection_request import CreateConnectionRequest
|
||||
from huaweicloudsdkdgc.v1.model.create_connection_response import CreateConnectionResponse
|
||||
from huaweicloudsdkdgc.v1.model.delete_connction_request import DeleteConnctionRequest
|
||||
from huaweicloudsdkdgc.v1.model.delete_connction_response import DeleteConnctionResponse
|
||||
from huaweicloudsdkdgc.v1.model.export_connections_request import ExportConnectionsRequest
|
||||
from huaweicloudsdkdgc.v1.model.export_connections_response import ExportConnectionsResponse
|
||||
from huaweicloudsdkdgc.v1.model.import_connection_req import ImportConnectionReq
|
||||
from huaweicloudsdkdgc.v1.model.import_connections_request import ImportConnectionsRequest
|
||||
from huaweicloudsdkdgc.v1.model.import_connections_response import ImportConnectionsResponse
|
||||
from huaweicloudsdkdgc.v1.model.list_connections_request import ListConnectionsRequest
|
||||
from huaweicloudsdkdgc.v1.model.list_connections_response import ListConnectionsResponse
|
||||
from huaweicloudsdkdgc.v1.model.show_connection_request import ShowConnectionRequest
|
||||
from huaweicloudsdkdgc.v1.model.show_connection_response import ShowConnectionResponse
|
||||
from huaweicloudsdkdgc.v1.model.update_connection_request import UpdateConnectionRequest
|
||||
from huaweicloudsdkdgc.v1.model.update_connection_response import UpdateConnectionResponse
|
|
@ -0,0 +1,158 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class ConnectionInfo:
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'name': 'str',
|
||||
'connection_type': 'str',
|
||||
'config': 'object'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name',
|
||||
'connection_type': 'connectionType',
|
||||
'config': 'config'
|
||||
}
|
||||
|
||||
def __init__(self, name=None, connection_type=None, config=None):
|
||||
"""ConnectionInfo - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
||||
self._name = None
|
||||
self._connection_type = None
|
||||
self._config = None
|
||||
self.discriminator = None
|
||||
|
||||
if name is not None:
|
||||
self.name = name
|
||||
if connection_type is not None:
|
||||
self.connection_type = connection_type
|
||||
if config is not None:
|
||||
self.config = config
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Gets the name of this ConnectionInfo.
|
||||
|
||||
|
||||
:return: The name of this ConnectionInfo.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._name
|
||||
|
||||
@name.setter
|
||||
def name(self, name):
|
||||
"""Sets the name of this ConnectionInfo.
|
||||
|
||||
|
||||
:param name: The name of this ConnectionInfo.
|
||||
:type: str
|
||||
"""
|
||||
self._name = name
|
||||
|
||||
@property
|
||||
def connection_type(self):
|
||||
"""Gets the connection_type of this ConnectionInfo.
|
||||
|
||||
|
||||
:return: The connection_type of this ConnectionInfo.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._connection_type
|
||||
|
||||
@connection_type.setter
|
||||
def connection_type(self, connection_type):
|
||||
"""Sets the connection_type of this ConnectionInfo.
|
||||
|
||||
|
||||
:param connection_type: The connection_type of this ConnectionInfo.
|
||||
:type: str
|
||||
"""
|
||||
self._connection_type = connection_type
|
||||
|
||||
@property
|
||||
def config(self):
|
||||
"""Gets the config of this ConnectionInfo.
|
||||
|
||||
|
||||
:return: The config of this ConnectionInfo.
|
||||
:rtype: object
|
||||
"""
|
||||
return self._config
|
||||
|
||||
@config.setter
|
||||
def config(self, config):
|
||||
"""Sets the config of this ConnectionInfo.
|
||||
|
||||
|
||||
:param config: The config of this ConnectionInfo.
|
||||
:type: object
|
||||
"""
|
||||
self._config = config
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, ConnectionInfo):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,158 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class ConnectionParam:
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'name': 'str',
|
||||
'connection_type': 'str',
|
||||
'params': 'object'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name',
|
||||
'connection_type': 'connectionType',
|
||||
'params': 'params'
|
||||
}
|
||||
|
||||
def __init__(self, name=None, connection_type=None, params=None):
|
||||
"""ConnectionParam - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
||||
self._name = None
|
||||
self._connection_type = None
|
||||
self._params = None
|
||||
self.discriminator = None
|
||||
|
||||
if name is not None:
|
||||
self.name = name
|
||||
if connection_type is not None:
|
||||
self.connection_type = connection_type
|
||||
if params is not None:
|
||||
self.params = params
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Gets the name of this ConnectionParam.
|
||||
|
||||
|
||||
:return: The name of this ConnectionParam.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._name
|
||||
|
||||
@name.setter
|
||||
def name(self, name):
|
||||
"""Sets the name of this ConnectionParam.
|
||||
|
||||
|
||||
:param name: The name of this ConnectionParam.
|
||||
:type: str
|
||||
"""
|
||||
self._name = name
|
||||
|
||||
@property
|
||||
def connection_type(self):
|
||||
"""Gets the connection_type of this ConnectionParam.
|
||||
|
||||
|
||||
:return: The connection_type of this ConnectionParam.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._connection_type
|
||||
|
||||
@connection_type.setter
|
||||
def connection_type(self, connection_type):
|
||||
"""Sets the connection_type of this ConnectionParam.
|
||||
|
||||
|
||||
:param connection_type: The connection_type of this ConnectionParam.
|
||||
:type: str
|
||||
"""
|
||||
self._connection_type = connection_type
|
||||
|
||||
@property
|
||||
def params(self):
|
||||
"""Gets the params of this ConnectionParam.
|
||||
|
||||
|
||||
:return: The params of this ConnectionParam.
|
||||
:rtype: object
|
||||
"""
|
||||
return self._params
|
||||
|
||||
@params.setter
|
||||
def params(self, params):
|
||||
"""Sets the params of this ConnectionParam.
|
||||
|
||||
|
||||
:param params: The params of this ConnectionParam.
|
||||
:type: object
|
||||
"""
|
||||
self._params = params
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, ConnectionParam):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,108 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class CreateConnectionRequest:
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'body': 'ConnectionInfo'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'body': 'body'
|
||||
}
|
||||
|
||||
def __init__(self, body=None):
|
||||
"""CreateConnectionRequest - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
||||
self._body = None
|
||||
self.discriminator = None
|
||||
|
||||
if body is not None:
|
||||
self.body = body
|
||||
|
||||
@property
|
||||
def body(self):
|
||||
"""Gets the body of this CreateConnectionRequest.
|
||||
|
||||
|
||||
:return: The body of this CreateConnectionRequest.
|
||||
:rtype: ConnectionInfo
|
||||
"""
|
||||
return self._body
|
||||
|
||||
@body.setter
|
||||
def body(self, body):
|
||||
"""Sets the body of this CreateConnectionRequest.
|
||||
|
||||
|
||||
:param body: The body of this CreateConnectionRequest.
|
||||
:type: ConnectionInfo
|
||||
"""
|
||||
self._body = body
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, CreateConnectionRequest):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,81 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
from huaweicloudsdkcore.sdk_response import SdkResponse
|
||||
|
||||
|
||||
class CreateConnectionResponse(SdkResponse):
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
"""CreateConnectionResponse - a model defined in huaweicloud sdk"""
|
||||
|
||||
super().__init__()
|
||||
self.discriminator = None
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, CreateConnectionResponse):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,107 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class DeleteConnctionRequest:
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'connection_name': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'connection_name': 'connection_name'
|
||||
}
|
||||
|
||||
def __init__(self, connection_name=None):
|
||||
"""DeleteConnctionRequest - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
||||
self._connection_name = None
|
||||
self.discriminator = None
|
||||
|
||||
self.connection_name = connection_name
|
||||
|
||||
@property
|
||||
def connection_name(self):
|
||||
"""Gets the connection_name of this DeleteConnctionRequest.
|
||||
|
||||
|
||||
:return: The connection_name of this DeleteConnctionRequest.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._connection_name
|
||||
|
||||
@connection_name.setter
|
||||
def connection_name(self, connection_name):
|
||||
"""Sets the connection_name of this DeleteConnctionRequest.
|
||||
|
||||
|
||||
:param connection_name: The connection_name of this DeleteConnctionRequest.
|
||||
:type: str
|
||||
"""
|
||||
self._connection_name = connection_name
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, DeleteConnctionRequest):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,81 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
from huaweicloudsdkcore.sdk_response import SdkResponse
|
||||
|
||||
|
||||
class DeleteConnctionResponse(SdkResponse):
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
"""DeleteConnctionResponse - a model defined in huaweicloud sdk"""
|
||||
|
||||
super().__init__()
|
||||
self.discriminator = None
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, DeleteConnctionResponse):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,81 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class ExportConnectionsRequest:
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
"""ExportConnectionsRequest - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
self.discriminator = None
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, ExportConnectionsRequest):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,81 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
from huaweicloudsdkcore.sdk_response import SdkResponse
|
||||
|
||||
|
||||
class ExportConnectionsResponse(SdkResponse):
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
"""ExportConnectionsResponse - a model defined in huaweicloud sdk"""
|
||||
|
||||
super().__init__()
|
||||
self.discriminator = None
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, ExportConnectionsResponse):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,160 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class ImportConnectionReq:
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'path': 'str',
|
||||
'params': 'list[ConnectionParam]',
|
||||
'same_name_policy': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'path': 'path',
|
||||
'params': 'params',
|
||||
'same_name_policy': 'sameNamePolicy'
|
||||
}
|
||||
|
||||
def __init__(self, path=None, params=None, same_name_policy=None):
|
||||
"""ImportConnectionReq - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
||||
self._path = None
|
||||
self._params = None
|
||||
self._same_name_policy = None
|
||||
self.discriminator = None
|
||||
|
||||
if path is not None:
|
||||
self.path = path
|
||||
if params is not None:
|
||||
self.params = params
|
||||
if same_name_policy is not None:
|
||||
self.same_name_policy = same_name_policy
|
||||
|
||||
@property
|
||||
def path(self):
|
||||
"""Gets the path of this ImportConnectionReq.
|
||||
|
||||
|
||||
:return: The path of this ImportConnectionReq.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._path
|
||||
|
||||
@path.setter
|
||||
def path(self, path):
|
||||
"""Sets the path of this ImportConnectionReq.
|
||||
|
||||
|
||||
:param path: The path of this ImportConnectionReq.
|
||||
:type: str
|
||||
"""
|
||||
self._path = path
|
||||
|
||||
@property
|
||||
def params(self):
|
||||
"""Gets the params of this ImportConnectionReq.
|
||||
|
||||
连接参数
|
||||
|
||||
:return: The params of this ImportConnectionReq.
|
||||
:rtype: list[ConnectionParam]
|
||||
"""
|
||||
return self._params
|
||||
|
||||
@params.setter
|
||||
def params(self, params):
|
||||
"""Sets the params of this ImportConnectionReq.
|
||||
|
||||
连接参数
|
||||
|
||||
:param params: The params of this ImportConnectionReq.
|
||||
:type: list[ConnectionParam]
|
||||
"""
|
||||
self._params = params
|
||||
|
||||
@property
|
||||
def same_name_policy(self):
|
||||
"""Gets the same_name_policy of this ImportConnectionReq.
|
||||
|
||||
|
||||
:return: The same_name_policy of this ImportConnectionReq.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._same_name_policy
|
||||
|
||||
@same_name_policy.setter
|
||||
def same_name_policy(self, same_name_policy):
|
||||
"""Sets the same_name_policy of this ImportConnectionReq.
|
||||
|
||||
|
||||
:param same_name_policy: The same_name_policy of this ImportConnectionReq.
|
||||
:type: str
|
||||
"""
|
||||
self._same_name_policy = same_name_policy
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, ImportConnectionReq):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,108 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class ImportConnectionsRequest:
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'body': 'ImportConnectionReq'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'body': 'body'
|
||||
}
|
||||
|
||||
def __init__(self, body=None):
|
||||
"""ImportConnectionsRequest - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
||||
self._body = None
|
||||
self.discriminator = None
|
||||
|
||||
if body is not None:
|
||||
self.body = body
|
||||
|
||||
@property
|
||||
def body(self):
|
||||
"""Gets the body of this ImportConnectionsRequest.
|
||||
|
||||
|
||||
:return: The body of this ImportConnectionsRequest.
|
||||
:rtype: ImportConnectionReq
|
||||
"""
|
||||
return self._body
|
||||
|
||||
@body.setter
|
||||
def body(self, body):
|
||||
"""Sets the body of this ImportConnectionsRequest.
|
||||
|
||||
|
||||
:param body: The body of this ImportConnectionsRequest.
|
||||
:type: ImportConnectionReq
|
||||
"""
|
||||
self._body = body
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, ImportConnectionsRequest):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -9,7 +9,7 @@ import six
|
|||
from huaweicloudsdkcore.sdk_response import SdkResponse
|
||||
|
||||
|
||||
class RecognizeFinancialStatementResponse(SdkResponse):
|
||||
class ImportConnectionsResponse(SdkResponse):
|
||||
|
||||
|
||||
"""
|
||||
|
@ -23,43 +23,45 @@ class RecognizeFinancialStatementResponse(SdkResponse):
|
|||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'result': 'RecognizeFinancialStatementResultResponse'
|
||||
'task_id': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'result': 'result'
|
||||
'task_id': 'taskId'
|
||||
}
|
||||
|
||||
def __init__(self, result=None):
|
||||
"""RecognizeFinancialStatementResponse - a model defined in huaweicloud sdk"""
|
||||
def __init__(self, task_id=None):
|
||||
"""ImportConnectionsResponse - a model defined in huaweicloud sdk"""
|
||||
|
||||
super().__init__()
|
||||
|
||||
self._result = None
|
||||
self._task_id = None
|
||||
self.discriminator = None
|
||||
|
||||
if result is not None:
|
||||
self.result = result
|
||||
if task_id is not None:
|
||||
self.task_id = task_id
|
||||
|
||||
@property
|
||||
def result(self):
|
||||
"""Gets the result of this RecognizeFinancialStatementResponse.
|
||||
def task_id(self):
|
||||
"""Gets the task_id of this ImportConnectionsResponse.
|
||||
|
||||
任务id
|
||||
|
||||
:return: The result of this RecognizeFinancialStatementResponse.
|
||||
:rtype: RecognizeFinancialStatementResultResponse
|
||||
:return: The task_id of this ImportConnectionsResponse.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._result
|
||||
return self._task_id
|
||||
|
||||
@result.setter
|
||||
def result(self, result):
|
||||
"""Sets the result of this RecognizeFinancialStatementResponse.
|
||||
@task_id.setter
|
||||
def task_id(self, task_id):
|
||||
"""Sets the task_id of this ImportConnectionsResponse.
|
||||
|
||||
任务id
|
||||
|
||||
:param result: The result of this RecognizeFinancialStatementResponse.
|
||||
:type: RecognizeFinancialStatementResultResponse
|
||||
:param task_id: The task_id of this ImportConnectionsResponse.
|
||||
:type: str
|
||||
"""
|
||||
self._result = result
|
||||
self._task_id = task_id
|
||||
|
||||
def to_dict(self):
|
||||
"""Returns the model properties as a dict"""
|
||||
|
@ -98,7 +100,7 @@ class RecognizeFinancialStatementResponse(SdkResponse):
|
|||
|
||||
def __eq__(self, other):
|
||||
"""Returns true if both objects are equal"""
|
||||
if not isinstance(other, RecognizeFinancialStatementResponse):
|
||||
if not isinstance(other, ImportConnectionsResponse):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
|
@ -0,0 +1,81 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class ListConnectionsRequest:
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
"""ListConnectionsRequest - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
self.discriminator = None
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, ListConnectionsRequest):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,133 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
from huaweicloudsdkcore.sdk_response import SdkResponse
|
||||
|
||||
|
||||
class ListConnectionsResponse(SdkResponse):
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'total': 'str',
|
||||
'connections': 'list[ConnectionInfo]'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'total': 'total',
|
||||
'connections': 'connections'
|
||||
}
|
||||
|
||||
def __init__(self, total=None, connections=None):
|
||||
"""ListConnectionsResponse - a model defined in huaweicloud sdk"""
|
||||
|
||||
super().__init__()
|
||||
|
||||
self._total = None
|
||||
self._connections = None
|
||||
self.discriminator = None
|
||||
|
||||
if total is not None:
|
||||
self.total = total
|
||||
if connections is not None:
|
||||
self.connections = connections
|
||||
|
||||
@property
|
||||
def total(self):
|
||||
"""Gets the total of this ListConnectionsResponse.
|
||||
|
||||
|
||||
:return: The total of this ListConnectionsResponse.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._total
|
||||
|
||||
@total.setter
|
||||
def total(self, total):
|
||||
"""Sets the total of this ListConnectionsResponse.
|
||||
|
||||
|
||||
:param total: The total of this ListConnectionsResponse.
|
||||
:type: str
|
||||
"""
|
||||
self._total = total
|
||||
|
||||
@property
|
||||
def connections(self):
|
||||
"""Gets the connections of this ListConnectionsResponse.
|
||||
|
||||
|
||||
:return: The connections of this ListConnectionsResponse.
|
||||
:rtype: list[ConnectionInfo]
|
||||
"""
|
||||
return self._connections
|
||||
|
||||
@connections.setter
|
||||
def connections(self, connections):
|
||||
"""Sets the connections of this ListConnectionsResponse.
|
||||
|
||||
|
||||
:param connections: The connections of this ListConnectionsResponse.
|
||||
:type: list[ConnectionInfo]
|
||||
"""
|
||||
self._connections = connections
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, ListConnectionsResponse):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,107 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class ShowConnectionRequest:
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'connection_name': 'str'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'connection_name': 'connection_name'
|
||||
}
|
||||
|
||||
def __init__(self, connection_name=None):
|
||||
"""ShowConnectionRequest - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
||||
self._connection_name = None
|
||||
self.discriminator = None
|
||||
|
||||
self.connection_name = connection_name
|
||||
|
||||
@property
|
||||
def connection_name(self):
|
||||
"""Gets the connection_name of this ShowConnectionRequest.
|
||||
|
||||
|
||||
:return: The connection_name of this ShowConnectionRequest.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._connection_name
|
||||
|
||||
@connection_name.setter
|
||||
def connection_name(self, connection_name):
|
||||
"""Sets the connection_name of this ShowConnectionRequest.
|
||||
|
||||
|
||||
:param connection_name: The connection_name of this ShowConnectionRequest.
|
||||
:type: str
|
||||
"""
|
||||
self._connection_name = connection_name
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, ShowConnectionRequest):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,158 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
from huaweicloudsdkcore.sdk_response import SdkResponse
|
||||
|
||||
|
||||
class ShowConnectionResponse(SdkResponse):
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'name': 'str',
|
||||
'connection_type': 'str',
|
||||
'config': 'object'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'name': 'name',
|
||||
'connection_type': 'connectionType',
|
||||
'config': 'config'
|
||||
}
|
||||
|
||||
def __init__(self, name=None, connection_type=None, config=None):
|
||||
"""ShowConnectionResponse - a model defined in huaweicloud sdk"""
|
||||
|
||||
super().__init__()
|
||||
|
||||
self._name = None
|
||||
self._connection_type = None
|
||||
self._config = None
|
||||
self.discriminator = None
|
||||
|
||||
if name is not None:
|
||||
self.name = name
|
||||
if connection_type is not None:
|
||||
self.connection_type = connection_type
|
||||
if config is not None:
|
||||
self.config = config
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""Gets the name of this ShowConnectionResponse.
|
||||
|
||||
|
||||
:return: The name of this ShowConnectionResponse.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._name
|
||||
|
||||
@name.setter
|
||||
def name(self, name):
|
||||
"""Sets the name of this ShowConnectionResponse.
|
||||
|
||||
|
||||
:param name: The name of this ShowConnectionResponse.
|
||||
:type: str
|
||||
"""
|
||||
self._name = name
|
||||
|
||||
@property
|
||||
def connection_type(self):
|
||||
"""Gets the connection_type of this ShowConnectionResponse.
|
||||
|
||||
|
||||
:return: The connection_type of this ShowConnectionResponse.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._connection_type
|
||||
|
||||
@connection_type.setter
|
||||
def connection_type(self, connection_type):
|
||||
"""Sets the connection_type of this ShowConnectionResponse.
|
||||
|
||||
|
||||
:param connection_type: The connection_type of this ShowConnectionResponse.
|
||||
:type: str
|
||||
"""
|
||||
self._connection_type = connection_type
|
||||
|
||||
@property
|
||||
def config(self):
|
||||
"""Gets the config of this ShowConnectionResponse.
|
||||
|
||||
|
||||
:return: The config of this ShowConnectionResponse.
|
||||
:rtype: object
|
||||
"""
|
||||
return self._config
|
||||
|
||||
@config.setter
|
||||
def config(self, config):
|
||||
"""Sets the config of this ShowConnectionResponse.
|
||||
|
||||
|
||||
:param config: The config of this ShowConnectionResponse.
|
||||
:type: object
|
||||
"""
|
||||
self._config = config
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, ShowConnectionResponse):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -9,7 +9,7 @@ import six
|
|||
|
||||
|
||||
|
||||
class RecognizeFinancialStatementRequest:
|
||||
class UpdateConnectionRequest:
|
||||
|
||||
|
||||
"""
|
||||
|
@ -23,65 +23,65 @@ class RecognizeFinancialStatementRequest:
|
|||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
'project_id': 'str',
|
||||
'body': 'RecognizeFinancialStatementRequestBody'
|
||||
'connection_name': 'str',
|
||||
'body': 'ConnectionInfo'
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
'project_id': 'project_id',
|
||||
'connection_name': 'connection_name',
|
||||
'body': 'body'
|
||||
}
|
||||
|
||||
def __init__(self, project_id=None, body=None):
|
||||
"""RecognizeFinancialStatementRequest - a model defined in huaweicloud sdk"""
|
||||
def __init__(self, connection_name=None, body=None):
|
||||
"""UpdateConnectionRequest - a model defined in huaweicloud sdk"""
|
||||
|
||||
|
||||
|
||||
self._project_id = None
|
||||
self._connection_name = None
|
||||
self._body = None
|
||||
self.discriminator = None
|
||||
|
||||
self.project_id = project_id
|
||||
self.connection_name = connection_name
|
||||
if body is not None:
|
||||
self.body = body
|
||||
|
||||
@property
|
||||
def project_id(self):
|
||||
"""Gets the project_id of this RecognizeFinancialStatementRequest.
|
||||
def connection_name(self):
|
||||
"""Gets the connection_name of this UpdateConnectionRequest.
|
||||
|
||||
|
||||
:return: The project_id of this RecognizeFinancialStatementRequest.
|
||||
:return: The connection_name of this UpdateConnectionRequest.
|
||||
:rtype: str
|
||||
"""
|
||||
return self._project_id
|
||||
return self._connection_name
|
||||
|
||||
@project_id.setter
|
||||
def project_id(self, project_id):
|
||||
"""Sets the project_id of this RecognizeFinancialStatementRequest.
|
||||
@connection_name.setter
|
||||
def connection_name(self, connection_name):
|
||||
"""Sets the connection_name of this UpdateConnectionRequest.
|
||||
|
||||
|
||||
:param project_id: The project_id of this RecognizeFinancialStatementRequest.
|
||||
:param connection_name: The connection_name of this UpdateConnectionRequest.
|
||||
:type: str
|
||||
"""
|
||||
self._project_id = project_id
|
||||
self._connection_name = connection_name
|
||||
|
||||
@property
|
||||
def body(self):
|
||||
"""Gets the body of this RecognizeFinancialStatementRequest.
|
||||
"""Gets the body of this UpdateConnectionRequest.
|
||||
|
||||
|
||||
:return: The body of this RecognizeFinancialStatementRequest.
|
||||
:rtype: RecognizeFinancialStatementRequestBody
|
||||
:return: The body of this UpdateConnectionRequest.
|
||||
:rtype: ConnectionInfo
|
||||
"""
|
||||
return self._body
|
||||
|
||||
@body.setter
|
||||
def body(self, body):
|
||||
"""Sets the body of this RecognizeFinancialStatementRequest.
|
||||
"""Sets the body of this UpdateConnectionRequest.
|
||||
|
||||
|
||||
:param body: The body of this RecognizeFinancialStatementRequest.
|
||||
:type: RecognizeFinancialStatementRequestBody
|
||||
:param body: The body of this UpdateConnectionRequest.
|
||||
:type: ConnectionInfo
|
||||
"""
|
||||
self._body = body
|
||||
|
||||
|
@ -122,7 +122,7 @@ class RecognizeFinancialStatementRequest:
|
|||
|
||||
def __eq__(self, other):
|
||||
"""Returns true if both objects are equal"""
|
||||
if not isinstance(other, RecognizeFinancialStatementRequest):
|
||||
if not isinstance(other, UpdateConnectionRequest):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
|
@ -0,0 +1,81 @@
|
|||
# coding: utf-8
|
||||
|
||||
import pprint
|
||||
import re
|
||||
|
||||
import six
|
||||
|
||||
|
||||
from huaweicloudsdkcore.sdk_response import SdkResponse
|
||||
|
||||
|
||||
class UpdateConnectionResponse(SdkResponse):
|
||||
|
||||
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
sensitive_list = []
|
||||
|
||||
openapi_types = {
|
||||
}
|
||||
|
||||
attribute_map = {
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
"""UpdateConnectionResponse - a model defined in huaweicloud sdk"""
|
||||
|
||||
super().__init__()
|
||||
self.discriminator = None
|
||||
|
||||
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:
|
||||
if attr in self.sensitive_list:
|
||||
result[attr] = "****"
|
||||
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, UpdateConnectionResponse):
|
||||
return False
|
||||
|
||||
return self.__dict__ == other.__dict__
|
||||
|
||||
def __ne__(self, other):
|
||||
"""Returns true if both objects are not equal"""
|
||||
return not self == other
|
|
@ -0,0 +1,26 @@
|
|||
# coding: utf-8
|
||||
|
||||
from huaweicloudsdkcore.region.region import Region
|
||||
|
||||
|
||||
class DgcRegion:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
CN_NORTH_1 = Region(id="cn-north-1", endpoint="https://dayu-dlf.cn-north-1.myhuaweicloud.com")
|
||||
|
||||
CN_NORTH_4 = Region(id="cn-north-4", endpoint="https://dayu-dlf.cn-north-4.myhuaweicloud.com")
|
||||
|
||||
CN_EAST_3 = Region(id="cn-east-3", endpoint="https://dayu-dlf.cn-east-3.myhuaweicloud.com")
|
||||
|
||||
CN_EAST_2 = Region(id="cn-east-2", endpoint="https://dayu-dlf.cn-east-2.myhuaweicloud.com")
|
||||
|
||||
CN_SOUTH_1 = Region(id="cn-south-1", endpoint="https://dayu-dlf.cn-south-1.myhuaweicloud.com")
|
||||
|
||||
AP_SOUTHEAST_3 = Region(id="ap-southeast-3", endpoint="https://dayu-dlf.ap-southeast-3.myhuaweicloud.com")
|
||||
|
||||
AP_SOUTHEAST_1 = Region(id="ap-southeast-1", endpoint="https://dayu-dlf.ap-southeast-3.myhuaweicloud.com")
|
||||
|
||||
RU_NORTHWEST_2 = Region(id="ru-northwest-2", endpoint="https://dayu-dlf.ru-northwest-2.myhuaweicloud.com")
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
huaweicloud-sdk-python-core
|
|
@ -0,0 +1,45 @@
|
|||
# coding: utf-8
|
||||
from os import path
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
NAME = "huaweicloudsdkdgc"
|
||||
VERSION = "3.0.29-beta"
|
||||
AUTHOR = "HuaweiCloud SDK"
|
||||
AUTHOR_EMAIL = "hwcloudsdk@huawei.com"
|
||||
URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"
|
||||
|
||||
DESCRIPTION = "DGC"
|
||||
this_directory = path.abspath(path.dirname(__file__))
|
||||
with open(path.join(this_directory, 'README_PYPI.md'), encoding='utf-8') as f:
|
||||
LONG_DESCRIPTION = f.read()
|
||||
|
||||
REQUIRES = ["huaweicloudsdkcore"]
|
||||
|
||||
setup(
|
||||
name=NAME,
|
||||
version=VERSION,
|
||||
description=DESCRIPTION,
|
||||
long_description=LONG_DESCRIPTION,
|
||||
long_description_content_type='text/markdown',
|
||||
author=AUTHOR,
|
||||
author_email=AUTHOR_EMAIL,
|
||||
license="Apache LICENSE 2.0",
|
||||
url=URL,
|
||||
keywords=["huaweicloud", "sdk", "DGC"],
|
||||
packages=find_packages(exclude=["tests*"]),
|
||||
install_requires=REQUIRES,
|
||||
include_package_data=True,
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: Apache Software License',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Topic :: Software Development'
|
||||
]
|
||||
)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue