def test_query(self):
        result = Client.query(None)
        self.assertEqual(0, len(result))
        dic = {
            'str_test': 'test',
            'none_test': None,
            'int_test': 1
        }
        result = Client.query(dic)
        self.assertEqual('test', result.get('str_test'))
        self.assertIsNone(result.get("none_test"))
        self.assertEqual("1", result.get("int_test"))
        with open(os.path.join(module_path, "test.txt")) as f:
            fl = [1, None]
            sub_dict_fl = {
                'none_test': None,
                'int_test': 2,
                'str_test': 'test',
                'file_test': f
            }
            fl.append(sub_dict_fl)
            sl = [1, None]
            fl.append(sl)
            dic['list'] = fl
            result = Client.query(dic)
        self.assertEqual("1", result.get("list.1"))
        self.assertIsNone(result.get("list.2"))
        self.assertEqual("1", result.get("int_test"))
        self.assertEqual("2", result.get("list.3.int_test"))
        self.assertEqual(None, result.get("list.3.file_test"))
        self.assertIsNone(result.get("list.3.none_test"))
        self.assertEqual("test", result.get("list.3.str_test"))
        self.assertEqual("1", result.get("list.4.1"))

        sub_map_fd = {
            'none_test': None,
            'int_test': 2,
            'str_test': 'test'
        }
        fd = {
            'first_map_map': sub_map_fd,
            'first_map_list': sl,
            'none_test': None,
            'int_test': 2,
            'str_test': 'test'
        }
        dic['map'] = fd

        result = Client.query(dic)
        self.assertEqual("1", result.get("map.first_map_list.1"))
        self.assertIsNone(result.get("map.none_test"))
        self.assertEqual("2", result.get("map.int_test"))
        self.assertEqual("test", result.get("map.str_test"))
        self.assertIsNone(result.get("map.first_map_map.none_test"))
        self.assertEqual("2", result.get("map.first_map_map.int_test"))
        self.assertEqual("test", result.get("map.first_map_map.str_test"))
Beispiel #2
0
 async def get_plugin_rule_check_info_with_options_async(
     self,
     request: dingtalkworkbench__1__0_models.GetPluginRuleCheckInfoRequest,
     headers: dingtalkworkbench__1__0_models.GetPluginRuleCheckInfoHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkworkbench__1__0_models.GetPluginRuleCheckInfoResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.mini_app_id):
         query['miniAppId'] = request.mini_app_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkworkbench__1__0_models.GetPluginRuleCheckInfoResponse(),
         await self.do_roarequest_async(
             'GetPluginRuleCheckInfo', 'workbench_1.0', 'HTTP', 'GET', 'AK',
             f'/v1.0/workbench/plugins/validationRules', 'json', req,
             runtime))
Beispiel #3
0
 async def query_goods_list_with_options_async(
     self,
     request: dingtalkwms__1__0_models.QueryGoodsListRequest,
     headers: dingtalkwms__1__0_models.QueryGoodsListHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkwms__1__0_models.QueryGoodsListResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.end_time_in_mills):
         query['endTimeInMills'] = request.end_time_in_mills
     if not UtilClient.is_unset(request.max_results):
         query['maxResults'] = request.max_results
     if not UtilClient.is_unset(request.next_token):
         query['nextToken'] = request.next_token
     if not UtilClient.is_unset(request.start_time_in_mills):
         query['startTimeInMills'] = request.start_time_in_mills
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers['x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers,
         query=OpenApiUtilClient.query(query)
     )
     return TeaCore.from_map(
         dingtalkwms__1__0_models.QueryGoodsListResponse(),
         await self.do_roarequest_async('QueryGoodsList', 'wms_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/wms/goods', 'json', req, runtime)
     )
