huaweicloudsdkcae 3.1.99__py2.py3-none-any.whl → 3.1.100__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of huaweicloudsdkcae might be problematic. Click here for more details.

@@ -62,10 +62,14 @@ from huaweicloudsdkcae.v1.model.create_component_configuration_request_body impo
62
62
  from huaweicloudsdkcae.v1.model.create_component_configuration_response import CreateComponentConfigurationResponse
63
63
  from huaweicloudsdkcae.v1.model.create_component_request import CreateComponentRequest
64
64
  from huaweicloudsdkcae.v1.model.create_component_request_body import CreateComponentRequestBody
65
- from huaweicloudsdkcae.v1.model.create_component_request_body_metadata import CreateComponentRequestBodyMetadata
66
- from huaweicloudsdkcae.v1.model.create_component_request_body_spec import CreateComponentRequestBodySpec
67
65
  from huaweicloudsdkcae.v1.model.create_component_response import CreateComponentResponse
68
66
  from huaweicloudsdkcae.v1.model.create_component_spec import CreateComponentSpec
67
+ from huaweicloudsdkcae.v1.model.create_component_with_configuration_request import CreateComponentWithConfigurationRequest
68
+ from huaweicloudsdkcae.v1.model.create_component_with_configuration_request_body import CreateComponentWithConfigurationRequestBody
69
+ from huaweicloudsdkcae.v1.model.create_component_with_configuration_request_body_metadata import CreateComponentWithConfigurationRequestBodyMetadata
70
+ from huaweicloudsdkcae.v1.model.create_component_with_configuration_request_body_spec import CreateComponentWithConfigurationRequestBodySpec
71
+ from huaweicloudsdkcae.v1.model.create_component_with_configuration_response import CreateComponentWithConfigurationResponse
72
+ from huaweicloudsdkcae.v1.model.create_component_with_configuration_response_body_status import CreateComponentWithConfigurationResponseBodyStatus
69
73
  from huaweicloudsdkcae.v1.model.create_domain_req import CreateDomainReq
70
74
  from huaweicloudsdkcae.v1.model.create_domain_request import CreateDomainRequest
71
75
  from huaweicloudsdkcae.v1.model.create_domain_response import CreateDomainResponse
@@ -781,6 +781,77 @@ class CaeAsyncClient(Client):
781
781
 
782
782
  return http_info
783
783
 
784
+ def create_component_with_configuration_async(self, request):
785
+ """创建、生效配置并部署组件
786
+
787
+ 创建、生效配置并部署组件。
788
+
789
+ Please refer to HUAWEI cloud API Explorer for details.
790
+
791
+
792
+ :param request: Request instance for CreateComponentWithConfiguration
793
+ :type request: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequest`
794
+ :rtype: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationResponse`
795
+ """
796
+ http_info = self._create_component_with_configuration_http_info(request)
797
+ return self._call_api(**http_info)
798
+
799
+ def create_component_with_configuration_async_invoker(self, request):
800
+ http_info = self._create_component_with_configuration_http_info(request)
801
+ return AsyncInvoker(self, http_info)
802
+
803
+ def _create_component_with_configuration_http_info(self, request):
804
+ http_info = {
805
+ "method": "POST",
806
+ "resource_path": "/v1/{project_id}/cae/applications/{application_id}/component-with-configurations",
807
+ "request_type": request.__class__.__name__,
808
+ "response_type": "CreateComponentWithConfigurationResponse"
809
+ }
810
+
811
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
812
+
813
+ cname = None
814
+
815
+ collection_formats = {}
816
+
817
+ path_params = {}
818
+ if 'application_id' in local_var_params:
819
+ path_params['application_id'] = local_var_params['application_id']
820
+
821
+ query_params = []
822
+
823
+ header_params = {}
824
+ if 'x_enterprise_project_id' in local_var_params:
825
+ header_params['X-Enterprise-Project-ID'] = local_var_params['x_enterprise_project_id']
826
+ if 'x_environment_id' in local_var_params:
827
+ header_params['X-Environment-ID'] = local_var_params['x_environment_id']
828
+
829
+ form_params = {}
830
+
831
+ body = None
832
+ if 'body' in local_var_params:
833
+ body = local_var_params['body']
834
+ if isinstance(request, SdkStreamRequest):
835
+ body = request.get_file_stream()
836
+
837
+ response_headers = []
838
+
839
+ header_params['Content-Type'] = http_utils.select_header_content_type(
840
+ ['application/json'])
841
+
842
+ auth_settings = []
843
+
844
+ http_info["cname"] = cname
845
+ http_info["collection_formats"] = collection_formats
846
+ http_info["path_params"] = path_params
847
+ http_info["query_params"] = query_params
848
+ http_info["header_params"] = header_params
849
+ http_info["post_params"] = form_params
850
+ http_info["body"] = body
851
+ http_info["response_headers"] = response_headers
852
+
853
+ return http_info
854
+
784
855
  def delete_component_async(self, request):
