diff --git a/huaweicloud-sdk-codecheck/LICENSE b/huaweicloud-sdk-codecheck/LICENSE new file mode 100644 index 0000000000..808e3296c0 --- /dev/null +++ b/huaweicloud-sdk-codecheck/LICENSE @@ -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. \ No newline at end of file diff --git a/huaweicloud-sdk-codecheck/README_PYPI.md b/huaweicloud-sdk-codecheck/README_PYPI.md new file mode 100644 index 0000000000..9711543c73 --- /dev/null +++ b/huaweicloud-sdk-codecheck/README_PYPI.md @@ -0,0 +1 @@ +See detailed information in [huaweicloud-sdk-python-v3](https://github.com/huaweicloud/huaweicloud-sdk-python-v3). \ No newline at end of file diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/__init__.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/__init__.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/__init__.py new file mode 100644 index 0000000000..825a2f365a --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/__init__.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +from __future__ import absolute_import + +# import CodeCheckClient +from huaweicloudsdkcodecheck.v2.codecheck_client import CodeCheckClient +from huaweicloudsdkcodecheck.v2.codecheck_async_client import CodeCheckAsyncClient +# import models into sdk package +from huaweicloudsdkcodecheck.v2.model.check_config_info import CheckConfigInfo +from huaweicloudsdkcodecheck.v2.model.check_parameters_request import CheckParametersRequest +from huaweicloudsdkcodecheck.v2.model.check_parameters_response import CheckParametersResponse +from huaweicloudsdkcodecheck.v2.model.check_record_data_info import CheckRecordDataInfo +from huaweicloudsdkcodecheck.v2.model.check_record_issue_counts_info import CheckRecordIssueCountsInfo +from huaweicloudsdkcodecheck.v2.model.check_record_request import CheckRecordRequest +from huaweicloudsdkcodecheck.v2.model.check_record_response import CheckRecordResponse +from huaweicloudsdkcodecheck.v2.model.check_ruleset_parameters_request import CheckRulesetParametersRequest +from huaweicloudsdkcodecheck.v2.model.check_ruleset_parameters_response import CheckRulesetParametersResponse +from huaweicloudsdkcodecheck.v2.model.config_task_parameter_body import ConfigTaskParameterBody +from huaweicloudsdkcodecheck.v2.model.create_ruleset_request import CreateRulesetRequest +from huaweicloudsdkcodecheck.v2.model.create_ruleset_response import CreateRulesetResponse +from huaweicloudsdkcodecheck.v2.model.create_task_request import CreateTaskRequest +from huaweicloudsdkcodecheck.v2.model.create_task_request_v2 import CreateTaskRequestV2 +from huaweicloudsdkcodecheck.v2.model.create_task_response import CreateTaskResponse +from huaweicloudsdkcodecheck.v2.model.custom_attributes import CustomAttributes +from huaweicloudsdkcodecheck.v2.model.custom_attributes_rule import CustomAttributesRule +from huaweicloudsdkcodecheck.v2.model.defect_events import DefectEvents +from huaweicloudsdkcodecheck.v2.model.defect_fragment_v2 import DefectFragmentV2 +from huaweicloudsdkcodecheck.v2.model.defect_info_v2 import DefectInfoV2 +from huaweicloudsdkcodecheck.v2.model.delete_ruleset_request import DeleteRulesetRequest +from huaweicloudsdkcodecheck.v2.model.delete_ruleset_response import DeleteRulesetResponse +from huaweicloudsdkcodecheck.v2.model.delete_task_request import DeleteTaskRequest +from huaweicloudsdkcodecheck.v2.model.delete_task_response import DeleteTaskResponse +from huaweicloudsdkcodecheck.v2.model.ignore_path_setting_item import IgnorePathSettingItem +from huaweicloudsdkcodecheck.v2.model.inc_config_v2 import IncConfigV2 +from huaweicloudsdkcodecheck.v2.model.list_rules_request import ListRulesRequest +from huaweicloudsdkcodecheck.v2.model.list_rules_response import ListRulesResponse +from huaweicloudsdkcodecheck.v2.model.list_rulesets_request import ListRulesetsRequest +from huaweicloudsdkcodecheck.v2.model.list_rulesets_response import ListRulesetsResponse +from huaweicloudsdkcodecheck.v2.model.list_task_parameter_request import ListTaskParameterRequest +from huaweicloudsdkcodecheck.v2.model.list_task_parameter_response import ListTaskParameterResponse +from huaweicloudsdkcodecheck.v2.model.list_task_ruleset_request import ListTaskRulesetRequest +from huaweicloudsdkcodecheck.v2.model.list_task_ruleset_response import ListTaskRulesetResponse +from huaweicloudsdkcodecheck.v2.model.list_template_rules_request import ListTemplateRulesRequest +from huaweicloudsdkcodecheck.v2.model.list_template_rules_response import ListTemplateRulesResponse +from huaweicloudsdkcodecheck.v2.model.log_info import LogInfo +from huaweicloudsdkcodecheck.v2.model.metric_info import MetricInfo +from huaweicloudsdkcodecheck.v2.model.param_info import ParamInfo +from huaweicloudsdkcodecheck.v2.model.progress_detail_v2 import ProgressDetailV2 +from huaweicloudsdkcodecheck.v2.model.rule_config import RuleConfig +from huaweicloudsdkcodecheck.v2.model.rule_item import RuleItem +from huaweicloudsdkcodecheck.v2.model.rule_list_item import RuleListItem +from huaweicloudsdkcodecheck.v2.model.rule_set_v2 import RuleSetV2 +from huaweicloudsdkcodecheck.v2.model.ruleset import Ruleset +from huaweicloudsdkcodecheck.v2.model.ruleset_item import RulesetItem +from huaweicloudsdkcodecheck.v2.model.run_request_v2 import RunRequestV2 +from huaweicloudsdkcodecheck.v2.model.run_task_request import RunTaskRequest +from huaweicloudsdkcodecheck.v2.model.run_task_response import RunTaskResponse +from huaweicloudsdkcodecheck.v2.model.set_defaul_template_request import SetDefaulTemplateRequest +from huaweicloudsdkcodecheck.v2.model.set_defaul_template_response import SetDefaulTemplateResponse +from huaweicloudsdkcodecheck.v2.model.show_progress_detail_request import ShowProgressDetailRequest +from huaweicloudsdkcodecheck.v2.model.show_progress_detail_response import ShowProgressDetailResponse +from huaweicloudsdkcodecheck.v2.model.show_task_cmetrics_request import ShowTaskCmetricsRequest +from huaweicloudsdkcodecheck.v2.model.show_task_cmetrics_response import ShowTaskCmetricsResponse +from huaweicloudsdkcodecheck.v2.model.show_task_defects_request import ShowTaskDefectsRequest +from huaweicloudsdkcodecheck.v2.model.show_task_defects_response import ShowTaskDefectsResponse +from huaweicloudsdkcodecheck.v2.model.show_task_defects_statistic_request import ShowTaskDefectsStatisticRequest +from huaweicloudsdkcodecheck.v2.model.show_task_defects_statistic_response import ShowTaskDefectsStatisticResponse +from huaweicloudsdkcodecheck.v2.model.show_task_detail_request import ShowTaskDetailRequest +from huaweicloudsdkcodecheck.v2.model.show_task_detail_response import ShowTaskDetailResponse +from huaweicloudsdkcodecheck.v2.model.show_task_list_by_project_id_request import ShowTaskListByProjectIdRequest +from huaweicloudsdkcodecheck.v2.model.show_task_list_by_project_id_response import ShowTaskListByProjectIdResponse +from huaweicloudsdkcodecheck.v2.model.show_task_path_tree_request import ShowTaskPathTreeRequest +from huaweicloudsdkcodecheck.v2.model.show_task_path_tree_response import ShowTaskPathTreeResponse +from huaweicloudsdkcodecheck.v2.model.show_task_settings_request import ShowTaskSettingsRequest +from huaweicloudsdkcodecheck.v2.model.show_task_settings_response import ShowTaskSettingsResponse +from huaweicloudsdkcodecheck.v2.model.show_tasklog_request import ShowTasklogRequest +from huaweicloudsdkcodecheck.v2.model.show_tasklog_response import ShowTasklogResponse +from huaweicloudsdkcodecheck.v2.model.show_tasks_rulesets_request import ShowTasksRulesetsRequest +from huaweicloudsdkcodecheck.v2.model.show_tasks_rulesets_response import ShowTasksRulesetsResponse +from huaweicloudsdkcodecheck.v2.model.simple_task_info_v2 import SimpleTaskInfoV2 +from huaweicloudsdkcodecheck.v2.model.statistic_severity_v2 import StatisticSeverityV2 +from huaweicloudsdkcodecheck.v2.model.statistic_status_v2 import StatisticStatusV2 +from huaweicloudsdkcodecheck.v2.model.stop_task_by_id_request import StopTaskByIdRequest +from huaweicloudsdkcodecheck.v2.model.stop_task_by_id_response import StopTaskByIdResponse +from huaweicloudsdkcodecheck.v2.model.task_advanced_settings import TaskAdvancedSettings +from huaweicloudsdkcodecheck.v2.model.task_advanced_settings_item import TaskAdvancedSettingsItem +from huaweicloudsdkcodecheck.v2.model.task_check_paramters import TaskCheckParamters +from huaweicloudsdkcodecheck.v2.model.task_check_settings_item import TaskCheckSettingsItem +from huaweicloudsdkcodecheck.v2.model.task_ruleset_info import TaskRulesetInfo +from huaweicloudsdkcodecheck.v2.model.tree_node import TreeNode +from huaweicloudsdkcodecheck.v2.model.update_defect_request_body import UpdateDefectRequestBody +from huaweicloudsdkcodecheck.v2.model.update_defect_status_request import UpdateDefectStatusRequest +from huaweicloudsdkcodecheck.v2.model.update_defect_status_response import UpdateDefectStatusResponse +from huaweicloudsdkcodecheck.v2.model.update_ignore_path_request import UpdateIgnorePathRequest +from huaweicloudsdkcodecheck.v2.model.update_ignore_path_request_body import UpdateIgnorePathRequestBody +from huaweicloudsdkcodecheck.v2.model.update_ignore_path_response import UpdateIgnorePathResponse +from huaweicloudsdkcodecheck.v2.model.update_task_ruleset_item import UpdateTaskRulesetItem +from huaweicloudsdkcodecheck.v2.model.update_task_ruleset_request import UpdateTaskRulesetRequest +from huaweicloudsdkcodecheck.v2.model.update_task_ruleset_response import UpdateTaskRulesetResponse +from huaweicloudsdkcodecheck.v2.model.update_task_settings_request import UpdateTaskSettingsRequest +from huaweicloudsdkcodecheck.v2.model.update_task_settings_request_body import UpdateTaskSettingsRequestBody +from huaweicloudsdkcodecheck.v2.model.update_task_settings_response import UpdateTaskSettingsResponse + diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/codecheck_async_client.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/codecheck_async_client.py new file mode 100644 index 0000000000..8a1bb43eb0 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/codecheck_async_client.py @@ -0,0 +1,1833 @@ +# coding: utf-8 + +from __future__ import absolute_import + +import importlib + +from huaweicloudsdkcore.client import Client, ClientBuilder +from huaweicloudsdkcore.utils import http_utils +from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest + + +class CodeCheckAsyncClient(Client): + def __init__(self): + super(CodeCheckAsyncClient, self).__init__() + self.model_package = importlib.import_module("huaweicloudsdkcodecheck.v2.model") + + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CodeCheckClient": + raise TypeError("client type error, support client type is CodeCheckClient") + + return ClientBuilder(clazz) + + def check_parameters_async(self, request): + """查询任务规则集的检查参数 + + 查询任务规则集的检查参数 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for CheckParameters + :type request: :class:`huaweicloudsdkcodecheck.v2.CheckParametersRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.CheckParametersResponse` + """ + return self._check_parameters_with_http_info(request) + + def _check_parameters_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + if 'ruleset_id' in local_var_params: + path_params['ruleset_id'] = local_var_params['ruleset_id'] + + query_params = [] + if 'language' in local_var_params: + query_params.append(('language', local_var_params['language'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/ruleset/{ruleset_id}/check-parameters', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='CheckParametersResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def check_record_async(self, request): + """历史扫描结果查询 + + 提供每次扫描的问题数量统计 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for CheckRecord + :type request: :class:`huaweicloudsdkcodecheck.v2.CheckRecordRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.CheckRecordResponse` + """ + return self._check_record_with_http_info(request) + + def _check_record_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + if 'start_time' in local_var_params: + query_params.append(('start_time', local_var_params['start_time'])) + if 'end_time' in local_var_params: + query_params.append(('end_time', local_var_params['end_time'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/checkrecord', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='CheckRecordResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def check_ruleset_parameters_async(self, request): + """查询任务规则集的检查参数 + + 查询任务规则集的检查参数 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for CheckRulesetParameters + :type request: :class:`huaweicloudsdkcodecheck.v2.CheckRulesetParametersRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.CheckRulesetParametersResponse` + """ + return self._check_ruleset_parameters_with_http_info(request) + + def _check_ruleset_parameters_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + if 'ruleset_id' in local_var_params: + path_params['ruleset_id'] = local_var_params['ruleset_id'] + + query_params = [] + if 'language' in local_var_params: + query_params.append(('language', local_var_params['language'])) + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v3/{project_id}/tasks/{task_id}/ruleset/{ruleset_id}/check-parameters', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='CheckRulesetParametersResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def create_ruleset_async(self, request): + """创建自定义规则集 + + 可根据需求灵活的组合规则。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for CreateRuleset + :type request: :class:`huaweicloudsdkcodecheck.v2.CreateRulesetRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.CreateRulesetResponse` + """ + return self._create_ruleset_with_http_info(request) + + def _create_ruleset_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/ruleset', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='CreateRulesetResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def create_task_async(self, request): + """新建检查任务 + + 新建检查任务但是不执行。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for CreateTask + :type request: :class:`huaweicloudsdkcodecheck.v2.CreateTaskRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.CreateTaskResponse` + """ + return self._create_task_with_http_info(request) + + def _create_task_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/task', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='CreateTaskResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def delete_ruleset_async(self, request): + """删除自定义规则集 + + 删除自定义规则集,正在使用中的或默认规则集不能删除 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for DeleteRuleset + :type request: :class:`huaweicloudsdkcodecheck.v2.DeleteRulesetRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.DeleteRulesetResponse` + """ + return self._delete_ruleset_with_http_info(request) + + def _delete_ruleset_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'ruleset_id' in local_var_params: + path_params['ruleset_id'] = local_var_params['ruleset_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/ruleset/{ruleset_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='DeleteRulesetResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def delete_task_async(self, request): + """删除检查任务 + + 删除检查任务,执行中的任务删除无法再查看 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for DeleteTask + :type request: :class:`huaweicloudsdkcodecheck.v2.DeleteTaskRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.DeleteTaskResponse` + """ + return self._delete_task_with_http_info(request) + + def _delete_task_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='DeleteTaskResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def list_rules_async(self, request): + """获取规则列表接口 + + 根据语言、问题级别等条件查询规则列表。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ListRules + :type request: :class:`huaweicloudsdkcodecheck.v2.ListRulesRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ListRulesResponse` + """ + return self._list_rules_with_http_info(request) + + def _list_rules_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'rule_languages' in local_var_params: + query_params.append(('rule_languages', local_var_params['rule_languages'])) + if 'rule_severity' in local_var_params: + query_params.append(('rule_severity', local_var_params['rule_severity'])) + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/rules', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ListRulesResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def list_rulesets_async(self, request): + """查询规则集列表 + + 根据项目ID、语言等条件查询规则集列表。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ListRulesets + :type request: :class:`huaweicloudsdkcodecheck.v2.ListRulesetsRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ListRulesetsResponse` + """ + return self._list_rulesets_with_http_info(request) + + def _list_rulesets_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + + query_params = [] + if 'category' in local_var_params: + query_params.append(('category', local_var_params['category'])) + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/rulesets', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ListRulesetsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def list_task_parameter_async(self, request): + """任务配置检查参数 + + 任务配置检查参数 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ListTaskParameter + :type request: :class:`huaweicloudsdkcodecheck.v2.ListTaskParameterRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ListTaskParameterResponse` + """ + return self._list_task_parameter_with_http_info(request) + + def _list_task_parameter_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/config-parameters', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ListTaskParameterResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def list_task_ruleset_async(self, request): + """查询任务的已选规则集列表 + + 查询任务的已选规则集列表。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ListTaskRuleset + :type request: :class:`huaweicloudsdkcodecheck.v2.ListTaskRulesetRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ListTaskRulesetResponse` + """ + return self._list_task_ruleset_with_http_info(request) + + def _list_task_ruleset_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/rulesets', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ListTaskRulesetResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def list_template_rules_async(self, request): + """查看规则集的规则列表 + + 根据项目ID、规则集ID等条件查询规则列表。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ListTemplateRules + :type request: :class:`huaweicloudsdkcodecheck.v2.ListTemplateRulesRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ListTemplateRulesResponse` + """ + return self._list_template_rules_with_http_info(request) + + def _list_template_rules_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'ruleset_id' in local_var_params: + path_params['ruleset_id'] = local_var_params['ruleset_id'] + + query_params = [] + if 'types' in local_var_params: + query_params.append(('types', local_var_params['types'])) + if 'languages' in local_var_params: + query_params.append(('languages', local_var_params['languages'])) + if 'tags' in local_var_params: + query_params.append(('tags', local_var_params['tags'])) + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/ruleset/{ruleset_id}/rules', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ListTemplateRulesResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def run_task_async(self, request): + """执行检查任务 + + 执行检查任务。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for RunTask + :type request: :class:`huaweicloudsdkcodecheck.v2.RunTaskRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.RunTaskResponse` + """ + return self._run_task_with_http_info(request) + + def _run_task_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/run', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='RunTaskResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def set_defaul_template_async(self, request): + """设置每个项目对应语言的默认规则集配置 + + 设置每个项目对应语言的默认规则集配置。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for SetDefaulTemplate + :type request: :class:`huaweicloudsdkcodecheck.v2.SetDefaulTemplateRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.SetDefaulTemplateResponse` + """ + return self._set_defaul_template_with_http_info(request) + + def _set_defaul_template_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'ruleset_id' in local_var_params: + path_params['ruleset_id'] = local_var_params['ruleset_id'] + if 'language' in local_var_params: + path_params['language'] = local_var_params['language'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/ruleset/{ruleset_id}/{language}/default', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='SetDefaulTemplateResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_progress_detail_async(self, request): + """查询任务执行状态 + + 根据任务ID查询任务执行状态。任务状态:0表示检查中,1表示检查失败,2表示检查成功,3表示任务中止。只有正在检查中才有进度的详细信息。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ShowProgressDetail + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowProgressDetailRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowProgressDetailResponse` + """ + return self._show_progress_detail_with_http_info(request) + + def _show_progress_detail_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/progress', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowProgressDetailResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_cmetrics_async(self, request): + """查询cmertrics缺陷概要 + + 根据检查任务ID查询cmertrics缺陷概要。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ShowTaskCmetrics + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskCmetricsRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskCmetricsResponse` + """ + return self._show_task_cmetrics_with_http_info(request) + + def _show_task_cmetrics_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/metrics-summary', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskCmetricsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_defects_async(self, request): + """查询缺陷详情 + + 根据检查任务ID分页查询缺陷结果详情。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ShowTaskDefects + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskDefectsRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskDefectsResponse` + """ + return self._show_task_defects_with_http_info(request) + + def _show_task_defects_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + if 'status_ids' in local_var_params: + query_params.append(('status_ids', local_var_params['status_ids'])) + if 'severity' in local_var_params: + query_params.append(('severity', local_var_params['severity'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/defects-detail', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskDefectsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_defects_statistic_async(self, request): + """查询缺陷详情的统计 + + 根据检查任务ID查询缺陷详情的统计 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ShowTaskDefectsStatistic + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskDefectsStatisticRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskDefectsStatisticResponse` + """ + return self._show_task_defects_statistic_with_http_info(request) + + def _show_task_defects_statistic_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/defects-statistic', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskDefectsStatisticResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_detail_async(self, request): + """查询缺陷概要 + + 根据检查任务ID查询缺陷结果的概要。包括问题概述、问题状态、圈复杂度、代码重复率等。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ShowTaskDetail + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskDetailRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskDetailResponse` + """ + return self._show_task_detail_with_http_info(request) + + def _show_task_detail_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/defects-summary', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskDetailResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_list_by_project_id_async(self, request): + """查询任务列表 + + 根据DEVCLOUD_PROJECT_UUID查询该项目下的任务列表。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ShowTaskListByProjectId + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskListByProjectIdRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskListByProjectIdResponse` + """ + return self._show_task_list_by_project_id_with_http_info(request) + + def _show_task_list_by_project_id_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + + query_params = [] + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskListByProjectIdResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_path_tree_async(self, request): + """获取任务的目录树 + + 获取任务的目录树 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ShowTaskPathTree + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskPathTreeRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskPathTreeResponse` + """ + return self._show_task_path_tree_with_http_info(request) + + def _show_task_path_tree_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + if 'current_path' in local_var_params: + query_params.append(('current_path', local_var_params['current_path'])) + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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/{project_id}/tasks/{task_id}/listpathtree', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskPathTreeResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_settings_async(self, request): + """查询任务的高级选项 + + 查询任务的高级选项 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ShowTaskSettings + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskSettingsRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskSettingsResponse` + """ + return self._show_task_settings_with_http_info(request) + + def _show_task_settings_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/settings', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskSettingsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_tasklog_async(self, request): + """查询任务检查失败日志 + + 查询任务检查失败日志,不传execute_id则查询最近一次的检查日志 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ShowTasklog + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTasklogRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTasklogResponse` + """ + return self._show_tasklog_with_http_info(request) + + def _show_tasklog_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + if 'execute_id' in local_var_params: + query_params.append(('execute_id', local_var_params['execute_id'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/log-detail', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTasklogResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_tasks_rulesets_async(self, request): + """查询任务的已选规则集列表 + + 查询任务的已选规则集列表。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ShowTasksRulesets + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTasksRulesetsRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTasksRulesetsResponse` + """ + return self._show_tasks_rulesets_with_http_info(request) + + def _show_tasks_rulesets_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v3/{project_id}/tasks/{task_id}/rulesets', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTasksRulesetsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def stop_task_by_id_async(self, request): + """终止检查任务 + + 根据任务ID终止检查任务。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for StopTaskById + :type request: :class:`huaweicloudsdkcodecheck.v2.StopTaskByIdRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.StopTaskByIdResponse` + """ + return self._stop_task_by_id_with_http_info(request) + + def _stop_task_by_id_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/stop', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='StopTaskByIdResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def update_defect_status_async(self, request): + """修改缺陷状态 + + 修改检查出的缺陷的状态为已解决、已忽略 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for UpdateDefectStatus + :type request: :class:`huaweicloudsdkcodecheck.v2.UpdateDefectStatusRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.UpdateDefectStatusResponse` + """ + return self._update_defect_status_with_http_info(request) + + def _update_defect_status_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/defect-status', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='UpdateDefectStatusResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def update_ignore_path_async(self, request): + """任务配置屏蔽目录 + + 任务配置屏蔽目录 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for UpdateIgnorePath + :type request: :class:`huaweicloudsdkcodecheck.v2.UpdateIgnorePathRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.UpdateIgnorePathResponse` + """ + return self._update_ignore_path_with_http_info(request) + + def _update_ignore_path_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/config-ignorepath', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='UpdateIgnorePathResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def update_task_ruleset_async(self, request): + """修改任务规则集 + + 修改任务规则集。 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for UpdateTaskRuleset + :type request: :class:`huaweicloudsdkcodecheck.v2.UpdateTaskRulesetRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.UpdateTaskRulesetResponse` + """ + return self._update_task_ruleset_with_http_info(request) + + def _update_task_ruleset_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/ruleset', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='UpdateTaskRulesetResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def update_task_settings_async(self, request): + """任务配置高级选项 + + 任务配置高级选项,如自定义镜像 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for UpdateTaskSettings + :type request: :class:`huaweicloudsdkcodecheck.v2.UpdateTaskSettingsRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.UpdateTaskSettingsResponse` + """ + return self._update_task_settings_with_http_info(request) + + def _update_task_settings_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/settings', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='UpdateTaskSettingsResponse', + 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, cname=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: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param cname: Used for obs endpoint. + :param auth_settings: 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, + cname=cname, + response_type=response_type, + response_headers=response_headers, + collection_formats=collection_formats, + request_type=request_type, + async_request=True) diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/codecheck_client.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/codecheck_client.py new file mode 100644 index 0000000000..d8849e515a --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/codecheck_client.py @@ -0,0 +1,1802 @@ +# coding: utf-8 + +from __future__ import absolute_import + +import importlib + +from huaweicloudsdkcore.client import Client, ClientBuilder +from huaweicloudsdkcore.utils import http_utils +from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest + + +class CodeCheckClient(Client): + def __init__(self): + super(CodeCheckClient, self).__init__() + self.model_package = importlib.import_module("huaweicloudsdkcodecheck.v2.model") + + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CodeCheckClient": + raise TypeError("client type error, support client type is CodeCheckClient") + + return ClientBuilder(clazz) + + def check_parameters(self, request): + """查询任务规则集的检查参数 + + 查询任务规则集的检查参数 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for CheckParameters + :type request: :class:`huaweicloudsdkcodecheck.v2.CheckParametersRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.CheckParametersResponse` + """ + return self._check_parameters_with_http_info(request) + + def _check_parameters_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + if 'ruleset_id' in local_var_params: + path_params['ruleset_id'] = local_var_params['ruleset_id'] + + query_params = [] + if 'language' in local_var_params: + query_params.append(('language', local_var_params['language'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/ruleset/{ruleset_id}/check-parameters', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='CheckParametersResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def check_record(self, request): + """历史扫描结果查询 + + 提供每次扫描的问题数量统计 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for CheckRecord + :type request: :class:`huaweicloudsdkcodecheck.v2.CheckRecordRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.CheckRecordResponse` + """ + return self._check_record_with_http_info(request) + + def _check_record_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + if 'start_time' in local_var_params: + query_params.append(('start_time', local_var_params['start_time'])) + if 'end_time' in local_var_params: + query_params.append(('end_time', local_var_params['end_time'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/checkrecord', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='CheckRecordResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def check_ruleset_parameters(self, request): + """查询任务规则集的检查参数 + + 查询任务规则集的检查参数 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for CheckRulesetParameters + :type request: :class:`huaweicloudsdkcodecheck.v2.CheckRulesetParametersRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.CheckRulesetParametersResponse` + """ + return self._check_ruleset_parameters_with_http_info(request) + + def _check_ruleset_parameters_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + if 'ruleset_id' in local_var_params: + path_params['ruleset_id'] = local_var_params['ruleset_id'] + + query_params = [] + if 'language' in local_var_params: + query_params.append(('language', local_var_params['language'])) + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v3/{project_id}/tasks/{task_id}/ruleset/{ruleset_id}/check-parameters', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='CheckRulesetParametersResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def create_ruleset(self, request): + """创建自定义规则集 + + 可根据需求灵活的组合规则。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for CreateRuleset + :type request: :class:`huaweicloudsdkcodecheck.v2.CreateRulesetRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.CreateRulesetResponse` + """ + return self._create_ruleset_with_http_info(request) + + def _create_ruleset_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/ruleset', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='CreateRulesetResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def create_task(self, request): + """新建检查任务 + + 新建检查任务但是不执行。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for CreateTask + :type request: :class:`huaweicloudsdkcodecheck.v2.CreateTaskRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.CreateTaskResponse` + """ + return self._create_task_with_http_info(request) + + def _create_task_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/task', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='CreateTaskResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def delete_ruleset(self, request): + """删除自定义规则集 + + 删除自定义规则集,正在使用中的或默认规则集不能删除 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for DeleteRuleset + :type request: :class:`huaweicloudsdkcodecheck.v2.DeleteRulesetRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.DeleteRulesetResponse` + """ + return self._delete_ruleset_with_http_info(request) + + def _delete_ruleset_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'ruleset_id' in local_var_params: + path_params['ruleset_id'] = local_var_params['ruleset_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/ruleset/{ruleset_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='DeleteRulesetResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def delete_task(self, request): + """删除检查任务 + + 删除检查任务,执行中的任务删除无法再查看 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for DeleteTask + :type request: :class:`huaweicloudsdkcodecheck.v2.DeleteTaskRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.DeleteTaskResponse` + """ + return self._delete_task_with_http_info(request) + + def _delete_task_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='DeleteTaskResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def list_rules(self, request): + """获取规则列表接口 + + 根据语言、问题级别等条件查询规则列表。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ListRules + :type request: :class:`huaweicloudsdkcodecheck.v2.ListRulesRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ListRulesResponse` + """ + return self._list_rules_with_http_info(request) + + def _list_rules_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'rule_languages' in local_var_params: + query_params.append(('rule_languages', local_var_params['rule_languages'])) + if 'rule_severity' in local_var_params: + query_params.append(('rule_severity', local_var_params['rule_severity'])) + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/rules', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ListRulesResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def list_rulesets(self, request): + """查询规则集列表 + + 根据项目ID、语言等条件查询规则集列表。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ListRulesets + :type request: :class:`huaweicloudsdkcodecheck.v2.ListRulesetsRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ListRulesetsResponse` + """ + return self._list_rulesets_with_http_info(request) + + def _list_rulesets_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + + query_params = [] + if 'category' in local_var_params: + query_params.append(('category', local_var_params['category'])) + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/rulesets', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ListRulesetsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def list_task_parameter(self, request): + """任务配置检查参数 + + 任务配置检查参数 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ListTaskParameter + :type request: :class:`huaweicloudsdkcodecheck.v2.ListTaskParameterRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ListTaskParameterResponse` + """ + return self._list_task_parameter_with_http_info(request) + + def _list_task_parameter_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/config-parameters', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ListTaskParameterResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def list_task_ruleset(self, request): + """查询任务的已选规则集列表 + + 查询任务的已选规则集列表。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ListTaskRuleset + :type request: :class:`huaweicloudsdkcodecheck.v2.ListTaskRulesetRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ListTaskRulesetResponse` + """ + return self._list_task_ruleset_with_http_info(request) + + def _list_task_ruleset_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/rulesets', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ListTaskRulesetResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def list_template_rules(self, request): + """查看规则集的规则列表 + + 根据项目ID、规则集ID等条件查询规则列表。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ListTemplateRules + :type request: :class:`huaweicloudsdkcodecheck.v2.ListTemplateRulesRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ListTemplateRulesResponse` + """ + return self._list_template_rules_with_http_info(request) + + def _list_template_rules_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'ruleset_id' in local_var_params: + path_params['ruleset_id'] = local_var_params['ruleset_id'] + + query_params = [] + if 'types' in local_var_params: + query_params.append(('types', local_var_params['types'])) + if 'languages' in local_var_params: + query_params.append(('languages', local_var_params['languages'])) + if 'tags' in local_var_params: + query_params.append(('tags', local_var_params['tags'])) + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/ruleset/{ruleset_id}/rules', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ListTemplateRulesResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def run_task(self, request): + """执行检查任务 + + 执行检查任务。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for RunTask + :type request: :class:`huaweicloudsdkcodecheck.v2.RunTaskRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.RunTaskResponse` + """ + return self._run_task_with_http_info(request) + + def _run_task_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/run', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='RunTaskResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def set_defaul_template(self, request): + """设置每个项目对应语言的默认规则集配置 + + 设置每个项目对应语言的默认规则集配置。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for SetDefaulTemplate + :type request: :class:`huaweicloudsdkcodecheck.v2.SetDefaulTemplateRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.SetDefaulTemplateResponse` + """ + return self._set_defaul_template_with_http_info(request) + + def _set_defaul_template_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'ruleset_id' in local_var_params: + path_params['ruleset_id'] = local_var_params['ruleset_id'] + if 'language' in local_var_params: + path_params['language'] = local_var_params['language'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/ruleset/{ruleset_id}/{language}/default', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='SetDefaulTemplateResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_progress_detail(self, request): + """查询任务执行状态 + + 根据任务ID查询任务执行状态。任务状态:0表示检查中,1表示检查失败,2表示检查成功,3表示任务中止。只有正在检查中才有进度的详细信息。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ShowProgressDetail + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowProgressDetailRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowProgressDetailResponse` + """ + return self._show_progress_detail_with_http_info(request) + + def _show_progress_detail_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/progress', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowProgressDetailResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_cmetrics(self, request): + """查询cmertrics缺陷概要 + + 根据检查任务ID查询cmertrics缺陷概要。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ShowTaskCmetrics + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskCmetricsRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskCmetricsResponse` + """ + return self._show_task_cmetrics_with_http_info(request) + + def _show_task_cmetrics_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/metrics-summary', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskCmetricsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_defects(self, request): + """查询缺陷详情 + + 根据检查任务ID分页查询缺陷结果详情。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ShowTaskDefects + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskDefectsRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskDefectsResponse` + """ + return self._show_task_defects_with_http_info(request) + + def _show_task_defects_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + if 'status_ids' in local_var_params: + query_params.append(('status_ids', local_var_params['status_ids'])) + if 'severity' in local_var_params: + query_params.append(('severity', local_var_params['severity'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/defects-detail', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskDefectsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_defects_statistic(self, request): + """查询缺陷详情的统计 + + 根据检查任务ID查询缺陷详情的统计 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ShowTaskDefectsStatistic + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskDefectsStatisticRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskDefectsStatisticResponse` + """ + return self._show_task_defects_statistic_with_http_info(request) + + def _show_task_defects_statistic_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/defects-statistic', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskDefectsStatisticResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_detail(self, request): + """查询缺陷概要 + + 根据检查任务ID查询缺陷结果的概要。包括问题概述、问题状态、圈复杂度、代码重复率等。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ShowTaskDetail + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskDetailRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskDetailResponse` + """ + return self._show_task_detail_with_http_info(request) + + def _show_task_detail_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/defects-summary', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskDetailResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_list_by_project_id(self, request): + """查询任务列表 + + 根据DEVCLOUD_PROJECT_UUID查询该项目下的任务列表。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ShowTaskListByProjectId + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskListByProjectIdRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskListByProjectIdResponse` + """ + return self._show_task_list_by_project_id_with_http_info(request) + + def _show_task_list_by_project_id_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + + query_params = [] + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskListByProjectIdResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_path_tree(self, request): + """获取任务的目录树 + + 获取任务的目录树 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ShowTaskPathTree + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskPathTreeRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskPathTreeResponse` + """ + return self._show_task_path_tree_with_http_info(request) + + def _show_task_path_tree_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + if 'current_path' in local_var_params: + query_params.append(('current_path', local_var_params['current_path'])) + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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/{project_id}/tasks/{task_id}/listpathtree', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskPathTreeResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_task_settings(self, request): + """查询任务的高级选项 + + 查询任务的高级选项 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ShowTaskSettings + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTaskSettingsRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTaskSettingsResponse` + """ + return self._show_task_settings_with_http_info(request) + + def _show_task_settings_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/settings', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTaskSettingsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_tasklog(self, request): + """查询任务检查失败日志 + + 查询任务检查失败日志,不传execute_id则查询最近一次的检查日志 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ShowTasklog + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTasklogRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTasklogResponse` + """ + return self._show_tasklog_with_http_info(request) + + def _show_tasklog_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + if 'execute_id' in local_var_params: + query_params.append(('execute_id', local_var_params['execute_id'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/log-detail', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTasklogResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_tasks_rulesets(self, request): + """查询任务的已选规则集列表 + + 查询任务的已选规则集列表。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ShowTasksRulesets + :type request: :class:`huaweicloudsdkcodecheck.v2.ShowTasksRulesetsRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.ShowTasksRulesetsResponse` + """ + return self._show_tasks_rulesets_with_http_info(request) + + def _show_tasks_rulesets_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + query_params = [] + if 'offset' in local_var_params: + query_params.append(('offset', local_var_params['offset'])) + if 'limit' in local_var_params: + query_params.append(('limit', local_var_params['limit'])) + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v3/{project_id}/tasks/{task_id}/rulesets', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='ShowTasksRulesetsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def stop_task_by_id(self, request): + """终止检查任务 + + 根据任务ID终止检查任务。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for StopTaskById + :type request: :class:`huaweicloudsdkcodecheck.v2.StopTaskByIdRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.StopTaskByIdResponse` + """ + return self._stop_task_by_id_with_http_info(request) + + def _stop_task_by_id_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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 = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/stop', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='StopTaskByIdResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def update_defect_status(self, request): + """修改缺陷状态 + + 修改检查出的缺陷的状态为已解决、已忽略 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for UpdateDefectStatus + :type request: :class:`huaweicloudsdkcodecheck.v2.UpdateDefectStatusRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.UpdateDefectStatusResponse` + """ + return self._update_defect_status_with_http_info(request) + + def _update_defect_status_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/defect-status', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='UpdateDefectStatusResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def update_ignore_path(self, request): + """任务配置屏蔽目录 + + 任务配置屏蔽目录 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for UpdateIgnorePath + :type request: :class:`huaweicloudsdkcodecheck.v2.UpdateIgnorePathRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.UpdateIgnorePathResponse` + """ + return self._update_ignore_path_with_http_info(request) + + def _update_ignore_path_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/config-ignorepath', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='UpdateIgnorePathResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def update_task_ruleset(self, request): + """修改任务规则集 + + 修改任务规则集。 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for UpdateTaskRuleset + :type request: :class:`huaweicloudsdkcodecheck.v2.UpdateTaskRulesetRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.UpdateTaskRulesetResponse` + """ + return self._update_task_ruleset_with_http_info(request) + + def _update_task_ruleset_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/tasks/{task_id}/ruleset', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='UpdateTaskRulesetResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def update_task_settings(self, request): + """任务配置高级选项 + + 任务配置高级选项,如自定义镜像 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for UpdateTaskSettings + :type request: :class:`huaweicloudsdkcodecheck.v2.UpdateTaskSettingsRequest` + :rtype: :class:`huaweicloudsdkcodecheck.v2.UpdateTaskSettingsResponse` + """ + return self._update_task_settings_with_http_info(request) + + def _update_task_settings_with_http_info(self, request): + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] + if 'task_id' in local_var_params: + path_params['task_id'] = local_var_params['task_id'] + + 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']) + + auth_settings = ['apig-auth-iam'] + + return self.call_api( + resource_path='/v2/{project_id}/tasks/{task_id}/settings', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + cname=cname, + response_type='UpdateTaskSettingsResponse', + 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, cname=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: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param cname: Used for obs endpoint. + :param auth_settings: 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, + cname=cname, + response_type=response_type, + response_headers=response_headers, + collection_formats=collection_formats, + request_type=request_type) diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/__init__.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/__init__.py new file mode 100644 index 0000000000..a65412a5b6 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/__init__.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +from __future__ import absolute_import + +# import models into model package +from huaweicloudsdkcodecheck.v2.model.check_config_info import CheckConfigInfo +from huaweicloudsdkcodecheck.v2.model.check_parameters_request import CheckParametersRequest +from huaweicloudsdkcodecheck.v2.model.check_parameters_response import CheckParametersResponse +from huaweicloudsdkcodecheck.v2.model.check_record_data_info import CheckRecordDataInfo +from huaweicloudsdkcodecheck.v2.model.check_record_issue_counts_info import CheckRecordIssueCountsInfo +from huaweicloudsdkcodecheck.v2.model.check_record_request import CheckRecordRequest +from huaweicloudsdkcodecheck.v2.model.check_record_response import CheckRecordResponse +from huaweicloudsdkcodecheck.v2.model.check_ruleset_parameters_request import CheckRulesetParametersRequest +from huaweicloudsdkcodecheck.v2.model.check_ruleset_parameters_response import CheckRulesetParametersResponse +from huaweicloudsdkcodecheck.v2.model.config_task_parameter_body import ConfigTaskParameterBody +from huaweicloudsdkcodecheck.v2.model.create_ruleset_request import CreateRulesetRequest +from huaweicloudsdkcodecheck.v2.model.create_ruleset_response import CreateRulesetResponse +from huaweicloudsdkcodecheck.v2.model.create_task_request import CreateTaskRequest +from huaweicloudsdkcodecheck.v2.model.create_task_request_v2 import CreateTaskRequestV2 +from huaweicloudsdkcodecheck.v2.model.create_task_response import CreateTaskResponse +from huaweicloudsdkcodecheck.v2.model.custom_attributes import CustomAttributes +from huaweicloudsdkcodecheck.v2.model.custom_attributes_rule import CustomAttributesRule +from huaweicloudsdkcodecheck.v2.model.defect_events import DefectEvents +from huaweicloudsdkcodecheck.v2.model.defect_fragment_v2 import DefectFragmentV2 +from huaweicloudsdkcodecheck.v2.model.defect_info_v2 import DefectInfoV2 +from huaweicloudsdkcodecheck.v2.model.delete_ruleset_request import DeleteRulesetRequest +from huaweicloudsdkcodecheck.v2.model.delete_ruleset_response import DeleteRulesetResponse +from huaweicloudsdkcodecheck.v2.model.delete_task_request import DeleteTaskRequest +from huaweicloudsdkcodecheck.v2.model.delete_task_response import DeleteTaskResponse +from huaweicloudsdkcodecheck.v2.model.ignore_path_setting_item import IgnorePathSettingItem +from huaweicloudsdkcodecheck.v2.model.inc_config_v2 import IncConfigV2 +from huaweicloudsdkcodecheck.v2.model.list_rules_request import ListRulesRequest +from huaweicloudsdkcodecheck.v2.model.list_rules_response import ListRulesResponse +from huaweicloudsdkcodecheck.v2.model.list_rulesets_request import ListRulesetsRequest +from huaweicloudsdkcodecheck.v2.model.list_rulesets_response import ListRulesetsResponse +from huaweicloudsdkcodecheck.v2.model.list_task_parameter_request import ListTaskParameterRequest +from huaweicloudsdkcodecheck.v2.model.list_task_parameter_response import ListTaskParameterResponse +from huaweicloudsdkcodecheck.v2.model.list_task_ruleset_request import ListTaskRulesetRequest +from huaweicloudsdkcodecheck.v2.model.list_task_ruleset_response import ListTaskRulesetResponse +from huaweicloudsdkcodecheck.v2.model.list_template_rules_request import ListTemplateRulesRequest +from huaweicloudsdkcodecheck.v2.model.list_template_rules_response import ListTemplateRulesResponse +from huaweicloudsdkcodecheck.v2.model.log_info import LogInfo +from huaweicloudsdkcodecheck.v2.model.metric_info import MetricInfo +from huaweicloudsdkcodecheck.v2.model.param_info import ParamInfo +from huaweicloudsdkcodecheck.v2.model.progress_detail_v2 import ProgressDetailV2 +from huaweicloudsdkcodecheck.v2.model.rule_config import RuleConfig +from huaweicloudsdkcodecheck.v2.model.rule_item import RuleItem +from huaweicloudsdkcodecheck.v2.model.rule_list_item import RuleListItem +from huaweicloudsdkcodecheck.v2.model.rule_set_v2 import RuleSetV2 +from huaweicloudsdkcodecheck.v2.model.ruleset import Ruleset +from huaweicloudsdkcodecheck.v2.model.ruleset_item import RulesetItem +from huaweicloudsdkcodecheck.v2.model.run_request_v2 import RunRequestV2 +from huaweicloudsdkcodecheck.v2.model.run_task_request import RunTaskRequest +from huaweicloudsdkcodecheck.v2.model.run_task_response import RunTaskResponse +from huaweicloudsdkcodecheck.v2.model.set_defaul_template_request import SetDefaulTemplateRequest +from huaweicloudsdkcodecheck.v2.model.set_defaul_template_response import SetDefaulTemplateResponse +from huaweicloudsdkcodecheck.v2.model.show_progress_detail_request import ShowProgressDetailRequest +from huaweicloudsdkcodecheck.v2.model.show_progress_detail_response import ShowProgressDetailResponse +from huaweicloudsdkcodecheck.v2.model.show_task_cmetrics_request import ShowTaskCmetricsRequest +from huaweicloudsdkcodecheck.v2.model.show_task_cmetrics_response import ShowTaskCmetricsResponse +from huaweicloudsdkcodecheck.v2.model.show_task_defects_request import ShowTaskDefectsRequest +from huaweicloudsdkcodecheck.v2.model.show_task_defects_response import ShowTaskDefectsResponse +from huaweicloudsdkcodecheck.v2.model.show_task_defects_statistic_request import ShowTaskDefectsStatisticRequest +from huaweicloudsdkcodecheck.v2.model.show_task_defects_statistic_response import ShowTaskDefectsStatisticResponse +from huaweicloudsdkcodecheck.v2.model.show_task_detail_request import ShowTaskDetailRequest +from huaweicloudsdkcodecheck.v2.model.show_task_detail_response import ShowTaskDetailResponse +from huaweicloudsdkcodecheck.v2.model.show_task_list_by_project_id_request import ShowTaskListByProjectIdRequest +from huaweicloudsdkcodecheck.v2.model.show_task_list_by_project_id_response import ShowTaskListByProjectIdResponse +from huaweicloudsdkcodecheck.v2.model.show_task_path_tree_request import ShowTaskPathTreeRequest +from huaweicloudsdkcodecheck.v2.model.show_task_path_tree_response import ShowTaskPathTreeResponse +from huaweicloudsdkcodecheck.v2.model.show_task_settings_request import ShowTaskSettingsRequest +from huaweicloudsdkcodecheck.v2.model.show_task_settings_response import ShowTaskSettingsResponse +from huaweicloudsdkcodecheck.v2.model.show_tasklog_request import ShowTasklogRequest +from huaweicloudsdkcodecheck.v2.model.show_tasklog_response import ShowTasklogResponse +from huaweicloudsdkcodecheck.v2.model.show_tasks_rulesets_request import ShowTasksRulesetsRequest +from huaweicloudsdkcodecheck.v2.model.show_tasks_rulesets_response import ShowTasksRulesetsResponse +from huaweicloudsdkcodecheck.v2.model.simple_task_info_v2 import SimpleTaskInfoV2 +from huaweicloudsdkcodecheck.v2.model.statistic_severity_v2 import StatisticSeverityV2 +from huaweicloudsdkcodecheck.v2.model.statistic_status_v2 import StatisticStatusV2 +from huaweicloudsdkcodecheck.v2.model.stop_task_by_id_request import StopTaskByIdRequest +from huaweicloudsdkcodecheck.v2.model.stop_task_by_id_response import StopTaskByIdResponse +from huaweicloudsdkcodecheck.v2.model.task_advanced_settings import TaskAdvancedSettings +from huaweicloudsdkcodecheck.v2.model.task_advanced_settings_item import TaskAdvancedSettingsItem +from huaweicloudsdkcodecheck.v2.model.task_check_paramters import TaskCheckParamters +from huaweicloudsdkcodecheck.v2.model.task_check_settings_item import TaskCheckSettingsItem +from huaweicloudsdkcodecheck.v2.model.task_ruleset_info import TaskRulesetInfo +from huaweicloudsdkcodecheck.v2.model.tree_node import TreeNode +from huaweicloudsdkcodecheck.v2.model.update_defect_request_body import UpdateDefectRequestBody +from huaweicloudsdkcodecheck.v2.model.update_defect_status_request import UpdateDefectStatusRequest +from huaweicloudsdkcodecheck.v2.model.update_defect_status_response import UpdateDefectStatusResponse +from huaweicloudsdkcodecheck.v2.model.update_ignore_path_request import UpdateIgnorePathRequest +from huaweicloudsdkcodecheck.v2.model.update_ignore_path_request_body import UpdateIgnorePathRequestBody +from huaweicloudsdkcodecheck.v2.model.update_ignore_path_response import UpdateIgnorePathResponse +from huaweicloudsdkcodecheck.v2.model.update_task_ruleset_item import UpdateTaskRulesetItem +from huaweicloudsdkcodecheck.v2.model.update_task_ruleset_request import UpdateTaskRulesetRequest +from huaweicloudsdkcodecheck.v2.model.update_task_ruleset_response import UpdateTaskRulesetResponse +from huaweicloudsdkcodecheck.v2.model.update_task_settings_request import UpdateTaskSettingsRequest +from huaweicloudsdkcodecheck.v2.model.update_task_settings_request_body import UpdateTaskSettingsRequestBody +from huaweicloudsdkcodecheck.v2.model.update_task_settings_response import UpdateTaskSettingsResponse diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_config_info.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_config_info.py new file mode 100644 index 0000000000..b6a5ceb7a8 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_config_info.py @@ -0,0 +1,347 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CheckConfigInfo: + + """ + 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', + 'cfg_key': 'str', + 'default_value': 'str', + 'option_value': 'str', + 'is_required': 'int', + 'description': 'str', + 'type': 'int', + 'status': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'cfg_key': 'cfg_key', + 'default_value': 'default_value', + 'option_value': 'option_value', + 'is_required': 'is_required', + 'description': 'description', + 'type': 'type', + 'status': 'status', + 'value': 'value' + } + + def __init__(self, name=None, cfg_key=None, default_value=None, option_value=None, is_required=None, description=None, type=None, status=None, value=None): + """CheckConfigInfo + + The model defined in huaweicloud sdk + + :param name: 检查参数名称 + :type name: str + :param cfg_key: 检查参数对应的key值 + :type cfg_key: str + :param default_value: 检查参数默认值 + :type default_value: str + :param option_value: 检查参数可选项 + :type option_value: str + :param is_required: 0:非必填,1:必填 + :type is_required: int + :param description: 检查参数说明 + :type description: str + :param type: 参数类型,0:文本,2:有可选项 + :type type: int + :param status: 参数状态,on:启用,off:未启用 + :type status: str + :param value: 检查参数值 + :type value: str + """ + + + + self._name = None + self._cfg_key = None + self._default_value = None + self._option_value = None + self._is_required = None + self._description = None + self._type = None + self._status = None + self._value = None + self.discriminator = None + + if name is not None: + self.name = name + if cfg_key is not None: + self.cfg_key = cfg_key + if default_value is not None: + self.default_value = default_value + if option_value is not None: + self.option_value = option_value + if is_required is not None: + self.is_required = is_required + if description is not None: + self.description = description + if type is not None: + self.type = type + if status is not None: + self.status = status + if value is not None: + self.value = value + + @property + def name(self): + """Gets the name of this CheckConfigInfo. + + 检查参数名称 + + :return: The name of this CheckConfigInfo. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CheckConfigInfo. + + 检查参数名称 + + :param name: The name of this CheckConfigInfo. + :type name: str + """ + self._name = name + + @property + def cfg_key(self): + """Gets the cfg_key of this CheckConfigInfo. + + 检查参数对应的key值 + + :return: The cfg_key of this CheckConfigInfo. + :rtype: str + """ + return self._cfg_key + + @cfg_key.setter + def cfg_key(self, cfg_key): + """Sets the cfg_key of this CheckConfigInfo. + + 检查参数对应的key值 + + :param cfg_key: The cfg_key of this CheckConfigInfo. + :type cfg_key: str + """ + self._cfg_key = cfg_key + + @property + def default_value(self): + """Gets the default_value of this CheckConfigInfo. + + 检查参数默认值 + + :return: The default_value of this CheckConfigInfo. + :rtype: str + """ + return self._default_value + + @default_value.setter + def default_value(self, default_value): + """Sets the default_value of this CheckConfigInfo. + + 检查参数默认值 + + :param default_value: The default_value of this CheckConfigInfo. + :type default_value: str + """ + self._default_value = default_value + + @property + def option_value(self): + """Gets the option_value of this CheckConfigInfo. + + 检查参数可选项 + + :return: The option_value of this CheckConfigInfo. + :rtype: str + """ + return self._option_value + + @option_value.setter + def option_value(self, option_value): + """Sets the option_value of this CheckConfigInfo. + + 检查参数可选项 + + :param option_value: The option_value of this CheckConfigInfo. + :type option_value: str + """ + self._option_value = option_value + + @property + def is_required(self): + """Gets the is_required of this CheckConfigInfo. + + 0:非必填,1:必填 + + :return: The is_required of this CheckConfigInfo. + :rtype: int + """ + return self._is_required + + @is_required.setter + def is_required(self, is_required): + """Sets the is_required of this CheckConfigInfo. + + 0:非必填,1:必填 + + :param is_required: The is_required of this CheckConfigInfo. + :type is_required: int + """ + self._is_required = is_required + + @property + def description(self): + """Gets the description of this CheckConfigInfo. + + 检查参数说明 + + :return: The description of this CheckConfigInfo. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CheckConfigInfo. + + 检查参数说明 + + :param description: The description of this CheckConfigInfo. + :type description: str + """ + self._description = description + + @property + def type(self): + """Gets the type of this CheckConfigInfo. + + 参数类型,0:文本,2:有可选项 + + :return: The type of this CheckConfigInfo. + :rtype: int + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this CheckConfigInfo. + + 参数类型,0:文本,2:有可选项 + + :param type: The type of this CheckConfigInfo. + :type type: int + """ + self._type = type + + @property + def status(self): + """Gets the status of this CheckConfigInfo. + + 参数状态,on:启用,off:未启用 + + :return: The status of this CheckConfigInfo. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this CheckConfigInfo. + + 参数状态,on:启用,off:未启用 + + :param status: The status of this CheckConfigInfo. + :type status: str + """ + self._status = status + + @property + def value(self): + """Gets the value of this CheckConfigInfo. + + 检查参数值 + + :return: The value of this CheckConfigInfo. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this CheckConfigInfo. + + 检查参数值 + + :param value: The value of this CheckConfigInfo. + :type value: str + """ + self._value = value + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CheckConfigInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_parameters_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_parameters_request.py new file mode 100644 index 0000000000..8f27bd0418 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_parameters_request.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CheckParametersRequest: + + """ + 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 = { + 'project_id': 'str', + 'task_id': 'str', + 'ruleset_id': 'str', + 'language': 'str' + } + + attribute_map = { + 'project_id': 'project_id', + 'task_id': 'task_id', + 'ruleset_id': 'ruleset_id', + 'language': 'language' + } + + def __init__(self, project_id=None, task_id=None, ruleset_id=None, language=None): + """CheckParametersRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param task_id: 任务ID + :type task_id: str + :param ruleset_id: 规则集ID + :type ruleset_id: str + :param language: 规则集语言 + :type language: str + """ + + + + self._project_id = None + self._task_id = None + self._ruleset_id = None + self._language = None + self.discriminator = None + + self.project_id = project_id + self.task_id = task_id + self.ruleset_id = ruleset_id + self.language = language + + @property + def project_id(self): + """Gets the project_id of this CheckParametersRequest. + + 项目ID + + :return: The project_id of this CheckParametersRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this CheckParametersRequest. + + 项目ID + + :param project_id: The project_id of this CheckParametersRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this CheckParametersRequest. + + 任务ID + + :return: The task_id of this CheckParametersRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this CheckParametersRequest. + + 任务ID + + :param task_id: The task_id of this CheckParametersRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def ruleset_id(self): + """Gets the ruleset_id of this CheckParametersRequest. + + 规则集ID + + :return: The ruleset_id of this CheckParametersRequest. + :rtype: str + """ + return self._ruleset_id + + @ruleset_id.setter + def ruleset_id(self, ruleset_id): + """Sets the ruleset_id of this CheckParametersRequest. + + 规则集ID + + :param ruleset_id: The ruleset_id of this CheckParametersRequest. + :type ruleset_id: str + """ + self._ruleset_id = ruleset_id + + @property + def language(self): + """Gets the language of this CheckParametersRequest. + + 规则集语言 + + :return: The language of this CheckParametersRequest. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this CheckParametersRequest. + + 规则集语言 + + :param language: The language of this CheckParametersRequest. + :type language: str + """ + self._language = language + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CheckParametersRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_parameters_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_parameters_response.py new file mode 100644 index 0000000000..24da26b002 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_parameters_response.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CheckParametersResponse(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 = { + 'body': 'list[TaskCheckParamters]' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """CheckParametersResponse + + The model defined in huaweicloud sdk + + :param body: + :type body: list[:class:`huaweicloudsdkcodecheck.v2.TaskCheckParamters`] + """ + + super(CheckParametersResponse, self).__init__() + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this CheckParametersResponse. + + :return: The body of this CheckParametersResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.TaskCheckParamters`] + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CheckParametersResponse. + + :param body: The body of this CheckParametersResponse. + :type body: list[:class:`huaweicloudsdkcodecheck.v2.TaskCheckParamters`] + """ + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CheckParametersResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_record_data_info.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_record_data_info.py new file mode 100644 index 0000000000..11747fef13 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_record_data_info.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CheckRecordDataInfo: + + """ + 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 = { + 'check_time': 'str', + 'check_end_time': 'str', + 'issue_counts': 'CheckRecordIssueCountsInfo' + } + + attribute_map = { + 'check_time': 'check_time', + 'check_end_time': 'check_end_time', + 'issue_counts': 'issue_counts' + } + + def __init__(self, check_time=None, check_end_time=None, issue_counts=None): + """CheckRecordDataInfo + + The model defined in huaweicloud sdk + + :param check_time: 检查任务执行开始时间 + :type check_time: str + :param check_end_time: 检查任务执行结束时间 + :type check_end_time: str + :param issue_counts: + :type issue_counts: :class:`huaweicloudsdkcodecheck.v2.CheckRecordIssueCountsInfo` + """ + + + + self._check_time = None + self._check_end_time = None + self._issue_counts = None + self.discriminator = None + + if check_time is not None: + self.check_time = check_time + if check_end_time is not None: + self.check_end_time = check_end_time + if issue_counts is not None: + self.issue_counts = issue_counts + + @property + def check_time(self): + """Gets the check_time of this CheckRecordDataInfo. + + 检查任务执行开始时间 + + :return: The check_time of this CheckRecordDataInfo. + :rtype: str + """ + return self._check_time + + @check_time.setter + def check_time(self, check_time): + """Sets the check_time of this CheckRecordDataInfo. + + 检查任务执行开始时间 + + :param check_time: The check_time of this CheckRecordDataInfo. + :type check_time: str + """ + self._check_time = check_time + + @property + def check_end_time(self): + """Gets the check_end_time of this CheckRecordDataInfo. + + 检查任务执行结束时间 + + :return: The check_end_time of this CheckRecordDataInfo. + :rtype: str + """ + return self._check_end_time + + @check_end_time.setter + def check_end_time(self, check_end_time): + """Sets the check_end_time of this CheckRecordDataInfo. + + 检查任务执行结束时间 + + :param check_end_time: The check_end_time of this CheckRecordDataInfo. + :type check_end_time: str + """ + self._check_end_time = check_end_time + + @property + def issue_counts(self): + """Gets the issue_counts of this CheckRecordDataInfo. + + :return: The issue_counts of this CheckRecordDataInfo. + :rtype: :class:`huaweicloudsdkcodecheck.v2.CheckRecordIssueCountsInfo` + """ + return self._issue_counts + + @issue_counts.setter + def issue_counts(self, issue_counts): + """Sets the issue_counts of this CheckRecordDataInfo. + + :param issue_counts: The issue_counts of this CheckRecordDataInfo. + :type issue_counts: :class:`huaweicloudsdkcodecheck.v2.CheckRecordIssueCountsInfo` + """ + self._issue_counts = issue_counts + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CheckRecordDataInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_record_issue_counts_info.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_record_issue_counts_info.py new file mode 100644 index 0000000000..bed2d81dc3 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_record_issue_counts_info.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CheckRecordIssueCountsInfo: + + """ + 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 = { + 'critical': 'int', + 'serious': 'int', + 'normal': 'int', + 'prompt': 'int' + } + + attribute_map = { + 'critical': 'critical', + 'serious': 'serious', + 'normal': 'normal', + 'prompt': 'prompt' + } + + def __init__(self, critical=None, serious=None, normal=None, prompt=None): + """CheckRecordIssueCountsInfo + + The model defined in huaweicloud sdk + + :param critical: 致命问题 + :type critical: int + :param serious: 严重问题 + :type serious: int + :param normal: 常规问题 + :type normal: int + :param prompt: 提示问题 + :type prompt: int + """ + + + + self._critical = None + self._serious = None + self._normal = None + self._prompt = None + self.discriminator = None + + if critical is not None: + self.critical = critical + if serious is not None: + self.serious = serious + if normal is not None: + self.normal = normal + if prompt is not None: + self.prompt = prompt + + @property + def critical(self): + """Gets the critical of this CheckRecordIssueCountsInfo. + + 致命问题 + + :return: The critical of this CheckRecordIssueCountsInfo. + :rtype: int + """ + return self._critical + + @critical.setter + def critical(self, critical): + """Sets the critical of this CheckRecordIssueCountsInfo. + + 致命问题 + + :param critical: The critical of this CheckRecordIssueCountsInfo. + :type critical: int + """ + self._critical = critical + + @property + def serious(self): + """Gets the serious of this CheckRecordIssueCountsInfo. + + 严重问题 + + :return: The serious of this CheckRecordIssueCountsInfo. + :rtype: int + """ + return self._serious + + @serious.setter + def serious(self, serious): + """Sets the serious of this CheckRecordIssueCountsInfo. + + 严重问题 + + :param serious: The serious of this CheckRecordIssueCountsInfo. + :type serious: int + """ + self._serious = serious + + @property + def normal(self): + """Gets the normal of this CheckRecordIssueCountsInfo. + + 常规问题 + + :return: The normal of this CheckRecordIssueCountsInfo. + :rtype: int + """ + return self._normal + + @normal.setter + def normal(self, normal): + """Sets the normal of this CheckRecordIssueCountsInfo. + + 常规问题 + + :param normal: The normal of this CheckRecordIssueCountsInfo. + :type normal: int + """ + self._normal = normal + + @property + def prompt(self): + """Gets the prompt of this CheckRecordIssueCountsInfo. + + 提示问题 + + :return: The prompt of this CheckRecordIssueCountsInfo. + :rtype: int + """ + return self._prompt + + @prompt.setter + def prompt(self, prompt): + """Sets the prompt of this CheckRecordIssueCountsInfo. + + 提示问题 + + :param prompt: The prompt of this CheckRecordIssueCountsInfo. + :type prompt: int + """ + self._prompt = prompt + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CheckRecordIssueCountsInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_record_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_record_request.py new file mode 100644 index 0000000000..14c6db0988 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_record_request.py @@ -0,0 +1,258 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CheckRecordRequest: + + """ + 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 = { + 'project_id': 'str', + 'task_id': 'str', + 'offset': 'int', + 'limit': 'int', + 'start_time': 'str', + 'end_time': 'str' + } + + attribute_map = { + 'project_id': 'project_id', + 'task_id': 'task_id', + 'offset': 'offset', + 'limit': 'limit', + 'start_time': 'start_time', + 'end_time': 'end_time' + } + + def __init__(self, project_id=None, task_id=None, offset=None, limit=None, start_time=None, end_time=None): + """CheckRecordRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param task_id: 任务ID + :type task_id: str + :param offset: 分页索引,偏移量 + :type offset: int + :param limit: 每页显示的数量,每页最多显示1000条 + :type limit: int + :param start_time: 过滤开始时间,根据任务检查开始时间过滤 + :type start_time: str + :param end_time: 过滤结束时间,根据任务检查开始时间过滤 + :type end_time: str + """ + + + + self._project_id = None + self._task_id = None + self._offset = None + self._limit = None + self._start_time = None + self._end_time = None + self.discriminator = None + + self.project_id = project_id + self.task_id = task_id + if offset is not None: + self.offset = offset + if limit is not None: + self.limit = limit + if start_time is not None: + self.start_time = start_time + if end_time is not None: + self.end_time = end_time + + @property + def project_id(self): + """Gets the project_id of this CheckRecordRequest. + + 项目ID + + :return: The project_id of this CheckRecordRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this CheckRecordRequest. + + 项目ID + + :param project_id: The project_id of this CheckRecordRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this CheckRecordRequest. + + 任务ID + + :return: The task_id of this CheckRecordRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this CheckRecordRequest. + + 任务ID + + :param task_id: The task_id of this CheckRecordRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def offset(self): + """Gets the offset of this CheckRecordRequest. + + 分页索引,偏移量 + + :return: The offset of this CheckRecordRequest. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this CheckRecordRequest. + + 分页索引,偏移量 + + :param offset: The offset of this CheckRecordRequest. + :type offset: int + """ + self._offset = offset + + @property + def limit(self): + """Gets the limit of this CheckRecordRequest. + + 每页显示的数量,每页最多显示1000条 + + :return: The limit of this CheckRecordRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this CheckRecordRequest. + + 每页显示的数量,每页最多显示1000条 + + :param limit: The limit of this CheckRecordRequest. + :type limit: int + """ + self._limit = limit + + @property + def start_time(self): + """Gets the start_time of this CheckRecordRequest. + + 过滤开始时间,根据任务检查开始时间过滤 + + :return: The start_time of this CheckRecordRequest. + :rtype: str + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this CheckRecordRequest. + + 过滤开始时间,根据任务检查开始时间过滤 + + :param start_time: The start_time of this CheckRecordRequest. + :type start_time: str + """ + self._start_time = start_time + + @property + def end_time(self): + """Gets the end_time of this CheckRecordRequest. + + 过滤结束时间,根据任务检查开始时间过滤 + + :return: The end_time of this CheckRecordRequest. + :rtype: str + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this CheckRecordRequest. + + 过滤结束时间,根据任务检查开始时间过滤 + + :param end_time: The end_time of this CheckRecordRequest. + :type end_time: str + """ + self._end_time = end_time + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CheckRecordRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_record_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_record_response.py new file mode 100644 index 0000000000..40793dce95 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_record_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CheckRecordResponse(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 = { + 'data': 'list[CheckRecordDataInfo]', + 'total': 'int' + } + + attribute_map = { + 'data': 'data', + 'total': 'total' + } + + def __init__(self, data=None, total=None): + """CheckRecordResponse + + The model defined in huaweicloud sdk + + :param data: 历史记录数据 + :type data: list[:class:`huaweicloudsdkcodecheck.v2.CheckRecordDataInfo`] + :param total: 总数 + :type total: int + """ + + super(CheckRecordResponse, self).__init__() + + self._data = None + self._total = None + self.discriminator = None + + if data is not None: + self.data = data + if total is not None: + self.total = total + + @property + def data(self): + """Gets the data of this CheckRecordResponse. + + 历史记录数据 + + :return: The data of this CheckRecordResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.CheckRecordDataInfo`] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CheckRecordResponse. + + 历史记录数据 + + :param data: The data of this CheckRecordResponse. + :type data: list[:class:`huaweicloudsdkcodecheck.v2.CheckRecordDataInfo`] + """ + self._data = data + + @property + def total(self): + """Gets the total of this CheckRecordResponse. + + 总数 + + :return: The total of this CheckRecordResponse. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this CheckRecordResponse. + + 总数 + + :param total: The total of this CheckRecordResponse. + :type total: int + """ + self._total = total + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CheckRecordResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_ruleset_parameters_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_ruleset_parameters_request.py new file mode 100644 index 0000000000..ecd6c1ec77 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_ruleset_parameters_request.py @@ -0,0 +1,256 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CheckRulesetParametersRequest: + + """ + 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 = { + 'project_id': 'str', + 'task_id': 'str', + 'ruleset_id': 'str', + 'language': 'str', + 'offset': 'int', + 'limit': 'int' + } + + attribute_map = { + 'project_id': 'project_id', + 'task_id': 'task_id', + 'ruleset_id': 'ruleset_id', + 'language': 'language', + 'offset': 'offset', + 'limit': 'limit' + } + + def __init__(self, project_id=None, task_id=None, ruleset_id=None, language=None, offset=None, limit=None): + """CheckRulesetParametersRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param task_id: 任务ID + :type task_id: str + :param ruleset_id: 规则集ID + :type ruleset_id: str + :param language: 规则集语言 + :type language: str + :param offset: 分页索引,偏移量,非必填 + :type offset: int + :param limit: 每页显示的数量,非必填 + :type limit: int + """ + + + + self._project_id = None + self._task_id = None + self._ruleset_id = None + self._language = None + self._offset = None + self._limit = None + self.discriminator = None + + self.project_id = project_id + self.task_id = task_id + self.ruleset_id = ruleset_id + self.language = language + if offset is not None: + self.offset = offset + if limit is not None: + self.limit = limit + + @property + def project_id(self): + """Gets the project_id of this CheckRulesetParametersRequest. + + 项目ID + + :return: The project_id of this CheckRulesetParametersRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this CheckRulesetParametersRequest. + + 项目ID + + :param project_id: The project_id of this CheckRulesetParametersRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this CheckRulesetParametersRequest. + + 任务ID + + :return: The task_id of this CheckRulesetParametersRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this CheckRulesetParametersRequest. + + 任务ID + + :param task_id: The task_id of this CheckRulesetParametersRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def ruleset_id(self): + """Gets the ruleset_id of this CheckRulesetParametersRequest. + + 规则集ID + + :return: The ruleset_id of this CheckRulesetParametersRequest. + :rtype: str + """ + return self._ruleset_id + + @ruleset_id.setter + def ruleset_id(self, ruleset_id): + """Sets the ruleset_id of this CheckRulesetParametersRequest. + + 规则集ID + + :param ruleset_id: The ruleset_id of this CheckRulesetParametersRequest. + :type ruleset_id: str + """ + self._ruleset_id = ruleset_id + + @property + def language(self): + """Gets the language of this CheckRulesetParametersRequest. + + 规则集语言 + + :return: The language of this CheckRulesetParametersRequest. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this CheckRulesetParametersRequest. + + 规则集语言 + + :param language: The language of this CheckRulesetParametersRequest. + :type language: str + """ + self._language = language + + @property + def offset(self): + """Gets the offset of this CheckRulesetParametersRequest. + + 分页索引,偏移量,非必填 + + :return: The offset of this CheckRulesetParametersRequest. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this CheckRulesetParametersRequest. + + 分页索引,偏移量,非必填 + + :param offset: The offset of this CheckRulesetParametersRequest. + :type offset: int + """ + self._offset = offset + + @property + def limit(self): + """Gets the limit of this CheckRulesetParametersRequest. + + 每页显示的数量,非必填 + + :return: The limit of this CheckRulesetParametersRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this CheckRulesetParametersRequest. + + 每页显示的数量,非必填 + + :param limit: The limit of this CheckRulesetParametersRequest. + :type limit: int + """ + self._limit = limit + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CheckRulesetParametersRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_ruleset_parameters_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_ruleset_parameters_response.py new file mode 100644 index 0000000000..3fa0358716 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/check_ruleset_parameters_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CheckRulesetParametersResponse(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 = { + 'data': 'list[TaskCheckParamters]', + 'total': 'int' + } + + attribute_map = { + 'data': 'data', + 'total': 'total' + } + + def __init__(self, data=None, total=None): + """CheckRulesetParametersResponse + + The model defined in huaweicloud sdk + + :param data: 历史记录数据 + :type data: list[:class:`huaweicloudsdkcodecheck.v2.TaskCheckParamters`] + :param total: 总数 + :type total: int + """ + + super(CheckRulesetParametersResponse, self).__init__() + + self._data = None + self._total = None + self.discriminator = None + + if data is not None: + self.data = data + if total is not None: + self.total = total + + @property + def data(self): + """Gets the data of this CheckRulesetParametersResponse. + + 历史记录数据 + + :return: The data of this CheckRulesetParametersResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.TaskCheckParamters`] + """ + return self._data + + @data.setter + def data(self, data): + """Sets the data of this CheckRulesetParametersResponse. + + 历史记录数据 + + :param data: The data of this CheckRulesetParametersResponse. + :type data: list[:class:`huaweicloudsdkcodecheck.v2.TaskCheckParamters`] + """ + self._data = data + + @property + def total(self): + """Gets the total of this CheckRulesetParametersResponse. + + 总数 + + :return: The total of this CheckRulesetParametersResponse. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this CheckRulesetParametersResponse. + + 总数 + + :param total: The total of this CheckRulesetParametersResponse. + :type total: int + """ + self._total = total + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CheckRulesetParametersResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/config_task_parameter_body.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/config_task_parameter_body.py new file mode 100644 index 0000000000..6768156dc7 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/config_task_parameter_body.py @@ -0,0 +1,226 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ConfigTaskParameterBody: + + """ + 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 = { + 'check_id': 'int', + 'ruleset_id': 'str', + 'language': 'str', + 'status': 'str', + 'task_check_settings': 'list[TaskCheckSettingsItem]' + } + + attribute_map = { + 'check_id': 'check_id', + 'ruleset_id': 'ruleset_id', + 'language': 'language', + 'status': 'status', + 'task_check_settings': 'task_check_settings' + } + + def __init__(self, check_id=None, ruleset_id=None, language=None, status=None, task_check_settings=None): + """ConfigTaskParameterBody + + The model defined in huaweicloud sdk + + :param check_id: 检查工具ID + :type check_id: int + :param ruleset_id: 规则集ID + :type ruleset_id: str + :param language: 规则集语言 + :type language: str + :param status: off:关闭,on:开启 + :type status: str + :param task_check_settings: 检查参数信息 + :type task_check_settings: list[:class:`huaweicloudsdkcodecheck.v2.TaskCheckSettingsItem`] + """ + + + + self._check_id = None + self._ruleset_id = None + self._language = None + self._status = None + self._task_check_settings = None + self.discriminator = None + + self.check_id = check_id + self.ruleset_id = ruleset_id + self.language = language + self.status = status + self.task_check_settings = task_check_settings + + @property + def check_id(self): + """Gets the check_id of this ConfigTaskParameterBody. + + 检查工具ID + + :return: The check_id of this ConfigTaskParameterBody. + :rtype: int + """ + return self._check_id + + @check_id.setter + def check_id(self, check_id): + """Sets the check_id of this ConfigTaskParameterBody. + + 检查工具ID + + :param check_id: The check_id of this ConfigTaskParameterBody. + :type check_id: int + """ + self._check_id = check_id + + @property + def ruleset_id(self): + """Gets the ruleset_id of this ConfigTaskParameterBody. + + 规则集ID + + :return: The ruleset_id of this ConfigTaskParameterBody. + :rtype: str + """ + return self._ruleset_id + + @ruleset_id.setter + def ruleset_id(self, ruleset_id): + """Sets the ruleset_id of this ConfigTaskParameterBody. + + 规则集ID + + :param ruleset_id: The ruleset_id of this ConfigTaskParameterBody. + :type ruleset_id: str + """ + self._ruleset_id = ruleset_id + + @property + def language(self): + """Gets the language of this ConfigTaskParameterBody. + + 规则集语言 + + :return: The language of this ConfigTaskParameterBody. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this ConfigTaskParameterBody. + + 规则集语言 + + :param language: The language of this ConfigTaskParameterBody. + :type language: str + """ + self._language = language + + @property + def status(self): + """Gets the status of this ConfigTaskParameterBody. + + off:关闭,on:开启 + + :return: The status of this ConfigTaskParameterBody. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ConfigTaskParameterBody. + + off:关闭,on:开启 + + :param status: The status of this ConfigTaskParameterBody. + :type status: str + """ + self._status = status + + @property + def task_check_settings(self): + """Gets the task_check_settings of this ConfigTaskParameterBody. + + 检查参数信息 + + :return: The task_check_settings of this ConfigTaskParameterBody. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.TaskCheckSettingsItem`] + """ + return self._task_check_settings + + @task_check_settings.setter + def task_check_settings(self, task_check_settings): + """Sets the task_check_settings of this ConfigTaskParameterBody. + + 检查参数信息 + + :param task_check_settings: The task_check_settings of this ConfigTaskParameterBody. + :type task_check_settings: list[:class:`huaweicloudsdkcodecheck.v2.TaskCheckSettingsItem`] + """ + self._task_check_settings = task_check_settings + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConfigTaskParameterBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_ruleset_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_ruleset_request.py new file mode 100644 index 0000000000..9c8cb7641c --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_ruleset_request.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CreateRulesetRequest: + + """ + 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': 'Ruleset' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """CreateRulesetRequest + + The model defined in huaweicloud sdk + + :param body: Body of the CreateRulesetRequest + :type body: :class:`huaweicloudsdkcodecheck.v2.Ruleset` + """ + + + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this CreateRulesetRequest. + + :return: The body of this CreateRulesetRequest. + :rtype: :class:`huaweicloudsdkcodecheck.v2.Ruleset` + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateRulesetRequest. + + :param body: The body of this CreateRulesetRequest. + :type body: :class:`huaweicloudsdkcodecheck.v2.Ruleset` + """ + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateRulesetRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_ruleset_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_ruleset_response.py new file mode 100644 index 0000000000..de3b944359 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_ruleset_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CreateRulesetResponse(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 = { + 'template_id': 'str' + } + + attribute_map = { + 'template_id': 'template_id' + } + + def __init__(self, template_id=None): + """CreateRulesetResponse + + The model defined in huaweicloud sdk + + :param template_id: 规则集ID + :type template_id: str + """ + + super(CreateRulesetResponse, self).__init__() + + self._template_id = None + self.discriminator = None + + if template_id is not None: + self.template_id = template_id + + @property + def template_id(self): + """Gets the template_id of this CreateRulesetResponse. + + 规则集ID + + :return: The template_id of this CreateRulesetResponse. + :rtype: str + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this CreateRulesetResponse. + + 规则集ID + + :param template_id: The template_id of this CreateRulesetResponse. + :type template_id: str + """ + self._template_id = template_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateRulesetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_task_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_task_request.py new file mode 100644 index 0000000000..2275720fad --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_task_request.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CreateTaskRequest: + + """ + 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 = { + 'project_id': 'str', + 'body': 'CreateTaskRequestV2' + } + + attribute_map = { + 'project_id': 'project_id', + 'body': 'body' + } + + def __init__(self, project_id=None, body=None): + """CreateTaskRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param body: Body of the CreateTaskRequest + :type body: :class:`huaweicloudsdkcodecheck.v2.CreateTaskRequestV2` + """ + + + + self._project_id = None + self._body = None + self.discriminator = None + + self.project_id = project_id + if body is not None: + self.body = body + + @property + def project_id(self): + """Gets the project_id of this CreateTaskRequest. + + 项目ID + + :return: The project_id of this CreateTaskRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this CreateTaskRequest. + + 项目ID + + :param project_id: The project_id of this CreateTaskRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def body(self): + """Gets the body of this CreateTaskRequest. + + :return: The body of this CreateTaskRequest. + :rtype: :class:`huaweicloudsdkcodecheck.v2.CreateTaskRequestV2` + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateTaskRequest. + + :param body: The body of this CreateTaskRequest. + :type body: :class:`huaweicloudsdkcodecheck.v2.CreateTaskRequestV2` + """ + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateTaskRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_task_request_v2.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_task_request_v2.py new file mode 100644 index 0000000000..6d10502b47 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_task_request_v2.py @@ -0,0 +1,427 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CreateTaskRequestV2: + + """ + 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 = { + 'check_type': 'list[str]', + 'git_url': 'str', + 'git_branch': 'str', + 'language': 'list[str]', + 'rule_sets': 'list[RuleSetV2]', + 'task_type': 'str', + 'username': 'str', + 'access_token': 'str', + 'endpoint_id': 'str', + 'inc_config': 'IncConfigV2', + 'enable_fossbot': 'bool', + 'resource_pool_id': 'str' + } + + attribute_map = { + 'check_type': 'check_type', + 'git_url': 'git_url', + 'git_branch': 'git_branch', + 'language': 'language', + 'rule_sets': 'rule_sets', + 'task_type': 'task_type', + 'username': 'username', + 'access_token': 'access_token', + 'endpoint_id': 'endpoint_id', + 'inc_config': 'inc_config', + 'enable_fossbot': 'enable_fossbot', + 'resource_pool_id': 'resource_pool_id' + } + + def __init__(self, check_type=None, git_url=None, git_branch=None, language=None, rule_sets=None, task_type=None, username=None, access_token=None, endpoint_id=None, inc_config=None, enable_fossbot=None, resource_pool_id=None): + """CreateTaskRequestV2 + + The model defined in huaweicloud sdk + + :param check_type: 检查类型,数组格式,默认为source + :type check_type: list[str] + :param git_url: 仓库地址 + :type git_url: str + :param git_branch: 仓库分支 + :type git_branch: str + :param language: 检查语言,数组格式,支持cpp,java,js,python,php,css,html,go,typescript,csharp + :type language: list[str] + :param rule_sets: 指定规则集 + :type rule_sets: list[:class:`huaweicloudsdkcodecheck.v2.RuleSetV2`] + :param task_type: 检查类型,支持full/inc两种类型,full表示全量检查,inc表示mr检查 + :type task_type: str + :param username: 仓库有权限的用户名 + :type username: str + :param access_token: 仓库有权限的用户token + :type access_token: str + :param endpoint_id: 仓库有权限的用户endpointId + :type endpoint_id: str + :param inc_config: + :type inc_config: :class:`huaweicloudsdkcodecheck.v2.IncConfigV2` + :param enable_fossbot: 是否打开fossbot检查,默认不开 + :type enable_fossbot: bool + :param resource_pool_id: 资源池id,可以从资源池管理页面获取 + :type resource_pool_id: str + """ + + + + self._check_type = None + self._git_url = None + self._git_branch = None + self._language = None + self._rule_sets = None + self._task_type = None + self._username = None + self._access_token = None + self._endpoint_id = None + self._inc_config = None + self._enable_fossbot = None + self._resource_pool_id = None + self.discriminator = None + + if check_type is not None: + self.check_type = check_type + self.git_url = git_url + self.git_branch = git_branch + self.language = language + if rule_sets is not None: + self.rule_sets = rule_sets + if task_type is not None: + self.task_type = task_type + if username is not None: + self.username = username + if access_token is not None: + self.access_token = access_token + if endpoint_id is not None: + self.endpoint_id = endpoint_id + if inc_config is not None: + self.inc_config = inc_config + if enable_fossbot is not None: + self.enable_fossbot = enable_fossbot + if resource_pool_id is not None: + self.resource_pool_id = resource_pool_id + + @property + def check_type(self): + """Gets the check_type of this CreateTaskRequestV2. + + 检查类型,数组格式,默认为source + + :return: The check_type of this CreateTaskRequestV2. + :rtype: list[str] + """ + return self._check_type + + @check_type.setter + def check_type(self, check_type): + """Sets the check_type of this CreateTaskRequestV2. + + 检查类型,数组格式,默认为source + + :param check_type: The check_type of this CreateTaskRequestV2. + :type check_type: list[str] + """ + self._check_type = check_type + + @property + def git_url(self): + """Gets the git_url of this CreateTaskRequestV2. + + 仓库地址 + + :return: The git_url of this CreateTaskRequestV2. + :rtype: str + """ + return self._git_url + + @git_url.setter + def git_url(self, git_url): + """Sets the git_url of this CreateTaskRequestV2. + + 仓库地址 + + :param git_url: The git_url of this CreateTaskRequestV2. + :type git_url: str + """ + self._git_url = git_url + + @property + def git_branch(self): + """Gets the git_branch of this CreateTaskRequestV2. + + 仓库分支 + + :return: The git_branch of this CreateTaskRequestV2. + :rtype: str + """ + return self._git_branch + + @git_branch.setter + def git_branch(self, git_branch): + """Sets the git_branch of this CreateTaskRequestV2. + + 仓库分支 + + :param git_branch: The git_branch of this CreateTaskRequestV2. + :type git_branch: str + """ + self._git_branch = git_branch + + @property + def language(self): + """Gets the language of this CreateTaskRequestV2. + + 检查语言,数组格式,支持cpp,java,js,python,php,css,html,go,typescript,csharp + + :return: The language of this CreateTaskRequestV2. + :rtype: list[str] + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this CreateTaskRequestV2. + + 检查语言,数组格式,支持cpp,java,js,python,php,css,html,go,typescript,csharp + + :param language: The language of this CreateTaskRequestV2. + :type language: list[str] + """ + self._language = language + + @property + def rule_sets(self): + """Gets the rule_sets of this CreateTaskRequestV2. + + 指定规则集 + + :return: The rule_sets of this CreateTaskRequestV2. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.RuleSetV2`] + """ + return self._rule_sets + + @rule_sets.setter + def rule_sets(self, rule_sets): + """Sets the rule_sets of this CreateTaskRequestV2. + + 指定规则集 + + :param rule_sets: The rule_sets of this CreateTaskRequestV2. + :type rule_sets: list[:class:`huaweicloudsdkcodecheck.v2.RuleSetV2`] + """ + self._rule_sets = rule_sets + + @property + def task_type(self): + """Gets the task_type of this CreateTaskRequestV2. + + 检查类型,支持full/inc两种类型,full表示全量检查,inc表示mr检查 + + :return: The task_type of this CreateTaskRequestV2. + :rtype: str + """ + return self._task_type + + @task_type.setter + def task_type(self, task_type): + """Sets the task_type of this CreateTaskRequestV2. + + 检查类型,支持full/inc两种类型,full表示全量检查,inc表示mr检查 + + :param task_type: The task_type of this CreateTaskRequestV2. + :type task_type: str + """ + self._task_type = task_type + + @property + def username(self): + """Gets the username of this CreateTaskRequestV2. + + 仓库有权限的用户名 + + :return: The username of this CreateTaskRequestV2. + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this CreateTaskRequestV2. + + 仓库有权限的用户名 + + :param username: The username of this CreateTaskRequestV2. + :type username: str + """ + self._username = username + + @property + def access_token(self): + """Gets the access_token of this CreateTaskRequestV2. + + 仓库有权限的用户token + + :return: The access_token of this CreateTaskRequestV2. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """Sets the access_token of this CreateTaskRequestV2. + + 仓库有权限的用户token + + :param access_token: The access_token of this CreateTaskRequestV2. + :type access_token: str + """ + self._access_token = access_token + + @property + def endpoint_id(self): + """Gets the endpoint_id of this CreateTaskRequestV2. + + 仓库有权限的用户endpointId + + :return: The endpoint_id of this CreateTaskRequestV2. + :rtype: str + """ + return self._endpoint_id + + @endpoint_id.setter + def endpoint_id(self, endpoint_id): + """Sets the endpoint_id of this CreateTaskRequestV2. + + 仓库有权限的用户endpointId + + :param endpoint_id: The endpoint_id of this CreateTaskRequestV2. + :type endpoint_id: str + """ + self._endpoint_id = endpoint_id + + @property + def inc_config(self): + """Gets the inc_config of this CreateTaskRequestV2. + + :return: The inc_config of this CreateTaskRequestV2. + :rtype: :class:`huaweicloudsdkcodecheck.v2.IncConfigV2` + """ + return self._inc_config + + @inc_config.setter + def inc_config(self, inc_config): + """Sets the inc_config of this CreateTaskRequestV2. + + :param inc_config: The inc_config of this CreateTaskRequestV2. + :type inc_config: :class:`huaweicloudsdkcodecheck.v2.IncConfigV2` + """ + self._inc_config = inc_config + + @property + def enable_fossbot(self): + """Gets the enable_fossbot of this CreateTaskRequestV2. + + 是否打开fossbot检查,默认不开 + + :return: The enable_fossbot of this CreateTaskRequestV2. + :rtype: bool + """ + return self._enable_fossbot + + @enable_fossbot.setter + def enable_fossbot(self, enable_fossbot): + """Sets the enable_fossbot of this CreateTaskRequestV2. + + 是否打开fossbot检查,默认不开 + + :param enable_fossbot: The enable_fossbot of this CreateTaskRequestV2. + :type enable_fossbot: bool + """ + self._enable_fossbot = enable_fossbot + + @property + def resource_pool_id(self): + """Gets the resource_pool_id of this CreateTaskRequestV2. + + 资源池id,可以从资源池管理页面获取 + + :return: The resource_pool_id of this CreateTaskRequestV2. + :rtype: str + """ + return self._resource_pool_id + + @resource_pool_id.setter + def resource_pool_id(self, resource_pool_id): + """Sets the resource_pool_id of this CreateTaskRequestV2. + + 资源池id,可以从资源池管理页面获取 + + :param resource_pool_id: The resource_pool_id of this CreateTaskRequestV2. + :type resource_pool_id: str + """ + self._resource_pool_id = resource_pool_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateTaskRequestV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_task_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_task_response.py new file mode 100644 index 0000000000..4c1988719c --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/create_task_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CreateTaskResponse(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 = { + 'task_id': 'str' + } + + attribute_map = { + 'task_id': 'task_id' + } + + def __init__(self, task_id=None): + """CreateTaskResponse + + The model defined in huaweicloud sdk + + :param task_id: 检查任务id + :type task_id: str + """ + + super(CreateTaskResponse, self).__init__() + + self._task_id = None + self.discriminator = None + + if task_id is not None: + self.task_id = task_id + + @property + def task_id(self): + """Gets the task_id of this CreateTaskResponse. + + 检查任务id + + :return: The task_id of this CreateTaskResponse. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this CreateTaskResponse. + + 检查任务id + + :param task_id: The task_id of this CreateTaskResponse. + :type task_id: str + """ + self._task_id = task_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateTaskResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/custom_attributes.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/custom_attributes.py new file mode 100644 index 0000000000..14dbc34f57 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/custom_attributes.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CustomAttributes: + + """ + 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': 'str', + 'rules': 'list[CustomAttributesRule]' + } + + attribute_map = { + 'attribute': 'attribute', + 'rules': 'rules' + } + + def __init__(self, attribute=None, rules=None): + """CustomAttributes + + The model defined in huaweicloud sdk + + :param attribute: 配置项属性,severity:为问题级别 + :type attribute: str + :param rules: 规则详细 + :type rules: list[:class:`huaweicloudsdkcodecheck.v2.CustomAttributesRule`] + """ + + + + self._attribute = None + self._rules = None + self.discriminator = None + + if attribute is not None: + self.attribute = attribute + if rules is not None: + self.rules = rules + + @property + def attribute(self): + """Gets the attribute of this CustomAttributes. + + 配置项属性,severity:为问题级别 + + :return: The attribute of this CustomAttributes. + :rtype: str + """ + return self._attribute + + @attribute.setter + def attribute(self, attribute): + """Sets the attribute of this CustomAttributes. + + 配置项属性,severity:为问题级别 + + :param attribute: The attribute of this CustomAttributes. + :type attribute: str + """ + self._attribute = attribute + + @property + def rules(self): + """Gets the rules of this CustomAttributes. + + 规则详细 + + :return: The rules of this CustomAttributes. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.CustomAttributesRule`] + """ + return self._rules + + @rules.setter + def rules(self, rules): + """Sets the rules of this CustomAttributes. + + 规则详细 + + :param rules: The rules of this CustomAttributes. + :type rules: list[:class:`huaweicloudsdkcodecheck.v2.CustomAttributesRule`] + """ + self._rules = rules + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CustomAttributes): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/custom_attributes_rule.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/custom_attributes_rule.py new file mode 100644 index 0000000000..3c0476732b --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/custom_attributes_rule.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CustomAttributesRule: + + """ + 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 = { + 'rule_id': 'str', + 'value': 'str', + 'rule_config_list': 'list[RuleConfig]' + } + + attribute_map = { + 'rule_id': 'rule_id', + 'value': 'value', + 'rule_config_list': 'rule_config_list' + } + + def __init__(self, rule_id=None, value=None, rule_config_list=None): + """CustomAttributesRule + + The model defined in huaweicloud sdk + + :param rule_id: 规则ID + :type rule_id: str + :param value: attribute的问题级别,0致命,1严重,2一般,3提示 + :type value: str + :param rule_config_list: 规则阈值详细 + :type rule_config_list: list[:class:`huaweicloudsdkcodecheck.v2.RuleConfig`] + """ + + + + self._rule_id = None + self._value = None + self._rule_config_list = None + self.discriminator = None + + if rule_id is not None: + self.rule_id = rule_id + if value is not None: + self.value = value + if rule_config_list is not None: + self.rule_config_list = rule_config_list + + @property + def rule_id(self): + """Gets the rule_id of this CustomAttributesRule. + + 规则ID + + :return: The rule_id of this CustomAttributesRule. + :rtype: str + """ + return self._rule_id + + @rule_id.setter + def rule_id(self, rule_id): + """Sets the rule_id of this CustomAttributesRule. + + 规则ID + + :param rule_id: The rule_id of this CustomAttributesRule. + :type rule_id: str + """ + self._rule_id = rule_id + + @property + def value(self): + """Gets the value of this CustomAttributesRule. + + attribute的问题级别,0致命,1严重,2一般,3提示 + + :return: The value of this CustomAttributesRule. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this CustomAttributesRule. + + attribute的问题级别,0致命,1严重,2一般,3提示 + + :param value: The value of this CustomAttributesRule. + :type value: str + """ + self._value = value + + @property + def rule_config_list(self): + """Gets the rule_config_list of this CustomAttributesRule. + + 规则阈值详细 + + :return: The rule_config_list of this CustomAttributesRule. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.RuleConfig`] + """ + return self._rule_config_list + + @rule_config_list.setter + def rule_config_list(self, rule_config_list): + """Sets the rule_config_list of this CustomAttributesRule. + + 规则阈值详细 + + :param rule_config_list: The rule_config_list of this CustomAttributesRule. + :type rule_config_list: list[:class:`huaweicloudsdkcodecheck.v2.RuleConfig`] + """ + self._rule_config_list = rule_config_list + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CustomAttributesRule): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/defect_events.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/defect_events.py new file mode 100644 index 0000000000..83229ddb5a --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/defect_events.py @@ -0,0 +1,405 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class DefectEvents: + + """ + 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 = { + 'events': 'list[DefectEvents]', + 'description': 'str', + 'fix_suggestions': 'list[str]', + 'line': 'int', + 'end_line': 'int', + 'code_context_start_line': 'int', + 'main': 'bool', + 'path': 'str', + 'tag': 'str', + 'main_buggy_code': 'str', + 'code_context': 'str' + } + + attribute_map = { + 'events': 'events', + 'description': 'description', + 'fix_suggestions': 'fix_suggestions', + 'line': 'line', + 'end_line': 'end_line', + 'code_context_start_line': 'code_context_start_line', + 'main': 'main', + 'path': 'path', + 'tag': 'tag', + 'main_buggy_code': 'main_buggy_code', + 'code_context': 'code_context' + } + + def __init__(self, events=None, description=None, fix_suggestions=None, line=None, end_line=None, code_context_start_line=None, main=None, path=None, tag=None, main_buggy_code=None, code_context=None): + """DefectEvents + + The model defined in huaweicloud sdk + + :param events: 调用链信息 + :type events: list[:class:`huaweicloudsdkcodecheck.v2.DefectEvents`] + :param description: 描述 + :type description: str + :param fix_suggestions: fix suggestions + :type fix_suggestions: list[str] + :param line: 缺陷所在行 + :type line: int + :param end_line: 缺陷结束行 + :type end_line: int + :param code_context_start_line: 缺陷开始行 + :type code_context_start_line: int + :param main: 代码片段 + :type main: bool + :param path: file path + :type path: str + :param tag: 标签 + :type tag: str + :param main_buggy_code: main buggy code + :type main_buggy_code: str + :param code_context: code context + :type code_context: str + """ + + + + self._events = None + self._description = None + self._fix_suggestions = None + self._line = None + self._end_line = None + self._code_context_start_line = None + self._main = None + self._path = None + self._tag = None + self._main_buggy_code = None + self._code_context = None + self.discriminator = None + + if events is not None: + self.events = events + if description is not None: + self.description = description + if fix_suggestions is not None: + self.fix_suggestions = fix_suggestions + if line is not None: + self.line = line + if end_line is not None: + self.end_line = end_line + if code_context_start_line is not None: + self.code_context_start_line = code_context_start_line + if main is not None: + self.main = main + if path is not None: + self.path = path + if tag is not None: + self.tag = tag + if main_buggy_code is not None: + self.main_buggy_code = main_buggy_code + if code_context is not None: + self.code_context = code_context + + @property + def events(self): + """Gets the events of this DefectEvents. + + 调用链信息 + + :return: The events of this DefectEvents. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.DefectEvents`] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this DefectEvents. + + 调用链信息 + + :param events: The events of this DefectEvents. + :type events: list[:class:`huaweicloudsdkcodecheck.v2.DefectEvents`] + """ + self._events = events + + @property + def description(self): + """Gets the description of this DefectEvents. + + 描述 + + :return: The description of this DefectEvents. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this DefectEvents. + + 描述 + + :param description: The description of this DefectEvents. + :type description: str + """ + self._description = description + + @property + def fix_suggestions(self): + """Gets the fix_suggestions of this DefectEvents. + + fix suggestions + + :return: The fix_suggestions of this DefectEvents. + :rtype: list[str] + """ + return self._fix_suggestions + + @fix_suggestions.setter + def fix_suggestions(self, fix_suggestions): + """Sets the fix_suggestions of this DefectEvents. + + fix suggestions + + :param fix_suggestions: The fix_suggestions of this DefectEvents. + :type fix_suggestions: list[str] + """ + self._fix_suggestions = fix_suggestions + + @property + def line(self): + """Gets the line of this DefectEvents. + + 缺陷所在行 + + :return: The line of this DefectEvents. + :rtype: int + """ + return self._line + + @line.setter + def line(self, line): + """Sets the line of this DefectEvents. + + 缺陷所在行 + + :param line: The line of this DefectEvents. + :type line: int + """ + self._line = line + + @property + def end_line(self): + """Gets the end_line of this DefectEvents. + + 缺陷结束行 + + :return: The end_line of this DefectEvents. + :rtype: int + """ + return self._end_line + + @end_line.setter + def end_line(self, end_line): + """Sets the end_line of this DefectEvents. + + 缺陷结束行 + + :param end_line: The end_line of this DefectEvents. + :type end_line: int + """ + self._end_line = end_line + + @property + def code_context_start_line(self): + """Gets the code_context_start_line of this DefectEvents. + + 缺陷开始行 + + :return: The code_context_start_line of this DefectEvents. + :rtype: int + """ + return self._code_context_start_line + + @code_context_start_line.setter + def code_context_start_line(self, code_context_start_line): + """Sets the code_context_start_line of this DefectEvents. + + 缺陷开始行 + + :param code_context_start_line: The code_context_start_line of this DefectEvents. + :type code_context_start_line: int + """ + self._code_context_start_line = code_context_start_line + + @property + def main(self): + """Gets the main of this DefectEvents. + + 代码片段 + + :return: The main of this DefectEvents. + :rtype: bool + """ + return self._main + + @main.setter + def main(self, main): + """Sets the main of this DefectEvents. + + 代码片段 + + :param main: The main of this DefectEvents. + :type main: bool + """ + self._main = main + + @property + def path(self): + """Gets the path of this DefectEvents. + + file path + + :return: The path of this DefectEvents. + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this DefectEvents. + + file path + + :param path: The path of this DefectEvents. + :type path: str + """ + self._path = path + + @property + def tag(self): + """Gets the tag of this DefectEvents. + + 标签 + + :return: The tag of this DefectEvents. + :rtype: str + """ + return self._tag + + @tag.setter + def tag(self, tag): + """Sets the tag of this DefectEvents. + + 标签 + + :param tag: The tag of this DefectEvents. + :type tag: str + """ + self._tag = tag + + @property + def main_buggy_code(self): + """Gets the main_buggy_code of this DefectEvents. + + main buggy code + + :return: The main_buggy_code of this DefectEvents. + :rtype: str + """ + return self._main_buggy_code + + @main_buggy_code.setter + def main_buggy_code(self, main_buggy_code): + """Sets the main_buggy_code of this DefectEvents. + + main buggy code + + :param main_buggy_code: The main_buggy_code of this DefectEvents. + :type main_buggy_code: str + """ + self._main_buggy_code = main_buggy_code + + @property + def code_context(self): + """Gets the code_context of this DefectEvents. + + code context + + :return: The code_context of this DefectEvents. + :rtype: str + """ + return self._code_context + + @code_context.setter + def code_context(self, code_context): + """Sets the code_context of this DefectEvents. + + code context + + :param code_context: The code_context of this DefectEvents. + :type code_context: str + """ + self._code_context = code_context + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DefectEvents): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/defect_fragment_v2.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/defect_fragment_v2.py new file mode 100644 index 0000000000..fbc2bcc31c --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/defect_fragment_v2.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class DefectFragmentV2: + + """ + 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 = { + 'line_num': 'str', + 'line_content': 'str', + 'start_offset': 'int', + 'end_offset': 'int' + } + + attribute_map = { + 'line_num': 'line_num', + 'line_content': 'line_content', + 'start_offset': 'start_offset', + 'end_offset': 'end_offset' + } + + def __init__(self, line_num=None, line_content=None, start_offset=None, end_offset=None): + """DefectFragmentV2 + + The model defined in huaweicloud sdk + + :param line_num: 行号 + :type line_num: str + :param line_content: 该行代码内容 + :type line_content: str + :param start_offset: 缺陷开始列号 + :type start_offset: int + :param end_offset: 缺陷结束列号 + :type end_offset: int + """ + + + + self._line_num = None + self._line_content = None + self._start_offset = None + self._end_offset = None + self.discriminator = None + + if line_num is not None: + self.line_num = line_num + if line_content is not None: + self.line_content = line_content + if start_offset is not None: + self.start_offset = start_offset + if end_offset is not None: + self.end_offset = end_offset + + @property + def line_num(self): + """Gets the line_num of this DefectFragmentV2. + + 行号 + + :return: The line_num of this DefectFragmentV2. + :rtype: str + """ + return self._line_num + + @line_num.setter + def line_num(self, line_num): + """Sets the line_num of this DefectFragmentV2. + + 行号 + + :param line_num: The line_num of this DefectFragmentV2. + :type line_num: str + """ + self._line_num = line_num + + @property + def line_content(self): + """Gets the line_content of this DefectFragmentV2. + + 该行代码内容 + + :return: The line_content of this DefectFragmentV2. + :rtype: str + """ + return self._line_content + + @line_content.setter + def line_content(self, line_content): + """Sets the line_content of this DefectFragmentV2. + + 该行代码内容 + + :param line_content: The line_content of this DefectFragmentV2. + :type line_content: str + """ + self._line_content = line_content + + @property + def start_offset(self): + """Gets the start_offset of this DefectFragmentV2. + + 缺陷开始列号 + + :return: The start_offset of this DefectFragmentV2. + :rtype: int + """ + return self._start_offset + + @start_offset.setter + def start_offset(self, start_offset): + """Sets the start_offset of this DefectFragmentV2. + + 缺陷开始列号 + + :param start_offset: The start_offset of this DefectFragmentV2. + :type start_offset: int + """ + self._start_offset = start_offset + + @property + def end_offset(self): + """Gets the end_offset of this DefectFragmentV2. + + 缺陷结束列号 + + :return: The end_offset of this DefectFragmentV2. + :rtype: int + """ + return self._end_offset + + @end_offset.setter + def end_offset(self, end_offset): + """Sets the end_offset of this DefectFragmentV2. + + 缺陷结束列号 + + :param end_offset: The end_offset of this DefectFragmentV2. + :type end_offset: int + """ + self._end_offset = end_offset + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DefectFragmentV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/defect_info_v2.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/defect_info_v2.py new file mode 100644 index 0000000000..f820bf4156 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/defect_info_v2.py @@ -0,0 +1,463 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class DefectInfoV2: + + """ + 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 = { + 'defect_id': 'str', + 'defect_checker_name': 'str', + 'defect_status': 'str', + 'rule_system_tags': 'str', + 'rule_name': 'str', + 'line_number': 'str', + 'defect_content': 'str', + 'defect_level': 'str', + 'file_path': 'str', + 'created_at': 'str', + 'issue_key': 'str', + 'fragment': 'list[DefectFragmentV2]', + 'events': 'list[DefectEvents]' + } + + attribute_map = { + 'defect_id': 'defect_id', + 'defect_checker_name': 'defect_checker_name', + 'defect_status': 'defect_status', + 'rule_system_tags': 'rule_system_tags', + 'rule_name': 'rule_name', + 'line_number': 'line_number', + 'defect_content': 'defect_content', + 'defect_level': 'defect_level', + 'file_path': 'file_path', + 'created_at': 'created_at', + 'issue_key': 'issue_key', + 'fragment': 'fragment', + 'events': 'events' + } + + def __init__(self, defect_id=None, defect_checker_name=None, defect_status=None, rule_system_tags=None, rule_name=None, line_number=None, defect_content=None, defect_level=None, file_path=None, created_at=None, issue_key=None, fragment=None, events=None): + """DefectInfoV2 + + The model defined in huaweicloud sdk + + :param defect_id: 缺陷的id + :type defect_id: str + :param defect_checker_name: 缺陷对应检查项的名称 + :type defect_checker_name: str + :param defect_status: 缺陷的状态0为解决 1已解决 2已忽略 + :type defect_status: str + :param rule_system_tags: 规则标签,多个标签用逗号隔开 + :type rule_system_tags: str + :param rule_name: 规则名 + :type rule_name: str + :param line_number: 缺陷所在文件行号 + :type line_number: str + :param defect_content: 缺陷描述 + :type defect_content: str + :param defect_level: 缺陷等级,0致命,1严重,2一般,3提示 + :type defect_level: str + :param file_path: 缺陷文件路径 + :type file_path: str + :param created_at: 创建时间 + :type created_at: str + :param issue_key: 问题唯一标识 + :type issue_key: str + :param fragment: 缺陷代码片段详情 + :type fragment: list[:class:`huaweicloudsdkcodecheck.v2.DefectFragmentV2`] + :param events: 调用链信息 + :type events: list[:class:`huaweicloudsdkcodecheck.v2.DefectEvents`] + """ + + + + self._defect_id = None + self._defect_checker_name = None + self._defect_status = None + self._rule_system_tags = None + self._rule_name = None + self._line_number = None + self._defect_content = None + self._defect_level = None + self._file_path = None + self._created_at = None + self._issue_key = None + self._fragment = None + self._events = None + self.discriminator = None + + if defect_id is not None: + self.defect_id = defect_id + if defect_checker_name is not None: + self.defect_checker_name = defect_checker_name + if defect_status is not None: + self.defect_status = defect_status + if rule_system_tags is not None: + self.rule_system_tags = rule_system_tags + if rule_name is not None: + self.rule_name = rule_name + if line_number is not None: + self.line_number = line_number + if defect_content is not None: + self.defect_content = defect_content + if defect_level is not None: + self.defect_level = defect_level + if file_path is not None: + self.file_path = file_path + if created_at is not None: + self.created_at = created_at + if issue_key is not None: + self.issue_key = issue_key + if fragment is not None: + self.fragment = fragment + if events is not None: + self.events = events + + @property + def defect_id(self): + """Gets the defect_id of this DefectInfoV2. + + 缺陷的id + + :return: The defect_id of this DefectInfoV2. + :rtype: str + """ + return self._defect_id + + @defect_id.setter + def defect_id(self, defect_id): + """Sets the defect_id of this DefectInfoV2. + + 缺陷的id + + :param defect_id: The defect_id of this DefectInfoV2. + :type defect_id: str + """ + self._defect_id = defect_id + + @property + def defect_checker_name(self): + """Gets the defect_checker_name of this DefectInfoV2. + + 缺陷对应检查项的名称 + + :return: The defect_checker_name of this DefectInfoV2. + :rtype: str + """ + return self._defect_checker_name + + @defect_checker_name.setter + def defect_checker_name(self, defect_checker_name): + """Sets the defect_checker_name of this DefectInfoV2. + + 缺陷对应检查项的名称 + + :param defect_checker_name: The defect_checker_name of this DefectInfoV2. + :type defect_checker_name: str + """ + self._defect_checker_name = defect_checker_name + + @property + def defect_status(self): + """Gets the defect_status of this DefectInfoV2. + + 缺陷的状态0为解决 1已解决 2已忽略 + + :return: The defect_status of this DefectInfoV2. + :rtype: str + """ + return self._defect_status + + @defect_status.setter + def defect_status(self, defect_status): + """Sets the defect_status of this DefectInfoV2. + + 缺陷的状态0为解决 1已解决 2已忽略 + + :param defect_status: The defect_status of this DefectInfoV2. + :type defect_status: str + """ + self._defect_status = defect_status + + @property + def rule_system_tags(self): + """Gets the rule_system_tags of this DefectInfoV2. + + 规则标签,多个标签用逗号隔开 + + :return: The rule_system_tags of this DefectInfoV2. + :rtype: str + """ + return self._rule_system_tags + + @rule_system_tags.setter + def rule_system_tags(self, rule_system_tags): + """Sets the rule_system_tags of this DefectInfoV2. + + 规则标签,多个标签用逗号隔开 + + :param rule_system_tags: The rule_system_tags of this DefectInfoV2. + :type rule_system_tags: str + """ + self._rule_system_tags = rule_system_tags + + @property + def rule_name(self): + """Gets the rule_name of this DefectInfoV2. + + 规则名 + + :return: The rule_name of this DefectInfoV2. + :rtype: str + """ + return self._rule_name + + @rule_name.setter + def rule_name(self, rule_name): + """Sets the rule_name of this DefectInfoV2. + + 规则名 + + :param rule_name: The rule_name of this DefectInfoV2. + :type rule_name: str + """ + self._rule_name = rule_name + + @property + def line_number(self): + """Gets the line_number of this DefectInfoV2. + + 缺陷所在文件行号 + + :return: The line_number of this DefectInfoV2. + :rtype: str + """ + return self._line_number + + @line_number.setter + def line_number(self, line_number): + """Sets the line_number of this DefectInfoV2. + + 缺陷所在文件行号 + + :param line_number: The line_number of this DefectInfoV2. + :type line_number: str + """ + self._line_number = line_number + + @property + def defect_content(self): + """Gets the defect_content of this DefectInfoV2. + + 缺陷描述 + + :return: The defect_content of this DefectInfoV2. + :rtype: str + """ + return self._defect_content + + @defect_content.setter + def defect_content(self, defect_content): + """Sets the defect_content of this DefectInfoV2. + + 缺陷描述 + + :param defect_content: The defect_content of this DefectInfoV2. + :type defect_content: str + """ + self._defect_content = defect_content + + @property + def defect_level(self): + """Gets the defect_level of this DefectInfoV2. + + 缺陷等级,0致命,1严重,2一般,3提示 + + :return: The defect_level of this DefectInfoV2. + :rtype: str + """ + return self._defect_level + + @defect_level.setter + def defect_level(self, defect_level): + """Sets the defect_level of this DefectInfoV2. + + 缺陷等级,0致命,1严重,2一般,3提示 + + :param defect_level: The defect_level of this DefectInfoV2. + :type defect_level: str + """ + self._defect_level = defect_level + + @property + def file_path(self): + """Gets the file_path of this DefectInfoV2. + + 缺陷文件路径 + + :return: The file_path of this DefectInfoV2. + :rtype: str + """ + return self._file_path + + @file_path.setter + def file_path(self, file_path): + """Sets the file_path of this DefectInfoV2. + + 缺陷文件路径 + + :param file_path: The file_path of this DefectInfoV2. + :type file_path: str + """ + self._file_path = file_path + + @property + def created_at(self): + """Gets the created_at of this DefectInfoV2. + + 创建时间 + + :return: The created_at of this DefectInfoV2. + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this DefectInfoV2. + + 创建时间 + + :param created_at: The created_at of this DefectInfoV2. + :type created_at: str + """ + self._created_at = created_at + + @property + def issue_key(self): + """Gets the issue_key of this DefectInfoV2. + + 问题唯一标识 + + :return: The issue_key of this DefectInfoV2. + :rtype: str + """ + return self._issue_key + + @issue_key.setter + def issue_key(self, issue_key): + """Sets the issue_key of this DefectInfoV2. + + 问题唯一标识 + + :param issue_key: The issue_key of this DefectInfoV2. + :type issue_key: str + """ + self._issue_key = issue_key + + @property + def fragment(self): + """Gets the fragment of this DefectInfoV2. + + 缺陷代码片段详情 + + :return: The fragment of this DefectInfoV2. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.DefectFragmentV2`] + """ + return self._fragment + + @fragment.setter + def fragment(self, fragment): + """Sets the fragment of this DefectInfoV2. + + 缺陷代码片段详情 + + :param fragment: The fragment of this DefectInfoV2. + :type fragment: list[:class:`huaweicloudsdkcodecheck.v2.DefectFragmentV2`] + """ + self._fragment = fragment + + @property + def events(self): + """Gets the events of this DefectInfoV2. + + 调用链信息 + + :return: The events of this DefectInfoV2. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.DefectEvents`] + """ + return self._events + + @events.setter + def events(self, events): + """Sets the events of this DefectInfoV2. + + 调用链信息 + + :param events: The events of this DefectInfoV2. + :type events: list[:class:`huaweicloudsdkcodecheck.v2.DefectEvents`] + """ + self._events = events + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DefectInfoV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/delete_ruleset_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/delete_ruleset_request.py new file mode 100644 index 0000000000..a975b7ff1b --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/delete_ruleset_request.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class DeleteRulesetRequest: + + """ + 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 = { + 'project_id': 'str', + 'ruleset_id': 'str' + } + + attribute_map = { + 'project_id': 'project_id', + 'ruleset_id': 'ruleset_id' + } + + def __init__(self, project_id=None, ruleset_id=None): + """DeleteRulesetRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param ruleset_id: 规则集ID + :type ruleset_id: str + """ + + + + self._project_id = None + self._ruleset_id = None + self.discriminator = None + + self.project_id = project_id + self.ruleset_id = ruleset_id + + @property + def project_id(self): + """Gets the project_id of this DeleteRulesetRequest. + + 项目ID + + :return: The project_id of this DeleteRulesetRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this DeleteRulesetRequest. + + 项目ID + + :param project_id: The project_id of this DeleteRulesetRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def ruleset_id(self): + """Gets the ruleset_id of this DeleteRulesetRequest. + + 规则集ID + + :return: The ruleset_id of this DeleteRulesetRequest. + :rtype: str + """ + return self._ruleset_id + + @ruleset_id.setter + def ruleset_id(self, ruleset_id): + """Sets the ruleset_id of this DeleteRulesetRequest. + + 规则集ID + + :param ruleset_id: The ruleset_id of this DeleteRulesetRequest. + :type ruleset_id: str + """ + self._ruleset_id = ruleset_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteRulesetRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/delete_ruleset_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/delete_ruleset_response.py new file mode 100644 index 0000000000..4c031b05fc --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/delete_ruleset_response.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class DeleteRulesetResponse(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): + """DeleteRulesetResponse + + The model defined in huaweicloud sdk + + """ + + super(DeleteRulesetResponse, self).__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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteRulesetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/delete_task_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/delete_task_request.py new file mode 100644 index 0000000000..c8973eeff9 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/delete_task_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class DeleteTaskRequest: + + """ + 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 = { + 'task_id': 'str' + } + + attribute_map = { + 'task_id': 'task_id' + } + + def __init__(self, task_id=None): + """DeleteTaskRequest + + The model defined in huaweicloud sdk + + :param task_id: 检查任务ID + :type task_id: str + """ + + + + self._task_id = None + self.discriminator = None + + self.task_id = task_id + + @property + def task_id(self): + """Gets the task_id of this DeleteTaskRequest. + + 检查任务ID + + :return: The task_id of this DeleteTaskRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this DeleteTaskRequest. + + 检查任务ID + + :param task_id: The task_id of this DeleteTaskRequest. + :type task_id: str + """ + self._task_id = task_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteTaskRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/delete_task_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/delete_task_response.py new file mode 100644 index 0000000000..1ee235010b --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/delete_task_response.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class DeleteTaskResponse(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): + """DeleteTaskResponse + + The model defined in huaweicloud sdk + + """ + + super(DeleteTaskResponse, self).__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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteTaskResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/ignore_path_setting_item.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/ignore_path_setting_item.py new file mode 100644 index 0000000000..1d4caac301 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/ignore_path_setting_item.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class IgnorePathSettingItem: + + """ + 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 = { + 'file_path': 'str', + 'checkbox_status': 'str' + } + + attribute_map = { + 'file_path': 'file_path', + 'checkbox_status': 'checkbox_status' + } + + def __init__(self, file_path=None, checkbox_status=None): + """IgnorePathSettingItem + + The model defined in huaweicloud sdk + + :param file_path: 目录或文件路径 + :type file_path: str + :param checkbox_status: 屏蔽状态,包括unchecked(不屏蔽)、all(全屏蔽)、half(半屏蔽) + :type checkbox_status: str + """ + + + + self._file_path = None + self._checkbox_status = None + self.discriminator = None + + self.file_path = file_path + self.checkbox_status = checkbox_status + + @property + def file_path(self): + """Gets the file_path of this IgnorePathSettingItem. + + 目录或文件路径 + + :return: The file_path of this IgnorePathSettingItem. + :rtype: str + """ + return self._file_path + + @file_path.setter + def file_path(self, file_path): + """Sets the file_path of this IgnorePathSettingItem. + + 目录或文件路径 + + :param file_path: The file_path of this IgnorePathSettingItem. + :type file_path: str + """ + self._file_path = file_path + + @property + def checkbox_status(self): + """Gets the checkbox_status of this IgnorePathSettingItem. + + 屏蔽状态,包括unchecked(不屏蔽)、all(全屏蔽)、half(半屏蔽) + + :return: The checkbox_status of this IgnorePathSettingItem. + :rtype: str + """ + return self._checkbox_status + + @checkbox_status.setter + def checkbox_status(self, checkbox_status): + """Sets the checkbox_status of this IgnorePathSettingItem. + + 屏蔽状态,包括unchecked(不屏蔽)、all(全屏蔽)、half(半屏蔽) + + :param checkbox_status: The checkbox_status of this IgnorePathSettingItem. + :type checkbox_status: str + """ + self._checkbox_status = checkbox_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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IgnorePathSettingItem): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/inc_config_v2.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/inc_config_v2.py new file mode 100644 index 0000000000..4cdea06e0b --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/inc_config_v2.py @@ -0,0 +1,289 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class IncConfigV2: + + """ + 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 = { + 'parent_task_id': 'str', + 'git_source_branch': 'str', + 'git_target_branch': 'str', + 'merge_id': 'str', + 'event_type': 'str', + 'action': 'str', + 'title': 'str' + } + + attribute_map = { + 'parent_task_id': 'parent_task_id', + 'git_source_branch': 'git_source_branch', + 'git_target_branch': 'git_target_branch', + 'merge_id': 'merge_id', + 'event_type': 'event_type', + 'action': 'action', + 'title': 'title' + } + + def __init__(self, parent_task_id=None, git_source_branch=None, git_target_branch=None, merge_id=None, event_type=None, action=None, title=None): + """IncConfigV2 + + The model defined in huaweicloud sdk + + :param parent_task_id: 需要关联的父任务ID,流水线创建或MR创建任务需要该参数 + :type parent_task_id: str + :param git_source_branch: 增量检查代码源分支 + :type git_source_branch: str + :param git_target_branch: 增量检查代码目标分支 + :type git_target_branch: str + :param merge_id: MR唯一标示ID + :type merge_id: str + :param event_type: webhook触发事件类型,merge_request/push_request + :type event_type: str + :param action: webhook事件状态,open/close/update + :type action: str + :param title: MR标题 + :type title: str + """ + + + + self._parent_task_id = None + self._git_source_branch = None + self._git_target_branch = None + self._merge_id = None + self._event_type = None + self._action = None + self._title = None + self.discriminator = None + + if parent_task_id is not None: + self.parent_task_id = parent_task_id + if git_source_branch is not None: + self.git_source_branch = git_source_branch + if git_target_branch is not None: + self.git_target_branch = git_target_branch + if merge_id is not None: + self.merge_id = merge_id + if event_type is not None: + self.event_type = event_type + if action is not None: + self.action = action + if title is not None: + self.title = title + + @property + def parent_task_id(self): + """Gets the parent_task_id of this IncConfigV2. + + 需要关联的父任务ID,流水线创建或MR创建任务需要该参数 + + :return: The parent_task_id of this IncConfigV2. + :rtype: str + """ + return self._parent_task_id + + @parent_task_id.setter + def parent_task_id(self, parent_task_id): + """Sets the parent_task_id of this IncConfigV2. + + 需要关联的父任务ID,流水线创建或MR创建任务需要该参数 + + :param parent_task_id: The parent_task_id of this IncConfigV2. + :type parent_task_id: str + """ + self._parent_task_id = parent_task_id + + @property + def git_source_branch(self): + """Gets the git_source_branch of this IncConfigV2. + + 增量检查代码源分支 + + :return: The git_source_branch of this IncConfigV2. + :rtype: str + """ + return self._git_source_branch + + @git_source_branch.setter + def git_source_branch(self, git_source_branch): + """Sets the git_source_branch of this IncConfigV2. + + 增量检查代码源分支 + + :param git_source_branch: The git_source_branch of this IncConfigV2. + :type git_source_branch: str + """ + self._git_source_branch = git_source_branch + + @property + def git_target_branch(self): + """Gets the git_target_branch of this IncConfigV2. + + 增量检查代码目标分支 + + :return: The git_target_branch of this IncConfigV2. + :rtype: str + """ + return self._git_target_branch + + @git_target_branch.setter + def git_target_branch(self, git_target_branch): + """Sets the git_target_branch of this IncConfigV2. + + 增量检查代码目标分支 + + :param git_target_branch: The git_target_branch of this IncConfigV2. + :type git_target_branch: str + """ + self._git_target_branch = git_target_branch + + @property + def merge_id(self): + """Gets the merge_id of this IncConfigV2. + + MR唯一标示ID + + :return: The merge_id of this IncConfigV2. + :rtype: str + """ + return self._merge_id + + @merge_id.setter + def merge_id(self, merge_id): + """Sets the merge_id of this IncConfigV2. + + MR唯一标示ID + + :param merge_id: The merge_id of this IncConfigV2. + :type merge_id: str + """ + self._merge_id = merge_id + + @property + def event_type(self): + """Gets the event_type of this IncConfigV2. + + webhook触发事件类型,merge_request/push_request + + :return: The event_type of this IncConfigV2. + :rtype: str + """ + return self._event_type + + @event_type.setter + def event_type(self, event_type): + """Sets the event_type of this IncConfigV2. + + webhook触发事件类型,merge_request/push_request + + :param event_type: The event_type of this IncConfigV2. + :type event_type: str + """ + self._event_type = event_type + + @property + def action(self): + """Gets the action of this IncConfigV2. + + webhook事件状态,open/close/update + + :return: The action of this IncConfigV2. + :rtype: str + """ + return self._action + + @action.setter + def action(self, action): + """Sets the action of this IncConfigV2. + + webhook事件状态,open/close/update + + :param action: The action of this IncConfigV2. + :type action: str + """ + self._action = action + + @property + def title(self): + """Gets the title of this IncConfigV2. + + MR标题 + + :return: The title of this IncConfigV2. + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this IncConfigV2. + + MR标题 + + :param title: The title of this IncConfigV2. + :type title: str + """ + self._title = title + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IncConfigV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_rules_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_rules_request.py new file mode 100644 index 0000000000..4b93a3686c --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_rules_request.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ListRulesRequest: + + """ + 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 = { + 'rule_languages': 'str', + 'rule_severity': 'str', + 'offset': 'int', + 'limit': 'int' + } + + attribute_map = { + 'rule_languages': 'rule_languages', + 'rule_severity': 'rule_severity', + 'offset': 'offset', + 'limit': 'limit' + } + + def __init__(self, rule_languages=None, rule_severity=None, offset=None, limit=None): + """ListRulesRequest + + The model defined in huaweicloud sdk + + :param rule_languages: 规则对应的语言 + :type rule_languages: str + :param rule_severity: 缺陷等级,0致命,1严重,2一般,3提示 + :type rule_severity: str + :param offset: 分页索引,偏移量 + :type offset: int + :param limit: 每页显示的数量 + :type limit: int + """ + + + + self._rule_languages = None + self._rule_severity = None + self._offset = None + self._limit = None + self.discriminator = None + + if rule_languages is not None: + self.rule_languages = rule_languages + if rule_severity is not None: + self.rule_severity = rule_severity + if offset is not None: + self.offset = offset + if limit is not None: + self.limit = limit + + @property + def rule_languages(self): + """Gets the rule_languages of this ListRulesRequest. + + 规则对应的语言 + + :return: The rule_languages of this ListRulesRequest. + :rtype: str + """ + return self._rule_languages + + @rule_languages.setter + def rule_languages(self, rule_languages): + """Sets the rule_languages of this ListRulesRequest. + + 规则对应的语言 + + :param rule_languages: The rule_languages of this ListRulesRequest. + :type rule_languages: str + """ + self._rule_languages = rule_languages + + @property + def rule_severity(self): + """Gets the rule_severity of this ListRulesRequest. + + 缺陷等级,0致命,1严重,2一般,3提示 + + :return: The rule_severity of this ListRulesRequest. + :rtype: str + """ + return self._rule_severity + + @rule_severity.setter + def rule_severity(self, rule_severity): + """Sets the rule_severity of this ListRulesRequest. + + 缺陷等级,0致命,1严重,2一般,3提示 + + :param rule_severity: The rule_severity of this ListRulesRequest. + :type rule_severity: str + """ + self._rule_severity = rule_severity + + @property + def offset(self): + """Gets the offset of this ListRulesRequest. + + 分页索引,偏移量 + + :return: The offset of this ListRulesRequest. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this ListRulesRequest. + + 分页索引,偏移量 + + :param offset: The offset of this ListRulesRequest. + :type offset: int + """ + self._offset = offset + + @property + def limit(self): + """Gets the limit of this ListRulesRequest. + + 每页显示的数量 + + :return: The limit of this ListRulesRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this ListRulesRequest. + + 每页显示的数量 + + :param limit: The limit of this ListRulesRequest. + :type limit: int + """ + self._limit = limit + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListRulesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_rules_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_rules_response.py new file mode 100644 index 0000000000..369e8e3485 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_rules_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ListRulesResponse(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 = { + 'info': 'list[RuleListItem]', + 'total': 'int' + } + + attribute_map = { + 'info': 'info', + 'total': 'total' + } + + def __init__(self, info=None, total=None): + """ListRulesResponse + + The model defined in huaweicloud sdk + + :param info: 规则信息 + :type info: list[:class:`huaweicloudsdkcodecheck.v2.RuleListItem`] + :param total: 总数 + :type total: int + """ + + super(ListRulesResponse, self).__init__() + + self._info = None + self._total = None + self.discriminator = None + + if info is not None: + self.info = info + if total is not None: + self.total = total + + @property + def info(self): + """Gets the info of this ListRulesResponse. + + 规则信息 + + :return: The info of this ListRulesResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.RuleListItem`] + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this ListRulesResponse. + + 规则信息 + + :param info: The info of this ListRulesResponse. + :type info: list[:class:`huaweicloudsdkcodecheck.v2.RuleListItem`] + """ + self._info = info + + @property + def total(self): + """Gets the total of this ListRulesResponse. + + 总数 + + :return: The total of this ListRulesResponse. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ListRulesResponse. + + 总数 + + :param total: The total of this ListRulesResponse. + :type total: int + """ + self._total = total + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListRulesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_rulesets_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_rulesets_request.py new file mode 100644 index 0000000000..34b622cd36 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_rulesets_request.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ListRulesetsRequest: + + """ + 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 = { + 'project_id': 'str', + 'category': 'str', + 'offset': 'int', + 'limit': 'int' + } + + attribute_map = { + 'project_id': 'project_id', + 'category': 'category', + 'offset': 'offset', + 'limit': 'limit' + } + + def __init__(self, project_id=None, category=None, offset=None, limit=None): + """ListRulesetsRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param category: 规则集类别 '0只查询系统规则集,1只查询当前用户自定义规则集,2只查询其他用户自定义规则集,'0,1,2'或''查所有' + :type category: str + :param offset: 分页索引,偏移量 + :type offset: int + :param limit: 每页显示的数量 + :type limit: int + """ + + + + self._project_id = None + self._category = None + self._offset = None + self._limit = None + self.discriminator = None + + self.project_id = project_id + if category is not None: + self.category = category + if offset is not None: + self.offset = offset + if limit is not None: + self.limit = limit + + @property + def project_id(self): + """Gets the project_id of this ListRulesetsRequest. + + 项目ID + + :return: The project_id of this ListRulesetsRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ListRulesetsRequest. + + 项目ID + + :param project_id: The project_id of this ListRulesetsRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def category(self): + """Gets the category of this ListRulesetsRequest. + + 规则集类别 '0只查询系统规则集,1只查询当前用户自定义规则集,2只查询其他用户自定义规则集,'0,1,2'或''查所有' + + :return: The category of this ListRulesetsRequest. + :rtype: str + """ + return self._category + + @category.setter + def category(self, category): + """Sets the category of this ListRulesetsRequest. + + 规则集类别 '0只查询系统规则集,1只查询当前用户自定义规则集,2只查询其他用户自定义规则集,'0,1,2'或''查所有' + + :param category: The category of this ListRulesetsRequest. + :type category: str + """ + self._category = category + + @property + def offset(self): + """Gets the offset of this ListRulesetsRequest. + + 分页索引,偏移量 + + :return: The offset of this ListRulesetsRequest. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this ListRulesetsRequest. + + 分页索引,偏移量 + + :param offset: The offset of this ListRulesetsRequest. + :type offset: int + """ + self._offset = offset + + @property + def limit(self): + """Gets the limit of this ListRulesetsRequest. + + 每页显示的数量 + + :return: The limit of this ListRulesetsRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this ListRulesetsRequest. + + 每页显示的数量 + + :param limit: The limit of this ListRulesetsRequest. + :type limit: int + """ + self._limit = limit + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListRulesetsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_rulesets_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_rulesets_response.py new file mode 100644 index 0000000000..2bf14b4db0 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_rulesets_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ListRulesetsResponse(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 = { + 'info': 'list[RulesetItem]', + 'total': 'int' + } + + attribute_map = { + 'info': 'info', + 'total': 'total' + } + + def __init__(self, info=None, total=None): + """ListRulesetsResponse + + The model defined in huaweicloud sdk + + :param info: 规则集列表信息 + :type info: list[:class:`huaweicloudsdkcodecheck.v2.RulesetItem`] + :param total: 总数 + :type total: int + """ + + super(ListRulesetsResponse, self).__init__() + + self._info = None + self._total = None + self.discriminator = None + + if info is not None: + self.info = info + if total is not None: + self.total = total + + @property + def info(self): + """Gets the info of this ListRulesetsResponse. + + 规则集列表信息 + + :return: The info of this ListRulesetsResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.RulesetItem`] + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this ListRulesetsResponse. + + 规则集列表信息 + + :param info: The info of this ListRulesetsResponse. + :type info: list[:class:`huaweicloudsdkcodecheck.v2.RulesetItem`] + """ + self._info = info + + @property + def total(self): + """Gets the total of this ListRulesetsResponse. + + 总数 + + :return: The total of this ListRulesetsResponse. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ListRulesetsResponse. + + 总数 + + :param total: The total of this ListRulesetsResponse. + :type total: int + """ + self._total = total + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListRulesetsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_task_parameter_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_task_parameter_request.py new file mode 100644 index 0000000000..3e4204b01d --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_task_parameter_request.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ListTaskParameterRequest: + + """ + 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 = { + 'project_id': 'str', + 'task_id': 'str', + 'body': 'ConfigTaskParameterBody' + } + + attribute_map = { + 'project_id': 'project_id', + 'task_id': 'task_id', + 'body': 'body' + } + + def __init__(self, project_id=None, task_id=None, body=None): + """ListTaskParameterRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param task_id: 任务ID + :type task_id: str + :param body: Body of the ListTaskParameterRequest + :type body: :class:`huaweicloudsdkcodecheck.v2.ConfigTaskParameterBody` + """ + + + + self._project_id = None + self._task_id = None + self._body = None + self.discriminator = None + + self.project_id = project_id + self.task_id = task_id + if body is not None: + self.body = body + + @property + def project_id(self): + """Gets the project_id of this ListTaskParameterRequest. + + 项目ID + + :return: The project_id of this ListTaskParameterRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ListTaskParameterRequest. + + 项目ID + + :param project_id: The project_id of this ListTaskParameterRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this ListTaskParameterRequest. + + 任务ID + + :return: The task_id of this ListTaskParameterRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ListTaskParameterRequest. + + 任务ID + + :param task_id: The task_id of this ListTaskParameterRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def body(self): + """Gets the body of this ListTaskParameterRequest. + + :return: The body of this ListTaskParameterRequest. + :rtype: :class:`huaweicloudsdkcodecheck.v2.ConfigTaskParameterBody` + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ListTaskParameterRequest. + + :param body: The body of this ListTaskParameterRequest. + :type body: :class:`huaweicloudsdkcodecheck.v2.ConfigTaskParameterBody` + """ + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListTaskParameterRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_task_parameter_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_task_parameter_response.py new file mode 100644 index 0000000000..bf72a74f7f --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_task_parameter_response.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ListTaskParameterResponse(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): + """ListTaskParameterResponse + + The model defined in huaweicloud sdk + + """ + + super(ListTaskParameterResponse, self).__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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListTaskParameterResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_task_ruleset_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_task_ruleset_request.py new file mode 100644 index 0000000000..b3b19a0c54 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_task_ruleset_request.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ListTaskRulesetRequest: + + """ + 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 = { + 'project_id': 'str', + 'task_id': 'str' + } + + attribute_map = { + 'project_id': 'project_id', + 'task_id': 'task_id' + } + + def __init__(self, project_id=None, task_id=None): + """ListTaskRulesetRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param task_id: 任务ID + :type task_id: str + """ + + + + self._project_id = None + self._task_id = None + self.discriminator = None + + self.project_id = project_id + self.task_id = task_id + + @property + def project_id(self): + """Gets the project_id of this ListTaskRulesetRequest. + + 项目ID + + :return: The project_id of this ListTaskRulesetRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ListTaskRulesetRequest. + + 项目ID + + :param project_id: The project_id of this ListTaskRulesetRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this ListTaskRulesetRequest. + + 任务ID + + :return: The task_id of this ListTaskRulesetRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ListTaskRulesetRequest. + + 任务ID + + :param task_id: The task_id of this ListTaskRulesetRequest. + :type task_id: str + """ + self._task_id = task_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListTaskRulesetRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_task_ruleset_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_task_ruleset_response.py new file mode 100644 index 0000000000..97c0833bfe --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_task_ruleset_response.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ListTaskRulesetResponse(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 = { + 'body': 'list[TaskRulesetInfo]' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """ListTaskRulesetResponse + + The model defined in huaweicloud sdk + + :param body: + :type body: list[:class:`huaweicloudsdkcodecheck.v2.TaskRulesetInfo`] + """ + + super(ListTaskRulesetResponse, self).__init__() + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this ListTaskRulesetResponse. + + :return: The body of this ListTaskRulesetResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.TaskRulesetInfo`] + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ListTaskRulesetResponse. + + :param body: The body of this ListTaskRulesetResponse. + :type body: list[:class:`huaweicloudsdkcodecheck.v2.TaskRulesetInfo`] + """ + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListTaskRulesetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_template_rules_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_template_rules_request.py new file mode 100644 index 0000000000..a868e85bb5 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_template_rules_request.py @@ -0,0 +1,286 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ListTemplateRulesRequest: + + """ + 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 = { + 'project_id': 'str', + 'ruleset_id': 'str', + 'types': 'str', + 'languages': 'str', + 'tags': 'str', + 'offset': 'int', + 'limit': 'int' + } + + attribute_map = { + 'project_id': 'project_id', + 'ruleset_id': 'ruleset_id', + 'types': 'types', + 'languages': 'languages', + 'tags': 'tags', + 'offset': 'offset', + 'limit': 'limit' + } + + def __init__(self, project_id=None, ruleset_id=None, types=None, languages=None, tags=None, offset=None, limit=None): + """ListTemplateRulesRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param ruleset_id: 规则集ID + :type ruleset_id: str + :param types: 规则状态 '1查询全部,2已启动,3未启用' + :type types: str + :param languages: 规则语言 + :type languages: str + :param tags: 规则所属标签 + :type tags: str + :param offset: 分页索引,偏移量 + :type offset: int + :param limit: 每页显示的数量 + :type limit: int + """ + + + + self._project_id = None + self._ruleset_id = None + self._types = None + self._languages = None + self._tags = None + self._offset = None + self._limit = None + self.discriminator = None + + self.project_id = project_id + self.ruleset_id = ruleset_id + self.types = types + if languages is not None: + self.languages = languages + if tags is not None: + self.tags = tags + if offset is not None: + self.offset = offset + if limit is not None: + self.limit = limit + + @property + def project_id(self): + """Gets the project_id of this ListTemplateRulesRequest. + + 项目ID + + :return: The project_id of this ListTemplateRulesRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ListTemplateRulesRequest. + + 项目ID + + :param project_id: The project_id of this ListTemplateRulesRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def ruleset_id(self): + """Gets the ruleset_id of this ListTemplateRulesRequest. + + 规则集ID + + :return: The ruleset_id of this ListTemplateRulesRequest. + :rtype: str + """ + return self._ruleset_id + + @ruleset_id.setter + def ruleset_id(self, ruleset_id): + """Sets the ruleset_id of this ListTemplateRulesRequest. + + 规则集ID + + :param ruleset_id: The ruleset_id of this ListTemplateRulesRequest. + :type ruleset_id: str + """ + self._ruleset_id = ruleset_id + + @property + def types(self): + """Gets the types of this ListTemplateRulesRequest. + + 规则状态 '1查询全部,2已启动,3未启用' + + :return: The types of this ListTemplateRulesRequest. + :rtype: str + """ + return self._types + + @types.setter + def types(self, types): + """Sets the types of this ListTemplateRulesRequest. + + 规则状态 '1查询全部,2已启动,3未启用' + + :param types: The types of this ListTemplateRulesRequest. + :type types: str + """ + self._types = types + + @property + def languages(self): + """Gets the languages of this ListTemplateRulesRequest. + + 规则语言 + + :return: The languages of this ListTemplateRulesRequest. + :rtype: str + """ + return self._languages + + @languages.setter + def languages(self, languages): + """Sets the languages of this ListTemplateRulesRequest. + + 规则语言 + + :param languages: The languages of this ListTemplateRulesRequest. + :type languages: str + """ + self._languages = languages + + @property + def tags(self): + """Gets the tags of this ListTemplateRulesRequest. + + 规则所属标签 + + :return: The tags of this ListTemplateRulesRequest. + :rtype: str + """ + return self._tags + + @tags.setter + def tags(self, tags): + """Sets the tags of this ListTemplateRulesRequest. + + 规则所属标签 + + :param tags: The tags of this ListTemplateRulesRequest. + :type tags: str + """ + self._tags = tags + + @property + def offset(self): + """Gets the offset of this ListTemplateRulesRequest. + + 分页索引,偏移量 + + :return: The offset of this ListTemplateRulesRequest. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this ListTemplateRulesRequest. + + 分页索引,偏移量 + + :param offset: The offset of this ListTemplateRulesRequest. + :type offset: int + """ + self._offset = offset + + @property + def limit(self): + """Gets the limit of this ListTemplateRulesRequest. + + 每页显示的数量 + + :return: The limit of this ListTemplateRulesRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this ListTemplateRulesRequest. + + 每页显示的数量 + + :param limit: The limit of this ListTemplateRulesRequest. + :type limit: int + """ + self._limit = limit + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListTemplateRulesRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_template_rules_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_template_rules_response.py new file mode 100644 index 0000000000..f98f67be34 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/list_template_rules_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ListTemplateRulesResponse(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 = { + 'info': 'list[RuleItem]', + 'total': 'int' + } + + attribute_map = { + 'info': 'info', + 'total': 'total' + } + + def __init__(self, info=None, total=None): + """ListTemplateRulesResponse + + The model defined in huaweicloud sdk + + :param info: 规则集的规则列表信息 + :type info: list[:class:`huaweicloudsdkcodecheck.v2.RuleItem`] + :param total: 总数 + :type total: int + """ + + super(ListTemplateRulesResponse, self).__init__() + + self._info = None + self._total = None + self.discriminator = None + + if info is not None: + self.info = info + if total is not None: + self.total = total + + @property + def info(self): + """Gets the info of this ListTemplateRulesResponse. + + 规则集的规则列表信息 + + :return: The info of this ListTemplateRulesResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.RuleItem`] + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this ListTemplateRulesResponse. + + 规则集的规则列表信息 + + :param info: The info of this ListTemplateRulesResponse. + :type info: list[:class:`huaweicloudsdkcodecheck.v2.RuleItem`] + """ + self._info = info + + @property + def total(self): + """Gets the total of this ListTemplateRulesResponse. + + 总数 + + :return: The total of this ListTemplateRulesResponse. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ListTemplateRulesResponse. + + 总数 + + :param total: The total of this ListTemplateRulesResponse. + :type total: int + """ + self._total = total + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListTemplateRulesResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/log_info.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/log_info.py new file mode 100644 index 0000000000..0c83b9bd8b --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/log_info.py @@ -0,0 +1,231 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class LogInfo: + + """ + 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 = { + 'display_name': 'str', + 'log': 'str', + 'level': 'str', + 'analysis': 'str', + 'faq': 'str' + } + + attribute_map = { + 'display_name': 'display_name', + 'log': 'log', + 'level': 'level', + 'analysis': 'analysis', + 'faq': 'faq' + } + + def __init__(self, display_name=None, log=None, level=None, analysis=None, faq=None): + """LogInfo + + The model defined in huaweicloud sdk + + :param display_name: 日志标题 + :type display_name: str + :param log: 日志内容 + :type log: str + :param level: 日志级别 + :type level: str + :param analysis: 日志分析 + :type analysis: str + :param faq: 常见问题解答 + :type faq: str + """ + + + + self._display_name = None + self._log = None + self._level = None + self._analysis = None + self._faq = None + self.discriminator = None + + if display_name is not None: + self.display_name = display_name + if log is not None: + self.log = log + if level is not None: + self.level = level + if analysis is not None: + self.analysis = analysis + if faq is not None: + self.faq = faq + + @property + def display_name(self): + """Gets the display_name of this LogInfo. + + 日志标题 + + :return: The display_name of this LogInfo. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """Sets the display_name of this LogInfo. + + 日志标题 + + :param display_name: The display_name of this LogInfo. + :type display_name: str + """ + self._display_name = display_name + + @property + def log(self): + """Gets the log of this LogInfo. + + 日志内容 + + :return: The log of this LogInfo. + :rtype: str + """ + return self._log + + @log.setter + def log(self, log): + """Sets the log of this LogInfo. + + 日志内容 + + :param log: The log of this LogInfo. + :type log: str + """ + self._log = log + + @property + def level(self): + """Gets the level of this LogInfo. + + 日志级别 + + :return: The level of this LogInfo. + :rtype: str + """ + return self._level + + @level.setter + def level(self, level): + """Sets the level of this LogInfo. + + 日志级别 + + :param level: The level of this LogInfo. + :type level: str + """ + self._level = level + + @property + def analysis(self): + """Gets the analysis of this LogInfo. + + 日志分析 + + :return: The analysis of this LogInfo. + :rtype: str + """ + return self._analysis + + @analysis.setter + def analysis(self, analysis): + """Sets the analysis of this LogInfo. + + 日志分析 + + :param analysis: The analysis of this LogInfo. + :type analysis: str + """ + self._analysis = analysis + + @property + def faq(self): + """Gets the faq of this LogInfo. + + 常见问题解答 + + :return: The faq of this LogInfo. + :rtype: str + """ + return self._faq + + @faq.setter + def faq(self, faq): + """Sets the faq of this LogInfo. + + 常见问题解答 + + :param faq: The faq of this LogInfo. + :type faq: str + """ + self._faq = faq + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LogInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/metric_info.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/metric_info.py new file mode 100644 index 0000000000..5c54408971 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/metric_info.py @@ -0,0 +1,1333 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class MetricInfo: + + """ + 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 = { + 'code_size': 'str', + 'raw_lines': 'str', + 'methods_total': 'str', + 'cyclomatic_complexity_total': 'str', + 'cyclomatic_complexity_per_method': 'str', + 'maximum_cyclomatic_complexity': 'str', + 'huge_cyclomatic_complexity_total': 'str', + 'huge_cyclomatic_complexity_ratio': 'str', + 'cca_cyclomatic_complexity_total': 'str', + 'cca_cyclomatic_complexity_per_method': 'str', + 'maximum_cca_cyclomatic_complexity': 'str', + 'huge_cca_cyclomatic_complexity_total': 'str', + 'cyclomatic_complexity_adequacy': 'str', + 'maximum_depth': 'str', + 'huge_depth_total': 'str', + 'huge_depth_ratio': 'str', + 'method_lines': 'str', + 'lines_per_method': 'str', + 'huge_method_total': 'str', + 'huge_method_ratio': 'str', + 'files_total': 'str', + 'folders_total': 'str', + 'lines_per_file': 'str', + 'huge_headerfile_total': 'str', + 'huge_headerfile_ratio': 'str', + 'huge_non_headerfile_total': 'str', + 'huge_non_headerfile_ratio': 'str', + 'huge_folder_total': 'str', + 'huge_folder_ratio': 'str', + 'file_duplication_total': 'str', + 'file_duplication_ratio': 'str', + 'non_hfile_duplication_total': 'str', + 'non_hfile_duplication_ratio': 'str', + 'code_duplication_total': 'str', + 'code_duplication_ratio': 'str', + 'non_hfile_code_duplication_total': 'str', + 'non_hfile_code_duplication_ratio': 'str', + 'unsafe_functions_total': 'str', + 'unsafe_functions_kloc': 'str', + 'redundant_code_total': 'str', + 'redundant_code_kloc': 'str', + 'warning_suppression_total': 'str', + 'warning_suppression_kloc': 'str' + } + + attribute_map = { + 'code_size': 'code_size', + 'raw_lines': 'raw_lines', + 'methods_total': 'methods_total', + 'cyclomatic_complexity_total': 'cyclomatic_complexity_total', + 'cyclomatic_complexity_per_method': 'cyclomatic_complexity_per_method', + 'maximum_cyclomatic_complexity': 'maximum_cyclomatic_complexity', + 'huge_cyclomatic_complexity_total': 'huge_cyclomatic_complexity_total', + 'huge_cyclomatic_complexity_ratio': 'huge_cyclomatic_complexity_ratio', + 'cca_cyclomatic_complexity_total': 'cca_cyclomatic_complexity_total', + 'cca_cyclomatic_complexity_per_method': 'cca_cyclomatic_complexity_per_method', + 'maximum_cca_cyclomatic_complexity': 'maximum_cca_cyclomatic_complexity', + 'huge_cca_cyclomatic_complexity_total': 'huge_cca_cyclomatic_complexity_total', + 'cyclomatic_complexity_adequacy': 'cyclomatic_complexity_adequacy', + 'maximum_depth': 'maximum_depth', + 'huge_depth_total': 'huge_depth_total', + 'huge_depth_ratio': 'huge_depth_ratio', + 'method_lines': 'method_lines', + 'lines_per_method': 'lines_per_method', + 'huge_method_total': 'huge_method_total', + 'huge_method_ratio': 'huge_method_ratio', + 'files_total': 'files_total', + 'folders_total': 'folders_total', + 'lines_per_file': 'lines_per_file', + 'huge_headerfile_total': 'huge_headerfile_total', + 'huge_headerfile_ratio': 'huge_headerfile_ratio', + 'huge_non_headerfile_total': 'huge_non_headerfile_total', + 'huge_non_headerfile_ratio': 'huge_non_headerfile_ratio', + 'huge_folder_total': 'huge_folder_total', + 'huge_folder_ratio': 'huge_folder_ratio', + 'file_duplication_total': 'file_duplication_total', + 'file_duplication_ratio': 'file_duplication_ratio', + 'non_hfile_duplication_total': 'non_hfile_duplication_total', + 'non_hfile_duplication_ratio': 'non_hfile_duplication_ratio', + 'code_duplication_total': 'code_duplication_total', + 'code_duplication_ratio': 'code_duplication_ratio', + 'non_hfile_code_duplication_total': 'non_hfile_code_duplication_total', + 'non_hfile_code_duplication_ratio': 'non_hfile_code_duplication_ratio', + 'unsafe_functions_total': 'unsafe_functions_total', + 'unsafe_functions_kloc': 'unsafe_functions_kloc', + 'redundant_code_total': 'redundant_code_total', + 'redundant_code_kloc': 'redundant_code_kloc', + 'warning_suppression_total': 'warning_suppression_total', + 'warning_suppression_kloc': 'warning_suppression_kloc' + } + + def __init__(self, code_size=None, raw_lines=None, methods_total=None, cyclomatic_complexity_total=None, cyclomatic_complexity_per_method=None, maximum_cyclomatic_complexity=None, huge_cyclomatic_complexity_total=None, huge_cyclomatic_complexity_ratio=None, cca_cyclomatic_complexity_total=None, cca_cyclomatic_complexity_per_method=None, maximum_cca_cyclomatic_complexity=None, huge_cca_cyclomatic_complexity_total=None, cyclomatic_complexity_adequacy=None, maximum_depth=None, huge_depth_total=None, huge_depth_ratio=None, method_lines=None, lines_per_method=None, huge_method_total=None, huge_method_ratio=None, files_total=None, folders_total=None, lines_per_file=None, huge_headerfile_total=None, huge_headerfile_ratio=None, huge_non_headerfile_total=None, huge_non_headerfile_ratio=None, huge_folder_total=None, huge_folder_ratio=None, file_duplication_total=None, file_duplication_ratio=None, non_hfile_duplication_total=None, non_hfile_duplication_ratio=None, code_duplication_total=None, code_duplication_ratio=None, non_hfile_code_duplication_total=None, non_hfile_code_duplication_ratio=None, unsafe_functions_total=None, unsafe_functions_kloc=None, redundant_code_total=None, redundant_code_kloc=None, warning_suppression_total=None, warning_suppression_kloc=None): + """MetricInfo + + The model defined in huaweicloud sdk + + :param code_size: 代码规模 + :type code_size: str + :param raw_lines: 原始代码行数 + :type raw_lines: str + :param methods_total: 函数总数 + :type methods_total: str + :param cyclomatic_complexity_total: 圈复杂度总数 + :type cyclomatic_complexity_total: str + :param cyclomatic_complexity_per_method: 平均圈复杂度 + :type cyclomatic_complexity_per_method: str + :param maximum_cyclomatic_complexity: 最大圈复杂度 + :type maximum_cyclomatic_complexity: str + :param huge_cyclomatic_complexity_total: 超大圈复杂度数 + :type huge_cyclomatic_complexity_total: str + :param huge_cyclomatic_complexity_ratio: 超大圈复杂度比例 + :type huge_cyclomatic_complexity_ratio: str + :param cca_cyclomatic_complexity_total: cca圈复杂度总数 + :type cca_cyclomatic_complexity_total: str + :param cca_cyclomatic_complexity_per_method: cca平均圈复杂度 + :type cca_cyclomatic_complexity_per_method: str + :param maximum_cca_cyclomatic_complexity: cca最大圈复杂度 + :type maximum_cca_cyclomatic_complexity: str + :param huge_cca_cyclomatic_complexity_total: 超大圈复杂度函数总数 + :type huge_cca_cyclomatic_complexity_total: str + :param cyclomatic_complexity_adequacy: 圈复杂度满足度 + :type cyclomatic_complexity_adequacy: str + :param maximum_depth: 最大深度 + :type maximum_depth: str + :param huge_depth_total: 超大深度数 + :type huge_depth_total: str + :param huge_depth_ratio: 超大深度占比 + :type huge_depth_ratio: str + :param method_lines: 函数总行数 + :type method_lines: str + :param lines_per_method: 函数平均代码行 + :type lines_per_method: str + :param huge_method_total: 超大函数数 + :type huge_method_total: str + :param huge_method_ratio: 超大函数占比 + :type huge_method_ratio: str + :param files_total: 文件总数 + :type files_total: str + :param folders_total: 目录总数 + :type folders_total: str + :param lines_per_file: 文件平均代码行 + :type lines_per_file: str + :param huge_headerfile_total: 超大头文件数 + :type huge_headerfile_total: str + :param huge_headerfile_ratio: 超大头文件占比 + :type huge_headerfile_ratio: str + :param huge_non_headerfile_total: 超大源文件数 + :type huge_non_headerfile_total: str + :param huge_non_headerfile_ratio: 超大源文件占比 + :type huge_non_headerfile_ratio: str + :param huge_folder_total: 超大目录数 + :type huge_folder_total: str + :param huge_folder_ratio: 超大目录占比 + :type huge_folder_ratio: str + :param file_duplication_total: 重复文件数 + :type file_duplication_total: str + :param file_duplication_ratio: 文件重复率 + :type file_duplication_ratio: str + :param non_hfile_duplication_total: 重复源文件数 + :type non_hfile_duplication_total: str + :param non_hfile_duplication_ratio: 源文件重复率 + :type non_hfile_duplication_ratio: str + :param code_duplication_total: 代码重复数 + :type code_duplication_total: str + :param code_duplication_ratio: 代码重复率 + :type code_duplication_ratio: str + :param non_hfile_code_duplication_total: 源文件代码重复数 + :type non_hfile_code_duplication_total: str + :param non_hfile_code_duplication_ratio: 源文件代码重复率 + :type non_hfile_code_duplication_ratio: str + :param unsafe_functions_total: 危险函数总数 + :type unsafe_functions_total: str + :param unsafe_functions_kloc: 危险函数密度 + :type unsafe_functions_kloc: str + :param redundant_code_total: 冗余代码数 + :type redundant_code_total: str + :param redundant_code_kloc: 冗余代码块密度 + :type redundant_code_kloc: str + :param warning_suppression_total: 抑制告警数 + :type warning_suppression_total: str + :param warning_suppression_kloc: 抑制告警密度 + :type warning_suppression_kloc: str + """ + + + + self._code_size = None + self._raw_lines = None + self._methods_total = None + self._cyclomatic_complexity_total = None + self._cyclomatic_complexity_per_method = None + self._maximum_cyclomatic_complexity = None + self._huge_cyclomatic_complexity_total = None + self._huge_cyclomatic_complexity_ratio = None + self._cca_cyclomatic_complexity_total = None + self._cca_cyclomatic_complexity_per_method = None + self._maximum_cca_cyclomatic_complexity = None + self._huge_cca_cyclomatic_complexity_total = None + self._cyclomatic_complexity_adequacy = None + self._maximum_depth = None + self._huge_depth_total = None + self._huge_depth_ratio = None + self._method_lines = None + self._lines_per_method = None + self._huge_method_total = None + self._huge_method_ratio = None + self._files_total = None + self._folders_total = None + self._lines_per_file = None + self._huge_headerfile_total = None + self._huge_headerfile_ratio = None + self._huge_non_headerfile_total = None + self._huge_non_headerfile_ratio = None + self._huge_folder_total = None + self._huge_folder_ratio = None + self._file_duplication_total = None + self._file_duplication_ratio = None + self._non_hfile_duplication_total = None + self._non_hfile_duplication_ratio = None + self._code_duplication_total = None + self._code_duplication_ratio = None + self._non_hfile_code_duplication_total = None + self._non_hfile_code_duplication_ratio = None + self._unsafe_functions_total = None + self._unsafe_functions_kloc = None + self._redundant_code_total = None + self._redundant_code_kloc = None + self._warning_suppression_total = None + self._warning_suppression_kloc = None + self.discriminator = None + + if code_size is not None: + self.code_size = code_size + if raw_lines is not None: + self.raw_lines = raw_lines + if methods_total is not None: + self.methods_total = methods_total + if cyclomatic_complexity_total is not None: + self.cyclomatic_complexity_total = cyclomatic_complexity_total + if cyclomatic_complexity_per_method is not None: + self.cyclomatic_complexity_per_method = cyclomatic_complexity_per_method + if maximum_cyclomatic_complexity is not None: + self.maximum_cyclomatic_complexity = maximum_cyclomatic_complexity + if huge_cyclomatic_complexity_total is not None: + self.huge_cyclomatic_complexity_total = huge_cyclomatic_complexity_total + if huge_cyclomatic_complexity_ratio is not None: + self.huge_cyclomatic_complexity_ratio = huge_cyclomatic_complexity_ratio + if cca_cyclomatic_complexity_total is not None: + self.cca_cyclomatic_complexity_total = cca_cyclomatic_complexity_total + if cca_cyclomatic_complexity_per_method is not None: + self.cca_cyclomatic_complexity_per_method = cca_cyclomatic_complexity_per_method + if maximum_cca_cyclomatic_complexity is not None: + self.maximum_cca_cyclomatic_complexity = maximum_cca_cyclomatic_complexity + if huge_cca_cyclomatic_complexity_total is not None: + self.huge_cca_cyclomatic_complexity_total = huge_cca_cyclomatic_complexity_total + if cyclomatic_complexity_adequacy is not None: + self.cyclomatic_complexity_adequacy = cyclomatic_complexity_adequacy + if maximum_depth is not None: + self.maximum_depth = maximum_depth + if huge_depth_total is not None: + self.huge_depth_total = huge_depth_total + if huge_depth_ratio is not None: + self.huge_depth_ratio = huge_depth_ratio + if method_lines is not None: + self.method_lines = method_lines + if lines_per_method is not None: + self.lines_per_method = lines_per_method + if huge_method_total is not None: + self.huge_method_total = huge_method_total + if huge_method_ratio is not None: + self.huge_method_ratio = huge_method_ratio + if files_total is not None: + self.files_total = files_total + if folders_total is not None: + self.folders_total = folders_total + if lines_per_file is not None: + self.lines_per_file = lines_per_file + if huge_headerfile_total is not None: + self.huge_headerfile_total = huge_headerfile_total + if huge_headerfile_ratio is not None: + self.huge_headerfile_ratio = huge_headerfile_ratio + if huge_non_headerfile_total is not None: + self.huge_non_headerfile_total = huge_non_headerfile_total + if huge_non_headerfile_ratio is not None: + self.huge_non_headerfile_ratio = huge_non_headerfile_ratio + if huge_folder_total is not None: + self.huge_folder_total = huge_folder_total + if huge_folder_ratio is not None: + self.huge_folder_ratio = huge_folder_ratio + if file_duplication_total is not None: + self.file_duplication_total = file_duplication_total + if file_duplication_ratio is not None: + self.file_duplication_ratio = file_duplication_ratio + if non_hfile_duplication_total is not None: + self.non_hfile_duplication_total = non_hfile_duplication_total + if non_hfile_duplication_ratio is not None: + self.non_hfile_duplication_ratio = non_hfile_duplication_ratio + if code_duplication_total is not None: + self.code_duplication_total = code_duplication_total + if code_duplication_ratio is not None: + self.code_duplication_ratio = code_duplication_ratio + if non_hfile_code_duplication_total is not None: + self.non_hfile_code_duplication_total = non_hfile_code_duplication_total + if non_hfile_code_duplication_ratio is not None: + self.non_hfile_code_duplication_ratio = non_hfile_code_duplication_ratio + if unsafe_functions_total is not None: + self.unsafe_functions_total = unsafe_functions_total + if unsafe_functions_kloc is not None: + self.unsafe_functions_kloc = unsafe_functions_kloc + if redundant_code_total is not None: + self.redundant_code_total = redundant_code_total + if redundant_code_kloc is not None: + self.redundant_code_kloc = redundant_code_kloc + if warning_suppression_total is not None: + self.warning_suppression_total = warning_suppression_total + if warning_suppression_kloc is not None: + self.warning_suppression_kloc = warning_suppression_kloc + + @property + def code_size(self): + """Gets the code_size of this MetricInfo. + + 代码规模 + + :return: The code_size of this MetricInfo. + :rtype: str + """ + return self._code_size + + @code_size.setter + def code_size(self, code_size): + """Sets the code_size of this MetricInfo. + + 代码规模 + + :param code_size: The code_size of this MetricInfo. + :type code_size: str + """ + self._code_size = code_size + + @property + def raw_lines(self): + """Gets the raw_lines of this MetricInfo. + + 原始代码行数 + + :return: The raw_lines of this MetricInfo. + :rtype: str + """ + return self._raw_lines + + @raw_lines.setter + def raw_lines(self, raw_lines): + """Sets the raw_lines of this MetricInfo. + + 原始代码行数 + + :param raw_lines: The raw_lines of this MetricInfo. + :type raw_lines: str + """ + self._raw_lines = raw_lines + + @property + def methods_total(self): + """Gets the methods_total of this MetricInfo. + + 函数总数 + + :return: The methods_total of this MetricInfo. + :rtype: str + """ + return self._methods_total + + @methods_total.setter + def methods_total(self, methods_total): + """Sets the methods_total of this MetricInfo. + + 函数总数 + + :param methods_total: The methods_total of this MetricInfo. + :type methods_total: str + """ + self._methods_total = methods_total + + @property + def cyclomatic_complexity_total(self): + """Gets the cyclomatic_complexity_total of this MetricInfo. + + 圈复杂度总数 + + :return: The cyclomatic_complexity_total of this MetricInfo. + :rtype: str + """ + return self._cyclomatic_complexity_total + + @cyclomatic_complexity_total.setter + def cyclomatic_complexity_total(self, cyclomatic_complexity_total): + """Sets the cyclomatic_complexity_total of this MetricInfo. + + 圈复杂度总数 + + :param cyclomatic_complexity_total: The cyclomatic_complexity_total of this MetricInfo. + :type cyclomatic_complexity_total: str + """ + self._cyclomatic_complexity_total = cyclomatic_complexity_total + + @property + def cyclomatic_complexity_per_method(self): + """Gets the cyclomatic_complexity_per_method of this MetricInfo. + + 平均圈复杂度 + + :return: The cyclomatic_complexity_per_method of this MetricInfo. + :rtype: str + """ + return self._cyclomatic_complexity_per_method + + @cyclomatic_complexity_per_method.setter + def cyclomatic_complexity_per_method(self, cyclomatic_complexity_per_method): + """Sets the cyclomatic_complexity_per_method of this MetricInfo. + + 平均圈复杂度 + + :param cyclomatic_complexity_per_method: The cyclomatic_complexity_per_method of this MetricInfo. + :type cyclomatic_complexity_per_method: str + """ + self._cyclomatic_complexity_per_method = cyclomatic_complexity_per_method + + @property + def maximum_cyclomatic_complexity(self): + """Gets the maximum_cyclomatic_complexity of this MetricInfo. + + 最大圈复杂度 + + :return: The maximum_cyclomatic_complexity of this MetricInfo. + :rtype: str + """ + return self._maximum_cyclomatic_complexity + + @maximum_cyclomatic_complexity.setter + def maximum_cyclomatic_complexity(self, maximum_cyclomatic_complexity): + """Sets the maximum_cyclomatic_complexity of this MetricInfo. + + 最大圈复杂度 + + :param maximum_cyclomatic_complexity: The maximum_cyclomatic_complexity of this MetricInfo. + :type maximum_cyclomatic_complexity: str + """ + self._maximum_cyclomatic_complexity = maximum_cyclomatic_complexity + + @property + def huge_cyclomatic_complexity_total(self): + """Gets the huge_cyclomatic_complexity_total of this MetricInfo. + + 超大圈复杂度数 + + :return: The huge_cyclomatic_complexity_total of this MetricInfo. + :rtype: str + """ + return self._huge_cyclomatic_complexity_total + + @huge_cyclomatic_complexity_total.setter + def huge_cyclomatic_complexity_total(self, huge_cyclomatic_complexity_total): + """Sets the huge_cyclomatic_complexity_total of this MetricInfo. + + 超大圈复杂度数 + + :param huge_cyclomatic_complexity_total: The huge_cyclomatic_complexity_total of this MetricInfo. + :type huge_cyclomatic_complexity_total: str + """ + self._huge_cyclomatic_complexity_total = huge_cyclomatic_complexity_total + + @property + def huge_cyclomatic_complexity_ratio(self): + """Gets the huge_cyclomatic_complexity_ratio of this MetricInfo. + + 超大圈复杂度比例 + + :return: The huge_cyclomatic_complexity_ratio of this MetricInfo. + :rtype: str + """ + return self._huge_cyclomatic_complexity_ratio + + @huge_cyclomatic_complexity_ratio.setter + def huge_cyclomatic_complexity_ratio(self, huge_cyclomatic_complexity_ratio): + """Sets the huge_cyclomatic_complexity_ratio of this MetricInfo. + + 超大圈复杂度比例 + + :param huge_cyclomatic_complexity_ratio: The huge_cyclomatic_complexity_ratio of this MetricInfo. + :type huge_cyclomatic_complexity_ratio: str + """ + self._huge_cyclomatic_complexity_ratio = huge_cyclomatic_complexity_ratio + + @property + def cca_cyclomatic_complexity_total(self): + """Gets the cca_cyclomatic_complexity_total of this MetricInfo. + + cca圈复杂度总数 + + :return: The cca_cyclomatic_complexity_total of this MetricInfo. + :rtype: str + """ + return self._cca_cyclomatic_complexity_total + + @cca_cyclomatic_complexity_total.setter + def cca_cyclomatic_complexity_total(self, cca_cyclomatic_complexity_total): + """Sets the cca_cyclomatic_complexity_total of this MetricInfo. + + cca圈复杂度总数 + + :param cca_cyclomatic_complexity_total: The cca_cyclomatic_complexity_total of this MetricInfo. + :type cca_cyclomatic_complexity_total: str + """ + self._cca_cyclomatic_complexity_total = cca_cyclomatic_complexity_total + + @property + def cca_cyclomatic_complexity_per_method(self): + """Gets the cca_cyclomatic_complexity_per_method of this MetricInfo. + + cca平均圈复杂度 + + :return: The cca_cyclomatic_complexity_per_method of this MetricInfo. + :rtype: str + """ + return self._cca_cyclomatic_complexity_per_method + + @cca_cyclomatic_complexity_per_method.setter + def cca_cyclomatic_complexity_per_method(self, cca_cyclomatic_complexity_per_method): + """Sets the cca_cyclomatic_complexity_per_method of this MetricInfo. + + cca平均圈复杂度 + + :param cca_cyclomatic_complexity_per_method: The cca_cyclomatic_complexity_per_method of this MetricInfo. + :type cca_cyclomatic_complexity_per_method: str + """ + self._cca_cyclomatic_complexity_per_method = cca_cyclomatic_complexity_per_method + + @property + def maximum_cca_cyclomatic_complexity(self): + """Gets the maximum_cca_cyclomatic_complexity of this MetricInfo. + + cca最大圈复杂度 + + :return: The maximum_cca_cyclomatic_complexity of this MetricInfo. + :rtype: str + """ + return self._maximum_cca_cyclomatic_complexity + + @maximum_cca_cyclomatic_complexity.setter + def maximum_cca_cyclomatic_complexity(self, maximum_cca_cyclomatic_complexity): + """Sets the maximum_cca_cyclomatic_complexity of this MetricInfo. + + cca最大圈复杂度 + + :param maximum_cca_cyclomatic_complexity: The maximum_cca_cyclomatic_complexity of this MetricInfo. + :type maximum_cca_cyclomatic_complexity: str + """ + self._maximum_cca_cyclomatic_complexity = maximum_cca_cyclomatic_complexity + + @property + def huge_cca_cyclomatic_complexity_total(self): + """Gets the huge_cca_cyclomatic_complexity_total of this MetricInfo. + + 超大圈复杂度函数总数 + + :return: The huge_cca_cyclomatic_complexity_total of this MetricInfo. + :rtype: str + """ + return self._huge_cca_cyclomatic_complexity_total + + @huge_cca_cyclomatic_complexity_total.setter + def huge_cca_cyclomatic_complexity_total(self, huge_cca_cyclomatic_complexity_total): + """Sets the huge_cca_cyclomatic_complexity_total of this MetricInfo. + + 超大圈复杂度函数总数 + + :param huge_cca_cyclomatic_complexity_total: The huge_cca_cyclomatic_complexity_total of this MetricInfo. + :type huge_cca_cyclomatic_complexity_total: str + """ + self._huge_cca_cyclomatic_complexity_total = huge_cca_cyclomatic_complexity_total + + @property + def cyclomatic_complexity_adequacy(self): + """Gets the cyclomatic_complexity_adequacy of this MetricInfo. + + 圈复杂度满足度 + + :return: The cyclomatic_complexity_adequacy of this MetricInfo. + :rtype: str + """ + return self._cyclomatic_complexity_adequacy + + @cyclomatic_complexity_adequacy.setter + def cyclomatic_complexity_adequacy(self, cyclomatic_complexity_adequacy): + """Sets the cyclomatic_complexity_adequacy of this MetricInfo. + + 圈复杂度满足度 + + :param cyclomatic_complexity_adequacy: The cyclomatic_complexity_adequacy of this MetricInfo. + :type cyclomatic_complexity_adequacy: str + """ + self._cyclomatic_complexity_adequacy = cyclomatic_complexity_adequacy + + @property + def maximum_depth(self): + """Gets the maximum_depth of this MetricInfo. + + 最大深度 + + :return: The maximum_depth of this MetricInfo. + :rtype: str + """ + return self._maximum_depth + + @maximum_depth.setter + def maximum_depth(self, maximum_depth): + """Sets the maximum_depth of this MetricInfo. + + 最大深度 + + :param maximum_depth: The maximum_depth of this MetricInfo. + :type maximum_depth: str + """ + self._maximum_depth = maximum_depth + + @property + def huge_depth_total(self): + """Gets the huge_depth_total of this MetricInfo. + + 超大深度数 + + :return: The huge_depth_total of this MetricInfo. + :rtype: str + """ + return self._huge_depth_total + + @huge_depth_total.setter + def huge_depth_total(self, huge_depth_total): + """Sets the huge_depth_total of this MetricInfo. + + 超大深度数 + + :param huge_depth_total: The huge_depth_total of this MetricInfo. + :type huge_depth_total: str + """ + self._huge_depth_total = huge_depth_total + + @property + def huge_depth_ratio(self): + """Gets the huge_depth_ratio of this MetricInfo. + + 超大深度占比 + + :return: The huge_depth_ratio of this MetricInfo. + :rtype: str + """ + return self._huge_depth_ratio + + @huge_depth_ratio.setter + def huge_depth_ratio(self, huge_depth_ratio): + """Sets the huge_depth_ratio of this MetricInfo. + + 超大深度占比 + + :param huge_depth_ratio: The huge_depth_ratio of this MetricInfo. + :type huge_depth_ratio: str + """ + self._huge_depth_ratio = huge_depth_ratio + + @property + def method_lines(self): + """Gets the method_lines of this MetricInfo. + + 函数总行数 + + :return: The method_lines of this MetricInfo. + :rtype: str + """ + return self._method_lines + + @method_lines.setter + def method_lines(self, method_lines): + """Sets the method_lines of this MetricInfo. + + 函数总行数 + + :param method_lines: The method_lines of this MetricInfo. + :type method_lines: str + """ + self._method_lines = method_lines + + @property + def lines_per_method(self): + """Gets the lines_per_method of this MetricInfo. + + 函数平均代码行 + + :return: The lines_per_method of this MetricInfo. + :rtype: str + """ + return self._lines_per_method + + @lines_per_method.setter + def lines_per_method(self, lines_per_method): + """Sets the lines_per_method of this MetricInfo. + + 函数平均代码行 + + :param lines_per_method: The lines_per_method of this MetricInfo. + :type lines_per_method: str + """ + self._lines_per_method = lines_per_method + + @property + def huge_method_total(self): + """Gets the huge_method_total of this MetricInfo. + + 超大函数数 + + :return: The huge_method_total of this MetricInfo. + :rtype: str + """ + return self._huge_method_total + + @huge_method_total.setter + def huge_method_total(self, huge_method_total): + """Sets the huge_method_total of this MetricInfo. + + 超大函数数 + + :param huge_method_total: The huge_method_total of this MetricInfo. + :type huge_method_total: str + """ + self._huge_method_total = huge_method_total + + @property + def huge_method_ratio(self): + """Gets the huge_method_ratio of this MetricInfo. + + 超大函数占比 + + :return: The huge_method_ratio of this MetricInfo. + :rtype: str + """ + return self._huge_method_ratio + + @huge_method_ratio.setter + def huge_method_ratio(self, huge_method_ratio): + """Sets the huge_method_ratio of this MetricInfo. + + 超大函数占比 + + :param huge_method_ratio: The huge_method_ratio of this MetricInfo. + :type huge_method_ratio: str + """ + self._huge_method_ratio = huge_method_ratio + + @property + def files_total(self): + """Gets the files_total of this MetricInfo. + + 文件总数 + + :return: The files_total of this MetricInfo. + :rtype: str + """ + return self._files_total + + @files_total.setter + def files_total(self, files_total): + """Sets the files_total of this MetricInfo. + + 文件总数 + + :param files_total: The files_total of this MetricInfo. + :type files_total: str + """ + self._files_total = files_total + + @property + def folders_total(self): + """Gets the folders_total of this MetricInfo. + + 目录总数 + + :return: The folders_total of this MetricInfo. + :rtype: str + """ + return self._folders_total + + @folders_total.setter + def folders_total(self, folders_total): + """Sets the folders_total of this MetricInfo. + + 目录总数 + + :param folders_total: The folders_total of this MetricInfo. + :type folders_total: str + """ + self._folders_total = folders_total + + @property + def lines_per_file(self): + """Gets the lines_per_file of this MetricInfo. + + 文件平均代码行 + + :return: The lines_per_file of this MetricInfo. + :rtype: str + """ + return self._lines_per_file + + @lines_per_file.setter + def lines_per_file(self, lines_per_file): + """Sets the lines_per_file of this MetricInfo. + + 文件平均代码行 + + :param lines_per_file: The lines_per_file of this MetricInfo. + :type lines_per_file: str + """ + self._lines_per_file = lines_per_file + + @property + def huge_headerfile_total(self): + """Gets the huge_headerfile_total of this MetricInfo. + + 超大头文件数 + + :return: The huge_headerfile_total of this MetricInfo. + :rtype: str + """ + return self._huge_headerfile_total + + @huge_headerfile_total.setter + def huge_headerfile_total(self, huge_headerfile_total): + """Sets the huge_headerfile_total of this MetricInfo. + + 超大头文件数 + + :param huge_headerfile_total: The huge_headerfile_total of this MetricInfo. + :type huge_headerfile_total: str + """ + self._huge_headerfile_total = huge_headerfile_total + + @property + def huge_headerfile_ratio(self): + """Gets the huge_headerfile_ratio of this MetricInfo. + + 超大头文件占比 + + :return: The huge_headerfile_ratio of this MetricInfo. + :rtype: str + """ + return self._huge_headerfile_ratio + + @huge_headerfile_ratio.setter + def huge_headerfile_ratio(self, huge_headerfile_ratio): + """Sets the huge_headerfile_ratio of this MetricInfo. + + 超大头文件占比 + + :param huge_headerfile_ratio: The huge_headerfile_ratio of this MetricInfo. + :type huge_headerfile_ratio: str + """ + self._huge_headerfile_ratio = huge_headerfile_ratio + + @property + def huge_non_headerfile_total(self): + """Gets the huge_non_headerfile_total of this MetricInfo. + + 超大源文件数 + + :return: The huge_non_headerfile_total of this MetricInfo. + :rtype: str + """ + return self._huge_non_headerfile_total + + @huge_non_headerfile_total.setter + def huge_non_headerfile_total(self, huge_non_headerfile_total): + """Sets the huge_non_headerfile_total of this MetricInfo. + + 超大源文件数 + + :param huge_non_headerfile_total: The huge_non_headerfile_total of this MetricInfo. + :type huge_non_headerfile_total: str + """ + self._huge_non_headerfile_total = huge_non_headerfile_total + + @property + def huge_non_headerfile_ratio(self): + """Gets the huge_non_headerfile_ratio of this MetricInfo. + + 超大源文件占比 + + :return: The huge_non_headerfile_ratio of this MetricInfo. + :rtype: str + """ + return self._huge_non_headerfile_ratio + + @huge_non_headerfile_ratio.setter + def huge_non_headerfile_ratio(self, huge_non_headerfile_ratio): + """Sets the huge_non_headerfile_ratio of this MetricInfo. + + 超大源文件占比 + + :param huge_non_headerfile_ratio: The huge_non_headerfile_ratio of this MetricInfo. + :type huge_non_headerfile_ratio: str + """ + self._huge_non_headerfile_ratio = huge_non_headerfile_ratio + + @property + def huge_folder_total(self): + """Gets the huge_folder_total of this MetricInfo. + + 超大目录数 + + :return: The huge_folder_total of this MetricInfo. + :rtype: str + """ + return self._huge_folder_total + + @huge_folder_total.setter + def huge_folder_total(self, huge_folder_total): + """Sets the huge_folder_total of this MetricInfo. + + 超大目录数 + + :param huge_folder_total: The huge_folder_total of this MetricInfo. + :type huge_folder_total: str + """ + self._huge_folder_total = huge_folder_total + + @property + def huge_folder_ratio(self): + """Gets the huge_folder_ratio of this MetricInfo. + + 超大目录占比 + + :return: The huge_folder_ratio of this MetricInfo. + :rtype: str + """ + return self._huge_folder_ratio + + @huge_folder_ratio.setter + def huge_folder_ratio(self, huge_folder_ratio): + """Sets the huge_folder_ratio of this MetricInfo. + + 超大目录占比 + + :param huge_folder_ratio: The huge_folder_ratio of this MetricInfo. + :type huge_folder_ratio: str + """ + self._huge_folder_ratio = huge_folder_ratio + + @property + def file_duplication_total(self): + """Gets the file_duplication_total of this MetricInfo. + + 重复文件数 + + :return: The file_duplication_total of this MetricInfo. + :rtype: str + """ + return self._file_duplication_total + + @file_duplication_total.setter + def file_duplication_total(self, file_duplication_total): + """Sets the file_duplication_total of this MetricInfo. + + 重复文件数 + + :param file_duplication_total: The file_duplication_total of this MetricInfo. + :type file_duplication_total: str + """ + self._file_duplication_total = file_duplication_total + + @property + def file_duplication_ratio(self): + """Gets the file_duplication_ratio of this MetricInfo. + + 文件重复率 + + :return: The file_duplication_ratio of this MetricInfo. + :rtype: str + """ + return self._file_duplication_ratio + + @file_duplication_ratio.setter + def file_duplication_ratio(self, file_duplication_ratio): + """Sets the file_duplication_ratio of this MetricInfo. + + 文件重复率 + + :param file_duplication_ratio: The file_duplication_ratio of this MetricInfo. + :type file_duplication_ratio: str + """ + self._file_duplication_ratio = file_duplication_ratio + + @property + def non_hfile_duplication_total(self): + """Gets the non_hfile_duplication_total of this MetricInfo. + + 重复源文件数 + + :return: The non_hfile_duplication_total of this MetricInfo. + :rtype: str + """ + return self._non_hfile_duplication_total + + @non_hfile_duplication_total.setter + def non_hfile_duplication_total(self, non_hfile_duplication_total): + """Sets the non_hfile_duplication_total of this MetricInfo. + + 重复源文件数 + + :param non_hfile_duplication_total: The non_hfile_duplication_total of this MetricInfo. + :type non_hfile_duplication_total: str + """ + self._non_hfile_duplication_total = non_hfile_duplication_total + + @property + def non_hfile_duplication_ratio(self): + """Gets the non_hfile_duplication_ratio of this MetricInfo. + + 源文件重复率 + + :return: The non_hfile_duplication_ratio of this MetricInfo. + :rtype: str + """ + return self._non_hfile_duplication_ratio + + @non_hfile_duplication_ratio.setter + def non_hfile_duplication_ratio(self, non_hfile_duplication_ratio): + """Sets the non_hfile_duplication_ratio of this MetricInfo. + + 源文件重复率 + + :param non_hfile_duplication_ratio: The non_hfile_duplication_ratio of this MetricInfo. + :type non_hfile_duplication_ratio: str + """ + self._non_hfile_duplication_ratio = non_hfile_duplication_ratio + + @property + def code_duplication_total(self): + """Gets the code_duplication_total of this MetricInfo. + + 代码重复数 + + :return: The code_duplication_total of this MetricInfo. + :rtype: str + """ + return self._code_duplication_total + + @code_duplication_total.setter + def code_duplication_total(self, code_duplication_total): + """Sets the code_duplication_total of this MetricInfo. + + 代码重复数 + + :param code_duplication_total: The code_duplication_total of this MetricInfo. + :type code_duplication_total: str + """ + self._code_duplication_total = code_duplication_total + + @property + def code_duplication_ratio(self): + """Gets the code_duplication_ratio of this MetricInfo. + + 代码重复率 + + :return: The code_duplication_ratio of this MetricInfo. + :rtype: str + """ + return self._code_duplication_ratio + + @code_duplication_ratio.setter + def code_duplication_ratio(self, code_duplication_ratio): + """Sets the code_duplication_ratio of this MetricInfo. + + 代码重复率 + + :param code_duplication_ratio: The code_duplication_ratio of this MetricInfo. + :type code_duplication_ratio: str + """ + self._code_duplication_ratio = code_duplication_ratio + + @property + def non_hfile_code_duplication_total(self): + """Gets the non_hfile_code_duplication_total of this MetricInfo. + + 源文件代码重复数 + + :return: The non_hfile_code_duplication_total of this MetricInfo. + :rtype: str + """ + return self._non_hfile_code_duplication_total + + @non_hfile_code_duplication_total.setter + def non_hfile_code_duplication_total(self, non_hfile_code_duplication_total): + """Sets the non_hfile_code_duplication_total of this MetricInfo. + + 源文件代码重复数 + + :param non_hfile_code_duplication_total: The non_hfile_code_duplication_total of this MetricInfo. + :type non_hfile_code_duplication_total: str + """ + self._non_hfile_code_duplication_total = non_hfile_code_duplication_total + + @property + def non_hfile_code_duplication_ratio(self): + """Gets the non_hfile_code_duplication_ratio of this MetricInfo. + + 源文件代码重复率 + + :return: The non_hfile_code_duplication_ratio of this MetricInfo. + :rtype: str + """ + return self._non_hfile_code_duplication_ratio + + @non_hfile_code_duplication_ratio.setter + def non_hfile_code_duplication_ratio(self, non_hfile_code_duplication_ratio): + """Sets the non_hfile_code_duplication_ratio of this MetricInfo. + + 源文件代码重复率 + + :param non_hfile_code_duplication_ratio: The non_hfile_code_duplication_ratio of this MetricInfo. + :type non_hfile_code_duplication_ratio: str + """ + self._non_hfile_code_duplication_ratio = non_hfile_code_duplication_ratio + + @property + def unsafe_functions_total(self): + """Gets the unsafe_functions_total of this MetricInfo. + + 危险函数总数 + + :return: The unsafe_functions_total of this MetricInfo. + :rtype: str + """ + return self._unsafe_functions_total + + @unsafe_functions_total.setter + def unsafe_functions_total(self, unsafe_functions_total): + """Sets the unsafe_functions_total of this MetricInfo. + + 危险函数总数 + + :param unsafe_functions_total: The unsafe_functions_total of this MetricInfo. + :type unsafe_functions_total: str + """ + self._unsafe_functions_total = unsafe_functions_total + + @property + def unsafe_functions_kloc(self): + """Gets the unsafe_functions_kloc of this MetricInfo. + + 危险函数密度 + + :return: The unsafe_functions_kloc of this MetricInfo. + :rtype: str + """ + return self._unsafe_functions_kloc + + @unsafe_functions_kloc.setter + def unsafe_functions_kloc(self, unsafe_functions_kloc): + """Sets the unsafe_functions_kloc of this MetricInfo. + + 危险函数密度 + + :param unsafe_functions_kloc: The unsafe_functions_kloc of this MetricInfo. + :type unsafe_functions_kloc: str + """ + self._unsafe_functions_kloc = unsafe_functions_kloc + + @property + def redundant_code_total(self): + """Gets the redundant_code_total of this MetricInfo. + + 冗余代码数 + + :return: The redundant_code_total of this MetricInfo. + :rtype: str + """ + return self._redundant_code_total + + @redundant_code_total.setter + def redundant_code_total(self, redundant_code_total): + """Sets the redundant_code_total of this MetricInfo. + + 冗余代码数 + + :param redundant_code_total: The redundant_code_total of this MetricInfo. + :type redundant_code_total: str + """ + self._redundant_code_total = redundant_code_total + + @property + def redundant_code_kloc(self): + """Gets the redundant_code_kloc of this MetricInfo. + + 冗余代码块密度 + + :return: The redundant_code_kloc of this MetricInfo. + :rtype: str + """ + return self._redundant_code_kloc + + @redundant_code_kloc.setter + def redundant_code_kloc(self, redundant_code_kloc): + """Sets the redundant_code_kloc of this MetricInfo. + + 冗余代码块密度 + + :param redundant_code_kloc: The redundant_code_kloc of this MetricInfo. + :type redundant_code_kloc: str + """ + self._redundant_code_kloc = redundant_code_kloc + + @property + def warning_suppression_total(self): + """Gets the warning_suppression_total of this MetricInfo. + + 抑制告警数 + + :return: The warning_suppression_total of this MetricInfo. + :rtype: str + """ + return self._warning_suppression_total + + @warning_suppression_total.setter + def warning_suppression_total(self, warning_suppression_total): + """Sets the warning_suppression_total of this MetricInfo. + + 抑制告警数 + + :param warning_suppression_total: The warning_suppression_total of this MetricInfo. + :type warning_suppression_total: str + """ + self._warning_suppression_total = warning_suppression_total + + @property + def warning_suppression_kloc(self): + """Gets the warning_suppression_kloc of this MetricInfo. + + 抑制告警密度 + + :return: The warning_suppression_kloc of this MetricInfo. + :rtype: str + """ + return self._warning_suppression_kloc + + @warning_suppression_kloc.setter + def warning_suppression_kloc(self, warning_suppression_kloc): + """Sets the warning_suppression_kloc of this MetricInfo. + + 抑制告警密度 + + :param warning_suppression_kloc: The warning_suppression_kloc of this MetricInfo. + :type warning_suppression_kloc: str + """ + self._warning_suppression_kloc = warning_suppression_kloc + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MetricInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/param_info.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/param_info.py new file mode 100644 index 0000000000..a55edcb1ce --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/param_info.py @@ -0,0 +1,289 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ParamInfo: + + """ + 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 = { + 'url': 'str', + 'branch': 'str', + 'language': 'str', + 'exclude_dir': 'str', + 'encode': 'str', + 'compile_config': 'str', + 'rule_template': 'str' + } + + attribute_map = { + 'url': 'url', + 'branch': 'branch', + 'language': 'language', + 'exclude_dir': 'exclude_dir', + 'encode': 'encode', + 'compile_config': 'compile_config', + 'rule_template': 'rule_template' + } + + def __init__(self, url=None, branch=None, language=None, exclude_dir=None, encode=None, compile_config=None, rule_template=None): + """ParamInfo + + The model defined in huaweicloud sdk + + :param url: 仓库地址 + :type url: str + :param branch: 仓库分支 + :type branch: str + :param language: 仓库语言 + :type language: str + :param exclude_dir: 排除的目录 + :type exclude_dir: str + :param encode: 编码格式 + :type encode: str + :param compile_config: 编译配置信息 + :type compile_config: str + :param rule_template: g规则集名称 + :type rule_template: str + """ + + + + self._url = None + self._branch = None + self._language = None + self._exclude_dir = None + self._encode = None + self._compile_config = None + self._rule_template = None + self.discriminator = None + + if url is not None: + self.url = url + if branch is not None: + self.branch = branch + if language is not None: + self.language = language + if exclude_dir is not None: + self.exclude_dir = exclude_dir + if encode is not None: + self.encode = encode + if compile_config is not None: + self.compile_config = compile_config + if rule_template is not None: + self.rule_template = rule_template + + @property + def url(self): + """Gets the url of this ParamInfo. + + 仓库地址 + + :return: The url of this ParamInfo. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this ParamInfo. + + 仓库地址 + + :param url: The url of this ParamInfo. + :type url: str + """ + self._url = url + + @property + def branch(self): + """Gets the branch of this ParamInfo. + + 仓库分支 + + :return: The branch of this ParamInfo. + :rtype: str + """ + return self._branch + + @branch.setter + def branch(self, branch): + """Sets the branch of this ParamInfo. + + 仓库分支 + + :param branch: The branch of this ParamInfo. + :type branch: str + """ + self._branch = branch + + @property + def language(self): + """Gets the language of this ParamInfo. + + 仓库语言 + + :return: The language of this ParamInfo. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this ParamInfo. + + 仓库语言 + + :param language: The language of this ParamInfo. + :type language: str + """ + self._language = language + + @property + def exclude_dir(self): + """Gets the exclude_dir of this ParamInfo. + + 排除的目录 + + :return: The exclude_dir of this ParamInfo. + :rtype: str + """ + return self._exclude_dir + + @exclude_dir.setter + def exclude_dir(self, exclude_dir): + """Sets the exclude_dir of this ParamInfo. + + 排除的目录 + + :param exclude_dir: The exclude_dir of this ParamInfo. + :type exclude_dir: str + """ + self._exclude_dir = exclude_dir + + @property + def encode(self): + """Gets the encode of this ParamInfo. + + 编码格式 + + :return: The encode of this ParamInfo. + :rtype: str + """ + return self._encode + + @encode.setter + def encode(self, encode): + """Sets the encode of this ParamInfo. + + 编码格式 + + :param encode: The encode of this ParamInfo. + :type encode: str + """ + self._encode = encode + + @property + def compile_config(self): + """Gets the compile_config of this ParamInfo. + + 编译配置信息 + + :return: The compile_config of this ParamInfo. + :rtype: str + """ + return self._compile_config + + @compile_config.setter + def compile_config(self, compile_config): + """Sets the compile_config of this ParamInfo. + + 编译配置信息 + + :param compile_config: The compile_config of this ParamInfo. + :type compile_config: str + """ + self._compile_config = compile_config + + @property + def rule_template(self): + """Gets the rule_template of this ParamInfo. + + g规则集名称 + + :return: The rule_template of this ParamInfo. + :rtype: str + """ + return self._rule_template + + @rule_template.setter + def rule_template(self, rule_template): + """Sets the rule_template of this ParamInfo. + + g规则集名称 + + :param rule_template: The rule_template of this ParamInfo. + :type rule_template: str + """ + self._rule_template = rule_template + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ParamInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/progress_detail_v2.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/progress_detail_v2.py new file mode 100644 index 0000000000..68aac978fb --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/progress_detail_v2.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ProgressDetailV2: + + """ + 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 = { + 'ratio': 'str', + 'info': 'str' + } + + attribute_map = { + 'ratio': 'ratio', + 'info': 'info' + } + + def __init__(self, ratio=None, info=None): + """ProgressDetailV2 + + The model defined in huaweicloud sdk + + :param ratio: 进度百分比 + :type ratio: str + :param info: 中文信息 + :type info: str + """ + + + + self._ratio = None + self._info = None + self.discriminator = None + + if ratio is not None: + self.ratio = ratio + if info is not None: + self.info = info + + @property + def ratio(self): + """Gets the ratio of this ProgressDetailV2. + + 进度百分比 + + :return: The ratio of this ProgressDetailV2. + :rtype: str + """ + return self._ratio + + @ratio.setter + def ratio(self, ratio): + """Sets the ratio of this ProgressDetailV2. + + 进度百分比 + + :param ratio: The ratio of this ProgressDetailV2. + :type ratio: str + """ + self._ratio = ratio + + @property + def info(self): + """Gets the info of this ProgressDetailV2. + + 中文信息 + + :return: The info of this ProgressDetailV2. + :rtype: str + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this ProgressDetailV2. + + 中文信息 + + :param info: The info of this ProgressDetailV2. + :type info: str + """ + self._info = info + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ProgressDetailV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/rule_config.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/rule_config.py new file mode 100644 index 0000000000..a33143436c --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/rule_config.py @@ -0,0 +1,318 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class RuleConfig: + + """ + 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 = { + 'id': 'int', + 'rule_id': 'int', + 'default_value': 'str', + 'option_value': 'str', + 'option_key': 'str', + 'option_name': 'str', + 'template_id': 'str', + 'description': 'str' + } + + attribute_map = { + 'id': 'id', + 'rule_id': 'rule_id', + 'default_value': 'default_value', + 'option_value': 'option_value', + 'option_key': 'option_key', + 'option_name': 'option_name', + 'template_id': 'template_id', + 'description': 'description' + } + + def __init__(self, id=None, rule_id=None, default_value=None, option_value=None, option_key=None, option_name=None, template_id=None, description=None): + """RuleConfig + + The model defined in huaweicloud sdk + + :param id: 规则配置ID + :type id: int + :param rule_id: 规则ID + :type rule_id: int + :param default_value: 默认值 + :type default_value: str + :param option_value: 当前 + :type option_value: str + :param option_key: 当前规则配置项key + :type option_key: str + :param option_name: 当前规则配置项名称 + :type option_name: str + :param template_id: 规则集id + :type template_id: str + :param description: 描述 + :type description: str + """ + + + + self._id = None + self._rule_id = None + self._default_value = None + self._option_value = None + self._option_key = None + self._option_name = None + self._template_id = None + self._description = None + self.discriminator = None + + if id is not None: + self.id = id + if rule_id is not None: + self.rule_id = rule_id + if default_value is not None: + self.default_value = default_value + if option_value is not None: + self.option_value = option_value + if option_key is not None: + self.option_key = option_key + if option_name is not None: + self.option_name = option_name + if template_id is not None: + self.template_id = template_id + if description is not None: + self.description = description + + @property + def id(self): + """Gets the id of this RuleConfig. + + 规则配置ID + + :return: The id of this RuleConfig. + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this RuleConfig. + + 规则配置ID + + :param id: The id of this RuleConfig. + :type id: int + """ + self._id = id + + @property + def rule_id(self): + """Gets the rule_id of this RuleConfig. + + 规则ID + + :return: The rule_id of this RuleConfig. + :rtype: int + """ + return self._rule_id + + @rule_id.setter + def rule_id(self, rule_id): + """Sets the rule_id of this RuleConfig. + + 规则ID + + :param rule_id: The rule_id of this RuleConfig. + :type rule_id: int + """ + self._rule_id = rule_id + + @property + def default_value(self): + """Gets the default_value of this RuleConfig. + + 默认值 + + :return: The default_value of this RuleConfig. + :rtype: str + """ + return self._default_value + + @default_value.setter + def default_value(self, default_value): + """Sets the default_value of this RuleConfig. + + 默认值 + + :param default_value: The default_value of this RuleConfig. + :type default_value: str + """ + self._default_value = default_value + + @property + def option_value(self): + """Gets the option_value of this RuleConfig. + + 当前 + + :return: The option_value of this RuleConfig. + :rtype: str + """ + return self._option_value + + @option_value.setter + def option_value(self, option_value): + """Sets the option_value of this RuleConfig. + + 当前 + + :param option_value: The option_value of this RuleConfig. + :type option_value: str + """ + self._option_value = option_value + + @property + def option_key(self): + """Gets the option_key of this RuleConfig. + + 当前规则配置项key + + :return: The option_key of this RuleConfig. + :rtype: str + """ + return self._option_key + + @option_key.setter + def option_key(self, option_key): + """Sets the option_key of this RuleConfig. + + 当前规则配置项key + + :param option_key: The option_key of this RuleConfig. + :type option_key: str + """ + self._option_key = option_key + + @property + def option_name(self): + """Gets the option_name of this RuleConfig. + + 当前规则配置项名称 + + :return: The option_name of this RuleConfig. + :rtype: str + """ + return self._option_name + + @option_name.setter + def option_name(self, option_name): + """Sets the option_name of this RuleConfig. + + 当前规则配置项名称 + + :param option_name: The option_name of this RuleConfig. + :type option_name: str + """ + self._option_name = option_name + + @property + def template_id(self): + """Gets the template_id of this RuleConfig. + + 规则集id + + :return: The template_id of this RuleConfig. + :rtype: str + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this RuleConfig. + + 规则集id + + :param template_id: The template_id of this RuleConfig. + :type template_id: str + """ + self._template_id = template_id + + @property + def description(self): + """Gets the description of this RuleConfig. + + 描述 + + :return: The description of this RuleConfig. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this RuleConfig. + + 描述 + + :param description: The description of this RuleConfig. + :type description: str + """ + self._description = description + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RuleConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/rule_item.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/rule_item.py new file mode 100644 index 0000000000..c60eac60ea --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/rule_item.py @@ -0,0 +1,289 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class RuleItem: + + """ + 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 = { + 'rule_id': 'str', + 'rule_language': 'str', + 'rule_name': 'str', + 'rule_severity': 'str', + 'rule_tages': 'str', + 'checked': 'str', + 'rule_config_list': 'list[RuleConfig]' + } + + attribute_map = { + 'rule_id': 'rule_id', + 'rule_language': 'rule_language', + 'rule_name': 'rule_name', + 'rule_severity': 'rule_severity', + 'rule_tages': 'rule_tages', + 'checked': 'checked', + 'rule_config_list': 'rule_config_list' + } + + def __init__(self, rule_id=None, rule_language=None, rule_name=None, rule_severity=None, rule_tages=None, checked=None, rule_config_list=None): + """RuleItem + + The model defined in huaweicloud sdk + + :param rule_id: 规则id + :type rule_id: str + :param rule_language: 规则所属语言 + :type rule_language: str + :param rule_name: 规则名称 + :type rule_name: str + :param rule_severity: 规则问题级别 + :type rule_severity: str + :param rule_tages: 规则标签 + :type rule_tages: str + :param checked: 规则状态0:未启用,1:已启用 + :type checked: str + :param rule_config_list: 规则配置参数阈值相关信息 + :type rule_config_list: list[:class:`huaweicloudsdkcodecheck.v2.RuleConfig`] + """ + + + + self._rule_id = None + self._rule_language = None + self._rule_name = None + self._rule_severity = None + self._rule_tages = None + self._checked = None + self._rule_config_list = None + self.discriminator = None + + if rule_id is not None: + self.rule_id = rule_id + if rule_language is not None: + self.rule_language = rule_language + if rule_name is not None: + self.rule_name = rule_name + if rule_severity is not None: + self.rule_severity = rule_severity + if rule_tages is not None: + self.rule_tages = rule_tages + if checked is not None: + self.checked = checked + if rule_config_list is not None: + self.rule_config_list = rule_config_list + + @property + def rule_id(self): + """Gets the rule_id of this RuleItem. + + 规则id + + :return: The rule_id of this RuleItem. + :rtype: str + """ + return self._rule_id + + @rule_id.setter + def rule_id(self, rule_id): + """Sets the rule_id of this RuleItem. + + 规则id + + :param rule_id: The rule_id of this RuleItem. + :type rule_id: str + """ + self._rule_id = rule_id + + @property + def rule_language(self): + """Gets the rule_language of this RuleItem. + + 规则所属语言 + + :return: The rule_language of this RuleItem. + :rtype: str + """ + return self._rule_language + + @rule_language.setter + def rule_language(self, rule_language): + """Sets the rule_language of this RuleItem. + + 规则所属语言 + + :param rule_language: The rule_language of this RuleItem. + :type rule_language: str + """ + self._rule_language = rule_language + + @property + def rule_name(self): + """Gets the rule_name of this RuleItem. + + 规则名称 + + :return: The rule_name of this RuleItem. + :rtype: str + """ + return self._rule_name + + @rule_name.setter + def rule_name(self, rule_name): + """Sets the rule_name of this RuleItem. + + 规则名称 + + :param rule_name: The rule_name of this RuleItem. + :type rule_name: str + """ + self._rule_name = rule_name + + @property + def rule_severity(self): + """Gets the rule_severity of this RuleItem. + + 规则问题级别 + + :return: The rule_severity of this RuleItem. + :rtype: str + """ + return self._rule_severity + + @rule_severity.setter + def rule_severity(self, rule_severity): + """Sets the rule_severity of this RuleItem. + + 规则问题级别 + + :param rule_severity: The rule_severity of this RuleItem. + :type rule_severity: str + """ + self._rule_severity = rule_severity + + @property + def rule_tages(self): + """Gets the rule_tages of this RuleItem. + + 规则标签 + + :return: The rule_tages of this RuleItem. + :rtype: str + """ + return self._rule_tages + + @rule_tages.setter + def rule_tages(self, rule_tages): + """Sets the rule_tages of this RuleItem. + + 规则标签 + + :param rule_tages: The rule_tages of this RuleItem. + :type rule_tages: str + """ + self._rule_tages = rule_tages + + @property + def checked(self): + """Gets the checked of this RuleItem. + + 规则状态0:未启用,1:已启用 + + :return: The checked of this RuleItem. + :rtype: str + """ + return self._checked + + @checked.setter + def checked(self, checked): + """Sets the checked of this RuleItem. + + 规则状态0:未启用,1:已启用 + + :param checked: The checked of this RuleItem. + :type checked: str + """ + self._checked = checked + + @property + def rule_config_list(self): + """Gets the rule_config_list of this RuleItem. + + 规则配置参数阈值相关信息 + + :return: The rule_config_list of this RuleItem. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.RuleConfig`] + """ + return self._rule_config_list + + @rule_config_list.setter + def rule_config_list(self, rule_config_list): + """Sets the rule_config_list of this RuleItem. + + 规则配置参数阈值相关信息 + + :param rule_config_list: The rule_config_list of this RuleItem. + :type rule_config_list: list[:class:`huaweicloudsdkcodecheck.v2.RuleConfig`] + """ + self._rule_config_list = rule_config_list + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RuleItem): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/rule_list_item.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/rule_list_item.py new file mode 100644 index 0000000000..d32078224d --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/rule_list_item.py @@ -0,0 +1,376 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class RuleListItem: + + """ + 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 = { + 'rule_set': 'str', + 'rule_id': 'str', + 'rule_language': 'str', + 'rule_name': 'str', + 'rule_severity': 'str', + 'rule_tages': 'str', + 'right_example': 'str', + 'error_example': 'str', + 'revise_opinion': 'str', + 'rule_desc': 'str' + } + + attribute_map = { + 'rule_set': 'rule_set', + 'rule_id': 'rule_id', + 'rule_language': 'rule_language', + 'rule_name': 'rule_name', + 'rule_severity': 'rule_severity', + 'rule_tages': 'rule_tages', + 'right_example': 'right_example', + 'error_example': 'error_example', + 'revise_opinion': 'revise_opinion', + 'rule_desc': 'rule_desc' + } + + def __init__(self, rule_set=None, rule_id=None, rule_language=None, rule_name=None, rule_severity=None, rule_tages=None, right_example=None, error_example=None, revise_opinion=None, rule_desc=None): + """RuleListItem + + The model defined in huaweicloud sdk + + :param rule_set: 规则集规范分类 + :type rule_set: str + :param rule_id: 规则id + :type rule_id: str + :param rule_language: 规则所属语言 + :type rule_language: str + :param rule_name: 规则名称 + :type rule_name: str + :param rule_severity: 规则问题级别 + :type rule_severity: str + :param rule_tages: 规则标签 + :type rule_tages: str + :param right_example: 正确示例 + :type right_example: str + :param error_example: 错误示例 + :type error_example: str + :param revise_opinion: 修改建议 + :type revise_opinion: str + :param rule_desc: 规则描述 + :type rule_desc: str + """ + + + + self._rule_set = None + self._rule_id = None + self._rule_language = None + self._rule_name = None + self._rule_severity = None + self._rule_tages = None + self._right_example = None + self._error_example = None + self._revise_opinion = None + self._rule_desc = None + self.discriminator = None + + if rule_set is not None: + self.rule_set = rule_set + if rule_id is not None: + self.rule_id = rule_id + if rule_language is not None: + self.rule_language = rule_language + if rule_name is not None: + self.rule_name = rule_name + if rule_severity is not None: + self.rule_severity = rule_severity + if rule_tages is not None: + self.rule_tages = rule_tages + if right_example is not None: + self.right_example = right_example + if error_example is not None: + self.error_example = error_example + if revise_opinion is not None: + self.revise_opinion = revise_opinion + if rule_desc is not None: + self.rule_desc = rule_desc + + @property + def rule_set(self): + """Gets the rule_set of this RuleListItem. + + 规则集规范分类 + + :return: The rule_set of this RuleListItem. + :rtype: str + """ + return self._rule_set + + @rule_set.setter + def rule_set(self, rule_set): + """Sets the rule_set of this RuleListItem. + + 规则集规范分类 + + :param rule_set: The rule_set of this RuleListItem. + :type rule_set: str + """ + self._rule_set = rule_set + + @property + def rule_id(self): + """Gets the rule_id of this RuleListItem. + + 规则id + + :return: The rule_id of this RuleListItem. + :rtype: str + """ + return self._rule_id + + @rule_id.setter + def rule_id(self, rule_id): + """Sets the rule_id of this RuleListItem. + + 规则id + + :param rule_id: The rule_id of this RuleListItem. + :type rule_id: str + """ + self._rule_id = rule_id + + @property + def rule_language(self): + """Gets the rule_language of this RuleListItem. + + 规则所属语言 + + :return: The rule_language of this RuleListItem. + :rtype: str + """ + return self._rule_language + + @rule_language.setter + def rule_language(self, rule_language): + """Sets the rule_language of this RuleListItem. + + 规则所属语言 + + :param rule_language: The rule_language of this RuleListItem. + :type rule_language: str + """ + self._rule_language = rule_language + + @property + def rule_name(self): + """Gets the rule_name of this RuleListItem. + + 规则名称 + + :return: The rule_name of this RuleListItem. + :rtype: str + """ + return self._rule_name + + @rule_name.setter + def rule_name(self, rule_name): + """Sets the rule_name of this RuleListItem. + + 规则名称 + + :param rule_name: The rule_name of this RuleListItem. + :type rule_name: str + """ + self._rule_name = rule_name + + @property + def rule_severity(self): + """Gets the rule_severity of this RuleListItem. + + 规则问题级别 + + :return: The rule_severity of this RuleListItem. + :rtype: str + """ + return self._rule_severity + + @rule_severity.setter + def rule_severity(self, rule_severity): + """Sets the rule_severity of this RuleListItem. + + 规则问题级别 + + :param rule_severity: The rule_severity of this RuleListItem. + :type rule_severity: str + """ + self._rule_severity = rule_severity + + @property + def rule_tages(self): + """Gets the rule_tages of this RuleListItem. + + 规则标签 + + :return: The rule_tages of this RuleListItem. + :rtype: str + """ + return self._rule_tages + + @rule_tages.setter + def rule_tages(self, rule_tages): + """Sets the rule_tages of this RuleListItem. + + 规则标签 + + :param rule_tages: The rule_tages of this RuleListItem. + :type rule_tages: str + """ + self._rule_tages = rule_tages + + @property + def right_example(self): + """Gets the right_example of this RuleListItem. + + 正确示例 + + :return: The right_example of this RuleListItem. + :rtype: str + """ + return self._right_example + + @right_example.setter + def right_example(self, right_example): + """Sets the right_example of this RuleListItem. + + 正确示例 + + :param right_example: The right_example of this RuleListItem. + :type right_example: str + """ + self._right_example = right_example + + @property + def error_example(self): + """Gets the error_example of this RuleListItem. + + 错误示例 + + :return: The error_example of this RuleListItem. + :rtype: str + """ + return self._error_example + + @error_example.setter + def error_example(self, error_example): + """Sets the error_example of this RuleListItem. + + 错误示例 + + :param error_example: The error_example of this RuleListItem. + :type error_example: str + """ + self._error_example = error_example + + @property + def revise_opinion(self): + """Gets the revise_opinion of this RuleListItem. + + 修改建议 + + :return: The revise_opinion of this RuleListItem. + :rtype: str + """ + return self._revise_opinion + + @revise_opinion.setter + def revise_opinion(self, revise_opinion): + """Sets the revise_opinion of this RuleListItem. + + 修改建议 + + :param revise_opinion: The revise_opinion of this RuleListItem. + :type revise_opinion: str + """ + self._revise_opinion = revise_opinion + + @property + def rule_desc(self): + """Gets the rule_desc of this RuleListItem. + + 规则描述 + + :return: The rule_desc of this RuleListItem. + :rtype: str + """ + return self._rule_desc + + @rule_desc.setter + def rule_desc(self, rule_desc): + """Sets the rule_desc of this RuleListItem. + + 规则描述 + + :param rule_desc: The rule_desc of this RuleListItem. + :type rule_desc: str + """ + self._rule_desc = rule_desc + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RuleListItem): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/rule_set_v2.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/rule_set_v2.py new file mode 100644 index 0000000000..ffcdb65059 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/rule_set_v2.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class RuleSetV2: + + """ + 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 = { + 'ruleset_id': 'str', + 'language': 'str' + } + + attribute_map = { + 'ruleset_id': 'ruleset_id', + 'language': 'language' + } + + def __init__(self, ruleset_id=None, language=None): + """RuleSetV2 + + The model defined in huaweicloud sdk + + :param ruleset_id: 规则集id,需要从web界面获取 + :type ruleset_id: str + :param language: 检查语言,支持cpp,java,js,python,php,css,html,go,typescript + :type language: str + """ + + + + self._ruleset_id = None + self._language = None + self.discriminator = None + + if ruleset_id is not None: + self.ruleset_id = ruleset_id + self.language = language + + @property + def ruleset_id(self): + """Gets the ruleset_id of this RuleSetV2. + + 规则集id,需要从web界面获取 + + :return: The ruleset_id of this RuleSetV2. + :rtype: str + """ + return self._ruleset_id + + @ruleset_id.setter + def ruleset_id(self, ruleset_id): + """Sets the ruleset_id of this RuleSetV2. + + 规则集id,需要从web界面获取 + + :param ruleset_id: The ruleset_id of this RuleSetV2. + :type ruleset_id: str + """ + self._ruleset_id = ruleset_id + + @property + def language(self): + """Gets the language of this RuleSetV2. + + 检查语言,支持cpp,java,js,python,php,css,html,go,typescript + + :return: The language of this RuleSetV2. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this RuleSetV2. + + 检查语言,支持cpp,java,js,python,php,css,html,go,typescript + + :param language: The language of this RuleSetV2. + :type language: str + """ + self._language = language + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RuleSetV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/ruleset.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/ruleset.py new file mode 100644 index 0000000000..cd37e620a6 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/ruleset.py @@ -0,0 +1,313 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class Ruleset: + + """ + 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 = { + 'project_id': 'str', + 'template_name': 'str', + 'language': 'str', + 'is_default': 'str', + 'rule_ids': 'str', + 'uncheck_ids': 'str', + 'template_id': 'str', + 'custom_attributes': 'list[CustomAttributes]' + } + + attribute_map = { + 'project_id': 'project_id', + 'template_name': 'template_name', + 'language': 'language', + 'is_default': 'is_default', + 'rule_ids': 'rule_ids', + 'uncheck_ids': 'uncheck_ids', + 'template_id': 'template_id', + 'custom_attributes': 'custom_attributes' + } + + def __init__(self, project_id=None, template_name=None, language=None, is_default=None, rule_ids=None, uncheck_ids=None, template_id=None, custom_attributes=None): + """Ruleset + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param template_name: 新规则集名称 + :type template_name: str + :param language: 规则集语言 + :type language: str + :param is_default: 如果有基于的规则集则是1,没有基于的规则集则是0 + :type is_default: str + :param rule_ids: 新启用规则ids + :type rule_ids: str + :param uncheck_ids: 新关闭规则id + :type uncheck_ids: str + :param template_id: 规则集ID + :type template_id: str + :param custom_attributes: 自定义规则参数项,支持修改规则阈值 + :type custom_attributes: list[:class:`huaweicloudsdkcodecheck.v2.CustomAttributes`] + """ + + + + self._project_id = None + self._template_name = None + self._language = None + self._is_default = None + self._rule_ids = None + self._uncheck_ids = None + self._template_id = None + self._custom_attributes = None + self.discriminator = None + + self.project_id = project_id + self.template_name = template_name + self.language = language + self.is_default = is_default + self.rule_ids = rule_ids + if uncheck_ids is not None: + self.uncheck_ids = uncheck_ids + if template_id is not None: + self.template_id = template_id + if custom_attributes is not None: + self.custom_attributes = custom_attributes + + @property + def project_id(self): + """Gets the project_id of this Ruleset. + + 项目ID + + :return: The project_id of this Ruleset. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this Ruleset. + + 项目ID + + :param project_id: The project_id of this Ruleset. + :type project_id: str + """ + self._project_id = project_id + + @property + def template_name(self): + """Gets the template_name of this Ruleset. + + 新规则集名称 + + :return: The template_name of this Ruleset. + :rtype: str + """ + return self._template_name + + @template_name.setter + def template_name(self, template_name): + """Sets the template_name of this Ruleset. + + 新规则集名称 + + :param template_name: The template_name of this Ruleset. + :type template_name: str + """ + self._template_name = template_name + + @property + def language(self): + """Gets the language of this Ruleset. + + 规则集语言 + + :return: The language of this Ruleset. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this Ruleset. + + 规则集语言 + + :param language: The language of this Ruleset. + :type language: str + """ + self._language = language + + @property + def is_default(self): + """Gets the is_default of this Ruleset. + + 如果有基于的规则集则是1,没有基于的规则集则是0 + + :return: The is_default of this Ruleset. + :rtype: str + """ + return self._is_default + + @is_default.setter + def is_default(self, is_default): + """Sets the is_default of this Ruleset. + + 如果有基于的规则集则是1,没有基于的规则集则是0 + + :param is_default: The is_default of this Ruleset. + :type is_default: str + """ + self._is_default = is_default + + @property + def rule_ids(self): + """Gets the rule_ids of this Ruleset. + + 新启用规则ids + + :return: The rule_ids of this Ruleset. + :rtype: str + """ + return self._rule_ids + + @rule_ids.setter + def rule_ids(self, rule_ids): + """Sets the rule_ids of this Ruleset. + + 新启用规则ids + + :param rule_ids: The rule_ids of this Ruleset. + :type rule_ids: str + """ + self._rule_ids = rule_ids + + @property + def uncheck_ids(self): + """Gets the uncheck_ids of this Ruleset. + + 新关闭规则id + + :return: The uncheck_ids of this Ruleset. + :rtype: str + """ + return self._uncheck_ids + + @uncheck_ids.setter + def uncheck_ids(self, uncheck_ids): + """Sets the uncheck_ids of this Ruleset. + + 新关闭规则id + + :param uncheck_ids: The uncheck_ids of this Ruleset. + :type uncheck_ids: str + """ + self._uncheck_ids = uncheck_ids + + @property + def template_id(self): + """Gets the template_id of this Ruleset. + + 规则集ID + + :return: The template_id of this Ruleset. + :rtype: str + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this Ruleset. + + 规则集ID + + :param template_id: The template_id of this Ruleset. + :type template_id: str + """ + self._template_id = template_id + + @property + def custom_attributes(self): + """Gets the custom_attributes of this Ruleset. + + 自定义规则参数项,支持修改规则阈值 + + :return: The custom_attributes of this Ruleset. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.CustomAttributes`] + """ + return self._custom_attributes + + @custom_attributes.setter + def custom_attributes(self, custom_attributes): + """Sets the custom_attributes of this Ruleset. + + 自定义规则参数项,支持修改规则阈值 + + :param custom_attributes: The custom_attributes of this Ruleset. + :type custom_attributes: list[:class:`huaweicloudsdkcodecheck.v2.CustomAttributes`] + """ + self._custom_attributes = custom_attributes + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Ruleset): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/ruleset_item.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/ruleset_item.py new file mode 100644 index 0000000000..36d7420205 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/ruleset_item.py @@ -0,0 +1,405 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class RulesetItem: + + """ + 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 = { + 'template_id': 'str', + 'language': 'str', + 'template_name': 'str', + 'creator_id': 'str', + 'creator_name': 'str', + 'template_create_time': 'str', + 'is_used': 'str', + 'rule_ids': 'str', + 'is_default': 'str', + 'is_devcloud_project_default': 'str', + 'is_default_template': 'str' + } + + attribute_map = { + 'template_id': 'template_id', + 'language': 'language', + 'template_name': 'template_name', + 'creator_id': 'creator_id', + 'creator_name': 'creator_name', + 'template_create_time': 'template_create_time', + 'is_used': 'is_used', + 'rule_ids': 'rule_ids', + 'is_default': 'is_default', + 'is_devcloud_project_default': 'is_devcloud_project_default', + 'is_default_template': 'is_default_template' + } + + def __init__(self, template_id=None, language=None, template_name=None, creator_id=None, creator_name=None, template_create_time=None, is_used=None, rule_ids=None, is_default=None, is_devcloud_project_default=None, is_default_template=None): + """RulesetItem + + The model defined in huaweicloud sdk + + :param template_id: 规则集id + :type template_id: str + :param language: 规则集语言 + :type language: str + :param template_name: 规则集名称 + :type template_name: str + :param creator_id: 创建人ID + :type creator_id: str + :param creator_name: 创建人名称 + :type creator_name: str + :param template_create_time: 创建人时间 + :type template_create_time: str + :param is_used: 使用状态1使用中,0空闲中 + :type is_used: str + :param rule_ids: 规则集包含的规则id + :type rule_ids: str + :param is_default: 是否该语言默认规则集,0不是,1是 + :type is_default: str + :param is_devcloud_project_default: 是否是项目下语言默认规则集,0不是,1是 + :type is_devcloud_project_default: str + :param is_default_template: 是否是系统规则集,0不是,1是 + :type is_default_template: str + """ + + + + self._template_id = None + self._language = None + self._template_name = None + self._creator_id = None + self._creator_name = None + self._template_create_time = None + self._is_used = None + self._rule_ids = None + self._is_default = None + self._is_devcloud_project_default = None + self._is_default_template = None + self.discriminator = None + + if template_id is not None: + self.template_id = template_id + if language is not None: + self.language = language + if template_name is not None: + self.template_name = template_name + if creator_id is not None: + self.creator_id = creator_id + if creator_name is not None: + self.creator_name = creator_name + if template_create_time is not None: + self.template_create_time = template_create_time + if is_used is not None: + self.is_used = is_used + if rule_ids is not None: + self.rule_ids = rule_ids + if is_default is not None: + self.is_default = is_default + if is_devcloud_project_default is not None: + self.is_devcloud_project_default = is_devcloud_project_default + if is_default_template is not None: + self.is_default_template = is_default_template + + @property + def template_id(self): + """Gets the template_id of this RulesetItem. + + 规则集id + + :return: The template_id of this RulesetItem. + :rtype: str + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this RulesetItem. + + 规则集id + + :param template_id: The template_id of this RulesetItem. + :type template_id: str + """ + self._template_id = template_id + + @property + def language(self): + """Gets the language of this RulesetItem. + + 规则集语言 + + :return: The language of this RulesetItem. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this RulesetItem. + + 规则集语言 + + :param language: The language of this RulesetItem. + :type language: str + """ + self._language = language + + @property + def template_name(self): + """Gets the template_name of this RulesetItem. + + 规则集名称 + + :return: The template_name of this RulesetItem. + :rtype: str + """ + return self._template_name + + @template_name.setter + def template_name(self, template_name): + """Sets the template_name of this RulesetItem. + + 规则集名称 + + :param template_name: The template_name of this RulesetItem. + :type template_name: str + """ + self._template_name = template_name + + @property + def creator_id(self): + """Gets the creator_id of this RulesetItem. + + 创建人ID + + :return: The creator_id of this RulesetItem. + :rtype: str + """ + return self._creator_id + + @creator_id.setter + def creator_id(self, creator_id): + """Sets the creator_id of this RulesetItem. + + 创建人ID + + :param creator_id: The creator_id of this RulesetItem. + :type creator_id: str + """ + self._creator_id = creator_id + + @property + def creator_name(self): + """Gets the creator_name of this RulesetItem. + + 创建人名称 + + :return: The creator_name of this RulesetItem. + :rtype: str + """ + return self._creator_name + + @creator_name.setter + def creator_name(self, creator_name): + """Sets the creator_name of this RulesetItem. + + 创建人名称 + + :param creator_name: The creator_name of this RulesetItem. + :type creator_name: str + """ + self._creator_name = creator_name + + @property + def template_create_time(self): + """Gets the template_create_time of this RulesetItem. + + 创建人时间 + + :return: The template_create_time of this RulesetItem. + :rtype: str + """ + return self._template_create_time + + @template_create_time.setter + def template_create_time(self, template_create_time): + """Sets the template_create_time of this RulesetItem. + + 创建人时间 + + :param template_create_time: The template_create_time of this RulesetItem. + :type template_create_time: str + """ + self._template_create_time = template_create_time + + @property + def is_used(self): + """Gets the is_used of this RulesetItem. + + 使用状态1使用中,0空闲中 + + :return: The is_used of this RulesetItem. + :rtype: str + """ + return self._is_used + + @is_used.setter + def is_used(self, is_used): + """Sets the is_used of this RulesetItem. + + 使用状态1使用中,0空闲中 + + :param is_used: The is_used of this RulesetItem. + :type is_used: str + """ + self._is_used = is_used + + @property + def rule_ids(self): + """Gets the rule_ids of this RulesetItem. + + 规则集包含的规则id + + :return: The rule_ids of this RulesetItem. + :rtype: str + """ + return self._rule_ids + + @rule_ids.setter + def rule_ids(self, rule_ids): + """Sets the rule_ids of this RulesetItem. + + 规则集包含的规则id + + :param rule_ids: The rule_ids of this RulesetItem. + :type rule_ids: str + """ + self._rule_ids = rule_ids + + @property + def is_default(self): + """Gets the is_default of this RulesetItem. + + 是否该语言默认规则集,0不是,1是 + + :return: The is_default of this RulesetItem. + :rtype: str + """ + return self._is_default + + @is_default.setter + def is_default(self, is_default): + """Sets the is_default of this RulesetItem. + + 是否该语言默认规则集,0不是,1是 + + :param is_default: The is_default of this RulesetItem. + :type is_default: str + """ + self._is_default = is_default + + @property + def is_devcloud_project_default(self): + """Gets the is_devcloud_project_default of this RulesetItem. + + 是否是项目下语言默认规则集,0不是,1是 + + :return: The is_devcloud_project_default of this RulesetItem. + :rtype: str + """ + return self._is_devcloud_project_default + + @is_devcloud_project_default.setter + def is_devcloud_project_default(self, is_devcloud_project_default): + """Sets the is_devcloud_project_default of this RulesetItem. + + 是否是项目下语言默认规则集,0不是,1是 + + :param is_devcloud_project_default: The is_devcloud_project_default of this RulesetItem. + :type is_devcloud_project_default: str + """ + self._is_devcloud_project_default = is_devcloud_project_default + + @property + def is_default_template(self): + """Gets the is_default_template of this RulesetItem. + + 是否是系统规则集,0不是,1是 + + :return: The is_default_template of this RulesetItem. + :rtype: str + """ + return self._is_default_template + + @is_default_template.setter + def is_default_template(self, is_default_template): + """Sets the is_default_template of this RulesetItem. + + 是否是系统规则集,0不是,1是 + + :param is_default_template: The is_default_template of this RulesetItem. + :type is_default_template: str + """ + self._is_default_template = is_default_template + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RulesetItem): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/run_request_v2.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/run_request_v2.py new file mode 100644 index 0000000000..5ca04eff0e --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/run_request_v2.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class RunRequestV2: + + """ + 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 = { + 'username': 'str', + 'access_token': 'str', + 'git_url': 'str', + 'git_branch': 'str' + } + + attribute_map = { + 'username': 'username', + 'access_token': 'access_token', + 'git_url': 'git_url', + 'git_branch': 'git_branch' + } + + def __init__(self, username=None, access_token=None, git_url=None, git_branch=None): + """RunRequestV2 + + The model defined in huaweicloud sdk + + :param username: 该任务对应临时仓库有权限的用户名 + :type username: str + :param access_token: 该任务对应临时仓库有权限的用户token + :type access_token: str + :param git_url: 该任务对应的临时仓库地址 + :type git_url: str + :param git_branch: 该任务对应的临时仓库分支 + :type git_branch: str + """ + + + + self._username = None + self._access_token = None + self._git_url = None + self._git_branch = None + self.discriminator = None + + if username is not None: + self.username = username + if access_token is not None: + self.access_token = access_token + if git_url is not None: + self.git_url = git_url + if git_branch is not None: + self.git_branch = git_branch + + @property + def username(self): + """Gets the username of this RunRequestV2. + + 该任务对应临时仓库有权限的用户名 + + :return: The username of this RunRequestV2. + :rtype: str + """ + return self._username + + @username.setter + def username(self, username): + """Sets the username of this RunRequestV2. + + 该任务对应临时仓库有权限的用户名 + + :param username: The username of this RunRequestV2. + :type username: str + """ + self._username = username + + @property + def access_token(self): + """Gets the access_token of this RunRequestV2. + + 该任务对应临时仓库有权限的用户token + + :return: The access_token of this RunRequestV2. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """Sets the access_token of this RunRequestV2. + + 该任务对应临时仓库有权限的用户token + + :param access_token: The access_token of this RunRequestV2. + :type access_token: str + """ + self._access_token = access_token + + @property + def git_url(self): + """Gets the git_url of this RunRequestV2. + + 该任务对应的临时仓库地址 + + :return: The git_url of this RunRequestV2. + :rtype: str + """ + return self._git_url + + @git_url.setter + def git_url(self, git_url): + """Sets the git_url of this RunRequestV2. + + 该任务对应的临时仓库地址 + + :param git_url: The git_url of this RunRequestV2. + :type git_url: str + """ + self._git_url = git_url + + @property + def git_branch(self): + """Gets the git_branch of this RunRequestV2. + + 该任务对应的临时仓库分支 + + :return: The git_branch of this RunRequestV2. + :rtype: str + """ + return self._git_branch + + @git_branch.setter + def git_branch(self, git_branch): + """Sets the git_branch of this RunRequestV2. + + 该任务对应的临时仓库分支 + + :param git_branch: The git_branch of this RunRequestV2. + :type git_branch: str + """ + self._git_branch = git_branch + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RunRequestV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/run_task_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/run_task_request.py new file mode 100644 index 0000000000..1063aa9473 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/run_task_request.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class RunTaskRequest: + + """ + 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 = { + 'task_id': 'str', + 'body': 'RunRequestV2' + } + + attribute_map = { + 'task_id': 'task_id', + 'body': 'body' + } + + def __init__(self, task_id=None, body=None): + """RunTaskRequest + + The model defined in huaweicloud sdk + + :param task_id: 任务ID + :type task_id: str + :param body: Body of the RunTaskRequest + :type body: :class:`huaweicloudsdkcodecheck.v2.RunRequestV2` + """ + + + + self._task_id = None + self._body = None + self.discriminator = None + + self.task_id = task_id + if body is not None: + self.body = body + + @property + def task_id(self): + """Gets the task_id of this RunTaskRequest. + + 任务ID + + :return: The task_id of this RunTaskRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this RunTaskRequest. + + 任务ID + + :param task_id: The task_id of this RunTaskRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def body(self): + """Gets the body of this RunTaskRequest. + + :return: The body of this RunTaskRequest. + :rtype: :class:`huaweicloudsdkcodecheck.v2.RunRequestV2` + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this RunTaskRequest. + + :param body: The body of this RunTaskRequest. + :type body: :class:`huaweicloudsdkcodecheck.v2.RunRequestV2` + """ + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RunTaskRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/run_task_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/run_task_response.py new file mode 100644 index 0000000000..ccab29a770 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/run_task_response.py @@ -0,0 +1,116 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class RunTaskResponse(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 = { + 'exec_id': 'str' + } + + attribute_map = { + 'exec_id': 'exec_id' + } + + def __init__(self, exec_id=None): + """RunTaskResponse + + The model defined in huaweicloud sdk + + :param exec_id: 执行id + :type exec_id: str + """ + + super(RunTaskResponse, self).__init__() + + self._exec_id = None + self.discriminator = None + + if exec_id is not None: + self.exec_id = exec_id + + @property + def exec_id(self): + """Gets the exec_id of this RunTaskResponse. + + 执行id + + :return: The exec_id of this RunTaskResponse. + :rtype: str + """ + return self._exec_id + + @exec_id.setter + def exec_id(self, exec_id): + """Sets the exec_id of this RunTaskResponse. + + 执行id + + :param exec_id: The exec_id of this RunTaskResponse. + :type exec_id: str + """ + self._exec_id = exec_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RunTaskResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/set_defaul_template_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/set_defaul_template_request.py new file mode 100644 index 0000000000..58dde11674 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/set_defaul_template_request.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class SetDefaulTemplateRequest: + + """ + 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 = { + 'project_id': 'str', + 'ruleset_id': 'str', + 'language': 'str' + } + + attribute_map = { + 'project_id': 'project_id', + 'ruleset_id': 'ruleset_id', + 'language': 'language' + } + + def __init__(self, project_id=None, ruleset_id=None, language=None): + """SetDefaulTemplateRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param ruleset_id: 规则集ID + :type ruleset_id: str + :param language: 规则集语言 + :type language: str + """ + + + + self._project_id = None + self._ruleset_id = None + self._language = None + self.discriminator = None + + self.project_id = project_id + self.ruleset_id = ruleset_id + self.language = language + + @property + def project_id(self): + """Gets the project_id of this SetDefaulTemplateRequest. + + 项目ID + + :return: The project_id of this SetDefaulTemplateRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this SetDefaulTemplateRequest. + + 项目ID + + :param project_id: The project_id of this SetDefaulTemplateRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def ruleset_id(self): + """Gets the ruleset_id of this SetDefaulTemplateRequest. + + 规则集ID + + :return: The ruleset_id of this SetDefaulTemplateRequest. + :rtype: str + """ + return self._ruleset_id + + @ruleset_id.setter + def ruleset_id(self, ruleset_id): + """Sets the ruleset_id of this SetDefaulTemplateRequest. + + 规则集ID + + :param ruleset_id: The ruleset_id of this SetDefaulTemplateRequest. + :type ruleset_id: str + """ + self._ruleset_id = ruleset_id + + @property + def language(self): + """Gets the language of this SetDefaulTemplateRequest. + + 规则集语言 + + :return: The language of this SetDefaulTemplateRequest. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this SetDefaulTemplateRequest. + + 规则集语言 + + :param language: The language of this SetDefaulTemplateRequest. + :type language: str + """ + self._language = language + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SetDefaulTemplateRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/set_defaul_template_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/set_defaul_template_response.py new file mode 100644 index 0000000000..a2f92e0ea8 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/set_defaul_template_response.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class SetDefaulTemplateResponse(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): + """SetDefaulTemplateResponse + + The model defined in huaweicloud sdk + + """ + + super(SetDefaulTemplateResponse, self).__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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SetDefaulTemplateResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_progress_detail_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_progress_detail_request.py new file mode 100644 index 0000000000..b6ab47aaac --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_progress_detail_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowProgressDetailRequest: + + """ + 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 = { + 'task_id': 'str' + } + + attribute_map = { + 'task_id': 'task_id' + } + + def __init__(self, task_id=None): + """ShowProgressDetailRequest + + The model defined in huaweicloud sdk + + :param task_id: 任务ID + :type task_id: str + """ + + + + self._task_id = None + self.discriminator = None + + self.task_id = task_id + + @property + def task_id(self): + """Gets the task_id of this ShowProgressDetailRequest. + + 任务ID + + :return: The task_id of this ShowProgressDetailRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowProgressDetailRequest. + + 任务ID + + :param task_id: The task_id of this ShowProgressDetailRequest. + :type task_id: str + """ + self._task_id = task_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowProgressDetailRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_progress_detail_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_progress_detail_response.py new file mode 100644 index 0000000000..a27e133579 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_progress_detail_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowProgressDetailResponse(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 = { + 'task_status': 'int', + 'progress': 'ProgressDetailV2' + } + + attribute_map = { + 'task_status': 'task_status', + 'progress': 'progress' + } + + def __init__(self, task_status=None, progress=None): + """ShowProgressDetailResponse + + The model defined in huaweicloud sdk + + :param task_status: 任务状态,0表示检查中,1表示检查失败,2表示检查成功,3表示任务中止 + :type task_status: int + :param progress: + :type progress: :class:`huaweicloudsdkcodecheck.v2.ProgressDetailV2` + """ + + super(ShowProgressDetailResponse, self).__init__() + + self._task_status = None + self._progress = None + self.discriminator = None + + if task_status is not None: + self.task_status = task_status + if progress is not None: + self.progress = progress + + @property + def task_status(self): + """Gets the task_status of this ShowProgressDetailResponse. + + 任务状态,0表示检查中,1表示检查失败,2表示检查成功,3表示任务中止 + + :return: The task_status of this ShowProgressDetailResponse. + :rtype: int + """ + return self._task_status + + @task_status.setter + def task_status(self, task_status): + """Sets the task_status of this ShowProgressDetailResponse. + + 任务状态,0表示检查中,1表示检查失败,2表示检查成功,3表示任务中止 + + :param task_status: The task_status of this ShowProgressDetailResponse. + :type task_status: int + """ + self._task_status = task_status + + @property + def progress(self): + """Gets the progress of this ShowProgressDetailResponse. + + :return: The progress of this ShowProgressDetailResponse. + :rtype: :class:`huaweicloudsdkcodecheck.v2.ProgressDetailV2` + """ + return self._progress + + @progress.setter + def progress(self, progress): + """Sets the progress of this ShowProgressDetailResponse. + + :param progress: The progress of this ShowProgressDetailResponse. + :type progress: :class:`huaweicloudsdkcodecheck.v2.ProgressDetailV2` + """ + self._progress = progress + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowProgressDetailResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_cmetrics_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_cmetrics_request.py new file mode 100644 index 0000000000..83177bcd99 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_cmetrics_request.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskCmetricsRequest: + + """ + 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 = { + 'project_id': 'str', + 'task_id': 'str' + } + + attribute_map = { + 'project_id': 'project_id', + 'task_id': 'task_id' + } + + def __init__(self, project_id=None, task_id=None): + """ShowTaskCmetricsRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param task_id: 任务ID + :type task_id: str + """ + + + + self._project_id = None + self._task_id = None + self.discriminator = None + + self.project_id = project_id + self.task_id = task_id + + @property + def project_id(self): + """Gets the project_id of this ShowTaskCmetricsRequest. + + 项目ID + + :return: The project_id of this ShowTaskCmetricsRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ShowTaskCmetricsRequest. + + 项目ID + + :param project_id: The project_id of this ShowTaskCmetricsRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this ShowTaskCmetricsRequest. + + 任务ID + + :return: The task_id of this ShowTaskCmetricsRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowTaskCmetricsRequest. + + 任务ID + + :param task_id: The task_id of this ShowTaskCmetricsRequest. + :type task_id: str + """ + self._task_id = task_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskCmetricsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_cmetrics_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_cmetrics_response.py new file mode 100644 index 0000000000..fe9a2087e7 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_cmetrics_response.py @@ -0,0 +1,373 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskCmetricsResponse(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 = { + 'task_id': 'str', + 'task_name': 'str', + 'creator_id': 'str', + 'git_url': 'str', + 'git_branch': 'str', + 'last_check_time': 'str', + 'last_exec_time': 'str', + 'check_type': 'str', + 'created_at': 'str', + 'metric_info': 'MetricInfo' + } + + attribute_map = { + 'task_id': 'task_id', + 'task_name': 'task_name', + 'creator_id': 'creator_id', + 'git_url': 'git_url', + 'git_branch': 'git_branch', + 'last_check_time': 'last_check_time', + 'last_exec_time': 'last_exec_time', + 'check_type': 'check_type', + 'created_at': 'created_at', + 'metric_info': 'metric_info' + } + + def __init__(self, task_id=None, task_name=None, creator_id=None, git_url=None, git_branch=None, last_check_time=None, last_exec_time=None, check_type=None, created_at=None, metric_info=None): + """ShowTaskCmetricsResponse + + The model defined in huaweicloud sdk + + :param task_id: 任务id + :type task_id: str + :param task_name: 任务名字 + :type task_name: str + :param creator_id: 创建者id + :type creator_id: str + :param git_url: 代码仓地址 + :type git_url: str + :param git_branch: 代码仓分支 + :type git_branch: str + :param last_check_time: 上一次检查时间 + :type last_check_time: str + :param last_exec_time: 上次执行时间 + :type last_exec_time: str + :param check_type: 检查类型 + :type check_type: str + :param created_at: 创建时间 + :type created_at: str + :param metric_info: + :type metric_info: :class:`huaweicloudsdkcodecheck.v2.MetricInfo` + """ + + super(ShowTaskCmetricsResponse, self).__init__() + + self._task_id = None + self._task_name = None + self._creator_id = None + self._git_url = None + self._git_branch = None + self._last_check_time = None + self._last_exec_time = None + self._check_type = None + self._created_at = None + self._metric_info = None + self.discriminator = None + + if task_id is not None: + self.task_id = task_id + if task_name is not None: + self.task_name = task_name + if creator_id is not None: + self.creator_id = creator_id + if git_url is not None: + self.git_url = git_url + if git_branch is not None: + self.git_branch = git_branch + if last_check_time is not None: + self.last_check_time = last_check_time + if last_exec_time is not None: + self.last_exec_time = last_exec_time + if check_type is not None: + self.check_type = check_type + if created_at is not None: + self.created_at = created_at + if metric_info is not None: + self.metric_info = metric_info + + @property + def task_id(self): + """Gets the task_id of this ShowTaskCmetricsResponse. + + 任务id + + :return: The task_id of this ShowTaskCmetricsResponse. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowTaskCmetricsResponse. + + 任务id + + :param task_id: The task_id of this ShowTaskCmetricsResponse. + :type task_id: str + """ + self._task_id = task_id + + @property + def task_name(self): + """Gets the task_name of this ShowTaskCmetricsResponse. + + 任务名字 + + :return: The task_name of this ShowTaskCmetricsResponse. + :rtype: str + """ + return self._task_name + + @task_name.setter + def task_name(self, task_name): + """Sets the task_name of this ShowTaskCmetricsResponse. + + 任务名字 + + :param task_name: The task_name of this ShowTaskCmetricsResponse. + :type task_name: str + """ + self._task_name = task_name + + @property + def creator_id(self): + """Gets the creator_id of this ShowTaskCmetricsResponse. + + 创建者id + + :return: The creator_id of this ShowTaskCmetricsResponse. + :rtype: str + """ + return self._creator_id + + @creator_id.setter + def creator_id(self, creator_id): + """Sets the creator_id of this ShowTaskCmetricsResponse. + + 创建者id + + :param creator_id: The creator_id of this ShowTaskCmetricsResponse. + :type creator_id: str + """ + self._creator_id = creator_id + + @property + def git_url(self): + """Gets the git_url of this ShowTaskCmetricsResponse. + + 代码仓地址 + + :return: The git_url of this ShowTaskCmetricsResponse. + :rtype: str + """ + return self._git_url + + @git_url.setter + def git_url(self, git_url): + """Sets the git_url of this ShowTaskCmetricsResponse. + + 代码仓地址 + + :param git_url: The git_url of this ShowTaskCmetricsResponse. + :type git_url: str + """ + self._git_url = git_url + + @property + def git_branch(self): + """Gets the git_branch of this ShowTaskCmetricsResponse. + + 代码仓分支 + + :return: The git_branch of this ShowTaskCmetricsResponse. + :rtype: str + """ + return self._git_branch + + @git_branch.setter + def git_branch(self, git_branch): + """Sets the git_branch of this ShowTaskCmetricsResponse. + + 代码仓分支 + + :param git_branch: The git_branch of this ShowTaskCmetricsResponse. + :type git_branch: str + """ + self._git_branch = git_branch + + @property + def last_check_time(self): + """Gets the last_check_time of this ShowTaskCmetricsResponse. + + 上一次检查时间 + + :return: The last_check_time of this ShowTaskCmetricsResponse. + :rtype: str + """ + return self._last_check_time + + @last_check_time.setter + def last_check_time(self, last_check_time): + """Sets the last_check_time of this ShowTaskCmetricsResponse. + + 上一次检查时间 + + :param last_check_time: The last_check_time of this ShowTaskCmetricsResponse. + :type last_check_time: str + """ + self._last_check_time = last_check_time + + @property + def last_exec_time(self): + """Gets the last_exec_time of this ShowTaskCmetricsResponse. + + 上次执行时间 + + :return: The last_exec_time of this ShowTaskCmetricsResponse. + :rtype: str + """ + return self._last_exec_time + + @last_exec_time.setter + def last_exec_time(self, last_exec_time): + """Sets the last_exec_time of this ShowTaskCmetricsResponse. + + 上次执行时间 + + :param last_exec_time: The last_exec_time of this ShowTaskCmetricsResponse. + :type last_exec_time: str + """ + self._last_exec_time = last_exec_time + + @property + def check_type(self): + """Gets the check_type of this ShowTaskCmetricsResponse. + + 检查类型 + + :return: The check_type of this ShowTaskCmetricsResponse. + :rtype: str + """ + return self._check_type + + @check_type.setter + def check_type(self, check_type): + """Sets the check_type of this ShowTaskCmetricsResponse. + + 检查类型 + + :param check_type: The check_type of this ShowTaskCmetricsResponse. + :type check_type: str + """ + self._check_type = check_type + + @property + def created_at(self): + """Gets the created_at of this ShowTaskCmetricsResponse. + + 创建时间 + + :return: The created_at of this ShowTaskCmetricsResponse. + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ShowTaskCmetricsResponse. + + 创建时间 + + :param created_at: The created_at of this ShowTaskCmetricsResponse. + :type created_at: str + """ + self._created_at = created_at + + @property + def metric_info(self): + """Gets the metric_info of this ShowTaskCmetricsResponse. + + :return: The metric_info of this ShowTaskCmetricsResponse. + :rtype: :class:`huaweicloudsdkcodecheck.v2.MetricInfo` + """ + return self._metric_info + + @metric_info.setter + def metric_info(self, metric_info): + """Sets the metric_info of this ShowTaskCmetricsResponse. + + :param metric_info: The metric_info of this ShowTaskCmetricsResponse. + :type metric_info: :class:`huaweicloudsdkcodecheck.v2.MetricInfo` + """ + self._metric_info = metric_info + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskCmetricsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_defects_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_defects_request.py new file mode 100644 index 0000000000..fa05b15481 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_defects_request.py @@ -0,0 +1,230 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskDefectsRequest: + + """ + 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 = { + 'task_id': 'str', + 'offset': 'int', + 'limit': 'int', + 'status_ids': 'str', + 'severity': 'str' + } + + attribute_map = { + 'task_id': 'task_id', + 'offset': 'offset', + 'limit': 'limit', + 'status_ids': 'status_ids', + 'severity': 'severity' + } + + def __init__(self, task_id=None, offset=None, limit=None, status_ids=None, severity=None): + """ShowTaskDefectsRequest + + The model defined in huaweicloud sdk + + :param task_id: 任务ID + :type task_id: str + :param offset: 分页索引,偏移量 + :type offset: int + :param limit: 每页显示的数量,每页最多显示100条 + :type limit: int + :param status_ids: 问题状态筛选 + :type status_ids: str + :param severity: 严重级别,0致命,1严重,2一般,3提示 + :type severity: str + """ + + + + self._task_id = None + self._offset = None + self._limit = None + self._status_ids = None + self._severity = None + self.discriminator = None + + self.task_id = task_id + if offset is not None: + self.offset = offset + if limit is not None: + self.limit = limit + if status_ids is not None: + self.status_ids = status_ids + if severity is not None: + self.severity = severity + + @property + def task_id(self): + """Gets the task_id of this ShowTaskDefectsRequest. + + 任务ID + + :return: The task_id of this ShowTaskDefectsRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowTaskDefectsRequest. + + 任务ID + + :param task_id: The task_id of this ShowTaskDefectsRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def offset(self): + """Gets the offset of this ShowTaskDefectsRequest. + + 分页索引,偏移量 + + :return: The offset of this ShowTaskDefectsRequest. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this ShowTaskDefectsRequest. + + 分页索引,偏移量 + + :param offset: The offset of this ShowTaskDefectsRequest. + :type offset: int + """ + self._offset = offset + + @property + def limit(self): + """Gets the limit of this ShowTaskDefectsRequest. + + 每页显示的数量,每页最多显示100条 + + :return: The limit of this ShowTaskDefectsRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this ShowTaskDefectsRequest. + + 每页显示的数量,每页最多显示100条 + + :param limit: The limit of this ShowTaskDefectsRequest. + :type limit: int + """ + self._limit = limit + + @property + def status_ids(self): + """Gets the status_ids of this ShowTaskDefectsRequest. + + 问题状态筛选 + + :return: The status_ids of this ShowTaskDefectsRequest. + :rtype: str + """ + return self._status_ids + + @status_ids.setter + def status_ids(self, status_ids): + """Sets the status_ids of this ShowTaskDefectsRequest. + + 问题状态筛选 + + :param status_ids: The status_ids of this ShowTaskDefectsRequest. + :type status_ids: str + """ + self._status_ids = status_ids + + @property + def severity(self): + """Gets the severity of this ShowTaskDefectsRequest. + + 严重级别,0致命,1严重,2一般,3提示 + + :return: The severity of this ShowTaskDefectsRequest. + :rtype: str + """ + return self._severity + + @severity.setter + def severity(self, severity): + """Sets the severity of this ShowTaskDefectsRequest. + + 严重级别,0致命,1严重,2一般,3提示 + + :param severity: The severity of this ShowTaskDefectsRequest. + :type severity: str + """ + self._severity = severity + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskDefectsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_defects_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_defects_response.py new file mode 100644 index 0000000000..51d6be1f13 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_defects_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskDefectsResponse(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 = { + 'defects': 'list[DefectInfoV2]', + 'total': 'int' + } + + attribute_map = { + 'defects': 'defects', + 'total': 'total' + } + + def __init__(self, defects=None, total=None): + """ShowTaskDefectsResponse + + The model defined in huaweicloud sdk + + :param defects: 缺陷详情信息 + :type defects: list[:class:`huaweicloudsdkcodecheck.v2.DefectInfoV2`] + :param total: 总数 + :type total: int + """ + + super(ShowTaskDefectsResponse, self).__init__() + + self._defects = None + self._total = None + self.discriminator = None + + if defects is not None: + self.defects = defects + if total is not None: + self.total = total + + @property + def defects(self): + """Gets the defects of this ShowTaskDefectsResponse. + + 缺陷详情信息 + + :return: The defects of this ShowTaskDefectsResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.DefectInfoV2`] + """ + return self._defects + + @defects.setter + def defects(self, defects): + """Sets the defects of this ShowTaskDefectsResponse. + + 缺陷详情信息 + + :param defects: The defects of this ShowTaskDefectsResponse. + :type defects: list[:class:`huaweicloudsdkcodecheck.v2.DefectInfoV2`] + """ + self._defects = defects + + @property + def total(self): + """Gets the total of this ShowTaskDefectsResponse. + + 总数 + + :return: The total of this ShowTaskDefectsResponse. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ShowTaskDefectsResponse. + + 总数 + + :param total: The total of this ShowTaskDefectsResponse. + :type total: int + """ + self._total = total + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskDefectsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_defects_statistic_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_defects_statistic_request.py new file mode 100644 index 0000000000..32cbb8f6c3 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_defects_statistic_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskDefectsStatisticRequest: + + """ + 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 = { + 'task_id': 'str' + } + + attribute_map = { + 'task_id': 'task_id' + } + + def __init__(self, task_id=None): + """ShowTaskDefectsStatisticRequest + + The model defined in huaweicloud sdk + + :param task_id: 任务ID + :type task_id: str + """ + + + + self._task_id = None + self.discriminator = None + + self.task_id = task_id + + @property + def task_id(self): + """Gets the task_id of this ShowTaskDefectsStatisticRequest. + + 任务ID + + :return: The task_id of this ShowTaskDefectsStatisticRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowTaskDefectsStatisticRequest. + + 任务ID + + :param task_id: The task_id of this ShowTaskDefectsStatisticRequest. + :type task_id: str + """ + self._task_id = task_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskDefectsStatisticRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_defects_statistic_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_defects_statistic_response.py new file mode 100644 index 0000000000..c1d58a4c59 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_defects_statistic_response.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskDefectsStatisticResponse(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 = { + 'severity': 'StatisticSeverityV2', + 'status': 'StatisticStatusV2' + } + + attribute_map = { + 'severity': 'severity', + 'status': 'status' + } + + def __init__(self, severity=None, status=None): + """ShowTaskDefectsStatisticResponse + + The model defined in huaweicloud sdk + + :param severity: + :type severity: :class:`huaweicloudsdkcodecheck.v2.StatisticSeverityV2` + :param status: + :type status: :class:`huaweicloudsdkcodecheck.v2.StatisticStatusV2` + """ + + super(ShowTaskDefectsStatisticResponse, self).__init__() + + self._severity = None + self._status = None + self.discriminator = None + + if severity is not None: + self.severity = severity + if status is not None: + self.status = status + + @property + def severity(self): + """Gets the severity of this ShowTaskDefectsStatisticResponse. + + :return: The severity of this ShowTaskDefectsStatisticResponse. + :rtype: :class:`huaweicloudsdkcodecheck.v2.StatisticSeverityV2` + """ + return self._severity + + @severity.setter + def severity(self, severity): + """Sets the severity of this ShowTaskDefectsStatisticResponse. + + :param severity: The severity of this ShowTaskDefectsStatisticResponse. + :type severity: :class:`huaweicloudsdkcodecheck.v2.StatisticSeverityV2` + """ + self._severity = severity + + @property + def status(self): + """Gets the status of this ShowTaskDefectsStatisticResponse. + + :return: The status of this ShowTaskDefectsStatisticResponse. + :rtype: :class:`huaweicloudsdkcodecheck.v2.StatisticStatusV2` + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ShowTaskDefectsStatisticResponse. + + :param status: The status of this ShowTaskDefectsStatisticResponse. + :type status: :class:`huaweicloudsdkcodecheck.v2.StatisticStatusV2` + """ + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskDefectsStatisticResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_detail_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_detail_request.py new file mode 100644 index 0000000000..6e8c2048ac --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_detail_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskDetailRequest: + + """ + 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 = { + 'task_id': 'str' + } + + attribute_map = { + 'task_id': 'task_id' + } + + def __init__(self, task_id=None): + """ShowTaskDetailRequest + + The model defined in huaweicloud sdk + + :param task_id: 任务ID + :type task_id: str + """ + + + + self._task_id = None + self.discriminator = None + + self.task_id = task_id + + @property + def task_id(self): + """Gets the task_id of this ShowTaskDetailRequest. + + 任务ID + + :return: The task_id of this ShowTaskDetailRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowTaskDetailRequest. + + 任务ID + + :param task_id: The task_id of this ShowTaskDetailRequest. + :type task_id: str + """ + self._task_id = task_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskDetailRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_detail_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_detail_response.py new file mode 100644 index 0000000000..1793169f23 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_detail_response.py @@ -0,0 +1,928 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskDetailResponse(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 = { + 'task_id': 'str', + 'task_name': 'str', + 'creator_id': 'str', + 'git_url': 'str', + 'git_branch': 'str', + 'last_check_time': 'str', + 'code_line_total': 'int', + 'code_line': 'int', + 'code_quality': 'float', + 'issue_count': 'int', + 'risk_coefficient': 'float', + 'duplication_ratio': 'str', + 'complexity_count': 'int', + 'duplicated_lines': 'int', + 'comment_lines': 'int', + 'comment_ratio': 'str', + 'duplicated_blocks': 'int', + 'last_exec_time': 'str', + 'check_type': 'str', + 'created_at': 'str', + 'cyclomatic_complexity_per_method': 'str', + 'cyclomatic_complexity_per_file': 'str', + 'critical_count': 'str', + 'major_count': 'str', + 'minor_count': 'str', + 'suggestion_count': 'str', + 'is_access': 'str', + 'trigger_type': 'str', + 'file_duplication_ratio': 'str' + } + + attribute_map = { + 'task_id': 'task_id', + 'task_name': 'task_name', + 'creator_id': 'creator_id', + 'git_url': 'git_url', + 'git_branch': 'git_branch', + 'last_check_time': 'last_check_time', + 'code_line_total': 'code_line_total', + 'code_line': 'code_line', + 'code_quality': 'code_quality', + 'issue_count': 'issue_count', + 'risk_coefficient': 'risk_coefficient', + 'duplication_ratio': 'duplication_ratio', + 'complexity_count': 'complexity_count', + 'duplicated_lines': 'duplicated_lines', + 'comment_lines': 'comment_lines', + 'comment_ratio': 'comment_ratio', + 'duplicated_blocks': 'duplicated_blocks', + 'last_exec_time': 'last_exec_time', + 'check_type': 'check_type', + 'created_at': 'created_at', + 'cyclomatic_complexity_per_method': 'cyclomatic_complexity_per_method', + 'cyclomatic_complexity_per_file': 'cyclomatic_complexity_per_file', + 'critical_count': 'critical_count', + 'major_count': 'major_count', + 'minor_count': 'minor_count', + 'suggestion_count': 'suggestion_count', + 'is_access': 'is_access', + 'trigger_type': 'trigger_type', + 'file_duplication_ratio': 'file_duplication_ratio' + } + + def __init__(self, task_id=None, task_name=None, creator_id=None, git_url=None, git_branch=None, last_check_time=None, code_line_total=None, code_line=None, code_quality=None, issue_count=None, risk_coefficient=None, duplication_ratio=None, complexity_count=None, duplicated_lines=None, comment_lines=None, comment_ratio=None, duplicated_blocks=None, last_exec_time=None, check_type=None, created_at=None, cyclomatic_complexity_per_method=None, cyclomatic_complexity_per_file=None, critical_count=None, major_count=None, minor_count=None, suggestion_count=None, is_access=None, trigger_type=None, file_duplication_ratio=None): + """ShowTaskDetailResponse + + The model defined in huaweicloud sdk + + :param task_id: 任务id + :type task_id: str + :param task_name: 任务名字 + :type task_name: str + :param creator_id: 创建者id + :type creator_id: str + :param git_url: 代码仓地址 + :type git_url: str + :param git_branch: 代码仓分支,如果是MR模式,为源分支 + :type git_branch: str + :param last_check_time: 上一次检查时间 + :type last_check_time: str + :param code_line_total: 代码总行数 + :type code_line_total: int + :param code_line: 代码有效行数 + :type code_line: int + :param code_quality: 代码质量 + :type code_quality: float + :param issue_count: 问题数 + :type issue_count: int + :param risk_coefficient: 危险系数 + :type risk_coefficient: float + :param duplication_ratio: 重复比例 + :type duplication_ratio: str + :param complexity_count: 复杂度 + :type complexity_count: int + :param duplicated_lines: 重复行数 + :type duplicated_lines: int + :param comment_lines: 注释行数 + :type comment_lines: int + :param comment_ratio: 注释比例 + :type comment_ratio: str + :param duplicated_blocks: 重复块 + :type duplicated_blocks: int + :param last_exec_time: 上次执行时间 + :type last_exec_time: str + :param check_type: 检查类型 + :type check_type: str + :param created_at: 创建时间 + :type created_at: str + :param cyclomatic_complexity_per_method: 代码平均复杂度 + :type cyclomatic_complexity_per_method: str + :param cyclomatic_complexity_per_file: 代码平均复杂度(文件) + :type cyclomatic_complexity_per_file: str + :param critical_count: 致命问题数 + :type critical_count: str + :param major_count: 严重问题数 + :type major_count: str + :param minor_count: 一般问题数 + :type minor_count: str + :param suggestion_count: 提示问题数 + :type suggestion_count: str + :param is_access: 门禁质量是否通过 + :type is_access: str + :param trigger_type: 任务触发方式 + :type trigger_type: str + :param file_duplication_ratio: 文件重复率 + :type file_duplication_ratio: str + """ + + super(ShowTaskDetailResponse, self).__init__() + + self._task_id = None + self._task_name = None + self._creator_id = None + self._git_url = None + self._git_branch = None + self._last_check_time = None + self._code_line_total = None + self._code_line = None + self._code_quality = None + self._issue_count = None + self._risk_coefficient = None + self._duplication_ratio = None + self._complexity_count = None + self._duplicated_lines = None + self._comment_lines = None + self._comment_ratio = None + self._duplicated_blocks = None + self._last_exec_time = None + self._check_type = None + self._created_at = None + self._cyclomatic_complexity_per_method = None + self._cyclomatic_complexity_per_file = None + self._critical_count = None + self._major_count = None + self._minor_count = None + self._suggestion_count = None + self._is_access = None + self._trigger_type = None + self._file_duplication_ratio = None + self.discriminator = None + + if task_id is not None: + self.task_id = task_id + if task_name is not None: + self.task_name = task_name + if creator_id is not None: + self.creator_id = creator_id + if git_url is not None: + self.git_url = git_url + if git_branch is not None: + self.git_branch = git_branch + if last_check_time is not None: + self.last_check_time = last_check_time + if code_line_total is not None: + self.code_line_total = code_line_total + if code_line is not None: + self.code_line = code_line + if code_quality is not None: + self.code_quality = code_quality + if issue_count is not None: + self.issue_count = issue_count + if risk_coefficient is not None: + self.risk_coefficient = risk_coefficient + if duplication_ratio is not None: + self.duplication_ratio = duplication_ratio + if complexity_count is not None: + self.complexity_count = complexity_count + if duplicated_lines is not None: + self.duplicated_lines = duplicated_lines + if comment_lines is not None: + self.comment_lines = comment_lines + if comment_ratio is not None: + self.comment_ratio = comment_ratio + if duplicated_blocks is not None: + self.duplicated_blocks = duplicated_blocks + if last_exec_time is not None: + self.last_exec_time = last_exec_time + if check_type is not None: + self.check_type = check_type + if created_at is not None: + self.created_at = created_at + if cyclomatic_complexity_per_method is not None: + self.cyclomatic_complexity_per_method = cyclomatic_complexity_per_method + if cyclomatic_complexity_per_file is not None: + self.cyclomatic_complexity_per_file = cyclomatic_complexity_per_file + if critical_count is not None: + self.critical_count = critical_count + if major_count is not None: + self.major_count = major_count + if minor_count is not None: + self.minor_count = minor_count + if suggestion_count is not None: + self.suggestion_count = suggestion_count + if is_access is not None: + self.is_access = is_access + if trigger_type is not None: + self.trigger_type = trigger_type + if file_duplication_ratio is not None: + self.file_duplication_ratio = file_duplication_ratio + + @property + def task_id(self): + """Gets the task_id of this ShowTaskDetailResponse. + + 任务id + + :return: The task_id of this ShowTaskDetailResponse. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowTaskDetailResponse. + + 任务id + + :param task_id: The task_id of this ShowTaskDetailResponse. + :type task_id: str + """ + self._task_id = task_id + + @property + def task_name(self): + """Gets the task_name of this ShowTaskDetailResponse. + + 任务名字 + + :return: The task_name of this ShowTaskDetailResponse. + :rtype: str + """ + return self._task_name + + @task_name.setter + def task_name(self, task_name): + """Sets the task_name of this ShowTaskDetailResponse. + + 任务名字 + + :param task_name: The task_name of this ShowTaskDetailResponse. + :type task_name: str + """ + self._task_name = task_name + + @property + def creator_id(self): + """Gets the creator_id of this ShowTaskDetailResponse. + + 创建者id + + :return: The creator_id of this ShowTaskDetailResponse. + :rtype: str + """ + return self._creator_id + + @creator_id.setter + def creator_id(self, creator_id): + """Sets the creator_id of this ShowTaskDetailResponse. + + 创建者id + + :param creator_id: The creator_id of this ShowTaskDetailResponse. + :type creator_id: str + """ + self._creator_id = creator_id + + @property + def git_url(self): + """Gets the git_url of this ShowTaskDetailResponse. + + 代码仓地址 + + :return: The git_url of this ShowTaskDetailResponse. + :rtype: str + """ + return self._git_url + + @git_url.setter + def git_url(self, git_url): + """Sets the git_url of this ShowTaskDetailResponse. + + 代码仓地址 + + :param git_url: The git_url of this ShowTaskDetailResponse. + :type git_url: str + """ + self._git_url = git_url + + @property + def git_branch(self): + """Gets the git_branch of this ShowTaskDetailResponse. + + 代码仓分支,如果是MR模式,为源分支 + + :return: The git_branch of this ShowTaskDetailResponse. + :rtype: str + """ + return self._git_branch + + @git_branch.setter + def git_branch(self, git_branch): + """Sets the git_branch of this ShowTaskDetailResponse. + + 代码仓分支,如果是MR模式,为源分支 + + :param git_branch: The git_branch of this ShowTaskDetailResponse. + :type git_branch: str + """ + self._git_branch = git_branch + + @property + def last_check_time(self): + """Gets the last_check_time of this ShowTaskDetailResponse. + + 上一次检查时间 + + :return: The last_check_time of this ShowTaskDetailResponse. + :rtype: str + """ + return self._last_check_time + + @last_check_time.setter + def last_check_time(self, last_check_time): + """Sets the last_check_time of this ShowTaskDetailResponse. + + 上一次检查时间 + + :param last_check_time: The last_check_time of this ShowTaskDetailResponse. + :type last_check_time: str + """ + self._last_check_time = last_check_time + + @property + def code_line_total(self): + """Gets the code_line_total of this ShowTaskDetailResponse. + + 代码总行数 + + :return: The code_line_total of this ShowTaskDetailResponse. + :rtype: int + """ + return self._code_line_total + + @code_line_total.setter + def code_line_total(self, code_line_total): + """Sets the code_line_total of this ShowTaskDetailResponse. + + 代码总行数 + + :param code_line_total: The code_line_total of this ShowTaskDetailResponse. + :type code_line_total: int + """ + self._code_line_total = code_line_total + + @property + def code_line(self): + """Gets the code_line of this ShowTaskDetailResponse. + + 代码有效行数 + + :return: The code_line of this ShowTaskDetailResponse. + :rtype: int + """ + return self._code_line + + @code_line.setter + def code_line(self, code_line): + """Sets the code_line of this ShowTaskDetailResponse. + + 代码有效行数 + + :param code_line: The code_line of this ShowTaskDetailResponse. + :type code_line: int + """ + self._code_line = code_line + + @property + def code_quality(self): + """Gets the code_quality of this ShowTaskDetailResponse. + + 代码质量 + + :return: The code_quality of this ShowTaskDetailResponse. + :rtype: float + """ + return self._code_quality + + @code_quality.setter + def code_quality(self, code_quality): + """Sets the code_quality of this ShowTaskDetailResponse. + + 代码质量 + + :param code_quality: The code_quality of this ShowTaskDetailResponse. + :type code_quality: float + """ + self._code_quality = code_quality + + @property + def issue_count(self): + """Gets the issue_count of this ShowTaskDetailResponse. + + 问题数 + + :return: The issue_count of this ShowTaskDetailResponse. + :rtype: int + """ + return self._issue_count + + @issue_count.setter + def issue_count(self, issue_count): + """Sets the issue_count of this ShowTaskDetailResponse. + + 问题数 + + :param issue_count: The issue_count of this ShowTaskDetailResponse. + :type issue_count: int + """ + self._issue_count = issue_count + + @property + def risk_coefficient(self): + """Gets the risk_coefficient of this ShowTaskDetailResponse. + + 危险系数 + + :return: The risk_coefficient of this ShowTaskDetailResponse. + :rtype: float + """ + return self._risk_coefficient + + @risk_coefficient.setter + def risk_coefficient(self, risk_coefficient): + """Sets the risk_coefficient of this ShowTaskDetailResponse. + + 危险系数 + + :param risk_coefficient: The risk_coefficient of this ShowTaskDetailResponse. + :type risk_coefficient: float + """ + self._risk_coefficient = risk_coefficient + + @property + def duplication_ratio(self): + """Gets the duplication_ratio of this ShowTaskDetailResponse. + + 重复比例 + + :return: The duplication_ratio of this ShowTaskDetailResponse. + :rtype: str + """ + return self._duplication_ratio + + @duplication_ratio.setter + def duplication_ratio(self, duplication_ratio): + """Sets the duplication_ratio of this ShowTaskDetailResponse. + + 重复比例 + + :param duplication_ratio: The duplication_ratio of this ShowTaskDetailResponse. + :type duplication_ratio: str + """ + self._duplication_ratio = duplication_ratio + + @property + def complexity_count(self): + """Gets the complexity_count of this ShowTaskDetailResponse. + + 复杂度 + + :return: The complexity_count of this ShowTaskDetailResponse. + :rtype: int + """ + return self._complexity_count + + @complexity_count.setter + def complexity_count(self, complexity_count): + """Sets the complexity_count of this ShowTaskDetailResponse. + + 复杂度 + + :param complexity_count: The complexity_count of this ShowTaskDetailResponse. + :type complexity_count: int + """ + self._complexity_count = complexity_count + + @property + def duplicated_lines(self): + """Gets the duplicated_lines of this ShowTaskDetailResponse. + + 重复行数 + + :return: The duplicated_lines of this ShowTaskDetailResponse. + :rtype: int + """ + return self._duplicated_lines + + @duplicated_lines.setter + def duplicated_lines(self, duplicated_lines): + """Sets the duplicated_lines of this ShowTaskDetailResponse. + + 重复行数 + + :param duplicated_lines: The duplicated_lines of this ShowTaskDetailResponse. + :type duplicated_lines: int + """ + self._duplicated_lines = duplicated_lines + + @property + def comment_lines(self): + """Gets the comment_lines of this ShowTaskDetailResponse. + + 注释行数 + + :return: The comment_lines of this ShowTaskDetailResponse. + :rtype: int + """ + return self._comment_lines + + @comment_lines.setter + def comment_lines(self, comment_lines): + """Sets the comment_lines of this ShowTaskDetailResponse. + + 注释行数 + + :param comment_lines: The comment_lines of this ShowTaskDetailResponse. + :type comment_lines: int + """ + self._comment_lines = comment_lines + + @property + def comment_ratio(self): + """Gets the comment_ratio of this ShowTaskDetailResponse. + + 注释比例 + + :return: The comment_ratio of this ShowTaskDetailResponse. + :rtype: str + """ + return self._comment_ratio + + @comment_ratio.setter + def comment_ratio(self, comment_ratio): + """Sets the comment_ratio of this ShowTaskDetailResponse. + + 注释比例 + + :param comment_ratio: The comment_ratio of this ShowTaskDetailResponse. + :type comment_ratio: str + """ + self._comment_ratio = comment_ratio + + @property + def duplicated_blocks(self): + """Gets the duplicated_blocks of this ShowTaskDetailResponse. + + 重复块 + + :return: The duplicated_blocks of this ShowTaskDetailResponse. + :rtype: int + """ + return self._duplicated_blocks + + @duplicated_blocks.setter + def duplicated_blocks(self, duplicated_blocks): + """Sets the duplicated_blocks of this ShowTaskDetailResponse. + + 重复块 + + :param duplicated_blocks: The duplicated_blocks of this ShowTaskDetailResponse. + :type duplicated_blocks: int + """ + self._duplicated_blocks = duplicated_blocks + + @property + def last_exec_time(self): + """Gets the last_exec_time of this ShowTaskDetailResponse. + + 上次执行时间 + + :return: The last_exec_time of this ShowTaskDetailResponse. + :rtype: str + """ + return self._last_exec_time + + @last_exec_time.setter + def last_exec_time(self, last_exec_time): + """Sets the last_exec_time of this ShowTaskDetailResponse. + + 上次执行时间 + + :param last_exec_time: The last_exec_time of this ShowTaskDetailResponse. + :type last_exec_time: str + """ + self._last_exec_time = last_exec_time + + @property + def check_type(self): + """Gets the check_type of this ShowTaskDetailResponse. + + 检查类型 + + :return: The check_type of this ShowTaskDetailResponse. + :rtype: str + """ + return self._check_type + + @check_type.setter + def check_type(self, check_type): + """Sets the check_type of this ShowTaskDetailResponse. + + 检查类型 + + :param check_type: The check_type of this ShowTaskDetailResponse. + :type check_type: str + """ + self._check_type = check_type + + @property + def created_at(self): + """Gets the created_at of this ShowTaskDetailResponse. + + 创建时间 + + :return: The created_at of this ShowTaskDetailResponse. + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this ShowTaskDetailResponse. + + 创建时间 + + :param created_at: The created_at of this ShowTaskDetailResponse. + :type created_at: str + """ + self._created_at = created_at + + @property + def cyclomatic_complexity_per_method(self): + """Gets the cyclomatic_complexity_per_method of this ShowTaskDetailResponse. + + 代码平均复杂度 + + :return: The cyclomatic_complexity_per_method of this ShowTaskDetailResponse. + :rtype: str + """ + return self._cyclomatic_complexity_per_method + + @cyclomatic_complexity_per_method.setter + def cyclomatic_complexity_per_method(self, cyclomatic_complexity_per_method): + """Sets the cyclomatic_complexity_per_method of this ShowTaskDetailResponse. + + 代码平均复杂度 + + :param cyclomatic_complexity_per_method: The cyclomatic_complexity_per_method of this ShowTaskDetailResponse. + :type cyclomatic_complexity_per_method: str + """ + self._cyclomatic_complexity_per_method = cyclomatic_complexity_per_method + + @property + def cyclomatic_complexity_per_file(self): + """Gets the cyclomatic_complexity_per_file of this ShowTaskDetailResponse. + + 代码平均复杂度(文件) + + :return: The cyclomatic_complexity_per_file of this ShowTaskDetailResponse. + :rtype: str + """ + return self._cyclomatic_complexity_per_file + + @cyclomatic_complexity_per_file.setter + def cyclomatic_complexity_per_file(self, cyclomatic_complexity_per_file): + """Sets the cyclomatic_complexity_per_file of this ShowTaskDetailResponse. + + 代码平均复杂度(文件) + + :param cyclomatic_complexity_per_file: The cyclomatic_complexity_per_file of this ShowTaskDetailResponse. + :type cyclomatic_complexity_per_file: str + """ + self._cyclomatic_complexity_per_file = cyclomatic_complexity_per_file + + @property + def critical_count(self): + """Gets the critical_count of this ShowTaskDetailResponse. + + 致命问题数 + + :return: The critical_count of this ShowTaskDetailResponse. + :rtype: str + """ + return self._critical_count + + @critical_count.setter + def critical_count(self, critical_count): + """Sets the critical_count of this ShowTaskDetailResponse. + + 致命问题数 + + :param critical_count: The critical_count of this ShowTaskDetailResponse. + :type critical_count: str + """ + self._critical_count = critical_count + + @property + def major_count(self): + """Gets the major_count of this ShowTaskDetailResponse. + + 严重问题数 + + :return: The major_count of this ShowTaskDetailResponse. + :rtype: str + """ + return self._major_count + + @major_count.setter + def major_count(self, major_count): + """Sets the major_count of this ShowTaskDetailResponse. + + 严重问题数 + + :param major_count: The major_count of this ShowTaskDetailResponse. + :type major_count: str + """ + self._major_count = major_count + + @property + def minor_count(self): + """Gets the minor_count of this ShowTaskDetailResponse. + + 一般问题数 + + :return: The minor_count of this ShowTaskDetailResponse. + :rtype: str + """ + return self._minor_count + + @minor_count.setter + def minor_count(self, minor_count): + """Sets the minor_count of this ShowTaskDetailResponse. + + 一般问题数 + + :param minor_count: The minor_count of this ShowTaskDetailResponse. + :type minor_count: str + """ + self._minor_count = minor_count + + @property + def suggestion_count(self): + """Gets the suggestion_count of this ShowTaskDetailResponse. + + 提示问题数 + + :return: The suggestion_count of this ShowTaskDetailResponse. + :rtype: str + """ + return self._suggestion_count + + @suggestion_count.setter + def suggestion_count(self, suggestion_count): + """Sets the suggestion_count of this ShowTaskDetailResponse. + + 提示问题数 + + :param suggestion_count: The suggestion_count of this ShowTaskDetailResponse. + :type suggestion_count: str + """ + self._suggestion_count = suggestion_count + + @property + def is_access(self): + """Gets the is_access of this ShowTaskDetailResponse. + + 门禁质量是否通过 + + :return: The is_access of this ShowTaskDetailResponse. + :rtype: str + """ + return self._is_access + + @is_access.setter + def is_access(self, is_access): + """Sets the is_access of this ShowTaskDetailResponse. + + 门禁质量是否通过 + + :param is_access: The is_access of this ShowTaskDetailResponse. + :type is_access: str + """ + self._is_access = is_access + + @property + def trigger_type(self): + """Gets the trigger_type of this ShowTaskDetailResponse. + + 任务触发方式 + + :return: The trigger_type of this ShowTaskDetailResponse. + :rtype: str + """ + return self._trigger_type + + @trigger_type.setter + def trigger_type(self, trigger_type): + """Sets the trigger_type of this ShowTaskDetailResponse. + + 任务触发方式 + + :param trigger_type: The trigger_type of this ShowTaskDetailResponse. + :type trigger_type: str + """ + self._trigger_type = trigger_type + + @property + def file_duplication_ratio(self): + """Gets the file_duplication_ratio of this ShowTaskDetailResponse. + + 文件重复率 + + :return: The file_duplication_ratio of this ShowTaskDetailResponse. + :rtype: str + """ + return self._file_duplication_ratio + + @file_duplication_ratio.setter + def file_duplication_ratio(self, file_duplication_ratio): + """Sets the file_duplication_ratio of this ShowTaskDetailResponse. + + 文件重复率 + + :param file_duplication_ratio: The file_duplication_ratio of this ShowTaskDetailResponse. + :type file_duplication_ratio: str + """ + self._file_duplication_ratio = file_duplication_ratio + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskDetailResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_list_by_project_id_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_list_by_project_id_request.py new file mode 100644 index 0000000000..123c10f34e --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_list_by_project_id_request.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskListByProjectIdRequest: + + """ + 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 = { + 'project_id': 'str', + 'offset': 'int', + 'limit': 'int' + } + + attribute_map = { + 'project_id': 'project_id', + 'offset': 'offset', + 'limit': 'limit' + } + + def __init__(self, project_id=None, offset=None, limit=None): + """ShowTaskListByProjectIdRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param offset: 分页索引,偏移量 + :type offset: int + :param limit: 每页显示的数量,每页最多显示100条 + :type limit: int + """ + + + + self._project_id = None + self._offset = None + self._limit = None + self.discriminator = None + + self.project_id = project_id + if offset is not None: + self.offset = offset + if limit is not None: + self.limit = limit + + @property + def project_id(self): + """Gets the project_id of this ShowTaskListByProjectIdRequest. + + 项目ID + + :return: The project_id of this ShowTaskListByProjectIdRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ShowTaskListByProjectIdRequest. + + 项目ID + + :param project_id: The project_id of this ShowTaskListByProjectIdRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def offset(self): + """Gets the offset of this ShowTaskListByProjectIdRequest. + + 分页索引,偏移量 + + :return: The offset of this ShowTaskListByProjectIdRequest. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this ShowTaskListByProjectIdRequest. + + 分页索引,偏移量 + + :param offset: The offset of this ShowTaskListByProjectIdRequest. + :type offset: int + """ + self._offset = offset + + @property + def limit(self): + """Gets the limit of this ShowTaskListByProjectIdRequest. + + 每页显示的数量,每页最多显示100条 + + :return: The limit of this ShowTaskListByProjectIdRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this ShowTaskListByProjectIdRequest. + + 每页显示的数量,每页最多显示100条 + + :param limit: The limit of this ShowTaskListByProjectIdRequest. + :type limit: int + """ + self._limit = limit + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskListByProjectIdRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_list_by_project_id_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_list_by_project_id_response.py new file mode 100644 index 0000000000..8cc8374f4e --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_list_by_project_id_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskListByProjectIdResponse(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 = { + 'tasks': 'list[SimpleTaskInfoV2]', + 'total': 'int' + } + + attribute_map = { + 'tasks': 'tasks', + 'total': 'total' + } + + def __init__(self, tasks=None, total=None): + """ShowTaskListByProjectIdResponse + + The model defined in huaweicloud sdk + + :param tasks: 任务信息 + :type tasks: list[:class:`huaweicloudsdkcodecheck.v2.SimpleTaskInfoV2`] + :param total: 总数 + :type total: int + """ + + super(ShowTaskListByProjectIdResponse, self).__init__() + + self._tasks = None + self._total = None + self.discriminator = None + + if tasks is not None: + self.tasks = tasks + if total is not None: + self.total = total + + @property + def tasks(self): + """Gets the tasks of this ShowTaskListByProjectIdResponse. + + 任务信息 + + :return: The tasks of this ShowTaskListByProjectIdResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.SimpleTaskInfoV2`] + """ + return self._tasks + + @tasks.setter + def tasks(self, tasks): + """Sets the tasks of this ShowTaskListByProjectIdResponse. + + 任务信息 + + :param tasks: The tasks of this ShowTaskListByProjectIdResponse. + :type tasks: list[:class:`huaweicloudsdkcodecheck.v2.SimpleTaskInfoV2`] + """ + self._tasks = tasks + + @property + def total(self): + """Gets the total of this ShowTaskListByProjectIdResponse. + + 总数 + + :return: The total of this ShowTaskListByProjectIdResponse. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ShowTaskListByProjectIdResponse. + + 总数 + + :param total: The total of this ShowTaskListByProjectIdResponse. + :type total: int + """ + self._total = total + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskListByProjectIdResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_path_tree_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_path_tree_request.py new file mode 100644 index 0000000000..a08676f5ba --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_path_tree_request.py @@ -0,0 +1,229 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskPathTreeRequest: + + """ + 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 = { + 'project_id': 'str', + 'task_id': 'str', + 'current_path': 'str', + 'offset': 'int', + 'limit': 'int' + } + + attribute_map = { + 'project_id': 'project_id', + 'task_id': 'task_id', + 'current_path': 'current_path', + 'offset': 'offset', + 'limit': 'limit' + } + + def __init__(self, project_id=None, task_id=None, current_path=None, offset=None, limit=None): + """ShowTaskPathTreeRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目id + :type project_id: str + :param task_id: 任务id + :type task_id: str + :param current_path: 目录或文件的路径 + :type current_path: str + :param offset: 分页索引,偏移量 + :type offset: int + :param limit: 每页显示的数量,每页最多显示1000条 + :type limit: int + """ + + + + self._project_id = None + self._task_id = None + self._current_path = None + self._offset = None + self._limit = None + self.discriminator = None + + self.project_id = project_id + self.task_id = task_id + if current_path is not None: + self.current_path = current_path + if offset is not None: + self.offset = offset + if limit is not None: + self.limit = limit + + @property + def project_id(self): + """Gets the project_id of this ShowTaskPathTreeRequest. + + 项目id + + :return: The project_id of this ShowTaskPathTreeRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ShowTaskPathTreeRequest. + + 项目id + + :param project_id: The project_id of this ShowTaskPathTreeRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this ShowTaskPathTreeRequest. + + 任务id + + :return: The task_id of this ShowTaskPathTreeRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowTaskPathTreeRequest. + + 任务id + + :param task_id: The task_id of this ShowTaskPathTreeRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def current_path(self): + """Gets the current_path of this ShowTaskPathTreeRequest. + + 目录或文件的路径 + + :return: The current_path of this ShowTaskPathTreeRequest. + :rtype: str + """ + return self._current_path + + @current_path.setter + def current_path(self, current_path): + """Sets the current_path of this ShowTaskPathTreeRequest. + + 目录或文件的路径 + + :param current_path: The current_path of this ShowTaskPathTreeRequest. + :type current_path: str + """ + self._current_path = current_path + + @property + def offset(self): + """Gets the offset of this ShowTaskPathTreeRequest. + + 分页索引,偏移量 + + :return: The offset of this ShowTaskPathTreeRequest. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this ShowTaskPathTreeRequest. + + 分页索引,偏移量 + + :param offset: The offset of this ShowTaskPathTreeRequest. + :type offset: int + """ + self._offset = offset + + @property + def limit(self): + """Gets the limit of this ShowTaskPathTreeRequest. + + 每页显示的数量,每页最多显示1000条 + + :return: The limit of this ShowTaskPathTreeRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this ShowTaskPathTreeRequest. + + 每页显示的数量,每页最多显示1000条 + + :param limit: The limit of this ShowTaskPathTreeRequest. + :type limit: int + """ + self._limit = limit + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskPathTreeRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_path_tree_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_path_tree_response.py new file mode 100644 index 0000000000..be78f03a90 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_path_tree_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskPathTreeResponse(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 = { + 'info': 'list[TreeNode]', + 'total': 'int' + } + + attribute_map = { + 'info': 'info', + 'total': 'total' + } + + def __init__(self, info=None, total=None): + """ShowTaskPathTreeResponse + + The model defined in huaweicloud sdk + + :param info: 任务的目录树信息 + :type info: list[:class:`huaweicloudsdkcodecheck.v2.TreeNode`] + :param total: 数目 + :type total: int + """ + + super(ShowTaskPathTreeResponse, self).__init__() + + self._info = None + self._total = None + self.discriminator = None + + if info is not None: + self.info = info + if total is not None: + self.total = total + + @property + def info(self): + """Gets the info of this ShowTaskPathTreeResponse. + + 任务的目录树信息 + + :return: The info of this ShowTaskPathTreeResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.TreeNode`] + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this ShowTaskPathTreeResponse. + + 任务的目录树信息 + + :param info: The info of this ShowTaskPathTreeResponse. + :type info: list[:class:`huaweicloudsdkcodecheck.v2.TreeNode`] + """ + self._info = info + + @property + def total(self): + """Gets the total of this ShowTaskPathTreeResponse. + + 数目 + + :return: The total of this ShowTaskPathTreeResponse. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ShowTaskPathTreeResponse. + + 数目 + + :param total: The total of this ShowTaskPathTreeResponse. + :type total: int + """ + self._total = total + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskPathTreeResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_settings_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_settings_request.py new file mode 100644 index 0000000000..b3cf09f866 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_settings_request.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskSettingsRequest: + + """ + 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 = { + 'project_id': 'str', + 'task_id': 'str', + 'offset': 'int', + 'limit': 'int' + } + + attribute_map = { + 'project_id': 'project_id', + 'task_id': 'task_id', + 'offset': 'offset', + 'limit': 'limit' + } + + def __init__(self, project_id=None, task_id=None, offset=None, limit=None): + """ShowTaskSettingsRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param task_id: 任务ID + :type task_id: str + :param offset: 分页索引,偏移量,非必填 + :type offset: int + :param limit: 每页显示的数量,非必填 + :type limit: int + """ + + + + self._project_id = None + self._task_id = None + self._offset = None + self._limit = None + self.discriminator = None + + self.project_id = project_id + self.task_id = task_id + if offset is not None: + self.offset = offset + if limit is not None: + self.limit = limit + + @property + def project_id(self): + """Gets the project_id of this ShowTaskSettingsRequest. + + 项目ID + + :return: The project_id of this ShowTaskSettingsRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ShowTaskSettingsRequest. + + 项目ID + + :param project_id: The project_id of this ShowTaskSettingsRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this ShowTaskSettingsRequest. + + 任务ID + + :return: The task_id of this ShowTaskSettingsRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowTaskSettingsRequest. + + 任务ID + + :param task_id: The task_id of this ShowTaskSettingsRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def offset(self): + """Gets the offset of this ShowTaskSettingsRequest. + + 分页索引,偏移量,非必填 + + :return: The offset of this ShowTaskSettingsRequest. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this ShowTaskSettingsRequest. + + 分页索引,偏移量,非必填 + + :param offset: The offset of this ShowTaskSettingsRequest. + :type offset: int + """ + self._offset = offset + + @property + def limit(self): + """Gets the limit of this ShowTaskSettingsRequest. + + 每页显示的数量,非必填 + + :return: The limit of this ShowTaskSettingsRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this ShowTaskSettingsRequest. + + 每页显示的数量,非必填 + + :param limit: The limit of this ShowTaskSettingsRequest. + :type limit: int + """ + self._limit = limit + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskSettingsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_settings_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_settings_response.py new file mode 100644 index 0000000000..27bc724ae4 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_task_settings_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTaskSettingsResponse(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 = { + 'info': 'list[TaskAdvancedSettings]', + 'total': 'int' + } + + attribute_map = { + 'info': 'info', + 'total': 'total' + } + + def __init__(self, info=None, total=None): + """ShowTaskSettingsResponse + + The model defined in huaweicloud sdk + + :param info: 高级选项的相关信息 + :type info: list[:class:`huaweicloudsdkcodecheck.v2.TaskAdvancedSettings`] + :param total: 总数 + :type total: int + """ + + super(ShowTaskSettingsResponse, self).__init__() + + self._info = None + self._total = None + self.discriminator = None + + if info is not None: + self.info = info + if total is not None: + self.total = total + + @property + def info(self): + """Gets the info of this ShowTaskSettingsResponse. + + 高级选项的相关信息 + + :return: The info of this ShowTaskSettingsResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.TaskAdvancedSettings`] + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this ShowTaskSettingsResponse. + + 高级选项的相关信息 + + :param info: The info of this ShowTaskSettingsResponse. + :type info: list[:class:`huaweicloudsdkcodecheck.v2.TaskAdvancedSettings`] + """ + self._info = info + + @property + def total(self): + """Gets the total of this ShowTaskSettingsResponse. + + 总数 + + :return: The total of this ShowTaskSettingsResponse. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ShowTaskSettingsResponse. + + 总数 + + :param total: The total of this ShowTaskSettingsResponse. + :type total: int + """ + self._total = total + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTaskSettingsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_tasklog_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_tasklog_request.py new file mode 100644 index 0000000000..1b0c7b751a --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_tasklog_request.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTasklogRequest: + + """ + 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 = { + 'project_id': 'str', + 'task_id': 'str', + 'execute_id': 'str' + } + + attribute_map = { + 'project_id': 'project_id', + 'task_id': 'task_id', + 'execute_id': 'execute_id' + } + + def __init__(self, project_id=None, task_id=None, execute_id=None): + """ShowTasklogRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param task_id: 任务ID + :type task_id: str + :param execute_id: 任务单次的执行ID + :type execute_id: str + """ + + + + self._project_id = None + self._task_id = None + self._execute_id = None + self.discriminator = None + + self.project_id = project_id + self.task_id = task_id + if execute_id is not None: + self.execute_id = execute_id + + @property + def project_id(self): + """Gets the project_id of this ShowTasklogRequest. + + 项目ID + + :return: The project_id of this ShowTasklogRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ShowTasklogRequest. + + 项目ID + + :param project_id: The project_id of this ShowTasklogRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this ShowTasklogRequest. + + 任务ID + + :return: The task_id of this ShowTasklogRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowTasklogRequest. + + 任务ID + + :param task_id: The task_id of this ShowTasklogRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def execute_id(self): + """Gets the execute_id of this ShowTasklogRequest. + + 任务单次的执行ID + + :return: The execute_id of this ShowTasklogRequest. + :rtype: str + """ + return self._execute_id + + @execute_id.setter + def execute_id(self, execute_id): + """Sets the execute_id of this ShowTasklogRequest. + + 任务单次的执行ID + + :param execute_id: The execute_id of this ShowTasklogRequest. + :type execute_id: str + """ + self._execute_id = execute_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTasklogRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_tasklog_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_tasklog_response.py new file mode 100644 index 0000000000..196bdcd2dd --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_tasklog_response.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTasklogResponse(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 = { + 'param_info': 'ParamInfo', + 'log_info': 'list[LogInfo]' + } + + attribute_map = { + 'param_info': 'param_info', + 'log_info': 'log_info' + } + + def __init__(self, param_info=None, log_info=None): + """ShowTasklogResponse + + The model defined in huaweicloud sdk + + :param param_info: + :type param_info: :class:`huaweicloudsdkcodecheck.v2.ParamInfo` + :param log_info: 日志信息 + :type log_info: list[:class:`huaweicloudsdkcodecheck.v2.LogInfo`] + """ + + super(ShowTasklogResponse, self).__init__() + + self._param_info = None + self._log_info = None + self.discriminator = None + + if param_info is not None: + self.param_info = param_info + if log_info is not None: + self.log_info = log_info + + @property + def param_info(self): + """Gets the param_info of this ShowTasklogResponse. + + :return: The param_info of this ShowTasklogResponse. + :rtype: :class:`huaweicloudsdkcodecheck.v2.ParamInfo` + """ + return self._param_info + + @param_info.setter + def param_info(self, param_info): + """Sets the param_info of this ShowTasklogResponse. + + :param param_info: The param_info of this ShowTasklogResponse. + :type param_info: :class:`huaweicloudsdkcodecheck.v2.ParamInfo` + """ + self._param_info = param_info + + @property + def log_info(self): + """Gets the log_info of this ShowTasklogResponse. + + 日志信息 + + :return: The log_info of this ShowTasklogResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.LogInfo`] + """ + return self._log_info + + @log_info.setter + def log_info(self, log_info): + """Sets the log_info of this ShowTasklogResponse. + + 日志信息 + + :param log_info: The log_info of this ShowTasklogResponse. + :type log_info: list[:class:`huaweicloudsdkcodecheck.v2.LogInfo`] + """ + self._log_info = log_info + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTasklogResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_tasks_rulesets_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_tasks_rulesets_request.py new file mode 100644 index 0000000000..60229e708e --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_tasks_rulesets_request.py @@ -0,0 +1,200 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTasksRulesetsRequest: + + """ + 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 = { + 'project_id': 'str', + 'task_id': 'str', + 'offset': 'int', + 'limit': 'int' + } + + attribute_map = { + 'project_id': 'project_id', + 'task_id': 'task_id', + 'offset': 'offset', + 'limit': 'limit' + } + + def __init__(self, project_id=None, task_id=None, offset=None, limit=None): + """ShowTasksRulesetsRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param task_id: 任务ID + :type task_id: str + :param offset: 分页索引,偏移量 + :type offset: int + :param limit: 每页显示的数量,每页最多显示1000条 + :type limit: int + """ + + + + self._project_id = None + self._task_id = None + self._offset = None + self._limit = None + self.discriminator = None + + self.project_id = project_id + self.task_id = task_id + if offset is not None: + self.offset = offset + if limit is not None: + self.limit = limit + + @property + def project_id(self): + """Gets the project_id of this ShowTasksRulesetsRequest. + + 项目ID + + :return: The project_id of this ShowTasksRulesetsRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this ShowTasksRulesetsRequest. + + 项目ID + + :param project_id: The project_id of this ShowTasksRulesetsRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this ShowTasksRulesetsRequest. + + 任务ID + + :return: The task_id of this ShowTasksRulesetsRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ShowTasksRulesetsRequest. + + 任务ID + + :param task_id: The task_id of this ShowTasksRulesetsRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def offset(self): + """Gets the offset of this ShowTasksRulesetsRequest. + + 分页索引,偏移量 + + :return: The offset of this ShowTasksRulesetsRequest. + :rtype: int + """ + return self._offset + + @offset.setter + def offset(self, offset): + """Sets the offset of this ShowTasksRulesetsRequest. + + 分页索引,偏移量 + + :param offset: The offset of this ShowTasksRulesetsRequest. + :type offset: int + """ + self._offset = offset + + @property + def limit(self): + """Gets the limit of this ShowTasksRulesetsRequest. + + 每页显示的数量,每页最多显示1000条 + + :return: The limit of this ShowTasksRulesetsRequest. + :rtype: int + """ + return self._limit + + @limit.setter + def limit(self, limit): + """Sets the limit of this ShowTasksRulesetsRequest. + + 每页显示的数量,每页最多显示1000条 + + :param limit: The limit of this ShowTasksRulesetsRequest. + :type limit: int + """ + self._limit = limit + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTasksRulesetsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_tasks_rulesets_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_tasks_rulesets_response.py new file mode 100644 index 0000000000..f5aa474920 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/show_tasks_rulesets_response.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowTasksRulesetsResponse(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 = { + 'info': 'list[TaskRulesetInfo]', + 'total': 'int' + } + + attribute_map = { + 'info': 'info', + 'total': 'total' + } + + def __init__(self, info=None, total=None): + """ShowTasksRulesetsResponse + + The model defined in huaweicloud sdk + + :param info: 规则集信息 + :type info: list[:class:`huaweicloudsdkcodecheck.v2.TaskRulesetInfo`] + :param total: 总数 + :type total: int + """ + + super(ShowTasksRulesetsResponse, self).__init__() + + self._info = None + self._total = None + self.discriminator = None + + if info is not None: + self.info = info + if total is not None: + self.total = total + + @property + def info(self): + """Gets the info of this ShowTasksRulesetsResponse. + + 规则集信息 + + :return: The info of this ShowTasksRulesetsResponse. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.TaskRulesetInfo`] + """ + return self._info + + @info.setter + def info(self, info): + """Sets the info of this ShowTasksRulesetsResponse. + + 规则集信息 + + :param info: The info of this ShowTasksRulesetsResponse. + :type info: list[:class:`huaweicloudsdkcodecheck.v2.TaskRulesetInfo`] + """ + self._info = info + + @property + def total(self): + """Gets the total of this ShowTasksRulesetsResponse. + + 总数 + + :return: The total of this ShowTasksRulesetsResponse. + :rtype: int + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ShowTasksRulesetsResponse. + + 总数 + + :param total: The total of this ShowTasksRulesetsResponse. + :type total: int + """ + self._total = total + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowTasksRulesetsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/simple_task_info_v2.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/simple_task_info_v2.py new file mode 100644 index 0000000000..16c047bca2 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/simple_task_info_v2.py @@ -0,0 +1,289 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class SimpleTaskInfoV2: + + """ + 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 = { + 'task_id': 'str', + 'task_name': 'str', + 'creator_id': 'str', + 'git_url': 'str', + 'git_branch': 'str', + 'created_at': 'str', + 'last_check_time': 'str' + } + + attribute_map = { + 'task_id': 'task_id', + 'task_name': 'task_name', + 'creator_id': 'creator_id', + 'git_url': 'git_url', + 'git_branch': 'git_branch', + 'created_at': 'created_at', + 'last_check_time': 'last_check_time' + } + + def __init__(self, task_id=None, task_name=None, creator_id=None, git_url=None, git_branch=None, created_at=None, last_check_time=None): + """SimpleTaskInfoV2 + + The model defined in huaweicloud sdk + + :param task_id: 任务id + :type task_id: str + :param task_name: 任务名字 + :type task_name: str + :param creator_id: 创建者id + :type creator_id: str + :param git_url: 代码仓地址 + :type git_url: str + :param git_branch: 代码仓分支,如果是MR模式,为源分支 + :type git_branch: str + :param created_at: 创建时间 + :type created_at: str + :param last_check_time: 上一次检查时间 + :type last_check_time: str + """ + + + + self._task_id = None + self._task_name = None + self._creator_id = None + self._git_url = None + self._git_branch = None + self._created_at = None + self._last_check_time = None + self.discriminator = None + + if task_id is not None: + self.task_id = task_id + if task_name is not None: + self.task_name = task_name + if creator_id is not None: + self.creator_id = creator_id + if git_url is not None: + self.git_url = git_url + if git_branch is not None: + self.git_branch = git_branch + if created_at is not None: + self.created_at = created_at + if last_check_time is not None: + self.last_check_time = last_check_time + + @property + def task_id(self): + """Gets the task_id of this SimpleTaskInfoV2. + + 任务id + + :return: The task_id of this SimpleTaskInfoV2. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this SimpleTaskInfoV2. + + 任务id + + :param task_id: The task_id of this SimpleTaskInfoV2. + :type task_id: str + """ + self._task_id = task_id + + @property + def task_name(self): + """Gets the task_name of this SimpleTaskInfoV2. + + 任务名字 + + :return: The task_name of this SimpleTaskInfoV2. + :rtype: str + """ + return self._task_name + + @task_name.setter + def task_name(self, task_name): + """Sets the task_name of this SimpleTaskInfoV2. + + 任务名字 + + :param task_name: The task_name of this SimpleTaskInfoV2. + :type task_name: str + """ + self._task_name = task_name + + @property + def creator_id(self): + """Gets the creator_id of this SimpleTaskInfoV2. + + 创建者id + + :return: The creator_id of this SimpleTaskInfoV2. + :rtype: str + """ + return self._creator_id + + @creator_id.setter + def creator_id(self, creator_id): + """Sets the creator_id of this SimpleTaskInfoV2. + + 创建者id + + :param creator_id: The creator_id of this SimpleTaskInfoV2. + :type creator_id: str + """ + self._creator_id = creator_id + + @property + def git_url(self): + """Gets the git_url of this SimpleTaskInfoV2. + + 代码仓地址 + + :return: The git_url of this SimpleTaskInfoV2. + :rtype: str + """ + return self._git_url + + @git_url.setter + def git_url(self, git_url): + """Sets the git_url of this SimpleTaskInfoV2. + + 代码仓地址 + + :param git_url: The git_url of this SimpleTaskInfoV2. + :type git_url: str + """ + self._git_url = git_url + + @property + def git_branch(self): + """Gets the git_branch of this SimpleTaskInfoV2. + + 代码仓分支,如果是MR模式,为源分支 + + :return: The git_branch of this SimpleTaskInfoV2. + :rtype: str + """ + return self._git_branch + + @git_branch.setter + def git_branch(self, git_branch): + """Sets the git_branch of this SimpleTaskInfoV2. + + 代码仓分支,如果是MR模式,为源分支 + + :param git_branch: The git_branch of this SimpleTaskInfoV2. + :type git_branch: str + """ + self._git_branch = git_branch + + @property + def created_at(self): + """Gets the created_at of this SimpleTaskInfoV2. + + 创建时间 + + :return: The created_at of this SimpleTaskInfoV2. + :rtype: str + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this SimpleTaskInfoV2. + + 创建时间 + + :param created_at: The created_at of this SimpleTaskInfoV2. + :type created_at: str + """ + self._created_at = created_at + + @property + def last_check_time(self): + """Gets the last_check_time of this SimpleTaskInfoV2. + + 上一次检查时间 + + :return: The last_check_time of this SimpleTaskInfoV2. + :rtype: str + """ + return self._last_check_time + + @last_check_time.setter + def last_check_time(self, last_check_time): + """Sets the last_check_time of this SimpleTaskInfoV2. + + 上一次检查时间 + + :param last_check_time: The last_check_time of this SimpleTaskInfoV2. + :type last_check_time: str + """ + self._last_check_time = last_check_time + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SimpleTaskInfoV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/statistic_severity_v2.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/statistic_severity_v2.py new file mode 100644 index 0000000000..729d9a1147 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/statistic_severity_v2.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class StatisticSeverityV2: + + """ + 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 = { + 'critical': 'int', + 'major': 'int', + 'minor': 'int', + 'suggestion': 'int' + } + + attribute_map = { + 'critical': 'critical', + 'major': 'major', + 'minor': 'minor', + 'suggestion': 'suggestion' + } + + def __init__(self, critical=None, major=None, minor=None, suggestion=None): + """StatisticSeverityV2 + + The model defined in huaweicloud sdk + + :param critical: 致命问题数 + :type critical: int + :param major: 严重问题数 + :type major: int + :param minor: 一般问题数 + :type minor: int + :param suggestion: 提示问题数 + :type suggestion: int + """ + + + + self._critical = None + self._major = None + self._minor = None + self._suggestion = None + self.discriminator = None + + if critical is not None: + self.critical = critical + if major is not None: + self.major = major + if minor is not None: + self.minor = minor + if suggestion is not None: + self.suggestion = suggestion + + @property + def critical(self): + """Gets the critical of this StatisticSeverityV2. + + 致命问题数 + + :return: The critical of this StatisticSeverityV2. + :rtype: int + """ + return self._critical + + @critical.setter + def critical(self, critical): + """Sets the critical of this StatisticSeverityV2. + + 致命问题数 + + :param critical: The critical of this StatisticSeverityV2. + :type critical: int + """ + self._critical = critical + + @property + def major(self): + """Gets the major of this StatisticSeverityV2. + + 严重问题数 + + :return: The major of this StatisticSeverityV2. + :rtype: int + """ + return self._major + + @major.setter + def major(self, major): + """Sets the major of this StatisticSeverityV2. + + 严重问题数 + + :param major: The major of this StatisticSeverityV2. + :type major: int + """ + self._major = major + + @property + def minor(self): + """Gets the minor of this StatisticSeverityV2. + + 一般问题数 + + :return: The minor of this StatisticSeverityV2. + :rtype: int + """ + return self._minor + + @minor.setter + def minor(self, minor): + """Sets the minor of this StatisticSeverityV2. + + 一般问题数 + + :param minor: The minor of this StatisticSeverityV2. + :type minor: int + """ + self._minor = minor + + @property + def suggestion(self): + """Gets the suggestion of this StatisticSeverityV2. + + 提示问题数 + + :return: The suggestion of this StatisticSeverityV2. + :rtype: int + """ + return self._suggestion + + @suggestion.setter + def suggestion(self, suggestion): + """Sets the suggestion of this StatisticSeverityV2. + + 提示问题数 + + :param suggestion: The suggestion of this StatisticSeverityV2. + :type suggestion: int + """ + self._suggestion = suggestion + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StatisticSeverityV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/statistic_status_v2.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/statistic_status_v2.py new file mode 100644 index 0000000000..844e4f7390 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/statistic_status_v2.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class StatisticStatusV2: + + """ + 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 = { + 'unresolved': 'int', + 'resolved': 'int', + 'dismissed': 'int' + } + + attribute_map = { + 'unresolved': 'unresolved', + 'resolved': 'resolved', + 'dismissed': 'dismissed' + } + + def __init__(self, unresolved=None, resolved=None, dismissed=None): + """StatisticStatusV2 + + The model defined in huaweicloud sdk + + :param unresolved: 未解决 + :type unresolved: int + :param resolved: 已解决 + :type resolved: int + :param dismissed: 已忽略 + :type dismissed: int + """ + + + + self._unresolved = None + self._resolved = None + self._dismissed = None + self.discriminator = None + + if unresolved is not None: + self.unresolved = unresolved + if resolved is not None: + self.resolved = resolved + if dismissed is not None: + self.dismissed = dismissed + + @property + def unresolved(self): + """Gets the unresolved of this StatisticStatusV2. + + 未解决 + + :return: The unresolved of this StatisticStatusV2. + :rtype: int + """ + return self._unresolved + + @unresolved.setter + def unresolved(self, unresolved): + """Sets the unresolved of this StatisticStatusV2. + + 未解决 + + :param unresolved: The unresolved of this StatisticStatusV2. + :type unresolved: int + """ + self._unresolved = unresolved + + @property + def resolved(self): + """Gets the resolved of this StatisticStatusV2. + + 已解决 + + :return: The resolved of this StatisticStatusV2. + :rtype: int + """ + return self._resolved + + @resolved.setter + def resolved(self, resolved): + """Sets the resolved of this StatisticStatusV2. + + 已解决 + + :param resolved: The resolved of this StatisticStatusV2. + :type resolved: int + """ + self._resolved = resolved + + @property + def dismissed(self): + """Gets the dismissed of this StatisticStatusV2. + + 已忽略 + + :return: The dismissed of this StatisticStatusV2. + :rtype: int + """ + return self._dismissed + + @dismissed.setter + def dismissed(self, dismissed): + """Sets the dismissed of this StatisticStatusV2. + + 已忽略 + + :param dismissed: The dismissed of this StatisticStatusV2. + :type dismissed: int + """ + self._dismissed = dismissed + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StatisticStatusV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/stop_task_by_id_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/stop_task_by_id_request.py new file mode 100644 index 0000000000..7d93cb164f --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/stop_task_by_id_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class StopTaskByIdRequest: + + """ + 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 = { + 'task_id': 'str' + } + + attribute_map = { + 'task_id': 'task_id' + } + + def __init__(self, task_id=None): + """StopTaskByIdRequest + + The model defined in huaweicloud sdk + + :param task_id: 任务ID + :type task_id: str + """ + + + + self._task_id = None + self.discriminator = None + + self.task_id = task_id + + @property + def task_id(self): + """Gets the task_id of this StopTaskByIdRequest. + + 任务ID + + :return: The task_id of this StopTaskByIdRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this StopTaskByIdRequest. + + 任务ID + + :param task_id: The task_id of this StopTaskByIdRequest. + :type task_id: str + """ + self._task_id = task_id + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StopTaskByIdRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/stop_task_by_id_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/stop_task_by_id_response.py new file mode 100644 index 0000000000..f25267804f --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/stop_task_by_id_response.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class StopTaskByIdResponse(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): + """StopTaskByIdResponse + + The model defined in huaweicloud sdk + + """ + + super(StopTaskByIdResponse, self).__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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StopTaskByIdResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_advanced_settings.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_advanced_settings.py new file mode 100644 index 0000000000..b40719553c --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_advanced_settings.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class TaskAdvancedSettings: + + """ + 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 = { + 'key': 'str', + 'value': 'str', + 'option_value': 'str', + 'description': 'str' + } + + attribute_map = { + 'key': 'key', + 'value': 'value', + 'option_value': 'option_value', + 'description': 'description' + } + + def __init__(self, key=None, value=None, option_value=None, description=None): + """TaskAdvancedSettings + + The model defined in huaweicloud sdk + + :param key: 高级选项对应的名称 + :type key: str + :param value: 高级选项对应的取值 + :type value: str + :param option_value: 高级选项对应的可选项 + :type option_value: str + :param description: 高级选项对应的中文描述 + :type description: str + """ + + + + self._key = None + self._value = None + self._option_value = None + self._description = None + self.discriminator = None + + if key is not None: + self.key = key + if value is not None: + self.value = value + if option_value is not None: + self.option_value = option_value + if description is not None: + self.description = description + + @property + def key(self): + """Gets the key of this TaskAdvancedSettings. + + 高级选项对应的名称 + + :return: The key of this TaskAdvancedSettings. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this TaskAdvancedSettings. + + 高级选项对应的名称 + + :param key: The key of this TaskAdvancedSettings. + :type key: str + """ + self._key = key + + @property + def value(self): + """Gets the value of this TaskAdvancedSettings. + + 高级选项对应的取值 + + :return: The value of this TaskAdvancedSettings. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this TaskAdvancedSettings. + + 高级选项对应的取值 + + :param value: The value of this TaskAdvancedSettings. + :type value: str + """ + self._value = value + + @property + def option_value(self): + """Gets the option_value of this TaskAdvancedSettings. + + 高级选项对应的可选项 + + :return: The option_value of this TaskAdvancedSettings. + :rtype: str + """ + return self._option_value + + @option_value.setter + def option_value(self, option_value): + """Sets the option_value of this TaskAdvancedSettings. + + 高级选项对应的可选项 + + :param option_value: The option_value of this TaskAdvancedSettings. + :type option_value: str + """ + self._option_value = option_value + + @property + def description(self): + """Gets the description of this TaskAdvancedSettings. + + 高级选项对应的中文描述 + + :return: The description of this TaskAdvancedSettings. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this TaskAdvancedSettings. + + 高级选项对应的中文描述 + + :param description: The description of this TaskAdvancedSettings. + :type description: str + """ + self._description = description + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TaskAdvancedSettings): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_advanced_settings_item.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_advanced_settings_item.py new file mode 100644 index 0000000000..59db1447fc --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_advanced_settings_item.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class TaskAdvancedSettingsItem: + + """ + 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 = { + 'key': 'str', + 'value': 'str' + } + + attribute_map = { + 'key': 'key', + 'value': 'value' + } + + def __init__(self, key=None, value=None): + """TaskAdvancedSettingsItem + + The model defined in huaweicloud sdk + + :param key: 高级选项对应的名称 + :type key: str + :param value: 高级选项对应的取值 + :type value: str + """ + + + + self._key = None + self._value = None + self.discriminator = None + + self.key = key + self.value = value + + @property + def key(self): + """Gets the key of this TaskAdvancedSettingsItem. + + 高级选项对应的名称 + + :return: The key of this TaskAdvancedSettingsItem. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """Sets the key of this TaskAdvancedSettingsItem. + + 高级选项对应的名称 + + :param key: The key of this TaskAdvancedSettingsItem. + :type key: str + """ + self._key = key + + @property + def value(self): + """Gets the value of this TaskAdvancedSettingsItem. + + 高级选项对应的取值 + + :return: The value of this TaskAdvancedSettingsItem. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this TaskAdvancedSettingsItem. + + 高级选项对应的取值 + + :param value: The value of this TaskAdvancedSettingsItem. + :type value: str + """ + self._value = value + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TaskAdvancedSettingsItem): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_check_paramters.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_check_paramters.py new file mode 100644 index 0000000000..6c7123f8b2 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_check_paramters.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class TaskCheckParamters: + + """ + 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 = { + 'check_id': 'int', + 'name': 'str', + 'checker_configs': 'list[CheckConfigInfo]' + } + + attribute_map = { + 'check_id': 'check_id', + 'name': 'name', + 'checker_configs': 'checker_configs' + } + + def __init__(self, check_id=None, name=None, checker_configs=None): + """TaskCheckParamters + + The model defined in huaweicloud sdk + + :param check_id: 检查工具ID + :type check_id: int + :param name: 编译参数名称 + :type name: str + :param checker_configs: 检查参数配置信息 + :type checker_configs: list[:class:`huaweicloudsdkcodecheck.v2.CheckConfigInfo`] + """ + + + + self._check_id = None + self._name = None + self._checker_configs = None + self.discriminator = None + + if check_id is not None: + self.check_id = check_id + if name is not None: + self.name = name + if checker_configs is not None: + self.checker_configs = checker_configs + + @property + def check_id(self): + """Gets the check_id of this TaskCheckParamters. + + 检查工具ID + + :return: The check_id of this TaskCheckParamters. + :rtype: int + """ + return self._check_id + + @check_id.setter + def check_id(self, check_id): + """Sets the check_id of this TaskCheckParamters. + + 检查工具ID + + :param check_id: The check_id of this TaskCheckParamters. + :type check_id: int + """ + self._check_id = check_id + + @property + def name(self): + """Gets the name of this TaskCheckParamters. + + 编译参数名称 + + :return: The name of this TaskCheckParamters. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this TaskCheckParamters. + + 编译参数名称 + + :param name: The name of this TaskCheckParamters. + :type name: str + """ + self._name = name + + @property + def checker_configs(self): + """Gets the checker_configs of this TaskCheckParamters. + + 检查参数配置信息 + + :return: The checker_configs of this TaskCheckParamters. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.CheckConfigInfo`] + """ + return self._checker_configs + + @checker_configs.setter + def checker_configs(self, checker_configs): + """Sets the checker_configs of this TaskCheckParamters. + + 检查参数配置信息 + + :param checker_configs: The checker_configs of this TaskCheckParamters. + :type checker_configs: list[:class:`huaweicloudsdkcodecheck.v2.CheckConfigInfo`] + """ + self._checker_configs = checker_configs + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TaskCheckParamters): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_check_settings_item.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_check_settings_item.py new file mode 100644 index 0000000000..c653528265 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_check_settings_item.py @@ -0,0 +1,171 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class TaskCheckSettingsItem: + + """ + 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 = { + 'cfg_key': 'str', + 'status': 'str', + 'cfg_value': 'str' + } + + attribute_map = { + 'cfg_key': 'cfg_key', + 'status': 'status', + 'cfg_value': 'cfg_value' + } + + def __init__(self, cfg_key=None, status=None, cfg_value=None): + """TaskCheckSettingsItem + + The model defined in huaweicloud sdk + + :param cfg_key: 检查参数对应的key值 + :type cfg_key: str + :param status: 参数状态 + :type status: str + :param cfg_value: 检查参数值 + :type cfg_value: str + """ + + + + self._cfg_key = None + self._status = None + self._cfg_value = None + self.discriminator = None + + self.cfg_key = cfg_key + self.status = status + if cfg_value is not None: + self.cfg_value = cfg_value + + @property + def cfg_key(self): + """Gets the cfg_key of this TaskCheckSettingsItem. + + 检查参数对应的key值 + + :return: The cfg_key of this TaskCheckSettingsItem. + :rtype: str + """ + return self._cfg_key + + @cfg_key.setter + def cfg_key(self, cfg_key): + """Sets the cfg_key of this TaskCheckSettingsItem. + + 检查参数对应的key值 + + :param cfg_key: The cfg_key of this TaskCheckSettingsItem. + :type cfg_key: str + """ + self._cfg_key = cfg_key + + @property + def status(self): + """Gets the status of this TaskCheckSettingsItem. + + 参数状态 + + :return: The status of this TaskCheckSettingsItem. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this TaskCheckSettingsItem. + + 参数状态 + + :param status: The status of this TaskCheckSettingsItem. + :type status: str + """ + self._status = status + + @property + def cfg_value(self): + """Gets the cfg_value of this TaskCheckSettingsItem. + + 检查参数值 + + :return: The cfg_value of this TaskCheckSettingsItem. + :rtype: str + """ + return self._cfg_value + + @cfg_value.setter + def cfg_value(self, cfg_value): + """Sets the cfg_value of this TaskCheckSettingsItem. + + 检查参数值 + + :param cfg_value: The cfg_value of this TaskCheckSettingsItem. + :type cfg_value: str + """ + self._cfg_value = cfg_value + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TaskCheckSettingsItem): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_ruleset_info.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_ruleset_info.py new file mode 100644 index 0000000000..cfbdbc7a49 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/task_ruleset_info.py @@ -0,0 +1,231 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class TaskRulesetInfo: + + """ + 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 = { + 'template_id': 'str', + 'language': 'str', + 'template_name': 'str', + 'type': 'str', + 'status': 'str' + } + + attribute_map = { + 'template_id': 'template_id', + 'language': 'language', + 'template_name': 'template_name', + 'type': 'type', + 'status': 'status' + } + + def __init__(self, template_id=None, language=None, template_name=None, type=None, status=None): + """TaskRulesetInfo + + The model defined in huaweicloud sdk + + :param template_id: 规则集id + :type template_id: str + :param language: 规则集语言 + :type language: str + :param template_name: 规则集名称 + :type template_name: str + :param type: 规则集状态optional:可选,selected:已选 + :type type: str + :param status: 规则集属性0 是默认用户规则集,1 是系统默认规则集 + :type status: str + """ + + + + self._template_id = None + self._language = None + self._template_name = None + self._type = None + self._status = None + self.discriminator = None + + if template_id is not None: + self.template_id = template_id + if language is not None: + self.language = language + if template_name is not None: + self.template_name = template_name + if type is not None: + self.type = type + if status is not None: + self.status = status + + @property + def template_id(self): + """Gets the template_id of this TaskRulesetInfo. + + 规则集id + + :return: The template_id of this TaskRulesetInfo. + :rtype: str + """ + return self._template_id + + @template_id.setter + def template_id(self, template_id): + """Sets the template_id of this TaskRulesetInfo. + + 规则集id + + :param template_id: The template_id of this TaskRulesetInfo. + :type template_id: str + """ + self._template_id = template_id + + @property + def language(self): + """Gets the language of this TaskRulesetInfo. + + 规则集语言 + + :return: The language of this TaskRulesetInfo. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this TaskRulesetInfo. + + 规则集语言 + + :param language: The language of this TaskRulesetInfo. + :type language: str + """ + self._language = language + + @property + def template_name(self): + """Gets the template_name of this TaskRulesetInfo. + + 规则集名称 + + :return: The template_name of this TaskRulesetInfo. + :rtype: str + """ + return self._template_name + + @template_name.setter + def template_name(self, template_name): + """Sets the template_name of this TaskRulesetInfo. + + 规则集名称 + + :param template_name: The template_name of this TaskRulesetInfo. + :type template_name: str + """ + self._template_name = template_name + + @property + def type(self): + """Gets the type of this TaskRulesetInfo. + + 规则集状态optional:可选,selected:已选 + + :return: The type of this TaskRulesetInfo. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this TaskRulesetInfo. + + 规则集状态optional:可选,selected:已选 + + :param type: The type of this TaskRulesetInfo. + :type type: str + """ + self._type = type + + @property + def status(self): + """Gets the status of this TaskRulesetInfo. + + 规则集属性0 是默认用户规则集,1 是系统默认规则集 + + :return: The status of this TaskRulesetInfo. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this TaskRulesetInfo. + + 规则集属性0 是默认用户规则集,1 是系统默认规则集 + + :param status: The status of this TaskRulesetInfo. + :type status: 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TaskRulesetInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/tree_node.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/tree_node.py new file mode 100644 index 0000000000..a36486a6c4 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/tree_node.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class TreeNode: + + """ + 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 = { + 'file_name': 'str', + 'file_path': 'str', + 'is_leaf': 'bool', + 'checkbox_status': 'str' + } + + attribute_map = { + 'file_name': 'file_name', + 'file_path': 'file_path', + 'is_leaf': 'is_leaf', + 'checkbox_status': 'checkbox_status' + } + + def __init__(self, file_name=None, file_path=None, is_leaf=None, checkbox_status=None): + """TreeNode + + The model defined in huaweicloud sdk + + :param file_name: 目录或文件名 + :type file_name: str + :param file_path: 目录或文件路径 + :type file_path: str + :param is_leaf: 是否为叶子节点,true是,false不是 + :type is_leaf: bool + :param checkbox_status: 屏蔽状态,包括unchecked(不屏蔽)、all(全屏蔽)、half(半屏蔽) + :type checkbox_status: str + """ + + + + self._file_name = None + self._file_path = None + self._is_leaf = None + self._checkbox_status = None + self.discriminator = None + + if file_name is not None: + self.file_name = file_name + if file_path is not None: + self.file_path = file_path + if is_leaf is not None: + self.is_leaf = is_leaf + if checkbox_status is not None: + self.checkbox_status = checkbox_status + + @property + def file_name(self): + """Gets the file_name of this TreeNode. + + 目录或文件名 + + :return: The file_name of this TreeNode. + :rtype: str + """ + return self._file_name + + @file_name.setter + def file_name(self, file_name): + """Sets the file_name of this TreeNode. + + 目录或文件名 + + :param file_name: The file_name of this TreeNode. + :type file_name: str + """ + self._file_name = file_name + + @property + def file_path(self): + """Gets the file_path of this TreeNode. + + 目录或文件路径 + + :return: The file_path of this TreeNode. + :rtype: str + """ + return self._file_path + + @file_path.setter + def file_path(self, file_path): + """Sets the file_path of this TreeNode. + + 目录或文件路径 + + :param file_path: The file_path of this TreeNode. + :type file_path: str + """ + self._file_path = file_path + + @property + def is_leaf(self): + """Gets the is_leaf of this TreeNode. + + 是否为叶子节点,true是,false不是 + + :return: The is_leaf of this TreeNode. + :rtype: bool + """ + return self._is_leaf + + @is_leaf.setter + def is_leaf(self, is_leaf): + """Sets the is_leaf of this TreeNode. + + 是否为叶子节点,true是,false不是 + + :param is_leaf: The is_leaf of this TreeNode. + :type is_leaf: bool + """ + self._is_leaf = is_leaf + + @property + def checkbox_status(self): + """Gets the checkbox_status of this TreeNode. + + 屏蔽状态,包括unchecked(不屏蔽)、all(全屏蔽)、half(半屏蔽) + + :return: The checkbox_status of this TreeNode. + :rtype: str + """ + return self._checkbox_status + + @checkbox_status.setter + def checkbox_status(self, checkbox_status): + """Sets the checkbox_status of this TreeNode. + + 屏蔽状态,包括unchecked(不屏蔽)、all(全屏蔽)、half(半屏蔽) + + :param checkbox_status: The checkbox_status of this TreeNode. + :type checkbox_status: str + """ + self._checkbox_status = checkbox_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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TreeNode): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_defect_request_body.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_defect_request_body.py new file mode 100644 index 0000000000..ff806d7471 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_defect_request_body.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class UpdateDefectRequestBody: + + """ + 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 = { + 'defect_id': 'str', + 'defect_status': 'str' + } + + attribute_map = { + 'defect_id': 'defect_id', + 'defect_status': 'defect_status' + } + + def __init__(self, defect_id=None, defect_status=None): + """UpdateDefectRequestBody + + The model defined in huaweicloud sdk + + :param defect_id: 问题id,多个时英文逗号分隔 + :type defect_id: str + :param defect_status: 状态2:已忽略 1:已解决 0:未解决 + :type defect_status: str + """ + + + + self._defect_id = None + self._defect_status = None + self.discriminator = None + + if defect_id is not None: + self.defect_id = defect_id + if defect_status is not None: + self.defect_status = defect_status + + @property + def defect_id(self): + """Gets the defect_id of this UpdateDefectRequestBody. + + 问题id,多个时英文逗号分隔 + + :return: The defect_id of this UpdateDefectRequestBody. + :rtype: str + """ + return self._defect_id + + @defect_id.setter + def defect_id(self, defect_id): + """Sets the defect_id of this UpdateDefectRequestBody. + + 问题id,多个时英文逗号分隔 + + :param defect_id: The defect_id of this UpdateDefectRequestBody. + :type defect_id: str + """ + self._defect_id = defect_id + + @property + def defect_status(self): + """Gets the defect_status of this UpdateDefectRequestBody. + + 状态2:已忽略 1:已解决 0:未解决 + + :return: The defect_status of this UpdateDefectRequestBody. + :rtype: str + """ + return self._defect_status + + @defect_status.setter + def defect_status(self, defect_status): + """Sets the defect_status of this UpdateDefectRequestBody. + + 状态2:已忽略 1:已解决 0:未解决 + + :param defect_status: The defect_status of this UpdateDefectRequestBody. + :type defect_status: str + """ + self._defect_status = defect_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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateDefectRequestBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_defect_status_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_defect_status_request.py new file mode 100644 index 0000000000..3c8c853791 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_defect_status_request.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class UpdateDefectStatusRequest: + + """ + 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 = { + 'task_id': 'str', + 'body': 'UpdateDefectRequestBody' + } + + attribute_map = { + 'task_id': 'task_id', + 'body': 'body' + } + + def __init__(self, task_id=None, body=None): + """UpdateDefectStatusRequest + + The model defined in huaweicloud sdk + + :param task_id: 任务id + :type task_id: str + :param body: Body of the UpdateDefectStatusRequest + :type body: :class:`huaweicloudsdkcodecheck.v2.UpdateDefectRequestBody` + """ + + + + self._task_id = None + self._body = None + self.discriminator = None + + self.task_id = task_id + if body is not None: + self.body = body + + @property + def task_id(self): + """Gets the task_id of this UpdateDefectStatusRequest. + + 任务id + + :return: The task_id of this UpdateDefectStatusRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this UpdateDefectStatusRequest. + + 任务id + + :param task_id: The task_id of this UpdateDefectStatusRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def body(self): + """Gets the body of this UpdateDefectStatusRequest. + + :return: The body of this UpdateDefectStatusRequest. + :rtype: :class:`huaweicloudsdkcodecheck.v2.UpdateDefectRequestBody` + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this UpdateDefectStatusRequest. + + :param body: The body of this UpdateDefectStatusRequest. + :type body: :class:`huaweicloudsdkcodecheck.v2.UpdateDefectRequestBody` + """ + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateDefectStatusRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_defect_status_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_defect_status_response.py new file mode 100644 index 0000000000..7ee72c8750 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_defect_status_response.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class UpdateDefectStatusResponse(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): + """UpdateDefectStatusResponse + + The model defined in huaweicloud sdk + + """ + + super(UpdateDefectStatusResponse, self).__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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateDefectStatusResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_ignore_path_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_ignore_path_request.py new file mode 100644 index 0000000000..e15825bb2a --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_ignore_path_request.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class UpdateIgnorePathRequest: + + """ + 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 = { + 'project_id': 'str', + 'task_id': 'str', + 'body': 'UpdateIgnorePathRequestBody' + } + + attribute_map = { + 'project_id': 'project_id', + 'task_id': 'task_id', + 'body': 'body' + } + + def __init__(self, project_id=None, task_id=None, body=None): + """UpdateIgnorePathRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param task_id: 任务ID + :type task_id: str + :param body: Body of the UpdateIgnorePathRequest + :type body: :class:`huaweicloudsdkcodecheck.v2.UpdateIgnorePathRequestBody` + """ + + + + self._project_id = None + self._task_id = None + self._body = None + self.discriminator = None + + self.project_id = project_id + self.task_id = task_id + if body is not None: + self.body = body + + @property + def project_id(self): + """Gets the project_id of this UpdateIgnorePathRequest. + + 项目ID + + :return: The project_id of this UpdateIgnorePathRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this UpdateIgnorePathRequest. + + 项目ID + + :param project_id: The project_id of this UpdateIgnorePathRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this UpdateIgnorePathRequest. + + 任务ID + + :return: The task_id of this UpdateIgnorePathRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this UpdateIgnorePathRequest. + + 任务ID + + :param task_id: The task_id of this UpdateIgnorePathRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def body(self): + """Gets the body of this UpdateIgnorePathRequest. + + :return: The body of this UpdateIgnorePathRequest. + :rtype: :class:`huaweicloudsdkcodecheck.v2.UpdateIgnorePathRequestBody` + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this UpdateIgnorePathRequest. + + :param body: The body of this UpdateIgnorePathRequest. + :type body: :class:`huaweicloudsdkcodecheck.v2.UpdateIgnorePathRequestBody` + """ + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateIgnorePathRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_ignore_path_request_body.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_ignore_path_request_body.py new file mode 100644 index 0000000000..ed79d479d0 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_ignore_path_request_body.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class UpdateIgnorePathRequestBody: + + """ + 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 = { + 'ignore_path_settings': 'list[IgnorePathSettingItem]' + } + + attribute_map = { + 'ignore_path_settings': 'ignore_path_settings' + } + + def __init__(self, ignore_path_settings=None): + """UpdateIgnorePathRequestBody + + The model defined in huaweicloud sdk + + :param ignore_path_settings: 屏蔽目录的节点信息列表 + :type ignore_path_settings: list[:class:`huaweicloudsdkcodecheck.v2.IgnorePathSettingItem`] + """ + + + + self._ignore_path_settings = None + self.discriminator = None + + self.ignore_path_settings = ignore_path_settings + + @property + def ignore_path_settings(self): + """Gets the ignore_path_settings of this UpdateIgnorePathRequestBody. + + 屏蔽目录的节点信息列表 + + :return: The ignore_path_settings of this UpdateIgnorePathRequestBody. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.IgnorePathSettingItem`] + """ + return self._ignore_path_settings + + @ignore_path_settings.setter + def ignore_path_settings(self, ignore_path_settings): + """Sets the ignore_path_settings of this UpdateIgnorePathRequestBody. + + 屏蔽目录的节点信息列表 + + :param ignore_path_settings: The ignore_path_settings of this UpdateIgnorePathRequestBody. + :type ignore_path_settings: list[:class:`huaweicloudsdkcodecheck.v2.IgnorePathSettingItem`] + """ + self._ignore_path_settings = ignore_path_settings + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateIgnorePathRequestBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_ignore_path_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_ignore_path_response.py new file mode 100644 index 0000000000..0f2eb99566 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_ignore_path_response.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class UpdateIgnorePathResponse(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): + """UpdateIgnorePathResponse + + The model defined in huaweicloud sdk + + """ + + super(UpdateIgnorePathResponse, self).__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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateIgnorePathResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_ruleset_item.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_ruleset_item.py new file mode 100644 index 0000000000..bc89b2f5cb --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_ruleset_item.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class UpdateTaskRulesetItem: + + """ + 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 = { + 'language': 'str', + 'rule_set_id': 'str', + 'if_use': 'str', + 'status': 'str' + } + + attribute_map = { + 'language': 'language', + 'rule_set_id': 'rule_set_id', + 'if_use': 'if_use', + 'status': 'status' + } + + def __init__(self, language=None, rule_set_id=None, if_use=None, status=None): + """UpdateTaskRulesetItem + + The model defined in huaweicloud sdk + + :param language: 规则集语言 + :type language: str + :param rule_set_id: 规则集ID,通过调用ListTaskRuleset接口,根据响应参数中的template_id获得 + :type rule_set_id: str + :param if_use: 任务语言和规则集的关系是否启用,1是启用,0是未启用 + :type if_use: str + :param status: 新/老数据表示,默认1 + :type status: str + """ + + + + self._language = None + self._rule_set_id = None + self._if_use = None + self._status = None + self.discriminator = None + + self.language = language + self.rule_set_id = rule_set_id + self.if_use = if_use + self.status = status + + @property + def language(self): + """Gets the language of this UpdateTaskRulesetItem. + + 规则集语言 + + :return: The language of this UpdateTaskRulesetItem. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """Sets the language of this UpdateTaskRulesetItem. + + 规则集语言 + + :param language: The language of this UpdateTaskRulesetItem. + :type language: str + """ + self._language = language + + @property + def rule_set_id(self): + """Gets the rule_set_id of this UpdateTaskRulesetItem. + + 规则集ID,通过调用ListTaskRuleset接口,根据响应参数中的template_id获得 + + :return: The rule_set_id of this UpdateTaskRulesetItem. + :rtype: str + """ + return self._rule_set_id + + @rule_set_id.setter + def rule_set_id(self, rule_set_id): + """Sets the rule_set_id of this UpdateTaskRulesetItem. + + 规则集ID,通过调用ListTaskRuleset接口,根据响应参数中的template_id获得 + + :param rule_set_id: The rule_set_id of this UpdateTaskRulesetItem. + :type rule_set_id: str + """ + self._rule_set_id = rule_set_id + + @property + def if_use(self): + """Gets the if_use of this UpdateTaskRulesetItem. + + 任务语言和规则集的关系是否启用,1是启用,0是未启用 + + :return: The if_use of this UpdateTaskRulesetItem. + :rtype: str + """ + return self._if_use + + @if_use.setter + def if_use(self, if_use): + """Sets the if_use of this UpdateTaskRulesetItem. + + 任务语言和规则集的关系是否启用,1是启用,0是未启用 + + :param if_use: The if_use of this UpdateTaskRulesetItem. + :type if_use: str + """ + self._if_use = if_use + + @property + def status(self): + """Gets the status of this UpdateTaskRulesetItem. + + 新/老数据表示,默认1 + + :return: The status of this UpdateTaskRulesetItem. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this UpdateTaskRulesetItem. + + 新/老数据表示,默认1 + + :param status: The status of this UpdateTaskRulesetItem. + :type status: 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateTaskRulesetItem): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_ruleset_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_ruleset_request.py new file mode 100644 index 0000000000..9ed2bca7f1 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_ruleset_request.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class UpdateTaskRulesetRequest: + + """ + 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 = { + 'task_id': 'str', + 'body': 'list[UpdateTaskRulesetItem]' + } + + attribute_map = { + 'task_id': 'task_id', + 'body': 'body' + } + + def __init__(self, task_id=None, body=None): + """UpdateTaskRulesetRequest + + The model defined in huaweicloud sdk + + :param task_id: 任务ID + :type task_id: str + :param body: 修改任务规则集 + :type body: list[:class:`huaweicloudsdkcodecheck.v2.UpdateTaskRulesetItem`] + """ + + + + self._task_id = None + self._body = None + self.discriminator = None + + self.task_id = task_id + if body is not None: + self.body = body + + @property + def task_id(self): + """Gets the task_id of this UpdateTaskRulesetRequest. + + 任务ID + + :return: The task_id of this UpdateTaskRulesetRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this UpdateTaskRulesetRequest. + + 任务ID + + :param task_id: The task_id of this UpdateTaskRulesetRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def body(self): + """Gets the body of this UpdateTaskRulesetRequest. + + 修改任务规则集 + + :return: The body of this UpdateTaskRulesetRequest. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.UpdateTaskRulesetItem`] + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this UpdateTaskRulesetRequest. + + 修改任务规则集 + + :param body: The body of this UpdateTaskRulesetRequest. + :type body: list[:class:`huaweicloudsdkcodecheck.v2.UpdateTaskRulesetItem`] + """ + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateTaskRulesetRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_ruleset_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_ruleset_response.py new file mode 100644 index 0000000000..5a22e45cd3 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_ruleset_response.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class UpdateTaskRulesetResponse(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): + """UpdateTaskRulesetResponse + + The model defined in huaweicloud sdk + + """ + + super(UpdateTaskRulesetResponse, self).__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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateTaskRulesetResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_settings_request.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_settings_request.py new file mode 100644 index 0000000000..1fe0fd5137 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_settings_request.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class UpdateTaskSettingsRequest: + + """ + 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 = { + 'project_id': 'str', + 'task_id': 'str', + 'body': 'UpdateTaskSettingsRequestBody' + } + + attribute_map = { + 'project_id': 'project_id', + 'task_id': 'task_id', + 'body': 'body' + } + + def __init__(self, project_id=None, task_id=None, body=None): + """UpdateTaskSettingsRequest + + The model defined in huaweicloud sdk + + :param project_id: 项目ID + :type project_id: str + :param task_id: 任务ID + :type task_id: str + :param body: Body of the UpdateTaskSettingsRequest + :type body: :class:`huaweicloudsdkcodecheck.v2.UpdateTaskSettingsRequestBody` + """ + + + + self._project_id = None + self._task_id = None + self._body = None + self.discriminator = None + + self.project_id = project_id + self.task_id = task_id + if body is not None: + self.body = body + + @property + def project_id(self): + """Gets the project_id of this UpdateTaskSettingsRequest. + + 项目ID + + :return: The project_id of this UpdateTaskSettingsRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this UpdateTaskSettingsRequest. + + 项目ID + + :param project_id: The project_id of this UpdateTaskSettingsRequest. + :type project_id: str + """ + self._project_id = project_id + + @property + def task_id(self): + """Gets the task_id of this UpdateTaskSettingsRequest. + + 任务ID + + :return: The task_id of this UpdateTaskSettingsRequest. + :rtype: str + """ + return self._task_id + + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this UpdateTaskSettingsRequest. + + 任务ID + + :param task_id: The task_id of this UpdateTaskSettingsRequest. + :type task_id: str + """ + self._task_id = task_id + + @property + def body(self): + """Gets the body of this UpdateTaskSettingsRequest. + + :return: The body of this UpdateTaskSettingsRequest. + :rtype: :class:`huaweicloudsdkcodecheck.v2.UpdateTaskSettingsRequestBody` + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this UpdateTaskSettingsRequest. + + :param body: The body of this UpdateTaskSettingsRequest. + :type body: :class:`huaweicloudsdkcodecheck.v2.UpdateTaskSettingsRequestBody` + """ + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateTaskSettingsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_settings_request_body.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_settings_request_body.py new file mode 100644 index 0000000000..5785030306 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_settings_request_body.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class UpdateTaskSettingsRequestBody: + + """ + 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 = { + 'task_advanced_settings': 'list[TaskAdvancedSettingsItem]' + } + + attribute_map = { + 'task_advanced_settings': 'task_advanced_settings' + } + + def __init__(self, task_advanced_settings=None): + """UpdateTaskSettingsRequestBody + + The model defined in huaweicloud sdk + + :param task_advanced_settings: 高级选项参数的相关信息 + :type task_advanced_settings: list[:class:`huaweicloudsdkcodecheck.v2.TaskAdvancedSettingsItem`] + """ + + + + self._task_advanced_settings = None + self.discriminator = None + + self.task_advanced_settings = task_advanced_settings + + @property + def task_advanced_settings(self): + """Gets the task_advanced_settings of this UpdateTaskSettingsRequestBody. + + 高级选项参数的相关信息 + + :return: The task_advanced_settings of this UpdateTaskSettingsRequestBody. + :rtype: list[:class:`huaweicloudsdkcodecheck.v2.TaskAdvancedSettingsItem`] + """ + return self._task_advanced_settings + + @task_advanced_settings.setter + def task_advanced_settings(self, task_advanced_settings): + """Sets the task_advanced_settings of this UpdateTaskSettingsRequestBody. + + 高级选项参数的相关信息 + + :param task_advanced_settings: The task_advanced_settings of this UpdateTaskSettingsRequestBody. + :type task_advanced_settings: list[:class:`huaweicloudsdkcodecheck.v2.TaskAdvancedSettingsItem`] + """ + self._task_advanced_settings = task_advanced_settings + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateTaskSettingsRequestBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_settings_response.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_settings_response.py new file mode 100644 index 0000000000..95ebbc55e3 --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/model/update_task_settings_response.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class UpdateTaskSettingsResponse(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): + """UpdateTaskSettingsResponse + + The model defined in huaweicloud sdk + + """ + + super(UpdateTaskSettingsResponse, self).__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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateTaskSettingsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/region/__init__.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/region/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/region/codecheck_region.py b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/region/codecheck_region.py new file mode 100644 index 0000000000..3e539e76ae --- /dev/null +++ b/huaweicloud-sdk-codecheck/huaweicloudsdkcodecheck/v2/region/codecheck_region.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +import types +import six + +from huaweicloudsdkcore.region.region import Region +from huaweicloudsdkcore.region.provider import RegionProviderChain + +class CodeCheckRegion: + _PROVIDER = RegionProviderChain.get_default_region_provider_chain("CODECHECK") + + CN_NORTH_4 = Region("cn-north-4", + "https://codecheck-ext.cn-north-4.myhuaweicloud.com", + "https://codecheck-ext.cn-north-4.myhuaweicloud.cn") + CN_NORTH_1 = Region("cn-north-1", + "https://codecheck-ext.cn-north-1.myhuaweicloud.com", + "https://codecheck-ext.cn-north-1.myhuaweicloud.cn") + CN_EAST_2 = Region("cn-east-2", + "https://codecheck-ext.cn-east-2.myhuaweicloud.com", + "https://codecheck-ext.cn-east-2.myhuaweicloud.cn") + CN_SOUTH_1 = Region("cn-south-1", + "https://codecheck-ext.cn-south-1.myhuaweicloud.com", + "https://codecheck-ext.cn-south-1.myhuaweicloud.cn") + CN_EAST_3 = Region("cn-east-3", + "https://codecheck-ext.cn-east-3.myhuaweicloud.com", + "https://codecheck-ext.cn-east-3.myhuaweicloud.cn") + LA_NORTH_2 = Region("la-north-2", + "https://codecheck-ext.la-north-2.myhuaweicloud.com") + SA_BRAZIL_1 = Region("sa-brazil-1", + "https://codecheck-ext.sa-brazil-1.myhuaweicloud.com") + AP_SOUTHEAST_3 = Region("ap-southeast-3", + "https://codecheck-ext.ap-southeast-3.myhuaweicloud.com") + + static_fields = { + "cn-north-4": CN_NORTH_4, + "cn-north-1": CN_NORTH_1, + "cn-east-2": CN_EAST_2, + "cn-south-1": CN_SOUTH_1, + "cn-east-3": CN_EAST_3, + "la-north-2": LA_NORTH_2, + "sa-brazil-1": SA_BRAZIL_1, + "ap-southeast-3": AP_SOUTHEAST_3, + } + + @classmethod + def value_of(cls, region_id, static_fields=None): + if not region_id: + raise KeyError("Unexpected empty parameter: region_id.") + + fields = static_fields if static_fields else cls.static_fields + + region = cls._PROVIDER.get_region(region_id) + if region: + return region + + if region_id in fields: + return fields.get(region_id) + + raise KeyError("Unexpected region_id: " + region_id) + + diff --git a/huaweicloud-sdk-codecheck/requirements.txt b/huaweicloud-sdk-codecheck/requirements.txt new file mode 100644 index 0000000000..f781123637 --- /dev/null +++ b/huaweicloud-sdk-codecheck/requirements.txt @@ -0,0 +1 @@ +huaweicloudsdkcore >= 3.1.46 \ No newline at end of file diff --git a/huaweicloud-sdk-codecheck/setup.py b/huaweicloud-sdk-codecheck/setup.py new file mode 100644 index 0000000000..ecc477f09c --- /dev/null +++ b/huaweicloud-sdk-codecheck/setup.py @@ -0,0 +1,55 @@ +# coding: utf-8 +from os import path + +from setuptools import setup, find_packages + +NAME = "huaweicloudsdkcodecheck" +VERSION = "3.1.46" +AUTHOR = "HuaweiCloud SDK" +AUTHOR_EMAIL = "hwcloudsdk@huawei.com" +URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" + +DESCRIPTION = "CodeCheck" +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>=3.1.46"] + +OPTIONS = { + 'bdist_wheel': { + 'universal': True + } +} + +setup( + name=NAME, + version=VERSION, + options=OPTIONS, + 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", "CodeCheck"], + packages=find_packages(exclude=["tests*"]), + install_requires=REQUIRES, + python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*", + include_package_data=True, + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python :: 2.7', + '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', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Topic :: Software Development' + ] +) diff --git a/huaweicloud-sdk-orgid/LICENSE b/huaweicloud-sdk-orgid/LICENSE new file mode 100644 index 0000000000..808e3296c0 --- /dev/null +++ b/huaweicloud-sdk-orgid/LICENSE @@ -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. \ No newline at end of file diff --git a/huaweicloud-sdk-orgid/README_PYPI.md b/huaweicloud-sdk-orgid/README_PYPI.md new file mode 100644 index 0000000000..9711543c73 --- /dev/null +++ b/huaweicloud-sdk-orgid/README_PYPI.md @@ -0,0 +1 @@ +See detailed information in [huaweicloud-sdk-python-v3](https://github.com/huaweicloud/huaweicloud-sdk-python-v3). \ No newline at end of file diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/__init__.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/__init__.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/__init__.py new file mode 100644 index 0000000000..494623f814 --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/__init__.py @@ -0,0 +1,19 @@ +# coding: utf-8 + +from __future__ import absolute_import + +from huaweicloudsdkorgid.v1.orgid_client import OrgIDClient +from huaweicloudsdkorgid.v1.orgid_async_client import OrgIDAsyncClient + +from huaweicloudsdkorgid.v1.model.cas_authentication_success_attributes import CasAuthenticationSuccessAttributes +from huaweicloudsdkorgid.v1.model.cas_service_response_authentication_failure import CasServiceResponseAuthenticationFailure +from huaweicloudsdkorgid.v1.model.cas_service_response_authentication_success import CasServiceResponseAuthenticationSuccess +from huaweicloudsdkorgid.v1.model.service_response import ServiceResponse +from huaweicloudsdkorgid.v1.model.show_oauth2_token_request import ShowOauth2TokenRequest +from huaweicloudsdkorgid.v1.model.show_oauth2_token_request_body import ShowOauth2TokenRequestBody +from huaweicloudsdkorgid.v1.model.show_oauth2_token_response import ShowOauth2TokenResponse +from huaweicloudsdkorgid.v1.model.show_oauth2_user_info_request import ShowOauth2UserInfoRequest +from huaweicloudsdkorgid.v1.model.show_oauth2_user_info_response import ShowOauth2UserInfoResponse +from huaweicloudsdkorgid.v1.model.validate_service_request import ValidateServiceRequest +from huaweicloudsdkorgid.v1.model.validate_service_response import ValidateServiceResponse + diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/__init__.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/__init__.py new file mode 100644 index 0000000000..57ef1bf082 --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/__init__.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +from __future__ import absolute_import + +# import models into model package +from huaweicloudsdkorgid.v1.model.cas_authentication_success_attributes import CasAuthenticationSuccessAttributes +from huaweicloudsdkorgid.v1.model.cas_service_response_authentication_failure import CasServiceResponseAuthenticationFailure +from huaweicloudsdkorgid.v1.model.cas_service_response_authentication_success import CasServiceResponseAuthenticationSuccess +from huaweicloudsdkorgid.v1.model.service_response import ServiceResponse +from huaweicloudsdkorgid.v1.model.show_oauth2_token_request import ShowOauth2TokenRequest +from huaweicloudsdkorgid.v1.model.show_oauth2_token_request_body import ShowOauth2TokenRequestBody +from huaweicloudsdkorgid.v1.model.show_oauth2_token_response import ShowOauth2TokenResponse +from huaweicloudsdkorgid.v1.model.show_oauth2_user_info_request import ShowOauth2UserInfoRequest +from huaweicloudsdkorgid.v1.model.show_oauth2_user_info_response import ShowOauth2UserInfoResponse +from huaweicloudsdkorgid.v1.model.validate_service_request import ValidateServiceRequest +from huaweicloudsdkorgid.v1.model.validate_service_response import ValidateServiceResponse diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/cas_authentication_success_attributes.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/cas_authentication_success_attributes.py new file mode 100644 index 0000000000..5992381863 --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/cas_authentication_success_attributes.py @@ -0,0 +1,289 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CasAuthenticationSuccessAttributes: + + """ + 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 = { + 'authentication_date': 'str', + 'long_term_authentication_request_token_used': 'bool', + 'is_from_new_login': 'bool', + 'token': 'str', + 'logo': 'str', + 'display_name': 'str', + 'uid': 'str' + } + + attribute_map = { + 'authentication_date': 'authenticationDate', + 'long_term_authentication_request_token_used': 'longTermAuthenticationRequestTokenUsed', + 'is_from_new_login': 'isFromNewLogin', + 'token': 'token', + 'logo': 'logo', + 'display_name': 'displayName', + 'uid': 'uid' + } + + def __init__(self, authentication_date=None, long_term_authentication_request_token_used=None, is_from_new_login=None, token=None, logo=None, display_name=None, uid=None): + """CasAuthenticationSuccessAttributes + + The model defined in huaweicloud sdk + + :param authentication_date: 认证时间 + :type authentication_date: str + :param long_term_authentication_request_token_used: longTermAuthenticationRequestTokenUsed + :type long_term_authentication_request_token_used: bool + :param is_from_new_login: isFromNewLogin + :type is_from_new_login: bool + :param token: 用户获取用户信息的token + :type token: str + :param logo: 用户头像URL + :type logo: str + :param display_name: 用户显示名 + :type display_name: str + :param uid: 华为账号uid + :type uid: str + """ + + + + self._authentication_date = None + self._long_term_authentication_request_token_used = None + self._is_from_new_login = None + self._token = None + self._logo = None + self._display_name = None + self._uid = None + self.discriminator = None + + if authentication_date is not None: + self.authentication_date = authentication_date + if long_term_authentication_request_token_used is not None: + self.long_term_authentication_request_token_used = long_term_authentication_request_token_used + if is_from_new_login is not None: + self.is_from_new_login = is_from_new_login + if token is not None: + self.token = token + if logo is not None: + self.logo = logo + if display_name is not None: + self.display_name = display_name + if uid is not None: + self.uid = uid + + @property + def authentication_date(self): + """Gets the authentication_date of this CasAuthenticationSuccessAttributes. + + 认证时间 + + :return: The authentication_date of this CasAuthenticationSuccessAttributes. + :rtype: str + """ + return self._authentication_date + + @authentication_date.setter + def authentication_date(self, authentication_date): + """Sets the authentication_date of this CasAuthenticationSuccessAttributes. + + 认证时间 + + :param authentication_date: The authentication_date of this CasAuthenticationSuccessAttributes. + :type authentication_date: str + """ + self._authentication_date = authentication_date + + @property + def long_term_authentication_request_token_used(self): + """Gets the long_term_authentication_request_token_used of this CasAuthenticationSuccessAttributes. + + longTermAuthenticationRequestTokenUsed + + :return: The long_term_authentication_request_token_used of this CasAuthenticationSuccessAttributes. + :rtype: bool + """ + return self._long_term_authentication_request_token_used + + @long_term_authentication_request_token_used.setter + def long_term_authentication_request_token_used(self, long_term_authentication_request_token_used): + """Sets the long_term_authentication_request_token_used of this CasAuthenticationSuccessAttributes. + + longTermAuthenticationRequestTokenUsed + + :param long_term_authentication_request_token_used: The long_term_authentication_request_token_used of this CasAuthenticationSuccessAttributes. + :type long_term_authentication_request_token_used: bool + """ + self._long_term_authentication_request_token_used = long_term_authentication_request_token_used + + @property + def is_from_new_login(self): + """Gets the is_from_new_login of this CasAuthenticationSuccessAttributes. + + isFromNewLogin + + :return: The is_from_new_login of this CasAuthenticationSuccessAttributes. + :rtype: bool + """ + return self._is_from_new_login + + @is_from_new_login.setter + def is_from_new_login(self, is_from_new_login): + """Sets the is_from_new_login of this CasAuthenticationSuccessAttributes. + + isFromNewLogin + + :param is_from_new_login: The is_from_new_login of this CasAuthenticationSuccessAttributes. + :type is_from_new_login: bool + """ + self._is_from_new_login = is_from_new_login + + @property + def token(self): + """Gets the token of this CasAuthenticationSuccessAttributes. + + 用户获取用户信息的token + + :return: The token of this CasAuthenticationSuccessAttributes. + :rtype: str + """ + return self._token + + @token.setter + def token(self, token): + """Sets the token of this CasAuthenticationSuccessAttributes. + + 用户获取用户信息的token + + :param token: The token of this CasAuthenticationSuccessAttributes. + :type token: str + """ + self._token = token + + @property + def logo(self): + """Gets the logo of this CasAuthenticationSuccessAttributes. + + 用户头像URL + + :return: The logo of this CasAuthenticationSuccessAttributes. + :rtype: str + """ + return self._logo + + @logo.setter + def logo(self, logo): + """Sets the logo of this CasAuthenticationSuccessAttributes. + + 用户头像URL + + :param logo: The logo of this CasAuthenticationSuccessAttributes. + :type logo: str + """ + self._logo = logo + + @property + def display_name(self): + """Gets the display_name of this CasAuthenticationSuccessAttributes. + + 用户显示名 + + :return: The display_name of this CasAuthenticationSuccessAttributes. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """Sets the display_name of this CasAuthenticationSuccessAttributes. + + 用户显示名 + + :param display_name: The display_name of this CasAuthenticationSuccessAttributes. + :type display_name: str + """ + self._display_name = display_name + + @property + def uid(self): + """Gets the uid of this CasAuthenticationSuccessAttributes. + + 华为账号uid + + :return: The uid of this CasAuthenticationSuccessAttributes. + :rtype: str + """ + return self._uid + + @uid.setter + def uid(self, uid): + """Sets the uid of this CasAuthenticationSuccessAttributes. + + 华为账号uid + + :param uid: The uid of this CasAuthenticationSuccessAttributes. + :type uid: str + """ + self._uid = uid + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CasAuthenticationSuccessAttributes): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/cas_service_response_authentication_failure.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/cas_service_response_authentication_failure.py new file mode 100644 index 0000000000..1d30ba04f6 --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/cas_service_response_authentication_failure.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CasServiceResponseAuthenticationFailure: + + """ + 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 = { + 'code': 'str', + 'description': 'str' + } + + attribute_map = { + 'code': 'code', + 'description': 'description' + } + + def __init__(self, code=None, description=None): + """CasServiceResponseAuthenticationFailure + + The model defined in huaweicloud sdk + + :param code: 响应码 + :type code: str + :param description: 响应描述 + :type description: str + """ + + + + self._code = None + self._description = None + self.discriminator = None + + if code is not None: + self.code = code + if description is not None: + self.description = description + + @property + def code(self): + """Gets the code of this CasServiceResponseAuthenticationFailure. + + 响应码 + + :return: The code of this CasServiceResponseAuthenticationFailure. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this CasServiceResponseAuthenticationFailure. + + 响应码 + + :param code: The code of this CasServiceResponseAuthenticationFailure. + :type code: str + """ + self._code = code + + @property + def description(self): + """Gets the description of this CasServiceResponseAuthenticationFailure. + + 响应描述 + + :return: The description of this CasServiceResponseAuthenticationFailure. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CasServiceResponseAuthenticationFailure. + + 响应描述 + + :param description: The description of this CasServiceResponseAuthenticationFailure. + :type description: str + """ + self._description = description + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CasServiceResponseAuthenticationFailure): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/cas_service_response_authentication_success.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/cas_service_response_authentication_success.py new file mode 100644 index 0000000000..41a83e715f --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/cas_service_response_authentication_success.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class CasServiceResponseAuthenticationSuccess: + + """ + 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 = { + 'user': 'str', + 'proxy_granting_ticket': 'str', + 'proxies': 'list[str]', + 'attributes': 'CasAuthenticationSuccessAttributes' + } + + attribute_map = { + 'user': 'user', + 'proxy_granting_ticket': 'proxyGrantingTicket', + 'proxies': 'proxies', + 'attributes': 'attributes' + } + + def __init__(self, user=None, proxy_granting_ticket=None, proxies=None, attributes=None): + """CasServiceResponseAuthenticationSuccess + + The model defined in huaweicloud sdk + + :param user: 用户标识 + :type user: str + :param proxy_granting_ticket: 代理授权凭据 + :type proxy_granting_ticket: str + :param proxies: 代理 + :type proxies: list[str] + :param attributes: + :type attributes: :class:`huaweicloudsdkorgid.v1.CasAuthenticationSuccessAttributes` + """ + + + + self._user = None + self._proxy_granting_ticket = None + self._proxies = None + self._attributes = None + self.discriminator = None + + if user is not None: + self.user = user + if proxy_granting_ticket is not None: + self.proxy_granting_ticket = proxy_granting_ticket + if proxies is not None: + self.proxies = proxies + if attributes is not None: + self.attributes = attributes + + @property + def user(self): + """Gets the user of this CasServiceResponseAuthenticationSuccess. + + 用户标识 + + :return: The user of this CasServiceResponseAuthenticationSuccess. + :rtype: str + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this CasServiceResponseAuthenticationSuccess. + + 用户标识 + + :param user: The user of this CasServiceResponseAuthenticationSuccess. + :type user: str + """ + self._user = user + + @property + def proxy_granting_ticket(self): + """Gets the proxy_granting_ticket of this CasServiceResponseAuthenticationSuccess. + + 代理授权凭据 + + :return: The proxy_granting_ticket of this CasServiceResponseAuthenticationSuccess. + :rtype: str + """ + return self._proxy_granting_ticket + + @proxy_granting_ticket.setter + def proxy_granting_ticket(self, proxy_granting_ticket): + """Sets the proxy_granting_ticket of this CasServiceResponseAuthenticationSuccess. + + 代理授权凭据 + + :param proxy_granting_ticket: The proxy_granting_ticket of this CasServiceResponseAuthenticationSuccess. + :type proxy_granting_ticket: str + """ + self._proxy_granting_ticket = proxy_granting_ticket + + @property + def proxies(self): + """Gets the proxies of this CasServiceResponseAuthenticationSuccess. + + 代理 + + :return: The proxies of this CasServiceResponseAuthenticationSuccess. + :rtype: list[str] + """ + return self._proxies + + @proxies.setter + def proxies(self, proxies): + """Sets the proxies of this CasServiceResponseAuthenticationSuccess. + + 代理 + + :param proxies: The proxies of this CasServiceResponseAuthenticationSuccess. + :type proxies: list[str] + """ + self._proxies = proxies + + @property + def attributes(self): + """Gets the attributes of this CasServiceResponseAuthenticationSuccess. + + :return: The attributes of this CasServiceResponseAuthenticationSuccess. + :rtype: :class:`huaweicloudsdkorgid.v1.CasAuthenticationSuccessAttributes` + """ + return self._attributes + + @attributes.setter + def attributes(self, attributes): + """Sets the attributes of this CasServiceResponseAuthenticationSuccess. + + :param attributes: The attributes of this CasServiceResponseAuthenticationSuccess. + :type attributes: :class:`huaweicloudsdkorgid.v1.CasAuthenticationSuccessAttributes` + """ + self._attributes = attributes + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CasServiceResponseAuthenticationSuccess): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/service_response.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/service_response.py new file mode 100644 index 0000000000..436db25a02 --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/service_response.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ServiceResponse: + + """ + 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 = { + 'authentication_failure': 'CasServiceResponseAuthenticationFailure', + 'authentication_success': 'CasServiceResponseAuthenticationSuccess' + } + + attribute_map = { + 'authentication_failure': 'authenticationFailure', + 'authentication_success': 'authenticationSuccess' + } + + def __init__(self, authentication_failure=None, authentication_success=None): + """ServiceResponse + + The model defined in huaweicloud sdk + + :param authentication_failure: + :type authentication_failure: :class:`huaweicloudsdkorgid.v1.CasServiceResponseAuthenticationFailure` + :param authentication_success: + :type authentication_success: :class:`huaweicloudsdkorgid.v1.CasServiceResponseAuthenticationSuccess` + """ + + + + self._authentication_failure = None + self._authentication_success = None + self.discriminator = None + + if authentication_failure is not None: + self.authentication_failure = authentication_failure + if authentication_success is not None: + self.authentication_success = authentication_success + + @property + def authentication_failure(self): + """Gets the authentication_failure of this ServiceResponse. + + :return: The authentication_failure of this ServiceResponse. + :rtype: :class:`huaweicloudsdkorgid.v1.CasServiceResponseAuthenticationFailure` + """ + return self._authentication_failure + + @authentication_failure.setter + def authentication_failure(self, authentication_failure): + """Sets the authentication_failure of this ServiceResponse. + + :param authentication_failure: The authentication_failure of this ServiceResponse. + :type authentication_failure: :class:`huaweicloudsdkorgid.v1.CasServiceResponseAuthenticationFailure` + """ + self._authentication_failure = authentication_failure + + @property + def authentication_success(self): + """Gets the authentication_success of this ServiceResponse. + + :return: The authentication_success of this ServiceResponse. + :rtype: :class:`huaweicloudsdkorgid.v1.CasServiceResponseAuthenticationSuccess` + """ + return self._authentication_success + + @authentication_success.setter + def authentication_success(self, authentication_success): + """Sets the authentication_success of this ServiceResponse. + + :param authentication_success: The authentication_success of this ServiceResponse. + :type authentication_success: :class:`huaweicloudsdkorgid.v1.CasServiceResponseAuthenticationSuccess` + """ + self._authentication_success = authentication_success + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ServiceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_token_request.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_token_request.py new file mode 100644 index 0000000000..c9b936e3e7 --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_token_request.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowOauth2TokenRequest: + + """ + 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': 'ShowOauth2TokenRequestBody' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """ShowOauth2TokenRequest + + The model defined in huaweicloud sdk + + :param body: Body of the ShowOauth2TokenRequest + :type body: :class:`huaweicloudsdkorgid.v1.ShowOauth2TokenRequestBody` + """ + + + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this ShowOauth2TokenRequest. + + :return: The body of this ShowOauth2TokenRequest. + :rtype: :class:`huaweicloudsdkorgid.v1.ShowOauth2TokenRequestBody` + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ShowOauth2TokenRequest. + + :param body: The body of this ShowOauth2TokenRequest. + :type body: :class:`huaweicloudsdkorgid.v1.ShowOauth2TokenRequestBody` + """ + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowOauth2TokenRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_token_request_body.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_token_request_body.py new file mode 100644 index 0000000000..1298f01385 --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_token_request_body.py @@ -0,0 +1,255 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowOauth2TokenRequestBody: + + """ + 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 = { + 'grant_type': 'str', + 'code': 'str', + 'client_id': 'str', + 'client_secret': 'str', + 'redirect_uri': 'str', + 'access_type': 'str' + } + + attribute_map = { + 'grant_type': 'grant_type', + 'code': 'code', + 'client_id': 'client_id', + 'client_secret': 'client_secret', + 'redirect_uri': 'redirect_uri', + 'access_type': 'access_type' + } + + def __init__(self, grant_type=None, code=None, client_id=None, client_secret=None, redirect_uri=None, access_type=None): + """ShowOauth2TokenRequestBody + + The model defined in huaweicloud sdk + + :param grant_type: 固定值authorization_code + :type grant_type: str + :param code: 授权码 + :type code: str + :param client_id: 客户端应用注册ID + :type client_id: str + :param client_secret: 客户端应用注册密钥 + :type client_secret: str + :param redirect_uri: 重定向地址,与授权码重定向地址一直,与应用注册是配置的回调地址校验需要一致 + :type redirect_uri: str + :param access_type: 接入模式,默认在线模式,可不填,值为离线模式时,设置为offline会返回refresh_token + :type access_type: str + """ + + + + self._grant_type = None + self._code = None + self._client_id = None + self._client_secret = None + self._redirect_uri = None + self._access_type = None + self.discriminator = None + + self.grant_type = grant_type + self.code = code + self.client_id = client_id + self.client_secret = client_secret + self.redirect_uri = redirect_uri + if access_type is not None: + self.access_type = access_type + + @property + def grant_type(self): + """Gets the grant_type of this ShowOauth2TokenRequestBody. + + 固定值authorization_code + + :return: The grant_type of this ShowOauth2TokenRequestBody. + :rtype: str + """ + return self._grant_type + + @grant_type.setter + def grant_type(self, grant_type): + """Sets the grant_type of this ShowOauth2TokenRequestBody. + + 固定值authorization_code + + :param grant_type: The grant_type of this ShowOauth2TokenRequestBody. + :type grant_type: str + """ + self._grant_type = grant_type + + @property + def code(self): + """Gets the code of this ShowOauth2TokenRequestBody. + + 授权码 + + :return: The code of this ShowOauth2TokenRequestBody. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """Sets the code of this ShowOauth2TokenRequestBody. + + 授权码 + + :param code: The code of this ShowOauth2TokenRequestBody. + :type code: str + """ + self._code = code + + @property + def client_id(self): + """Gets the client_id of this ShowOauth2TokenRequestBody. + + 客户端应用注册ID + + :return: The client_id of this ShowOauth2TokenRequestBody. + :rtype: str + """ + return self._client_id + + @client_id.setter + def client_id(self, client_id): + """Sets the client_id of this ShowOauth2TokenRequestBody. + + 客户端应用注册ID + + :param client_id: The client_id of this ShowOauth2TokenRequestBody. + :type client_id: str + """ + self._client_id = client_id + + @property + def client_secret(self): + """Gets the client_secret of this ShowOauth2TokenRequestBody. + + 客户端应用注册密钥 + + :return: The client_secret of this ShowOauth2TokenRequestBody. + :rtype: str + """ + return self._client_secret + + @client_secret.setter + def client_secret(self, client_secret): + """Sets the client_secret of this ShowOauth2TokenRequestBody. + + 客户端应用注册密钥 + + :param client_secret: The client_secret of this ShowOauth2TokenRequestBody. + :type client_secret: str + """ + self._client_secret = client_secret + + @property + def redirect_uri(self): + """Gets the redirect_uri of this ShowOauth2TokenRequestBody. + + 重定向地址,与授权码重定向地址一直,与应用注册是配置的回调地址校验需要一致 + + :return: The redirect_uri of this ShowOauth2TokenRequestBody. + :rtype: str + """ + return self._redirect_uri + + @redirect_uri.setter + def redirect_uri(self, redirect_uri): + """Sets the redirect_uri of this ShowOauth2TokenRequestBody. + + 重定向地址,与授权码重定向地址一直,与应用注册是配置的回调地址校验需要一致 + + :param redirect_uri: The redirect_uri of this ShowOauth2TokenRequestBody. + :type redirect_uri: str + """ + self._redirect_uri = redirect_uri + + @property + def access_type(self): + """Gets the access_type of this ShowOauth2TokenRequestBody. + + 接入模式,默认在线模式,可不填,值为离线模式时,设置为offline会返回refresh_token + + :return: The access_type of this ShowOauth2TokenRequestBody. + :rtype: str + """ + return self._access_type + + @access_type.setter + def access_type(self, access_type): + """Sets the access_type of this ShowOauth2TokenRequestBody. + + 接入模式,默认在线模式,可不填,值为离线模式时,设置为offline会返回refresh_token + + :param access_type: The access_type of this ShowOauth2TokenRequestBody. + :type access_type: str + """ + self._access_type = access_type + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowOauth2TokenRequestBody): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_token_response.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_token_response.py new file mode 100644 index 0000000000..7bd9489824 --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_token_response.py @@ -0,0 +1,232 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowOauth2TokenResponse(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 = { + 'access_token': 'str', + 'refresh_token': 'str', + 'scope': 'str', + 'token_type': 'str', + 'expires_in': 'int' + } + + attribute_map = { + 'access_token': 'access_token', + 'refresh_token': 'refresh_token', + 'scope': 'scope', + 'token_type': 'token_type', + 'expires_in': 'expires_in' + } + + def __init__(self, access_token=None, refresh_token=None, scope=None, token_type=None, expires_in=None): + """ShowOauth2TokenResponse + + The model defined in huaweicloud sdk + + :param access_token: 用户级接入token + :type access_token: str + :param refresh_token: 用户级刷新token,离线模式适用,用于服务端主动刷新用户token + :type refresh_token: str + :param scope: 授权信息范围 + :type scope: str + :param token_type: token类型,固定值“Bearer”,消息头传入token时前缀填入方式 + :type token_type: str + :param expires_in: token失效时长 + :type expires_in: int + """ + + super(ShowOauth2TokenResponse, self).__init__() + + self._access_token = None + self._refresh_token = None + self._scope = None + self._token_type = None + self._expires_in = None + self.discriminator = None + + if access_token is not None: + self.access_token = access_token + if refresh_token is not None: + self.refresh_token = refresh_token + if scope is not None: + self.scope = scope + if token_type is not None: + self.token_type = token_type + if expires_in is not None: + self.expires_in = expires_in + + @property + def access_token(self): + """Gets the access_token of this ShowOauth2TokenResponse. + + 用户级接入token + + :return: The access_token of this ShowOauth2TokenResponse. + :rtype: str + """ + return self._access_token + + @access_token.setter + def access_token(self, access_token): + """Sets the access_token of this ShowOauth2TokenResponse. + + 用户级接入token + + :param access_token: The access_token of this ShowOauth2TokenResponse. + :type access_token: str + """ + self._access_token = access_token + + @property + def refresh_token(self): + """Gets the refresh_token of this ShowOauth2TokenResponse. + + 用户级刷新token,离线模式适用,用于服务端主动刷新用户token + + :return: The refresh_token of this ShowOauth2TokenResponse. + :rtype: str + """ + return self._refresh_token + + @refresh_token.setter + def refresh_token(self, refresh_token): + """Sets the refresh_token of this ShowOauth2TokenResponse. + + 用户级刷新token,离线模式适用,用于服务端主动刷新用户token + + :param refresh_token: The refresh_token of this ShowOauth2TokenResponse. + :type refresh_token: str + """ + self._refresh_token = refresh_token + + @property + def scope(self): + """Gets the scope of this ShowOauth2TokenResponse. + + 授权信息范围 + + :return: The scope of this ShowOauth2TokenResponse. + :rtype: str + """ + return self._scope + + @scope.setter + def scope(self, scope): + """Sets the scope of this ShowOauth2TokenResponse. + + 授权信息范围 + + :param scope: The scope of this ShowOauth2TokenResponse. + :type scope: str + """ + self._scope = scope + + @property + def token_type(self): + """Gets the token_type of this ShowOauth2TokenResponse. + + token类型,固定值“Bearer”,消息头传入token时前缀填入方式 + + :return: The token_type of this ShowOauth2TokenResponse. + :rtype: str + """ + return self._token_type + + @token_type.setter + def token_type(self, token_type): + """Sets the token_type of this ShowOauth2TokenResponse. + + token类型,固定值“Bearer”,消息头传入token时前缀填入方式 + + :param token_type: The token_type of this ShowOauth2TokenResponse. + :type token_type: str + """ + self._token_type = token_type + + @property + def expires_in(self): + """Gets the expires_in of this ShowOauth2TokenResponse. + + token失效时长 + + :return: The expires_in of this ShowOauth2TokenResponse. + :rtype: int + """ + return self._expires_in + + @expires_in.setter + def expires_in(self, expires_in): + """Sets the expires_in of this ShowOauth2TokenResponse. + + token失效时长 + + :param expires_in: The expires_in of this ShowOauth2TokenResponse. + :type expires_in: int + """ + self._expires_in = expires_in + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowOauth2TokenResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_user_info_request.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_user_info_request.py new file mode 100644 index 0000000000..8e7b5fc1d1 --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_user_info_request.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowOauth2UserInfoRequest: + + """ + 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 = { + 'x_org_id_authorization': 'str' + } + + attribute_map = { + 'x_org_id_authorization': 'X-OrgID-Authorization' + } + + def __init__(self, x_org_id_authorization=None): + """ShowOauth2UserInfoRequest + + The model defined in huaweicloud sdk + + :param x_org_id_authorization: 用户访问凭证,即 user_access_token, 示例值:\"Bearer u-7f1bcd13fc57d46bac21793a18e560\" + :type x_org_id_authorization: str + """ + + + + self._x_org_id_authorization = None + self.discriminator = None + + self.x_org_id_authorization = x_org_id_authorization + + @property + def x_org_id_authorization(self): + """Gets the x_org_id_authorization of this ShowOauth2UserInfoRequest. + + 用户访问凭证,即 user_access_token, 示例值:\"Bearer u-7f1bcd13fc57d46bac21793a18e560\" + + :return: The x_org_id_authorization of this ShowOauth2UserInfoRequest. + :rtype: str + """ + return self._x_org_id_authorization + + @x_org_id_authorization.setter + def x_org_id_authorization(self, x_org_id_authorization): + """Sets the x_org_id_authorization of this ShowOauth2UserInfoRequest. + + 用户访问凭证,即 user_access_token, 示例值:\"Bearer u-7f1bcd13fc57d46bac21793a18e560\" + + :param x_org_id_authorization: The x_org_id_authorization of this ShowOauth2UserInfoRequest. + :type x_org_id_authorization: str + """ + self._x_org_id_authorization = x_org_id_authorization + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowOauth2UserInfoRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_user_info_response.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_user_info_response.py new file mode 100644 index 0000000000..a583fdfd3c --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/show_oauth2_user_info_response.py @@ -0,0 +1,290 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ShowOauth2UserInfoResponse(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 = { + 'tenant': 'str', + 'name': 'str', + 'mobile': 'str', + 'user_name': 'str', + 'user_id': 'str', + 'email': 'str', + 'role': 'str' + } + + attribute_map = { + 'tenant': 'tenant', + 'name': 'name', + 'mobile': 'mobile', + 'user_name': 'user_name', + 'user_id': 'user_id', + 'email': 'email', + 'role': 'role' + } + + def __init__(self, tenant=None, name=None, mobile=None, user_name=None, user_id=None, email=None, role=None): + """ShowOauth2UserInfoResponse + + The model defined in huaweicloud sdk + + :param tenant: 租户code,这里即企业code + :type tenant: str + :param name: 用户显示名 + :type name: str + :param mobile: 手机号 + :type mobile: str + :param user_name: 用户登录账号 + :type user_name: str + :param user_id: 用户外部id + :type user_id: str + :param email: 邮箱 + :type email: str + :param role: 角色,枚举:user或者admin + :type role: str + """ + + super(ShowOauth2UserInfoResponse, self).__init__() + + self._tenant = None + self._name = None + self._mobile = None + self._user_name = None + self._user_id = None + self._email = None + self._role = None + self.discriminator = None + + if tenant is not None: + self.tenant = tenant + if name is not None: + self.name = name + if mobile is not None: + self.mobile = mobile + if user_name is not None: + self.user_name = user_name + if user_id is not None: + self.user_id = user_id + if email is not None: + self.email = email + if role is not None: + self.role = role + + @property + def tenant(self): + """Gets the tenant of this ShowOauth2UserInfoResponse. + + 租户code,这里即企业code + + :return: The tenant of this ShowOauth2UserInfoResponse. + :rtype: str + """ + return self._tenant + + @tenant.setter + def tenant(self, tenant): + """Sets the tenant of this ShowOauth2UserInfoResponse. + + 租户code,这里即企业code + + :param tenant: The tenant of this ShowOauth2UserInfoResponse. + :type tenant: str + """ + self._tenant = tenant + + @property + def name(self): + """Gets the name of this ShowOauth2UserInfoResponse. + + 用户显示名 + + :return: The name of this ShowOauth2UserInfoResponse. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ShowOauth2UserInfoResponse. + + 用户显示名 + + :param name: The name of this ShowOauth2UserInfoResponse. + :type name: str + """ + self._name = name + + @property + def mobile(self): + """Gets the mobile of this ShowOauth2UserInfoResponse. + + 手机号 + + :return: The mobile of this ShowOauth2UserInfoResponse. + :rtype: str + """ + return self._mobile + + @mobile.setter + def mobile(self, mobile): + """Sets the mobile of this ShowOauth2UserInfoResponse. + + 手机号 + + :param mobile: The mobile of this ShowOauth2UserInfoResponse. + :type mobile: str + """ + self._mobile = mobile + + @property + def user_name(self): + """Gets the user_name of this ShowOauth2UserInfoResponse. + + 用户登录账号 + + :return: The user_name of this ShowOauth2UserInfoResponse. + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this ShowOauth2UserInfoResponse. + + 用户登录账号 + + :param user_name: The user_name of this ShowOauth2UserInfoResponse. + :type user_name: str + """ + self._user_name = user_name + + @property + def user_id(self): + """Gets the user_id of this ShowOauth2UserInfoResponse. + + 用户外部id + + :return: The user_id of this ShowOauth2UserInfoResponse. + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this ShowOauth2UserInfoResponse. + + 用户外部id + + :param user_id: The user_id of this ShowOauth2UserInfoResponse. + :type user_id: str + """ + self._user_id = user_id + + @property + def email(self): + """Gets the email of this ShowOauth2UserInfoResponse. + + 邮箱 + + :return: The email of this ShowOauth2UserInfoResponse. + :rtype: str + """ + return self._email + + @email.setter + def email(self, email): + """Sets the email of this ShowOauth2UserInfoResponse. + + 邮箱 + + :param email: The email of this ShowOauth2UserInfoResponse. + :type email: str + """ + self._email = email + + @property + def role(self): + """Gets the role of this ShowOauth2UserInfoResponse. + + 角色,枚举:user或者admin + + :return: The role of this ShowOauth2UserInfoResponse. + :rtype: str + """ + return self._role + + @role.setter + def role(self, role): + """Sets the role of this ShowOauth2UserInfoResponse. + + 角色,枚举:user或者admin + + :param role: The role of this ShowOauth2UserInfoResponse. + :type role: str + """ + self._role = role + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowOauth2UserInfoResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/validate_service_request.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/validate_service_request.py new file mode 100644 index 0000000000..bd67fa85d5 --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/validate_service_request.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ValidateServiceRequest: + + """ + 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 = { + 'service': 'str', + 'ticket': 'str' + } + + attribute_map = { + 'service': 'service', + 'ticket': 'ticket' + } + + def __init__(self, service=None, ticket=None): + """ValidateServiceRequest + + The model defined in huaweicloud sdk + + :param service: 登录时携带的回调地址 + :type service: str + :param ticket: 登录时系统返回的ticket + :type ticket: str + """ + + + + self._service = None + self._ticket = None + self.discriminator = None + + self.service = service + self.ticket = ticket + + @property + def service(self): + """Gets the service of this ValidateServiceRequest. + + 登录时携带的回调地址 + + :return: The service of this ValidateServiceRequest. + :rtype: str + """ + return self._service + + @service.setter + def service(self, service): + """Sets the service of this ValidateServiceRequest. + + 登录时携带的回调地址 + + :param service: The service of this ValidateServiceRequest. + :type service: str + """ + self._service = service + + @property + def ticket(self): + """Gets the ticket of this ValidateServiceRequest. + + 登录时系统返回的ticket + + :return: The ticket of this ValidateServiceRequest. + :rtype: str + """ + return self._ticket + + @ticket.setter + def ticket(self, ticket): + """Sets the ticket of this ValidateServiceRequest. + + 登录时系统返回的ticket + + :param ticket: The ticket of this ValidateServiceRequest. + :type ticket: str + """ + self._ticket = ticket + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ValidateServiceRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/validate_service_response.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/validate_service_response.py new file mode 100644 index 0000000000..fba35e97b6 --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/model/validate_service_response.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +import six + +from huaweicloudsdkcore.sdk_response import SdkResponse +from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization + + +class ValidateServiceResponse(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 = { + 'service_response': 'ServiceResponse' + } + + attribute_map = { + 'service_response': 'serviceResponse' + } + + def __init__(self, service_response=None): + """ValidateServiceResponse + + The model defined in huaweicloud sdk + + :param service_response: + :type service_response: :class:`huaweicloudsdkorgid.v1.ServiceResponse` + """ + + super(ValidateServiceResponse, self).__init__() + + self._service_response = None + self.discriminator = None + + if service_response is not None: + self.service_response = service_response + + @property + def service_response(self): + """Gets the service_response of this ValidateServiceResponse. + + :return: The service_response of this ValidateServiceResponse. + :rtype: :class:`huaweicloudsdkorgid.v1.ServiceResponse` + """ + return self._service_response + + @service_response.setter + def service_response(self, service_response): + """Sets the service_response of this ValidateServiceResponse. + + :param service_response: The service_response of this ValidateServiceResponse. + :type service_response: :class:`huaweicloudsdkorgid.v1.ServiceResponse` + """ + self._service_response = service_response + + 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""" + import simplejson as json + if six.PY2: + import sys + reload(sys) + sys.setdefaultencoding("utf-8") + return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) + + def __repr__(self): + """For `print`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ValidateServiceResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/orgid_async_client.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/orgid_async_client.py new file mode 100644 index 0000000000..1d17286c0c --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/orgid_async_client.py @@ -0,0 +1,291 @@ +# coding: utf-8 + +from __future__ import absolute_import + +import importlib +import warnings + +from huaweicloudsdkcore.client import Client, ClientBuilder +from huaweicloudsdkcore.utils import http_utils +from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest +try: + from huaweicloudsdkcore.invoker.invoker import AsyncInvoker +except ImportError as e: + warnings.warn(str(e) + ", please check if you are using the same versions of 'huaweicloudsdkcore' and 'huaweicloudsdkorgid'") + + +class OrgIDAsyncClient(Client): + def __init__(self): + super(OrgIDAsyncClient, self).__init__() + self.model_package = importlib.import_module("huaweicloudsdkorgid.v1.model") + + @classmethod + def new_builder(cls, clazz=None): + if not clazz: + client_builder = ClientBuilder(cls, "GlobalCredentials") + else: + if clazz.__name__ != "OrgIDAsyncClient": + raise TypeError("client type error, support client type is OrgIDAsyncClient") + client_builder = ClientBuilder(clazz, "GlobalCredentials") + + + + return client_builder + + def validate_service_async(self, request): + """验证票据接口 + + CAS 3.0验证票据接口 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ValidateService + :type request: :class:`huaweicloudsdkorgid.v1.ValidateServiceRequest` + :rtype: :class:`huaweicloudsdkorgid.v1.ValidateServiceResponse` + """ + http_info = self._validate_service_http_info(request) + return self._call_api(**http_info) + + def validate_service_async_invoker(self, request): + http_info = self._validate_service_http_info(request) + return AsyncInvoker(self, http_info) + + def _validate_service_http_info(self, request): + http_info = { + "method": "GET", + "resource_path": "/orgid/openapi/v1/cas/p3/serviceValidate", + "request_type": request.__class__.__name__, + "response_type": "ValidateServiceResponse" + } + + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'service' in local_var_params: + query_params.append(('service', local_var_params['service'])) + if 'ticket' in local_var_params: + query_params.append(('ticket', local_var_params['ticket'])) + + header_params = {} + + form_params = {} + + body = None + if isinstance(request, SdkStreamRequest): + body = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + http_info["cname"] = cname + http_info["collection_formats"] = collection_formats + http_info["path_params"] = path_params + http_info["query_params"] = query_params + http_info["header_params"] = header_params + http_info["post_params"] = form_params + http_info["body"] = body + http_info["response_headers"] = response_headers + + return http_info + + def show_oauth2_token_async(self, request): + """用户级Token获取 + + 用户级Token获取 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ShowOauth2Token + :type request: :class:`huaweicloudsdkorgid.v1.ShowOauth2TokenRequest` + :rtype: :class:`huaweicloudsdkorgid.v1.ShowOauth2TokenResponse` + """ + http_info = self._show_oauth2_token_http_info(request) + return self._call_api(**http_info) + + def show_oauth2_token_async_invoker(self, request): + http_info = self._show_oauth2_token_http_info(request) + return AsyncInvoker(self, http_info) + + def _show_oauth2_token_http_info(self, request): + http_info = { + "method": "POST", + "resource_path": "/orgid/openapi/v1/oauth2/token", + "request_type": request.__class__.__name__, + "response_type": "ShowOauth2TokenResponse" + } + + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + if 'grant_type' in local_var_params: + form_params['grant_type'] = local_var_params['grant_type'] + if 'code' in local_var_params: + form_params['code'] = local_var_params['code'] + if 'client_id' in local_var_params: + form_params['client_id'] = local_var_params['client_id'] + if 'client_secret' in local_var_params: + form_params['client_secret'] = local_var_params['client_secret'] + if 'redirect_uri' in local_var_params: + form_params['redirect_uri'] = local_var_params['redirect_uri'] + if 'access_type' in local_var_params: + form_params['access_type'] = local_var_params['access_type'] + + body = None + if 'body' in local_var_params: + body = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['multipart/form-data']) + + auth_settings = [] + + http_info["cname"] = cname + http_info["collection_formats"] = collection_formats + http_info["path_params"] = path_params + http_info["query_params"] = query_params + http_info["header_params"] = header_params + http_info["post_params"] = form_params + http_info["body"] = body + http_info["response_headers"] = response_headers + + return http_info + + def show_oauth2_user_info_async(self, request): + """用户信息获取 + + 用户级Token获取 + + Please refer to HUAWEI cloud API Explorer for details. + + + :param request: Request instance for ShowOauth2UserInfo + :type request: :class:`huaweicloudsdkorgid.v1.ShowOauth2UserInfoRequest` + :rtype: :class:`huaweicloudsdkorgid.v1.ShowOauth2UserInfoResponse` + """ + http_info = self._show_oauth2_user_info_http_info(request) + return self._call_api(**http_info) + + def show_oauth2_user_info_async_invoker(self, request): + http_info = self._show_oauth2_user_info_http_info(request) + return AsyncInvoker(self, http_info) + + def _show_oauth2_user_info_http_info(self, request): + http_info = { + "method": "GET", + "resource_path": "/orgid/openapi/v1/oauth2/userinfo", + "request_type": request.__class__.__name__, + "response_type": "ShowOauth2UserInfoResponse" + } + + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_org_id_authorization' in local_var_params: + header_params['X-OrgID-Authorization'] = local_var_params['x_org_id_authorization'] + + form_params = {} + + body = None + if isinstance(request, SdkStreamRequest): + body = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + http_info["cname"] = cname + http_info["collection_formats"] = collection_formats + http_info["path_params"] = path_params + http_info["query_params"] = query_params + http_info["header_params"] = header_params + http_info["post_params"] = form_params + http_info["body"] = body + http_info["response_headers"] = response_headers + + return http_info + + def _call_api(self, **kwargs): + try: + kwargs["async_request"] = True + return self.do_http_request(**kwargs) + except TypeError: + import inspect + params = inspect.signature(self.do_http_request).parameters + http_info = {param_name: kwargs.get(param_name) for param_name in params if param_name in kwargs} + return self.do_http_request(**http_info) + + def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, + post_params=None, cname=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: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param cname: Used for obs endpoint. + :param auth_settings: 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, + cname=cname, + response_type=response_type, + response_headers=response_headers, + collection_formats=collection_formats, + request_type=request_type, + async_request=True) diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/orgid_client.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/orgid_client.py new file mode 100644 index 0000000000..7d65ff869d --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/orgid_client.py @@ -0,0 +1,288 @@ +# coding: utf-8 + +from __future__ import absolute_import + +import importlib +import warnings + +from huaweicloudsdkcore.client import Client, ClientBuilder +from huaweicloudsdkcore.utils import http_utils +from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest +try: + from huaweicloudsdkcore.invoker.invoker import SyncInvoker +except ImportError as e: + warnings.warn(str(e) + ", please check if you are using the same versions of 'huaweicloudsdkcore' and 'huaweicloudsdkorgid'") + + +class OrgIDClient(Client): + def __init__(self): + super(OrgIDClient, self).__init__() + self.model_package = importlib.import_module("huaweicloudsdkorgid.v1.model") + + @classmethod + def new_builder(cls, clazz=None): + if not clazz: + client_builder = ClientBuilder(cls, "GlobalCredentials") + else: + if clazz.__name__ != "OrgIDClient": + raise TypeError("client type error, support client type is OrgIDClient") + client_builder = ClientBuilder(clazz, "GlobalCredentials") + + + + return client_builder + + def validate_service(self, request): + """验证票据接口 + + CAS 3.0验证票据接口 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ValidateService + :type request: :class:`huaweicloudsdkorgid.v1.ValidateServiceRequest` + :rtype: :class:`huaweicloudsdkorgid.v1.ValidateServiceResponse` + """ + http_info = self._validate_service_http_info(request) + return self._call_api(**http_info) + + def validate_service_invoker(self, request): + http_info = self._validate_service_http_info(request) + return SyncInvoker(self, http_info) + + @classmethod + def _validate_service_http_info(cls, request): + http_info = { + "method": "GET", + "resource_path": "/orgid/openapi/v1/cas/p3/serviceValidate", + "request_type": request.__class__.__name__, + "response_type": "ValidateServiceResponse" + } + + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'service' in local_var_params: + query_params.append(('service', local_var_params['service'])) + if 'ticket' in local_var_params: + query_params.append(('ticket', local_var_params['ticket'])) + + header_params = {} + + form_params = {} + + body = None + if isinstance(request, SdkStreamRequest): + body = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + http_info["cname"] = cname + http_info["collection_formats"] = collection_formats + http_info["path_params"] = path_params + http_info["query_params"] = query_params + http_info["header_params"] = header_params + http_info["post_params"] = form_params + http_info["body"] = body + http_info["response_headers"] = response_headers + + return http_info + + def show_oauth2_token(self, request): + """用户级Token获取 + + 用户级Token获取 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ShowOauth2Token + :type request: :class:`huaweicloudsdkorgid.v1.ShowOauth2TokenRequest` + :rtype: :class:`huaweicloudsdkorgid.v1.ShowOauth2TokenResponse` + """ + http_info = self._show_oauth2_token_http_info(request) + return self._call_api(**http_info) + + def show_oauth2_token_invoker(self, request): + http_info = self._show_oauth2_token_http_info(request) + return SyncInvoker(self, http_info) + + @classmethod + def _show_oauth2_token_http_info(cls, request): + http_info = { + "method": "POST", + "resource_path": "/orgid/openapi/v1/oauth2/token", + "request_type": request.__class__.__name__, + "response_type": "ShowOauth2TokenResponse" + } + + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + if 'grant_type' in local_var_params: + form_params['grant_type'] = local_var_params['grant_type'] + if 'code' in local_var_params: + form_params['code'] = local_var_params['code'] + if 'client_id' in local_var_params: + form_params['client_id'] = local_var_params['client_id'] + if 'client_secret' in local_var_params: + form_params['client_secret'] = local_var_params['client_secret'] + if 'redirect_uri' in local_var_params: + form_params['redirect_uri'] = local_var_params['redirect_uri'] + if 'access_type' in local_var_params: + form_params['access_type'] = local_var_params['access_type'] + + body = None + if 'body' in local_var_params: + body = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['multipart/form-data']) + + auth_settings = [] + + http_info["cname"] = cname + http_info["collection_formats"] = collection_formats + http_info["path_params"] = path_params + http_info["query_params"] = query_params + http_info["header_params"] = header_params + http_info["post_params"] = form_params + http_info["body"] = body + http_info["response_headers"] = response_headers + + return http_info + + def show_oauth2_user_info(self, request): + """用户信息获取 + + 用户级Token获取 + + Please refer to HUAWEI cloud API Explorer for details. + + :param request: Request instance for ShowOauth2UserInfo + :type request: :class:`huaweicloudsdkorgid.v1.ShowOauth2UserInfoRequest` + :rtype: :class:`huaweicloudsdkorgid.v1.ShowOauth2UserInfoResponse` + """ + http_info = self._show_oauth2_user_info_http_info(request) + return self._call_api(**http_info) + + def show_oauth2_user_info_invoker(self, request): + http_info = self._show_oauth2_user_info_http_info(request) + return SyncInvoker(self, http_info) + + @classmethod + def _show_oauth2_user_info_http_info(cls, request): + http_info = { + "method": "GET", + "resource_path": "/orgid/openapi/v1/oauth2/userinfo", + "request_type": request.__class__.__name__, + "response_type": "ShowOauth2UserInfoResponse" + } + + local_var_params = {attr: getattr(request, attr) for attr in request.attribute_map if hasattr(request, attr)} + + cname = None + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + if 'x_org_id_authorization' in local_var_params: + header_params['X-OrgID-Authorization'] = local_var_params['x_org_id_authorization'] + + form_params = {} + + body = None + if isinstance(request, SdkStreamRequest): + body = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + http_info["cname"] = cname + http_info["collection_formats"] = collection_formats + http_info["path_params"] = path_params + http_info["query_params"] = query_params + http_info["header_params"] = header_params + http_info["post_params"] = form_params + http_info["body"] = body + http_info["response_headers"] = response_headers + + return http_info + + def _call_api(self, **kwargs): + try: + return self.do_http_request(**kwargs) + except TypeError: + import inspect + params = inspect.signature(self.do_http_request).parameters + http_info = {param_name: kwargs.get(param_name) for param_name in params if param_name in kwargs} + return self.do_http_request(**http_info) + + def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, + post_params=None, cname=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: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param cname: Used for obs endpoint. + :param auth_settings: 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, + cname=cname, + response_type=response_type, + response_headers=response_headers, + collection_formats=collection_formats, + request_type=request_type) diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/region/__init__.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/region/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/region/orgid_region.py b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/region/orgid_region.py new file mode 100644 index 0000000000..bfcd8062b5 --- /dev/null +++ b/huaweicloud-sdk-orgid/huaweicloudsdkorgid/v1/region/orgid_region.py @@ -0,0 +1,31 @@ +# coding: utf-8 + +from huaweicloudsdkcore.region.region import Region +from huaweicloudsdkcore.region.provider import RegionProviderChain + +class OrgIDRegion: + _PROVIDER = RegionProviderChain.get_default_region_provider_chain("ORGID") + + CN_NORTH_4 = Region("cn-north-4", + "https://orgid-external.cn-north-4.myhuaweicloud.com") + + static_fields = { + "cn-north-4": CN_NORTH_4, + } + + @classmethod + def value_of(cls, region_id, static_fields=None): + if not region_id: + raise KeyError("Unexpected empty parameter: region_id") + + fields = static_fields or cls.static_fields + + region = cls._PROVIDER.get_region(region_id) + if region: + return region + + if region_id in fields: + return fields.get(region_id) + + raise KeyError("region_id '%s' is not in the following supported regions of service 'OrgID': [%s]" % ( + region_id, ", ".join(sorted(fields.keys())))) diff --git a/huaweicloud-sdk-orgid/requirements.txt b/huaweicloud-sdk-orgid/requirements.txt new file mode 100644 index 0000000000..fa0a1faf24 --- /dev/null +++ b/huaweicloud-sdk-orgid/requirements.txt @@ -0,0 +1 @@ +huaweicloudsdkcore >= 3.1.81 \ No newline at end of file diff --git a/huaweicloud-sdk-orgid/setup.py b/huaweicloud-sdk-orgid/setup.py new file mode 100644 index 0000000000..6db9b2e98b --- /dev/null +++ b/huaweicloud-sdk-orgid/setup.py @@ -0,0 +1,55 @@ +# coding: utf-8 +from os import path + +from setuptools import setup, find_packages + +NAME = "huaweicloudsdkorgid" +VERSION = "3.1.81" +AUTHOR = "HuaweiCloud SDK" +AUTHOR_EMAIL = "hwcloudsdk@huawei.com" +URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" + +DESCRIPTION = "OrgID" +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>=3.1.81"] + +OPTIONS = { + 'bdist_wheel': { + 'universal': True + } +} + +setup( + name=NAME, + version=VERSION, + options=OPTIONS, + 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", "OrgID"], + packages=find_packages(exclude=["tests*"]), + install_requires=REQUIRES, + python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*", + include_package_data=True, + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python :: 2.7', + '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', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Topic :: Software Development' + ] +)