Beispiel #4
0
 async def get_media_cerficate_with_options_async(
     self,
     request: dingtalkcontent__1__0_models.GetMediaCerficateRequest,
     headers: dingtalkcontent__1__0_models.GetMediaCerficateHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkcontent__1__0_models.GetMediaCerficateResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.file_name):
         query['fileName'] = request.file_name
     if not UtilClient.is_unset(request.mcn_id):
         query['mcnId'] = request.mcn_id
     if not UtilClient.is_unset(request.media_id):
         query['mediaId'] = request.media_id
     if not UtilClient.is_unset(request.media_introduction):
         query['mediaIntroduction'] = request.media_introduction
     if not UtilClient.is_unset(request.media_title):
         query['mediaTitle'] = request.media_title
     if not UtilClient.is_unset(request.thumb_url):
         query['thumbUrl'] = request.thumb_url
     if not UtilClient.is_unset(request.user_id):
         query['userId'] = request.user_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers['x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers,
         query=OpenApiUtilClient.query(query)
     )
     return TeaCore.from_map(
         dingtalkcontent__1__0_models.GetMediaCerficateResponse(),
         await self.do_roarequest_async('GetMediaCerficate', 'content_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/content/media/cerficates', 'json', req, runtime)
     )
Beispiel #5
0
 async def query_schema_by_process_code_with_options_async(
     self,
     request: dingtalkworkflow__1__0_models.QuerySchemaByProcessCodeRequest,
     headers: dingtalkworkflow__1__0_models.QuerySchemaByProcessCodeHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkworkflow__1__0_models.QuerySchemaByProcessCodeResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.process_code):
         query['processCode'] = request.process_code
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkworkflow__1__0_models.QuerySchemaByProcessCodeResponse(),
         await self.do_roarequest_async(
             'QuerySchemaByProcessCode', 'workflow_1.0', 'HTTP', 'GET',
             'AK', f'/v1.0/workflow/forms/schemas/processCodes', 'json',
             req, runtime))
Beispiel #6
0
 async def query_all_process_instances_with_options_async(
     self,
     request: dingtalkworkflow__1__0_models.QueryAllProcessInstancesRequest,
     headers: dingtalkworkflow__1__0_models.QueryAllProcessInstancesHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkworkflow__1__0_models.QueryAllProcessInstancesResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.app_uuid):
         query['appUuid'] = request.app_uuid
     if not UtilClient.is_unset(request.end_time_in_mills):
         query['endTimeInMills'] = request.end_time_in_mills
     if not UtilClient.is_unset(request.max_results):
         query['maxResults'] = request.max_results
     if not UtilClient.is_unset(request.next_token):
         query['nextToken'] = request.next_token
     if not UtilClient.is_unset(request.process_code):
         query['processCode'] = request.process_code
     if not UtilClient.is_unset(request.start_time_in_mills):
         query['startTimeInMills'] = request.start_time_in_mills
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkworkflow__1__0_models.QueryAllProcessInstancesResponse(),
         await self.do_roarequest_async(
             'QueryAllProcessInstances', 'workflow_1.0', 'HTTP', 'GET',
             'AK', f'/v1.0/workflow/processes/pages/instances', 'json', req,
             runtime))
Beispiel #7
0
 async def update_application_reg_form_with_options_async(
     self,
     flow_id: str,
     request: dingtalkats__1__0_models.UpdateApplicationRegFormRequest,
     headers: dingtalkats__1__0_models.UpdateApplicationRegFormHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkats__1__0_models.UpdateApplicationRegFormResponse:
     UtilClient.validate_model(request)
     flow_id = OpenApiUtilClient.get_encode_param(flow_id)
     query = {}
     if not UtilClient.is_unset(request.biz_code):
         query['bizCode'] = request.biz_code
     body = {}
     if not UtilClient.is_unset(request.content):
         body['content'] = request.content
     if not UtilClient.is_unset(request.ding_pan_file):
         body['dingPanFile'] = request.ding_pan_file
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers,
         query=OpenApiUtilClient.query(query),
         body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkats__1__0_models.UpdateApplicationRegFormResponse(), await
         self.do_roarequest_async(
             'UpdateApplicationRegForm', 'ats_1.0', 'HTTP', 'PUT', 'AK',
             f'/v1.0/ats/flows/{flow_id}/applicationRegForms', 'json', req,
             runtime))