785
856
  """删除组件
786
857
 
@@ -781,6 +781,77 @@ class CaeClient(Client):
781
781
 
782
782
  return http_info
783
783
 
784
+ def create_component_with_configuration(self, request):
785
+ """创建、生效配置并部署组件
786
+
787
+ 创建、生效配置并部署组件。
788
+
789
+ Please refer to HUAWEI cloud API Explorer for details.
790
+
791
+ :param request: Request instance for CreateComponentWithConfiguration
792
+ :type request: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequest`
793
+ :rtype: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationResponse`
794
+ """
795
+ http_info = self._create_component_with_configuration_http_info(request)
796
+ return self._call_api(**http_info)
797
+
798
+ def create_component_with_configuration_invoker(self, request):
799
+ http_info = self._create_component_with_configuration_http_info(request)
800
+ return SyncInvoker(self, http_info)
801
+
802
+ @classmethod
803
+ def _create_component_with_configuration_http_info(cls, request):
804
+ http_info = {
805
+ "method": "POST",
806
+ "resource_path": "/v1/{project_id}/cae/applications/{application_id}/component-with-configurations",
807
+ "request_type": request.__class__.__name__,
808
+ "response_type": "CreateComponentWithConfigurationResponse"
809
+ }
810
+
811
+ local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)}
812
+
813
+ cname = None
814
+
815
+ collection_formats = {}
816
+
817
+ path_params = {}
818
+ if 'application_id' in local_var_params:
819
+ path_params['application_id'] = local_var_params['application_id']
820
+
821
+ query_params = []
822
+
823
+ header_params = {}
824
+ if 'x_enterprise_project_id' in local_var_params:
825
+ header_params['X-Enterprise-Project-ID'] = local_var_params['x_enterprise_project_id']
826
+ if 'x_environment_id' in local_var_params:
827
+ header_params['X-Environment-ID'] = local_var_params['x_environment_id']
828
+
829
+ form_params = {}
830
+
831
+ body = None
832
+ if 'body' in local_var_params:
833
+ body = local_var_params['body']
834
+ if isinstance(request, SdkStreamRequest):
835
+ body = request.get_file_stream()
836
+
837
+ response_headers = []
838
+
839
+ header_params['Content-Type'] = http_utils.select_header_content_type(
840
+ ['application/json'])
841
+
842
+ auth_settings = []
843
+
844
+ http_info["cname"] = cname
845
+ http_info["collection_formats"] = collection_formats
846
+ http_info["path_params"] = path_params
847
+ http_info["query_params"] = query_params
848
+ http_info["header_params"] = header_params
849
+ http_info["post_params"] = form_params
850
+ http_info["body"] = body
851
+ http_info["response_headers"] = response_headers
852
+
853
+ return http_info
854
+
784
855
  def delete_component(self, request):
785
856
  """删除组件
786
857
 
@@ -60,10 +60,14 @@ from huaweicloudsdkcae.v1.model.create_component_configuration_request_body impo
60
60
  from huaweicloudsdkcae.v1.model.create_component_configuration_response import CreateComponentConfigurationResponse
61
61
  from huaweicloudsdkcae.v1.model.create_component_request import CreateComponentRequest
62
62
  from huaweicloudsdkcae.v1.model.create_component_request_body import CreateComponentRequestBody
63
- from huaweicloudsdkcae.v1.model.create_component_request_body_metadata import CreateComponentRequestBodyMetadata
64
- from huaweicloudsdkcae.v1.model.create_component_request_body_spec import CreateComponentRequestBodySpec
65
63
  from huaweicloudsdkcae.v1.model.create_component_response import CreateComponentResponse