Beispiel #8
0
 async def get_flow_id_by_relation_entity_id_with_options_async(
     self,
     request: dingtalkats__1__0_models.GetFlowIdByRelationEntityIdRequest,
     headers: dingtalkats__1__0_models.GetFlowIdByRelationEntityIdHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkats__1__0_models.GetFlowIdByRelationEntityIdResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.biz_code):
         query['bizCode'] = request.biz_code
     if not UtilClient.is_unset(request.relation_entity):
         query['relationEntity'] = request.relation_entity
     if not UtilClient.is_unset(request.relation_entity_id):
         query['relationEntityId'] = request.relation_entity_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkats__1__0_models.GetFlowIdByRelationEntityIdResponse(),
         await self.do_roarequest_async('GetFlowIdByRelationEntityId',
                                        'ats_1.0', 'HTTP', 'GET', 'AK',
                                        f'/v1.0/ats/flows/ids', 'json', req,
                                        runtime))
Beispiel #9
0
 def query_positions_with_options(
     self,
     request: dingtalkhrm__1__0_models.QueryPositionsRequest,
     headers: dingtalkhrm__1__0_models.QueryPositionsHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkhrm__1__0_models.QueryPositionsResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.max_results):
         query['maxResults'] = request.max_results
     if not UtilClient.is_unset(request.next_token):
         query['nextToken'] = request.next_token
     body = {}
     if not UtilClient.is_unset(request.in_category_ids):
         body['inCategoryIds'] = request.in_category_ids
     if not UtilClient.is_unset(request.in_position_ids):
         body['inPositionIds'] = request.in_position_ids
     if not UtilClient.is_unset(request.position_name):
         body['positionName'] = request.position_name
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers,
         query=OpenApiUtilClient.query(query),
         body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkhrm__1__0_models.QueryPositionsResponse(),
         self.do_roarequest('QueryPositions', 'hrm_1.0', 'HTTP', 'POST',
                            'AK', f'/v1.0/hrm/positions/query', 'json', req,
                            runtime))
Beispiel #10
0
 async def query_jobs_with_options_async(
     self,
     request: dingtalkhrm__1__0_models.QueryJobsRequest,
     headers: dingtalkhrm__1__0_models.QueryJobsHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkhrm__1__0_models.QueryJobsResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.job_name):
         query['jobName'] = request.job_name
     if not UtilClient.is_unset(request.max_results):
         query['maxResults'] = request.max_results
     if not UtilClient.is_unset(request.next_token):
         query['nextToken'] = request.next_token
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkhrm__1__0_models.QueryJobsResponse(), await
         self.do_roarequest_async('QueryJobs', 'hrm_1.0', 'HTTP', 'GET',
                                  'AK', f'/v1.0/hrm/jobs', 'json', req,
                                  runtime))
Beispiel #11
0
 async def query_hrm_employee_dismission_info_with_options_async(
     self,
     tmp_req: dingtalkhrm__1__0_models.
     QueryHrmEmployeeDismissionInfoRequest,
     headers: dingtalkhrm__1__0_models.
     QueryHrmEmployeeDismissionInfoHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkhrm__1__0_models.QueryHrmEmployeeDismissionInfoResponse:
     UtilClient.validate_model(tmp_req)
     request = dingtalkhrm__1__0_models.QueryHrmEmployeeDismissionInfoShrinkRequest(
     )
     OpenApiUtilClient.convert(tmp_req, request)
     if not UtilClient.is_unset(tmp_req.user_id_list):
         request.user_id_list_shrink = OpenApiUtilClient.array_to_string_with_specified_style(
             tmp_req.user_id_list, 'userIdList', 'json')
     query = {}
     if not UtilClient.is_unset(request.user_id_list_shrink):
         query['userIdList'] = request.user_id_list_shrink
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkhrm__1__0_models.QueryHrmEmployeeDismissionInfoResponse(),
         await
         self.do_roarequest_async('QueryHrmEmployeeDismissionInfo',
                                  'hrm_1.0', 'HTTP', 'GET', 'AK',
                                  f'/v1.0/hrm/employees/dimissionInfos',
                                  'json', req, runtime))
Beispiel #12
0
 async def master_data_tenant_quey_with_options_async(
     self,
     request: dingtalkhrm__1__0_models.MasterDataTenantQueyRequest,
     headers: dingtalkhrm__1__0_models.MasterDataTenantQueyHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkhrm__1__0_models.MasterDataTenantQueyResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.entity_code):
         query['entityCode'] = request.entity_code
     if not UtilClient.is_unset(request.scope_code):
         query['scopeCode'] = request.scope_code
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkhrm__1__0_models.MasterDataTenantQueyResponse(), await
         self.do_roarequest_async('MasterDataTenantQuey', 'hrm_1.0', 'HTTP',
                                  'GET', 'AK', f'/v1.0/hrm/masters/tenants',
                                  'json', req, runtime))
Beispiel #13
0
 async def master_data_save_with_options_async(
     self,
     request: dingtalkhrm__1__0_models.MasterDataSaveRequest,
     headers: dingtalkhrm__1__0_models.MasterDataSaveHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkhrm__1__0_models.MasterDataSaveResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.tenant_id):
         query['tenantId'] = request.tenant_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers,
         query=OpenApiUtilClient.query(query),
         body=UtilClient.to_array(request.body))
     return TeaCore.from_map(
         dingtalkhrm__1__0_models.MasterDataSaveResponse(), await
         self.do_roarequest_async('MasterDataSave', 'hrm_1.0', 'HTTP',
                                  'POST', 'AK',
                                  f'/v1.0/hrm/masters/datas/save', 'json',
                                  req, runtime))
Beispiel #14
0
 async def get_personal_experience_info_with_options_async(
     self,
     request: dingtalkapp_market__1__0_models.
     GetPersonalExperienceInfoRequest,
     headers: dingtalkapp_market__1__0_models.
     GetPersonalExperienceInfoHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkapp_market__1__0_models.GetPersonalExperienceInfoResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.user_id):
         query['userId'] = request.user_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkapp_market__1__0_models.GetPersonalExperienceInfoResponse(
         ), await
         self.do_roarequest_async('GetPersonalExperienceInfo',
                                  'appMarket_1.0', 'HTTP', 'GET', 'AK',
                                  f'/v1.0/appMarket/personalExperiences',
                                  'json', req, runtime))
Beispiel #15
0
 async def list_work_bench_group_with_options_async(
     self,
     request: dingtalkworkbench__1__0_models.ListWorkBenchGroupRequest,
     headers: dingtalkworkbench__1__0_models.ListWorkBenchGroupHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkworkbench__1__0_models.ListWorkBenchGroupResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.ecological_corp_id):
         query['ecologicalCorpId'] = request.ecological_corp_id
     if not UtilClient.is_unset(request.group_type):
         query['groupType'] = request.group_type
     if not UtilClient.is_unset(request.op_union_id):
         query['opUnionId'] = request.op_union_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkworkbench__1__0_models.ListWorkBenchGroupResponse(), await
         self.do_roarequest_async('ListWorkBenchGroup', 'workbench_1.0',
                                  'HTTP', 'GET', 'AK',
                                  f'/v1.0/workbench/groups', 'json', req,
                                  runtime))
Beispiel #16
0
 async def get_candidate_by_phone_number_with_options_async(
     self,
     request: dingtalkats__1__0_models.GetCandidateByPhoneNumberRequest,
     headers: dingtalkats__1__0_models.GetCandidateByPhoneNumberHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkats__1__0_models.GetCandidateByPhoneNumberResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.biz_code):
         query['bizCode'] = request.biz_code
     if not UtilClient.is_unset(request.phone_number):
         query['phoneNumber'] = request.phone_number
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkats__1__0_models.GetCandidateByPhoneNumberResponse(), await
         self.do_roarequest_async('GetCandidateByPhoneNumber', 'ats_1.0',
                                  'HTTP', 'GET', 'AK',
                                  f'/v1.0/ats/candidates', 'json', req,
                                  runtime))
Beispiel #17
0
 async def get_file_upload_info_with_options_async(
     self,
     request: dingtalkats__1__0_models.GetFileUploadInfoRequest,
     headers: dingtalkats__1__0_models.GetFileUploadInfoHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkats__1__0_models.GetFileUploadInfoResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.biz_code):
         query['bizCode'] = request.biz_code
     if not UtilClient.is_unset(request.file_name):
         query['fileName'] = request.file_name
     if not UtilClient.is_unset(request.file_size):
         query['fileSize'] = request.file_size
     if not UtilClient.is_unset(request.md_5):
         query['md5'] = request.md_5
     if not UtilClient.is_unset(request.op_user_id):
         query['opUserId'] = request.op_user_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkats__1__0_models.GetFileUploadInfoResponse(), await
         self.do_roarequest_async('GetFileUploadInfo', 'ats_1.0', 'HTTP',
                                  'GET', 'AK',
                                  f'/v1.0/ats/files/uploadInfos', 'json',
                                  req, runtime))