66
64
  from huaweicloudsdkcae.v1.model.create_component_spec import CreateComponentSpec
65
+ from huaweicloudsdkcae.v1.model.create_component_with_configuration_request import CreateComponentWithConfigurationRequest
66
+ from huaweicloudsdkcae.v1.model.create_component_with_configuration_request_body import CreateComponentWithConfigurationRequestBody
67
+ from huaweicloudsdkcae.v1.model.create_component_with_configuration_request_body_metadata import CreateComponentWithConfigurationRequestBodyMetadata
68
+ from huaweicloudsdkcae.v1.model.create_component_with_configuration_request_body_spec import CreateComponentWithConfigurationRequestBodySpec
69
+ from huaweicloudsdkcae.v1.model.create_component_with_configuration_response import CreateComponentWithConfigurationResponse
70
+ from huaweicloudsdkcae.v1.model.create_component_with_configuration_response_body_status import CreateComponentWithConfigurationResponseBodyStatus
67
71
  from huaweicloudsdkcae.v1.model.create_domain_req import CreateDomainReq
68
72
  from huaweicloudsdkcae.v1.model.create_domain_request import CreateDomainRequest
69
73
  from huaweicloudsdkcae.v1.model.create_domain_response import CreateDomainResponse
@@ -19,8 +19,8 @@ class CreateComponentRequestBody:
19
19
  openapi_types = {
20
20
  'api_version': 'ApiVersionObj',
21
21
  'kind': 'ComponentKindObj',
22
- 'metadata': 'CreateComponentRequestBodyMetadata',
23
- 'spec': 'CreateComponentRequestBodySpec'
22
+ 'metadata': 'CreateComponentWithConfigurationRequestBodyMetadata',
23
+ 'spec': 'CreateComponentWithConfigurationRequestBodySpec'
24
24
  }
25
25
 