Beispiel #18
0
 async def get_ding_me_base_data_with_options_async(
     self,
     request: dingtalkdingmi__1__0_models.GetDingMeBaseDataRequest,
     headers: dingtalkdingmi__1__0_models.GetDingMeBaseDataHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkdingmi__1__0_models.GetDingMeBaseDataResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.app_key):
         query['appKey'] = request.app_key
     if not UtilClient.is_unset(request.start_day):
         query['startDay'] = request.start_day
     if not UtilClient.is_unset(request.end_day):
         query['endDay'] = request.end_day
     if not UtilClient.is_unset(request.by_day):
         query['byDay'] = request.by_day
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkdingmi__1__0_models.GetDingMeBaseDataResponse(), await
         self.do_roarequest_async('GetDingMeBaseData', 'dingmi_1.0', 'HTTP',
                                  'GET', 'AK', f'/v1.0/dingmi/robots/data',
                                  'json', req, runtime))
Beispiel #19
0
 async def get_job_auth_with_options_async(
     self,
     job_id: str,
     request: dingtalkats__1__0_models.GetJobAuthRequest,
     headers: dingtalkats__1__0_models.GetJobAuthHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkats__1__0_models.GetJobAuthResponse:
     UtilClient.validate_model(request)
     job_id = OpenApiUtilClient.get_encode_param(job_id)
     query = {}
     if not UtilClient.is_unset(request.op_user_id):
         query['opUserId'] = request.op_user_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkats__1__0_models.GetJobAuthResponse(), await
         self.do_roarequest_async('GetJobAuth', 'ats_1.0', 'HTTP', 'GET',
                                  'AK', f'/v1.0/ats/auths/jobs/{job_id}',
                                  'json', req, runtime))
Beispiel #20
0
 async def get_official_account_robot_info_with_options_async(
     self,
     request: dingtalkdingmi__1__0_models.
     GetOfficialAccountRobotInfoRequest,
     headers: dingtalkdingmi__1__0_models.
     GetOfficialAccountRobotInfoHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkdingmi__1__0_models.GetOfficialAccountRobotInfoResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.type):
         query['type'] = request.type
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkdingmi__1__0_models.GetOfficialAccountRobotInfoResponse(),
         await
         self.do_roarequest_async('GetOfficialAccountRobotInfo',
                                  'dingmi_1.0', 'HTTP', 'GET', 'AK',
                                  f'/v1.0/dingmi/officialAccounts/robots',
                                  'json', req, runtime))
Beispiel #21
0
 async def update_interview_sign_in_info_with_options_async(
     self,
     interview_id: str,
     request: dingtalkats__1__0_models.UpdateInterviewSignInInfoRequest,
     headers: dingtalkats__1__0_models.UpdateInterviewSignInInfoHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkats__1__0_models.UpdateInterviewSignInInfoResponse:
     UtilClient.validate_model(request)
     interview_id = OpenApiUtilClient.get_encode_param(interview_id)
     query = {}
     if not UtilClient.is_unset(request.biz_code):
         query['bizCode'] = request.biz_code
     body = {}
     if not UtilClient.is_unset(request.sign_in_time_millis):
         body['signInTimeMillis'] = request.sign_in_time_millis
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers,
         query=OpenApiUtilClient.query(query),
         body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkats__1__0_models.UpdateInterviewSignInInfoResponse(), await
         self.do_roarequest_async(
             'UpdateInterviewSignInInfo', 'ats_1.0', 'HTTP', 'PUT', 'AK',
             f'/v1.0/ats/interviews/{interview_id}/signInInfos', 'none',
             req, runtime))
Beispiel #22
0
 async def query_device_with_options_async(
     self,
     request: dingtalkdiot__1__0_models.QueryDeviceRequest,
     headers: dingtalkdiot__1__0_models.QueryDeviceHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkdiot__1__0_models.QueryDeviceResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.corp_id):
         query['corpId'] = request.corp_id
     if not UtilClient.is_unset(request.page_number):
         query['pageNumber'] = request.page_number
     if not UtilClient.is_unset(request.page_size):
         query['pageSize'] = request.page_size
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkdiot__1__0_models.QueryDeviceResponse(), await
         self.do_roarequest_async('QueryDevice', 'diot_1.0', 'HTTP', 'GET',
                                  'AK', f'/v1.0/diot/devices', 'json', req,
                                  runtime))
Beispiel #23
0
 def query_form_instance_with_options(
     self,
     request: dingtalkworkflow__1__0_models.QueryFormInstanceRequest,
     headers: dingtalkworkflow__1__0_models.QueryFormInstanceHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkworkflow__1__0_models.QueryFormInstanceResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.app_uuid):
         query['appUuid'] = request.app_uuid
     if not UtilClient.is_unset(request.form_code):
         query['formCode'] = request.form_code
     if not UtilClient.is_unset(request.form_instance_id):
         query['formInstanceId'] = request.form_instance_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkworkflow__1__0_models.QueryFormInstanceResponse(),
         self.do_roarequest('QueryFormInstance', 'workflow_1.0', 'HTTP',
                            'GET', 'AK', f'/v1.0/workflow/forms/instances',
                            'json', req, runtime))
Beispiel #24
0
 async def add_file_with_options_async(
     self,
     request: dingtalkats__1__0_models.AddFileRequest,
     headers: dingtalkats__1__0_models.AddFileHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkats__1__0_models.AddFileResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.biz_code):
         query['bizCode'] = request.biz_code
     if not UtilClient.is_unset(request.op_user_id):
         query['opUserId'] = request.op_user_id
     body = {}
     if not UtilClient.is_unset(request.file_name):
         body['fileName'] = request.file_name
     if not UtilClient.is_unset(request.media_id):
         body['mediaId'] = request.media_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers,
         query=OpenApiUtilClient.query(query),
         body=OpenApiUtilClient.parse_to_map(body))
     return TeaCore.from_map(
         dingtalkats__1__0_models.AddFileResponse(), await
         self.do_roarequest_async('AddFile', 'ats_1.0', 'HTTP', 'POST',
                                  'AK', f'/v1.0/ats/files', 'json', req,
                                  runtime))