26
26
  attribute_map = {
@@ -40,9 +40,9 @@ class CreateComponentRequestBody:
40
40
  :param kind:
41
41
  :type kind: :class:`huaweicloudsdkcae.v1.ComponentKindObj`
42
42
  :param metadata:
43
- :type metadata: :class:`huaweicloudsdkcae.v1.CreateComponentRequestBodyMetadata`
43
+ :type metadata: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBodyMetadata`
44
44
  :param spec:
45
- :type spec: :class:`huaweicloudsdkcae.v1.CreateComponentRequestBodySpec`
45
+ :type spec: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBodySpec`
46
46
  """
47
47
 
48
48
 
@@ -101,7 +101,7 @@ class CreateComponentRequestBody:
101
101
  """Gets the metadata of this CreateComponentRequestBody.
102
102
 
103
103
  :return: The metadata of this CreateComponentRequestBody.
104
- :rtype: :class:`huaweicloudsdkcae.v1.CreateComponentRequestBodyMetadata`
104
+ :rtype: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBodyMetadata`
105
105
  """
106
106
  return self._metadata
107
107
 
@@ -110,7 +110,7 @@ class CreateComponentRequestBody:
110
110
  """Sets the metadata of this CreateComponentRequestBody.
111
111
 
112
112
  :param metadata: The metadata of this CreateComponentRequestBody.
113
- :type metadata: :class:`huaweicloudsdkcae.v1.CreateComponentRequestBodyMetadata`
113
+ :type metadata: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBodyMetadata`
114
114
  """
115
115
  self._metadata = metadata
116
116
 
@@ -119,7 +119,7 @@ class CreateComponentRequestBody:
119
119
  """Gets the spec of this CreateComponentRequestBody.
120
120
 
121
121
  :return: The spec of this CreateComponentRequestBody.
122
- :rtype: :class:`huaweicloudsdkcae.v1.CreateComponentRequestBodySpec`
122
+ :rtype: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBodySpec`
123
123
  """
124
124
  return self._spec
125
125
 
@@ -128,7 +128,7 @@ class CreateComponentRequestBody:
128
128
  """Sets the spec of this CreateComponentRequestBody.
129
129
 
130
130
  :param spec: The spec of this CreateComponentRequestBody.
131
- :type spec: :class:`huaweicloudsdkcae.v1.CreateComponentRequestBodySpec`
131
+ :type spec: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBodySpec`
132
132
  """
133
133
  self._spec = spec
134
134
 
@@ -0,0 +1,196 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class CreateComponentWithConfigurationRequest:
9
+
10
+ """
11
+ Attributes:
12
+ openapi_types (dict): The key is attribute name
13
+ and the value is attribute type.
14
+ attribute_map (dict): The key is attribute name
15
+ and the value is json key in definition.
16
+ """
17
+ sensitive_list = []
18
+
19
+ openapi_types = {
20
+ 'application_id': 'str',
21
+ 'x_enterprise_project_id': 'str',
22
+ 'x_environment_id': 'str',
23
+ 'body': 'CreateComponentWithConfigurationRequestBody'
24
+ }
25
+
26
+ attribute_map = {
27
+ 'application_id': 'application_id',
28
+ 'x_enterprise_project_id': 'X-Enterprise-Project-ID',
29
+ 'x_environment_id': 'X-Environment-ID',
30
+ 'body': 'body'
31
+ }
32
+
33
+ def __init__(self, application_id=None, x_enterprise_project_id=None, x_environment_id=None, body=None):
34
+ """CreateComponentWithConfigurationRequest
35
+
36
+ The model defined in huaweicloud sdk
37
+
38
+ :param application_id: 应用ID。
39
+ :type application_id: str
40
+ :param x_enterprise_project_id: 企业项目ID。 - 创建环境时,环境会绑定企业项目ID。 - 最大长度36字节,带“-”连字符的UUID格式,或者是字符串“0”。 - 该字段不传(或传为字符串“0”)时,则查询默认企业项目下的资源。 > 关于企业项目ID的获取及企业项目特性的详细信息,请参见《[企业管理服务用户指南](https://support.huaweicloud.com/usermanual-em/zh-cn_topic_0126101490.html)》。
41
+ :type x_enterprise_project_id: str
42
+ :param x_environment_id: 环境ID。 - 获取环境ID,通过《[云应用引擎API参考](https://support.huaweicloud.com/api-cae/ListEnvironments.html)》的“获取环境列表”章节获取环境信息。 - 请求响应成功后在响应体的items数组中的一个元素即为一个环境的信息,其中id字段即是环境ID。
43
+ :type x_environment_id: str
44
+ :param body: Body of the CreateComponentWithConfigurationRequest
45
+ :type body: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBody`
46
+ """
47
+
48
+
49
+
50
+ self._application_id = None
51
+ self._x_enterprise_project_id = None
52
+ self._x_environment_id = None
53
+ self._body = None
54
+ self.discriminator = None
55
+
56
+ self.application_id = application_id
57
+ if x_enterprise_project_id is not None:
58
+ self.x_enterprise_project_id = x_enterprise_project_id
59
+ self.x_environment_id = x_environment_id
60
+ if body is not None:
61
+ self.body = body
62
+
63
+ @property
64
+ def application_id(self):
65
+ """Gets the application_id of this CreateComponentWithConfigurationRequest.
66
+
67
+ 应用ID。
68
+
69
+ :return: The application_id of this CreateComponentWithConfigurationRequest.
70
+ :rtype: str
71
+ """
72
+ return self._application_id
73
+
74
+ @application_id.setter
75
+ def application_id(self, application_id):
76
+ """Sets the application_id of this CreateComponentWithConfigurationRequest.
77
+
78
+ 应用ID。
79
+
80
+ :param application_id: The application_id of this CreateComponentWithConfigurationRequest.
81
+ :type application_id: str
82
+ """
83
+ self._application_id = application_id
84
+
85
+ @property
86
+ def x_enterprise_project_id(self):
87
+ """Gets the x_enterprise_project_id of this CreateComponentWithConfigurationRequest.
88
+
89
+ 企业项目ID。 - 创建环境时,环境会绑定企业项目ID。 - 最大长度36字节,带“-”连字符的UUID格式,或者是字符串“0”。 - 该字段不传(或传为字符串“0”)时,则查询默认企业项目下的资源。 > 关于企业项目ID的获取及企业项目特性的详细信息,请参见《[企业管理服务用户指南](https://support.huaweicloud.com/usermanual-em/zh-cn_topic_0126101490.html)》。
90
+
91
+ :return: The x_enterprise_project_id of this CreateComponentWithConfigurationRequest.
92
+ :rtype: str
93
+ """
94
+ return self._x_enterprise_project_id
95
+
96
+ @x_enterprise_project_id.setter
97
+ def x_enterprise_project_id(self, x_enterprise_project_id):
98
+ """Sets the x_enterprise_project_id of this CreateComponentWithConfigurationRequest.
99
+
100
+ 企业项目ID。 - 创建环境时,环境会绑定企业项目ID。 - 最大长度36字节,带“-”连字符的UUID格式,或者是字符串“0”。 - 该字段不传(或传为字符串“0”)时,则查询默认企业项目下的资源。 > 关于企业项目ID的获取及企业项目特性的详细信息,请参见《[企业管理服务用户指南](https://support.huaweicloud.com/usermanual-em/zh-cn_topic_0126101490.html)》。
101
+
102
+ :param x_enterprise_project_id: The x_enterprise_project_id of this CreateComponentWithConfigurationRequest.
103
+ :type x_enterprise_project_id: str
104
+ """
105
+ self._x_enterprise_project_id = x_enterprise_project_id
106
+
107
+ @property
108
+ def x_environment_id(self):
109
+ """Gets the x_environment_id of this CreateComponentWithConfigurationRequest.
110
+
111
+ 环境ID。 - 获取环境ID,通过《[云应用引擎API参考](https://support.huaweicloud.com/api-cae/ListEnvironments.html)》的“获取环境列表”章节获取环境信息。 - 请求响应成功后在响应体的items数组中的一个元素即为一个环境的信息,其中id字段即是环境ID。
112
+
113
+ :return: The x_environment_id of this CreateComponentWithConfigurationRequest.
114
+ :rtype: str
115
+ """
116
+ return self._x_environment_id
117
+
118
+ @x_environment_id.setter
119
+ def x_environment_id(self, x_environment_id):
120
+ """Sets the x_environment_id of this CreateComponentWithConfigurationRequest.
121
+
122
+ 环境ID。 - 获取环境ID,通过《[云应用引擎API参考](https://support.huaweicloud.com/api-cae/ListEnvironments.html)》的“获取环境列表”章节获取环境信息。 - 请求响应成功后在响应体的items数组中的一个元素即为一个环境的信息,其中id字段即是环境ID。
123
+
124
+ :param x_environment_id: The x_environment_id of this CreateComponentWithConfigurationRequest.
125
+ :type x_environment_id: str
126
+ """
127
+ self._x_environment_id = x_environment_id
128
+
129
+ @property
130
+ def body(self):
131
+ """Gets the body of this CreateComponentWithConfigurationRequest.
132
+
133
+ :return: The body of this CreateComponentWithConfigurationRequest.
134
+ :rtype: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBody`
135
+ """
136
+ return self._body
137
+
138
+ @body.setter
139
+ def body(self, body):
140
+ """Sets the body of this CreateComponentWithConfigurationRequest.
141
+
142
+ :param body: The body of this CreateComponentWithConfigurationRequest.
143
+ :type body: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBody`
144
+ """
145
+ self._body = body
146
+
147
+ def to_dict(self):
148
+ """Returns the model properties as a dict"""
149
+ result = {}
150
+
151
+ for attr, _ in six.iteritems(self.openapi_types):
152
+ value = getattr(self, attr)
153
+ if isinstance(value, list):
154
+ result[attr] = list(map(
155
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
156
+ value
157
+ ))
158
+ elif hasattr(value, "to_dict"):
159
+ result[attr] = value.to_dict()
160
+ elif isinstance(value, dict):
161
+ result[attr] = dict(map(
162
+ lambda item: (item[0], item[1].to_dict())
163
+ if hasattr(item[1], "to_dict") else item,
164
+ value.items()
165
+ ))
166
+ else:
167
+ if attr in self.sensitive_list:
168
+ result[attr] = "****"
169
+ else:
170
+ result[attr] = value
171
+
172
+ return result
173
+
174
+ def to_str(self):
175
+ """Returns the string representation of the model"""
176
+ import simplejson as json
177
+ if six.PY2:
178
+ import sys
179
+ reload(sys)
180
+ sys.setdefaultencoding("utf-8")
181
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
182
+
183
+ def __repr__(self):
184
+ """For `print`"""
185
+ return self.to_str()
186
+
187
+ def __eq__(self, other):
188
+ """Returns true if both objects are equal"""
189
+ if not isinstance(other, CreateComponentWithConfigurationRequest):
190
+ return False
191
+
192
+ return self.__dict__ == other.__dict__
193
+
194
+ def __ne__(self, other):
195
+ """Returns true if both objects are not equal"""
196
+ return not self == other
@@ -0,0 +1,213 @@
1
+ # coding: utf-8
2
+
3
+ import six
4
+
5
+ from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
6
+
7
+
8
+ class CreateComponentWithConfigurationRequestBody:
9
+
10
+ """
11
+ Attributes:
12
+ openapi_types (dict): The key is attribute name
13
+ and the value is attribute type.
14
+ attribute_map (dict): The key is attribute name
15
+ and the value is json key in definition.
16
+ """
17
+ sensitive_list = []
18
+
19
+ openapi_types = {
20
+ 'api_version': 'ApiVersionObj',
21
+ 'kind': 'ComponentKindObj',
22
+ 'metadata': 'CreateComponentWithConfigurationRequestBodyMetadata',
23
+ 'spec': 'CreateComponentWithConfigurationRequestBodySpec',
24
+ 'configurations': 'list[ConfigurationItem]'
25
+ }
26
+
27
+ attribute_map = {
28
+ 'api_version': 'api_version',
29
+ 'kind': 'kind',
30
+ 'metadata': 'metadata',
31
+ 'spec': 'spec',
32
+ 'configurations': 'configurations'
33
+ }
34
+
35
+ def __init__(self, api_version=None, kind=None, metadata=None, spec=None, configurations=None):
36
+ """CreateComponentWithConfigurationRequestBody
37
+
38
+ The model defined in huaweicloud sdk
39
+
40
+ :param api_version:
41
+ :type api_version: :class:`huaweicloudsdkcae.v1.ApiVersionObj`
42
+ :param kind:
43
+ :type kind: :class:`huaweicloudsdkcae.v1.ComponentKindObj`
44
+ :param metadata:
45
+ :type metadata: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBodyMetadata`
46
+ :param spec:
47
+ :type spec: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBodySpec`
48
+ :param configurations: 配置项列表。
49
+ :type configurations: list[:class:`huaweicloudsdkcae.v1.ConfigurationItem`]
50
+ """
51
+
52
+
53
+
54
+ self._api_version = None
55
+ self._kind = None
56
+ self._metadata = None
57
+ self._spec = None
58
+ self._configurations = None
59
+ self.discriminator = None
60
+
61
+ self.api_version = api_version
62
+ self.kind = kind
63
+ if metadata is not None:
64
+ self.metadata = metadata
65
+ if spec is not None:
66
+ self.spec = spec
67
+ if configurations is not None:
68
+ self.configurations = configurations
69
+
70
+ @property
71
+ def api_version(self):
72
+ """Gets the api_version of this CreateComponentWithConfigurationRequestBody.
73
+
74
+ :return: The api_version of this CreateComponentWithConfigurationRequestBody.
75
+ :rtype: :class:`huaweicloudsdkcae.v1.ApiVersionObj`
76
+ """
77
+ return self._api_version
78
+
79
+ @api_version.setter
80
+ def api_version(self, api_version):
81
+ """Sets the api_version of this CreateComponentWithConfigurationRequestBody.
82
+
83
+ :param api_version: The api_version of this CreateComponentWithConfigurationRequestBody.
84
+ :type api_version: :class:`huaweicloudsdkcae.v1.ApiVersionObj`
85
+ """
86
+ self._api_version = api_version
87
+
88
+ @property
89
+ def kind(self):
90
+ """Gets the kind of this CreateComponentWithConfigurationRequestBody.
91
+
92
+ :return: The kind of this CreateComponentWithConfigurationRequestBody.
93
+ :rtype: :class:`huaweicloudsdkcae.v1.ComponentKindObj`
94
+ """
95
+ return self._kind
96
+
97
+ @kind.setter
98
+ def kind(self, kind):
99
+ """Sets the kind of this CreateComponentWithConfigurationRequestBody.
100
+
101
+ :param kind: The kind of this CreateComponentWithConfigurationRequestBody.
102
+ :type kind: :class:`huaweicloudsdkcae.v1.ComponentKindObj`
103
+ """
104
+ self._kind = kind
105
+
106
+ @property
107
+ def metadata(self):
108
+ """Gets the metadata of this CreateComponentWithConfigurationRequestBody.
109
+
110
+ :return: The metadata of this CreateComponentWithConfigurationRequestBody.
111
+ :rtype: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBodyMetadata`
112
+ """
113
+ return self._metadata
114
+
115
+ @metadata.setter
116
+ def metadata(self, metadata):
117
+ """Sets the metadata of this CreateComponentWithConfigurationRequestBody.
118
+
119
+ :param metadata: The metadata of this CreateComponentWithConfigurationRequestBody.
120
+ :type metadata: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBodyMetadata`
121
+ """
122
+ self._metadata = metadata
123
+
124
+ @property
125
+ def spec(self):
126
+ """Gets the spec of this CreateComponentWithConfigurationRequestBody.
127
+
128
+ :return: The spec of this CreateComponentWithConfigurationRequestBody.
129
+ :rtype: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBodySpec`
130
+ """
131
+ return self._spec
132
+
133
+ @spec.setter
134
+ def spec(self, spec):
135
+ """Sets the spec of this CreateComponentWithConfigurationRequestBody.
136
+
137
+ :param spec: The spec of this CreateComponentWithConfigurationRequestBody.
138
+ :type spec: :class:`huaweicloudsdkcae.v1.CreateComponentWithConfigurationRequestBodySpec`
139
+ """
140
+ self._spec = spec
141
+
142
+ @property
143
+ def configurations(self):
144
+ """Gets the configurations of this CreateComponentWithConfigurationRequestBody.
145
+
146
+ 配置项列表。
147
+
148
+ :return: The configurations of this CreateComponentWithConfigurationRequestBody.
149
+ :rtype: list[:class:`huaweicloudsdkcae.v1.ConfigurationItem`]
150
+ """
151
+ return self._configurations
152
+
153
+ @configurations.setter
154
+ def configurations(self, configurations):
155
+ """Sets the configurations of this CreateComponentWithConfigurationRequestBody.
156
+
157
+ 配置项列表。
158
+
159
+ :param configurations: The configurations of this CreateComponentWithConfigurationRequestBody.
160
+ :type configurations: list[:class:`huaweicloudsdkcae.v1.ConfigurationItem`]
161
+ """
162
+ self._configurations = configurations
163
+
164
+ def to_dict(self):
165
+ """Returns the model properties as a dict"""
166
+ result = {}
167
+
168
+ for attr, _ in six.iteritems(self.openapi_types):
169
+ value = getattr(self, attr)
170
+ if isinstance(value, list):
171
+ result[attr] = list(map(
172
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
173
+ value
174
+ ))
175
+ elif hasattr(value, "to_dict"):
176
+ result[attr] = value.to_dict()
177
+ elif isinstance(value, dict):
178
+ result[attr] = dict(map(
179
+ lambda item: (item[0], item[1].to_dict())
180
+ if hasattr(item[1], "to_dict") else item,
181
+ value.items()
182
+ ))
183
+ else:
184
+ if attr in self.sensitive_list:
185
+ result[attr] = "****"
186
+ else:
187
+ result[attr] = value
188
+
189
+ return result
190
+
191
+ def to_str(self):
192
+ """Returns the string representation of the model"""
193
+ import simplejson as json
194
+ if six.PY2:
195
+ import sys
196
+ reload(sys)
197
+ sys.setdefaultencoding("utf-8")
198
+ return json.dumps(sanitize_for_serialization(self), ensure_ascii=False)
199
+
200
+ def __repr__(self):
201
+ """For `print`"""
202
+ return self.to_str()
203
+
204
+ def __eq__(self, other):
205
+ """Returns true if both objects are equal"""
206
+ if not isinstance(other, CreateComponentWithConfigurationRequestBody):
207
+ return False
208
+
209
+ return self.__dict__ == other.__dict__
210
+
211
+ def __ne__(self, other):
212
+ """Returns true if both objects are not equal"""
213
+ return not self == other