Beispiel #25
0
 async def get_feed_with_options_async(
     self,
     feed_id: str,
     request: dingtalkcontent__1__0_models.GetFeedRequest,
     headers: dingtalkcontent__1__0_models.GetFeedHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkcontent__1__0_models.GetFeedResponse:
     UtilClient.validate_model(request)
     feed_id = OpenApiUtilClient.get_encode_param(feed_id)
     query = {}
     if not UtilClient.is_unset(request.mcn_id):
         query['mcnId'] = request.mcn_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers['x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers,
         query=OpenApiUtilClient.query(query)
     )
     return TeaCore.from_map(
         dingtalkcontent__1__0_models.GetFeedResponse(),
         await self.do_roarequest_async('GetFeed', 'content_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/content/feeds/{feed_id}', 'json', req, runtime)
     )
Beispiel #26
0
 async def confirm_rights_with_options_async(
     self,
     rights_code: str,
     request: dingtalkats__1__0_models.ConfirmRightsRequest,
     headers: dingtalkats__1__0_models.ConfirmRightsHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkats__1__0_models.ConfirmRightsResponse:
     UtilClient.validate_model(request)
     rights_code = OpenApiUtilClient.get_encode_param(rights_code)
     query = {}
     if not UtilClient.is_unset(request.biz_code):
         query['bizCode'] = request.biz_code
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkats__1__0_models.ConfirmRightsResponse(), await
         self.do_roarequest_async(
             'ConfirmRights', 'ats_1.0', 'HTTP', 'POST', 'AK',
             f'/v1.0/ats/rights/{rights_code}/confirm', 'json', req,
             runtime))
Beispiel #27
0
 async def page_feed_with_options_async(
     self,
     request: dingtalkcontent__1__0_models.PageFeedRequest,
     headers: dingtalkcontent__1__0_models.PageFeedHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkcontent__1__0_models.PageFeedResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.max_results):
         query['maxResults'] = request.max_results
     if not UtilClient.is_unset(request.mcn_id):
         query['mcnId'] = request.mcn_id
     if not UtilClient.is_unset(request.next_token):
         query['nextToken'] = request.next_token
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers['x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers,
         query=OpenApiUtilClient.query(query),
         body=request.body
     )
     return TeaCore.from_map(
         dingtalkcontent__1__0_models.PageFeedResponse(),
         await self.do_roarequest_async('PageFeed', 'content_1.0', 'HTTP', 'POST', 'AK', f'/v1.0/content/feeds/query', 'json', req, runtime)
     )
Beispiel #28
0
 async def finish_beginner_task_with_options_async(
     self,
     task_code: str,
     request: dingtalkats__1__0_models.FinishBeginnerTaskRequest,
     headers: dingtalkats__1__0_models.FinishBeginnerTaskHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkats__1__0_models.FinishBeginnerTaskResponse:
     UtilClient.validate_model(request)
     task_code = OpenApiUtilClient.get_encode_param(task_code)
     query = {}
     if not UtilClient.is_unset(request.scope):
         query['scope'] = request.scope
     if not UtilClient.is_unset(request.user_id):
         query['userId'] = request.user_id
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkats__1__0_models.FinishBeginnerTaskResponse(), await
         self.do_roarequest_async(
             'FinishBeginnerTask', 'ats_1.0', 'HTTP', 'POST', 'AK',
             f'/v1.0/ats/beginnerTasks/{task_code}/finish', 'json', req,
             runtime))
Beispiel #29
0
 async def query_custom_entry_processes_with_options_async(
     self,
     request: dingtalkhrm__1__0_models.QueryCustomEntryProcessesRequest,
     headers: dingtalkhrm__1__0_models.QueryCustomEntryProcessesHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkhrm__1__0_models.QueryCustomEntryProcessesResponse:
     UtilClient.validate_model(request)
     query = {}
     if not UtilClient.is_unset(request.operate_user_id):
         query['operateUserId'] = request.operate_user_id
     if not UtilClient.is_unset(request.next_token):
         query['nextToken'] = request.next_token
     if not UtilClient.is_unset(request.max_results):
         query['maxResults'] = request.max_results
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers['x-acs-dingtalk-access-token'] = headers.x_acs_dingtalk_access_token
     req = open_api_models.OpenApiRequest(
         headers=real_headers,
         query=OpenApiUtilClient.query(query)
     )
     return TeaCore.from_map(
         dingtalkhrm__1__0_models.QueryCustomEntryProcessesResponse(),
         await self.do_roarequest_async('QueryCustomEntryProcesses', 'hrm_1.0', 'HTTP', 'GET', 'AK', f'/v1.0/hrm/customEntryProcesses', 'json', req, runtime)
     )
Beispiel #30
0
 def get_application_reg_form_by_flow_id_with_options(
     self,
     flow_id: str,
     request: dingtalkats__1__0_models.GetApplicationRegFormByFlowIdRequest,
     headers: dingtalkats__1__0_models.GetApplicationRegFormByFlowIdHeaders,
     runtime: util_models.RuntimeOptions,
 ) -> dingtalkats__1__0_models.GetApplicationRegFormByFlowIdResponse:
     UtilClient.validate_model(request)
     flow_id = OpenApiUtilClient.get_encode_param(flow_id)
     query = {}
     if not UtilClient.is_unset(request.biz_code):
         query['bizCode'] = request.biz_code
     real_headers = {}
     if not UtilClient.is_unset(headers.common_headers):
         real_headers = headers.common_headers
     if not UtilClient.is_unset(headers.x_acs_dingtalk_access_token):
         real_headers[
             'x-acs-dingtalk-access-token'] = UtilClient.to_jsonstring(
                 headers.x_acs_dingtalk_access_token)
     req = open_api_models.OpenApiRequest(
         headers=real_headers, query=OpenApiUtilClient.query(query))
     return TeaCore.from_map(
         dingtalkats__1__0_models.GetApplicationRegFormByFlowIdResponse(),
         self.do_roarequest(
             'GetApplicationRegFormByFlowId', 'ats_1.0', 'HTTP', 'GET',
             'AK', f'/v1.0/ats/flows/{flow_id}/applicationRegForms', 'json',
             req, runtime))