From 114bc594ccced867189b74ee4915a7ec2ba7f226 Mon Sep 17 00:00:00 2001 From: Huaweicloud-SDK Date: Thu, 31 Dec 2020 18:02:03 +0800 Subject: [PATCH] release 3.0.29-beta source code for python --- CHANGELOG.md | 46 ++ CHANGELOG_CN.md | 46 ++ README.md | 10 +- README_CN.md | 10 +- __init__.py | 0 examples/setup.py | 2 +- .../v2/apig_async_client.py | 10 +- .../huaweicloudsdkapig/v2/apig_client.py | 10 +- huaweicloud-sdk-apig/setup.py | 2 +- .../huaweicloudsdkas/v1/as_async_client.py | 10 +- .../huaweicloudsdkas/v1/as_client.py | 10 +- huaweicloud-sdk-as/setup.py | 2 +- .../huaweicloudsdkbcs/v2/bcs_async_client.py | 10 +- .../huaweicloudsdkbcs/v2/bcs_client.py | 10 +- huaweicloud-sdk-bcs/setup.py | 2 +- .../huaweicloudsdkbms/v1/bms_async_client.py | 10 +- .../huaweicloudsdkbms/v1/bms_client.py | 10 +- huaweicloud-sdk-bms/setup.py | 2 +- .../huaweicloudsdkbss/v2/bss_async_client.py | 10 +- .../huaweicloudsdkbss/v2/bss_client.py | 10 +- huaweicloud-sdk-bss/setup.py | 2 +- .../v2/bssintl_async_client.py | 10 +- .../v2/bssintl_client.py | 10 +- huaweicloud-sdk-bssintl/setup.py | 2 +- .../huaweicloudsdkcbr/v1/cbr_async_client.py | 10 +- .../huaweicloudsdkcbr/v1/cbr_client.py | 10 +- huaweicloud-sdk-cbr/setup.py | 2 +- .../huaweicloudsdkcce/v3/cce_async_client.py | 10 +- .../huaweicloudsdkcce/v3/cce_client.py | 10 +- huaweicloud-sdk-cce/setup.py | 2 +- .../huaweicloudsdkces/v1/ces_async_client.py | 10 +- .../huaweicloudsdkces/v1/ces_client.py | 10 +- huaweicloud-sdk-ces/setup.py | 2 +- .../v3/classroom_async_client.py | 10 +- .../v3/classroom_client.py | 10 +- huaweicloud-sdk-classroom/setup.py | 2 +- .../huaweicloudsdkcloudide/v2/__init__.py | 4 + .../v2/cloudide_async_client.py | 81 ++- .../v2/cloudide_client.py | 81 ++- .../v2/model/__init__.py | 4 + .../v2/model/account_status.py | 191 ++++++ .../v2/model/instance_param.py | 87 ++- .../v2/model/list_instances_request.py | 52 +- .../v2/model/show_account_status_request.py | 81 +++ .../v2/model/show_account_status_response.py | 135 ++++ .../v2/model/start_instance_param.py | 137 ++++ .../v2/model/start_instance_request.py | 31 +- huaweicloud-sdk-cloudide/setup.py | 2 +- .../v2/cloudpipeline_async_client.py | 10 +- .../v2/cloudpipeline_client.py | 10 +- huaweicloud-sdk-cloudpipeline/setup.py | 2 +- .../v1/cloudtest_async_client.py | 10 +- .../v1/cloudtest_client.py | 10 +- huaweicloud-sdk-cloudtest/setup.py | 2 +- huaweicloud-sdk-core/setup.py | 2 +- .../huaweicloudsdkcts/v3/cts_async_client.py | 10 +- .../huaweicloudsdkcts/v3/cts_client.py | 10 +- huaweicloud-sdk-cts/setup.py | 2 +- .../huaweicloudsdkdcs/v2/dcs_async_client.py | 10 +- .../huaweicloudsdkdcs/v2/dcs_client.py | 10 +- .../v2/model/bigkeys_body.py | 6 +- .../v2/model/hotkeys_body.py | 14 +- .../v2/model/instance_list_info.py | 6 +- .../v2/model/slowlog_item.py | 6 +- huaweicloud-sdk-dcs/setup.py | 2 +- .../huaweicloudsdkdds/v3/dds_async_client.py | 10 +- .../huaweicloudsdkdds/v3/dds_client.py | 10 +- huaweicloud-sdk-dds/setup.py | 2 +- .../v1/devstar_async_client.py | 10 +- .../v1/devstar_client.py | 10 +- huaweicloud-sdk-devstar/setup.py | 2 +- huaweicloud-sdk-dgc/LICENSE | 13 + huaweicloud-sdk-dgc/README_PYPI.md | 1 + .../huaweicloudsdkdgc/__init__.py | 0 .../huaweicloudsdkdgc/v1/__init__.py | 26 + .../huaweicloudsdkdgc/v1/dgc_async_client.py | 511 +++++++++++++++ .../huaweicloudsdkdgc/v1/dgc_client.py | 509 +++++++++++++++ .../huaweicloudsdkdgc/v1/exception_handler.py | 19 + .../huaweicloudsdkdgc/v1/model/__init__.py | 22 + .../v1/model/connection_info.py | 158 +++++ .../v1/model/connection_param.py | 158 +++++ .../v1/model/create_connection_request.py | 108 ++++ .../v1/model/create_connection_response.py | 81 +++ .../v1/model/delete_connction_request.py | 107 ++++ .../v1/model/delete_connction_response.py | 81 +++ .../v1/model/export_connections_request.py | 81 +++ .../v1/model/export_connections_response.py | 81 +++ .../v1/model/import_connection_req.py | 160 +++++ .../v1/model/import_connections_request.py | 108 ++++ .../v1/model/import_connections_response.py | 42 +- .../v1/model/list_connections_request.py | 81 +++ .../v1/model/list_connections_response.py | 133 ++++ .../v1/model/show_connection_request.py | 107 ++++ .../v1/model/show_connection_response.py | 158 +++++ .../v1/model/update_connection_request.py | 48 +- .../v1/model/update_connection_response.py | 81 +++ .../huaweicloudsdkdgc/v1/region/__init__.py | 0 .../huaweicloudsdkdgc/v1/region/dgc_region.py | 26 + huaweicloud-sdk-dgc/requirements.txt | 1 + huaweicloud-sdk-dgc/setup.py | 45 ++ huaweicloud-sdk-dgc/test-requirements.txt | 5 + .../huaweicloudsdkdms/v2/dms_async_client.py | 10 +- .../huaweicloudsdkdms/v2/dms_client.py | 10 +- huaweicloud-sdk-dms/setup.py | 2 +- .../huaweicloudsdkecs/v2/ecs_async_client.py | 10 +- .../huaweicloudsdkecs/v2/ecs_client.py | 10 +- huaweicloud-sdk-ecs/setup.py | 2 +- .../huaweicloudsdkeip/v2/eip_async_client.py | 10 +- .../huaweicloudsdkeip/v2/eip_client.py | 10 +- huaweicloud-sdk-eip/setup.py | 2 +- .../huaweicloudsdkelb/v2/elb_async_client.py | 10 +- .../huaweicloudsdkelb/v2/elb_client.py | 10 +- .../huaweicloudsdkelb/v3/elb_async_client.py | 10 +- .../huaweicloudsdkelb/v3/elb_client.py | 10 +- huaweicloud-sdk-elb/setup.py | 2 +- .../huaweicloudsdkeps/v1/eps_async_client.py | 10 +- .../huaweicloudsdkeps/v1/eps_client.py | 10 +- huaweicloud-sdk-eps/setup.py | 2 +- .../huaweicloudsdkevs/v2/evs_async_client.py | 10 +- .../huaweicloudsdkevs/v2/evs_client.py | 10 +- huaweicloud-sdk-evs/setup.py | 2 +- .../v2/functiongraph_async_client.py | 10 +- .../v2/functiongraph_client.py | 10 +- huaweicloud-sdk-functiongraph/setup.py | 2 +- .../huaweicloudsdkiam/v3/iam_async_client.py | 10 +- .../huaweicloudsdkiam/v3/iam_client.py | 10 +- huaweicloud-sdk-iam/setup.py | 2 +- .../v1/image_async_client.py | 10 +- .../huaweicloudsdkimage/v1/image_client.py | 10 +- huaweicloud-sdk-image/setup.py | 2 +- .../huaweicloudsdkims/v2/ims_async_client.py | 10 +- .../huaweicloudsdkims/v2/ims_client.py | 10 +- huaweicloud-sdk-ims/setup.py | 2 +- .../v5/iotda_async_client.py | 10 +- .../huaweicloudsdkiotda/v5/iotda_client.py | 10 +- huaweicloud-sdk-iotda/setup.py | 2 +- .../v2/kafka_async_client.py | 10 +- .../huaweicloudsdkkafka/v2/kafka_client.py | 10 +- huaweicloud-sdk-kafka/setup.py | 2 +- .../huaweicloudsdkkms/v1/kms_async_client.py | 10 +- .../huaweicloudsdkkms/v1/kms_client.py | 10 +- huaweicloud-sdk-kms/setup.py | 2 +- .../v1/live_async_client.py | 10 +- .../huaweicloudsdklive/v1/live_client.py | 10 +- .../v2/live_async_client.py | 10 +- .../huaweicloudsdklive/v2/live_client.py | 10 +- huaweicloud-sdk-live/setup.py | 2 +- .../v1/meeting_async_client.py | 10 +- .../v1/meeting_client.py | 10 +- huaweicloud-sdk-meeting/setup.py | 2 +- .../v1/moderation_async_client.py | 10 +- .../v1/moderation_client.py | 10 +- huaweicloud-sdk-moderation/setup.py | 2 +- .../huaweicloudsdkmpc/v1/mpc_async_client.py | 10 +- .../huaweicloudsdkmpc/v1/mpc_client.py | 10 +- huaweicloud-sdk-mpc/setup.py | 2 +- .../huaweicloudsdknat/v2/nat_async_client.py | 10 +- .../huaweicloudsdknat/v2/nat_client.py | 10 +- huaweicloud-sdk-nat/setup.py | 2 +- .../huaweicloudsdkocr/v1/__init__.py | 100 ++- .../huaweicloudsdkocr/v1/model/__init__.py | 100 ++- ...est_body.py => auto_classification_req.py} | 34 +- ...auto_classification_response_body_item.py} | 58 +- ...nvoice_request_body.py => bankcard_req.py} | 78 +-- ...lt_response.py => bankcard_result_body.py} | 54 +- ...nse.py => business_card_items_response.py} | 30 +- ...d_request_body.py => business_card_req.py} | 46 +- ...py => business_card_response_body_item.py} | 108 ++-- .../v1/model/business_license_req.py | 137 ++++ ...nse.py => business_license_result_body.py} | 94 +-- ....py => flight_itinerary_items_response.py} | 94 +-- ...equest_body.py => flight_itinerary_req.py} | 22 +- ...=> flight_itinerary_response_body_item.py} | 164 ++--- ...onse.py => general_text_items_response.py} | 22 +- ...xt_request_body.py => general_text_req.py} | 90 +-- ...py => general_text_response_body_items.py} | 36 +- .../v1/model/handwriting_items2_response.py | 108 ++++ .../v1/model/handwriting_items3_response.py | 164 +++++ ...onse.py => handwriting_items4_response.py} | 42 +- ...ponse.py => handwriting_items_response.py} | 102 +-- .../v1/model/handwriting_req.py | 218 +++++++ ...e.py => handwriting_response_body_item.py} | 61 +- ...invoice_request_body.py => id_card_req.py} | 101 +-- ...ult_response.py => id_card_result_body.py} | 82 +-- .../v1/model/license_plate_req.py | 137 ++++ ...py => license_plate_response_body_item.py} | 92 +-- ...vin_request_body.py => mvs_invoice_req.py} | 78 +-- ...response.py => mvs_invoice_result_body.py} | 278 ++++---- ...ssport_request_body.py => passport_req.py} | 82 +-- ...lt_response.py => passport_result_body.py} | 126 ++-- .../v1/model/quota_invoice_req.py | 137 ++++ ...sponse.py => quota_invoice_result_body.py} | 50 +- .../recognize_auto_classification_request.py | 32 +- .../recognize_auto_classification_response.py | 8 +- .../v1/model/recognize_bankcard_request.py | 32 +- .../v1/model/recognize_bankcard_response.py | 6 +- .../model/recognize_business_card_request.py | 32 +- .../model/recognize_business_card_response.py | 6 +- .../recognize_business_license_request.py | 32 +- ...recognize_business_license_request_body.py | 137 ---- .../recognize_business_license_response.py | 6 +- .../model/recognize_driver_license_request.py | 26 +- .../recognize_driver_license_request_body.py | 37 +- ...ecognize_driver_license_result_response.py | 29 +- ...ognize_financial_statement_request_body.py | 272 -------- ...ize_financial_statement_result_response.py | 161 ----- ...al_statement_words_block_items_response.py | 272 -------- ...l_statement_words_region_items_response.py | 215 ------- .../recognize_flight_itinerary_request.py | 32 +- ...recognize_flight_itinerary_request_body.py | 137 ---- .../recognize_flight_itinerary_response.py | 6 +- ...recognize_general_table_items2_response.py | 4 +- .../model/recognize_general_table_request.py | 26 +- .../recognize_general_table_request_body.py | 72 ++- ...recognize_general_table_result_response.py | 4 +- .../model/recognize_general_text_request.py | 32 +- .../model/recognize_general_text_response.py | 6 +- .../v1/model/recognize_handwriting_request.py | 32 +- .../recognize_handwriting_request_body.py | 218 ------- .../model/recognize_handwriting_response.py | 6 +- .../v1/model/recognize_id_card_request.py | 46 +- .../model/recognize_id_card_request_body.py | 164 ----- .../v1/model/recognize_id_card_response.py | 20 +- .../model/recognize_license_plate_request.py | 32 +- .../model/recognize_license_plate_response.py | 8 +- .../v1/model/recognize_mvs_invoice_request.py | 32 +- .../model/recognize_mvs_invoice_response.py | 6 +- .../v1/model/recognize_passport_request.py | 32 +- .../v1/model/recognize_passport_response.py | 6 +- .../model/recognize_quota_invoice_request.py | 32 +- .../recognize_quota_invoice_request_body.py | 137 ---- .../model/recognize_quota_invoice_response.py | 6 +- .../model/recognize_taxi_invoice_request.py | 32 +- .../model/recognize_taxi_invoice_response.py | 6 +- .../model/recognize_toll_invoice_request.py | 32 +- .../recognize_toll_invoice_request_body.py | 137 ---- .../model/recognize_toll_invoice_response.py | 6 +- .../model/recognize_train_ticket_request.py | 32 +- .../model/recognize_train_ticket_response.py | 6 +- ...ecognize_transportation_license_request.py | 32 +- ...ize_transportation_license_request_body.py | 137 ---- ...cognize_transportation_license_response.py | 6 +- .../recognize_vat_invoice_items_response.py | 114 +++- .../v1/model/recognize_vat_invoice_request.py | 26 +- .../recognize_vat_invoice_request_body.py | 37 +- .../recognize_vat_invoice_result_response.py | 326 +++++++++- .../recognize_vehicle_license_request.py | 26 +- .../recognize_vehicle_license_request_body.py | 45 +- ...cognize_vehicle_license_result_response.py | 29 +- .../v1/model/recognize_vin_request.py | 46 +- .../v1/model/recognize_vin_response.py | 20 +- .../v1/model/recognize_web_image_request.py | 32 +- .../v1/model/recognize_web_image_response.py | 6 +- ...te_request_body.py => taxi_invoice_req.py} | 26 +- ...esponse.py => taxi_invoice_result_body.py} | 166 ++--- .../v1/model/toll_invoice_req.py | 137 ++++ ...esponse.py => toll_invoice_result_body.py} | 90 +-- .../v1/model/train_ticket_req.py | 137 ++++ ...esponse.py => train_ticket_result_body.py} | 154 ++--- ..._body.py => transportation_license_req.py} | 22 +- ... => transportation_license_result_body.py} | 110 ++-- .../huaweicloudsdkocr/v1/model/vin_req.py | 137 ++++ ..._response.py => vin_response_body_item.py} | 14 +- ...esponse.py => web_image_items_response.py} | 127 ++-- ...image_request_body.py => web_image_req.py} | 94 +-- ...nse.py => web_image_response_body_item.py} | 28 +- .../huaweicloudsdkocr/v1/ocr_async_client.py | 517 ++++++++------- .../huaweicloudsdkocr/v1/ocr_client.py | 517 ++++++++------- .../huaweicloudsdkocr/v1/region/__init__.py | 0 .../huaweicloudsdkocr/v1/region/ocr_region.py | 16 + huaweicloud-sdk-ocr/setup.py | 2 +- .../v4/projectman_async_client.py | 10 +- .../v4/projectman_client.py | 10 +- huaweicloud-sdk-projectman/setup.py | 2 +- .../v2/rabbitmq_async_client.py | 10 +- .../v2/rabbitmq_client.py | 10 +- huaweicloud-sdk-rabbitmq/setup.py | 2 +- .../huaweicloudsdkrds/v3/__init__.py | 1 + .../huaweicloudsdkrds/v3/model/__init__.py | 1 + .../v3/model/create_instance_resp_item.py | 602 ++++++++++++++++++ .../v3/model/create_instance_response.py | 6 +- .../huaweicloudsdkrds/v3/rds_async_client.py | 10 +- .../huaweicloudsdkrds/v3/rds_client.py | 10 +- huaweicloud-sdk-rds/setup.py | 2 +- .../huaweicloudsdkrms/v1/rms_async_client.py | 10 +- .../huaweicloudsdkrms/v1/rms_client.py | 10 +- huaweicloud-sdk-rms/setup.py | 2 +- .../v2/servicestage_async_client.py | 10 +- .../v2/servicestage_client.py | 10 +- huaweicloud-sdk-servicestage/setup.py | 2 +- .../v2/model/publish_message_request_body.py | 6 +- .../huaweicloudsdksmn/v2/smn_async_client.py | 10 +- .../huaweicloudsdksmn/v2/smn_client.py | 10 +- huaweicloud-sdk-smn/setup.py | 2 +- .../huaweicloudsdktms/v1/tms_async_client.py | 10 +- .../huaweicloudsdktms/v1/tms_client.py | 10 +- huaweicloud-sdk-tms/setup.py | 2 +- .../huaweicloudsdkvpc/v2/vpc_async_client.py | 10 +- .../huaweicloudsdkvpc/v2/vpc_client.py | 10 +- .../huaweicloudsdkvpc/v3/vpc_async_client.py | 10 +- .../huaweicloudsdkvpc/v3/vpc_client.py | 10 +- huaweicloud-sdk-vpc/setup.py | 2 +- 302 files changed, 9998 insertions(+), 4538 deletions(-) create mode 100644 __init__.py create mode 100644 huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/account_status.py create mode 100644 huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/show_account_status_request.py create mode 100644 huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/show_account_status_response.py create mode 100644 huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/start_instance_param.py create mode 100644 huaweicloud-sdk-dgc/LICENSE create mode 100644 huaweicloud-sdk-dgc/README_PYPI.md create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/__init__.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/__init__.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/dgc_async_client.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/dgc_client.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/exception_handler.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/__init__.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/connection_info.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/connection_param.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/create_connection_request.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/create_connection_response.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/delete_connction_request.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/delete_connction_response.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/export_connections_request.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/export_connections_response.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/import_connection_req.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/import_connections_request.py rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_response.py => huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/import_connections_response.py (67%) create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/list_connections_request.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/list_connections_response.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/show_connection_request.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/show_connection_response.py rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_request.py => huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/update_connection_request.py (63%) create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/update_connection_response.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/region/__init__.py create mode 100644 huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/region/dgc_region.py create mode 100644 huaweicloud-sdk-dgc/requirements.txt create mode 100644 huaweicloud-sdk-dgc/setup.py create mode 100644 huaweicloud-sdk-dgc/test-requirements.txt rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_auto_classification_request_body.py => auto_classification_req.py} (81%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_auto_classification_result_item_response.py => auto_classification_response_body_item.py} (67%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_mvs_invoice_request_body.py => bankcard_req.py} (53%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_bankcard_result_response.py => bankcard_result_body.py} (72%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_business_card_items_response.py => business_card_items_response.py} (77%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_business_card_request_body.py => business_card_req.py} (67%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_business_card_result_response.py => business_card_response_body_item.py} (65%) create mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_license_req.py rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_business_license_result_response.py => business_license_result_body.py} (69%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_flight_itinerary_items_response.py => flight_itinerary_items_response.py} (69%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_bankcard_request_body.py => flight_itinerary_req.py} (85%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_flight_itinerary_result_response.py => flight_itinerary_response_body_item.py} (65%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_general_text_items_response.py => general_text_items_response.py} (80%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_general_text_request_body.py => general_text_req.py} (60%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_general_text_result_response.py => general_text_response_body_items.py} (74%) create mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items2_response.py create mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items3_response.py rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_financial_statement_words_list_items_response.py => handwriting_items4_response.py} (63%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_handwriting_items_response.py => handwriting_items_response.py} (54%) create mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_req.py rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_handwriting_result_response.py => handwriting_response_body_item.py} (59%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_taxi_invoice_request_body.py => id_card_req.py} (50%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_id_card_result_response.py => id_card_result_body.py} (66%) create mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/license_plate_req.py rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_license_plate_result_items_response.py => license_plate_response_body_item.py} (65%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_vin_request_body.py => mvs_invoice_req.py} (59%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_mvs_invoice_result_response.py => mvs_invoice_result_body.py} (66%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_passport_request_body.py => passport_req.py} (58%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_passport_result_response.py => passport_result_body.py} (69%) create mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/quota_invoice_req.py rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_quota_invoice_result_response.py => quota_invoice_result_body.py} (70%) delete mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_request_body.py delete mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_request_body.py delete mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_result_response.py delete mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_words_block_items_response.py delete mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_words_region_items_response.py delete mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_request_body.py delete mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_request_body.py delete mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_request_body.py delete mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_request_body.py delete mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_request_body.py delete mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_request_body.py rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_license_plate_request_body.py => taxi_invoice_req.py} (81%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_taxi_invoice_result_response.py => taxi_invoice_result_body.py} (66%) create mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/toll_invoice_req.py rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_toll_invoice_result_response.py => toll_invoice_result_body.py} (66%) create mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/train_ticket_req.py rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_train_ticket_result_response.py => train_ticket_result_body.py} (67%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_train_ticket_request_body.py => transportation_license_req.py} (84%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_transportation_license_result_response.py => transportation_license_result_body.py} (67%) create mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/vin_req.py rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_vin_result_response.py => vin_response_body_item.py} (84%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_web_image_items_response.py => web_image_items_response.py} (71%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_web_image_request_body.py => web_image_req.py} (55%) rename huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/{recognize_web_image_result_response.py => web_image_response_body_item.py} (76%) create mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/region/__init__.py create mode 100644 huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/region/ocr_region.py create mode 100644 huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/create_instance_resp_item.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 16e667866..ac865d1f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,49 @@ +## 3.0.29-beta 2020-12-31 +## HuaweiCloud SDK CloudIDE + - ### Features + - Support more interface: ShowAccountStatus + - ### Bug Fix + - None + - ### Change + - None + +## HuaweiCloud SDK DCS + - ### Features + - None + - ### Bug Fix + - Modify the interface return data type to prevent deserialization failure: + - ListSlowlog: change data type of `Tags` from Tag to ResourceTag. + - ListInstances: change data type of `duration` from int32 to string. + - ShowBigkeyScanTaskDetails: change data type of `db` from int32 to string. + - ShowHotkeyTaskDetails: change data type of `db` from int32 to string. + - ### Change + - None + +## HuaweiCloud SDK DGC + - ### Features + - Support `Data Lake Governance Center` service. + - ### Bug Fix + - None + - ### Change + - None + +## HuaweiCloud SDK RDS + - ### Features + - None + - ### Bug Fix + - None + - ### Change + - Interface modification: response type of interface `CreateInstance` adjustment. + +## HuaweiCloud SDK SMN + - ### Features + - None + - ### Bug Fix + - Modify the request parameters of interface `PublishMessage` from Object to Map + - ### Change + - None + + ## 3.0.28-beta 2020-12-28 ## HuaweiCloud SDK DCS - ### Features diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index 562c22bcc..c66da4e52 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,49 @@ +## 3.0.29-beta 2020-12-31 +## HuaweiCloud SDK CloudIDE + - ### 新增特性 + - 新增支持接口:查询当前账号访问权限(ShowAccountStatus) + - ### 解决问题 + - 无 + - ### 特性变更 + - 无 + +## HuaweiCloud SDK DCS + - ### 新增特性 + - 无 + - ### 解决问题 + - 修正接口返回数据类型避免反序列化失败: + - 查询所有实例列表接口:响应参数`Tags`类型调整 Tag → ResourceTag + - 查询慢日志接口:响应参数`duration`类型调整 int32 → string + - 查询大key分析详情接口:响应参数`db`类型调整 int32 → string + - 查询热key分析详情接口:响应参数`db`类型调整 int32 → string + - ### 特性变更 + - 无 + +## HuaweiCloud SDK DGC + - ### 新增特性 + - 支持数据湖治理中心服务 + - ### 解决问题 + - 无 + - ### 特性变更 + - 无 + +## HuaweiCloud SDK RDS + - ### 新增特性 + - 无 + - ### 解决问题 + - 无 + - ### 特性变更 + - 创建实例接口响应类型调整 + +## HuaweiCloud SDK SMN + - ### 新增特性 + - 无 + - ### 解决问题 + - 修正消息发布接口请求参数:Object → Map + - ### 特性变更 + - 无 + + ## 3.0.28-beta 2020-12-28 ## HuaweiCloud SDK DCS - ### 新增特性 diff --git a/README.md b/README.md index 7ec2b72b8..1eba8fbf1 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ You must install `huaweicloudsdkcore` library no matter which product/service de ``` python # Initialize specified service client instance, take VpcClient for example - client = VpcClient.new_builder(VpcClient) \ + client = VpcClient.new_builder() \ .with_http_config(config) \ .with_credentials(credentials) \ .with_endpoint(endpoint) \ @@ -179,7 +179,7 @@ You must install `huaweicloudsdkcore` library no matter which product/service de ``` python # Initialize specified service client instance, take IamClient for example - client = IamClient.new_builder(IamClient) \ + client = IamClient.new_builder() \ .with_http_config(config) \ .with_credentials(credentials) \ .with_region(IamRegion.CN_NORTH_4) \ @@ -230,7 +230,7 @@ You must install `huaweicloudsdkcore` library no matter which product/service de ``` python # Initialize asynchronous client, take VpcAsyncClient for example - vpc_client = VpcAsyncClient.new_builder(VpcAsyncClient) \ + vpc_client = VpcAsyncClient.new_builder() \ .with_http_config(config) \ .with_credentials(credentials) \ .with_endpoint(endpoint) \ @@ -271,7 +271,7 @@ You must install `huaweicloudsdkcore` library no matter which product/service de base = base + "< Body: %s" % response.content logger.debug(base) - client = VpcClient.new_builder(VpcClient) \ + client = VpcClient.new_builder() \ .with_http_config(config) \ .with_credentials(credentials) \ .with_endpoint(endpoint) \ @@ -322,7 +322,7 @@ You must install `huaweicloudsdkcore` library no matter which product/service de config.ignore_ssl_verification = True credentials = BasicCredentials(ak, sk, project_id) - vpc_client = VpcClient.new_builder(VpcClient) \ + vpc_client = VpcClient.new_builder() \ .with_http_config(config) \ .with_credentials(credentials) \ .with_endpoint(endpoint) \ diff --git a/README_CN.md b/README_CN.md index 4bd521e28..f529344ee 100644 --- a/README_CN.md +++ b/README_CN.md @@ -147,7 +147,7 @@ ``` python # 初始化指定云服务的客户端 {Service}Client ,以初始化 VpcClient 为例 - client = VpcClient.new_builder(VpcClient) \ + client = VpcClient.new_builder() \ .with_http_config(config) \ .with_credentials(credentials) \ .with_endpoint(endpoint) \ @@ -178,7 +178,7 @@ ``` python # 初始化指定云服务的客户端 {Service}Client ,以初始化 IamClient 为例 - client = IamClient.new_builder(IamClient) \ + client = IamClient.new_builder() \ .with_http_config(config) \ .with_credentials(credentials) \ .with_region(IamRegion.CN_NORTH_4) \ @@ -228,7 +228,7 @@ ``` python # 初始化异步客户端,以初始化 VpcAsyncClient 为例 - vpc_client = VpcAsyncClient.new_builder(VpcAsyncClient) \ + vpc_client = VpcAsyncClient.new_builder() \ .with_http_config(config) \ .with_credentials(credentials) \ .with_endpoint(endpoint) \ @@ -270,7 +270,7 @@ base = base + "< Body: %s" % response.content logger.debug(base) - client = VpcClient.new_builder(VpcClient) \ + client = VpcClient.new_builder() \ .with_http_config(config) \ .with_credentials(credentials) \ .with_endpoint(endpoint) \ @@ -321,7 +321,7 @@ if __name__ == "__main__": config.ignore_ssl_verification = True credentials = BasicCredentials(ak, sk, project_id) - vpc_client = VpcClient.new_builder(VpcClient) \ + vpc_client = VpcClient.new_builder() \ .with_http_config(config) \ .with_credentials(credentials) \ .with_endpoint(endpoint) \ diff --git a/__init__.py b/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/examples/setup.py b/examples/setup.py index d744f7594..b6206566c 100644 --- a/examples/setup.py +++ b/examples/setup.py @@ -21,7 +21,7 @@ from setuptools import setup, find_packages NAME = "huaweicloudsdkexample" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-apig/huaweicloudsdkapig/v2/apig_async_client.py b/huaweicloud-sdk-apig/huaweicloudsdkapig/v2/apig_async_client.py index 75e1f488f..ab738e86f 100644 --- a/huaweicloud-sdk-apig/huaweicloudsdkapig/v2/apig_async_client.py +++ b/huaweicloud-sdk-apig/huaweicloudsdkapig/v2/apig_async_client.py @@ -38,8 +38,14 @@ class ApigAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkapig.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ApigClient": + raise TypeError("client type error, support client type is ApigClient") + return ClientBuilder(clazz) def associate_certificate_v2_async(self, request): diff --git a/huaweicloud-sdk-apig/huaweicloudsdkapig/v2/apig_client.py b/huaweicloud-sdk-apig/huaweicloudsdkapig/v2/apig_client.py index 5a7624044..c4631c1ea 100644 --- a/huaweicloud-sdk-apig/huaweicloudsdkapig/v2/apig_client.py +++ b/huaweicloud-sdk-apig/huaweicloudsdkapig/v2/apig_client.py @@ -38,8 +38,14 @@ class ApigClient(Client): self.model_package = importlib.import_module("huaweicloudsdkapig.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ApigClient": + raise TypeError("client type error, support client type is ApigClient") + return ClientBuilder(clazz) def associate_certificate_v2(self, request): diff --git a/huaweicloud-sdk-apig/setup.py b/huaweicloud-sdk-apig/setup.py index d198f9f3e..e318d90fa 100644 --- a/huaweicloud-sdk-apig/setup.py +++ b/huaweicloud-sdk-apig/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkapig" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-as/huaweicloudsdkas/v1/as_async_client.py b/huaweicloud-sdk-as/huaweicloudsdkas/v1/as_async_client.py index 27f02d21d..2c2a948e7 100644 --- a/huaweicloud-sdk-as/huaweicloudsdkas/v1/as_async_client.py +++ b/huaweicloud-sdk-as/huaweicloudsdkas/v1/as_async_client.py @@ -38,8 +38,14 @@ class AsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkas.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "AsClient": + raise TypeError("client type error, support client type is AsClient") + return ClientBuilder(clazz) def batch_delete_scaling_configs_async(self, request): diff --git a/huaweicloud-sdk-as/huaweicloudsdkas/v1/as_client.py b/huaweicloud-sdk-as/huaweicloudsdkas/v1/as_client.py index 27f82ecfc..e02ecbd4c 100644 --- a/huaweicloud-sdk-as/huaweicloudsdkas/v1/as_client.py +++ b/huaweicloud-sdk-as/huaweicloudsdkas/v1/as_client.py @@ -38,8 +38,14 @@ class AsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkas.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "AsClient": + raise TypeError("client type error, support client type is AsClient") + return ClientBuilder(clazz) def batch_delete_scaling_configs(self, request): diff --git a/huaweicloud-sdk-as/setup.py b/huaweicloud-sdk-as/setup.py index b9f0cafa4..ca0622db4 100644 --- a/huaweicloud-sdk-as/setup.py +++ b/huaweicloud-sdk-as/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkas" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-bcs/huaweicloudsdkbcs/v2/bcs_async_client.py b/huaweicloud-sdk-bcs/huaweicloudsdkbcs/v2/bcs_async_client.py index 9764a9047..8a5b9c3e0 100644 --- a/huaweicloud-sdk-bcs/huaweicloudsdkbcs/v2/bcs_async_client.py +++ b/huaweicloud-sdk-bcs/huaweicloudsdkbcs/v2/bcs_async_client.py @@ -38,8 +38,14 @@ class BcsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkbcs.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "BcsClient": + raise TypeError("client type error, support client type is BcsClient") + return ClientBuilder(clazz) def batch_add_peers_to_channel_async(self, request): diff --git a/huaweicloud-sdk-bcs/huaweicloudsdkbcs/v2/bcs_client.py b/huaweicloud-sdk-bcs/huaweicloudsdkbcs/v2/bcs_client.py index 8b82b9bde..19b9470d7 100644 --- a/huaweicloud-sdk-bcs/huaweicloudsdkbcs/v2/bcs_client.py +++ b/huaweicloud-sdk-bcs/huaweicloudsdkbcs/v2/bcs_client.py @@ -38,8 +38,14 @@ class BcsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkbcs.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "BcsClient": + raise TypeError("client type error, support client type is BcsClient") + return ClientBuilder(clazz) def batch_add_peers_to_channel(self, request): diff --git a/huaweicloud-sdk-bcs/setup.py b/huaweicloud-sdk-bcs/setup.py index 724c4f0ca..c55aed45c 100644 --- a/huaweicloud-sdk-bcs/setup.py +++ b/huaweicloud-sdk-bcs/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkbcs" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-bms/huaweicloudsdkbms/v1/bms_async_client.py b/huaweicloud-sdk-bms/huaweicloudsdkbms/v1/bms_async_client.py index 3ac4252aa..ab9e7a4b7 100644 --- a/huaweicloud-sdk-bms/huaweicloudsdkbms/v1/bms_async_client.py +++ b/huaweicloud-sdk-bms/huaweicloudsdkbms/v1/bms_async_client.py @@ -38,8 +38,14 @@ class BmsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkbms.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "BmsClient": + raise TypeError("client type error, support client type is BmsClient") + return ClientBuilder(clazz) def attach_baremetal_server_volume_async(self, request): diff --git a/huaweicloud-sdk-bms/huaweicloudsdkbms/v1/bms_client.py b/huaweicloud-sdk-bms/huaweicloudsdkbms/v1/bms_client.py index 659205a76..0d1e1b52e 100644 --- a/huaweicloud-sdk-bms/huaweicloudsdkbms/v1/bms_client.py +++ b/huaweicloud-sdk-bms/huaweicloudsdkbms/v1/bms_client.py @@ -38,8 +38,14 @@ class BmsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkbms.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "BmsClient": + raise TypeError("client type error, support client type is BmsClient") + return ClientBuilder(clazz) def attach_baremetal_server_volume(self, request): diff --git a/huaweicloud-sdk-bms/setup.py b/huaweicloud-sdk-bms/setup.py index ce462da3b..423ce2f4a 100644 --- a/huaweicloud-sdk-bms/setup.py +++ b/huaweicloud-sdk-bms/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkbms" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-bss/huaweicloudsdkbss/v2/bss_async_client.py b/huaweicloud-sdk-bss/huaweicloudsdkbss/v2/bss_async_client.py index 9a164a603..ec5ad1a38 100644 --- a/huaweicloud-sdk-bss/huaweicloudsdkbss/v2/bss_async_client.py +++ b/huaweicloud-sdk-bss/huaweicloudsdkbss/v2/bss_async_client.py @@ -38,8 +38,14 @@ class BssAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkbss.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials") + + if clazz.__name__ != "BssClient": + raise TypeError("client type error, support client type is BssClient") + return ClientBuilder(clazz, "GlobalCredentials") def list_conversions_async(self, request): diff --git a/huaweicloud-sdk-bss/huaweicloudsdkbss/v2/bss_client.py b/huaweicloud-sdk-bss/huaweicloudsdkbss/v2/bss_client.py index 497ba7fe5..648dfc534 100644 --- a/huaweicloud-sdk-bss/huaweicloudsdkbss/v2/bss_client.py +++ b/huaweicloud-sdk-bss/huaweicloudsdkbss/v2/bss_client.py @@ -38,8 +38,14 @@ class BssClient(Client): self.model_package = importlib.import_module("huaweicloudsdkbss.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials") + + if clazz.__name__ != "BssClient": + raise TypeError("client type error, support client type is BssClient") + return ClientBuilder(clazz, "GlobalCredentials") def list_conversions(self, request): diff --git a/huaweicloud-sdk-bss/setup.py b/huaweicloud-sdk-bss/setup.py index 32db944bf..2a5741419 100644 --- a/huaweicloud-sdk-bss/setup.py +++ b/huaweicloud-sdk-bss/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkbss" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/bssintl_async_client.py b/huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/bssintl_async_client.py index 2a00e6557..6462ca209 100644 --- a/huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/bssintl_async_client.py +++ b/huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/bssintl_async_client.py @@ -38,8 +38,14 @@ class BssintlAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkbssintl.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials") + + if clazz.__name__ != "BssintlClient": + raise TypeError("client type error, support client type is BssintlClient") + return ClientBuilder(clazz, "GlobalCredentials") def list_conversions_async(self, request): diff --git a/huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/bssintl_client.py b/huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/bssintl_client.py index 3443a7faf..54a6a6005 100644 --- a/huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/bssintl_client.py +++ b/huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/bssintl_client.py @@ -38,8 +38,14 @@ class BssintlClient(Client): self.model_package = importlib.import_module("huaweicloudsdkbssintl.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials") + + if clazz.__name__ != "BssintlClient": + raise TypeError("client type error, support client type is BssintlClient") + return ClientBuilder(clazz, "GlobalCredentials") def list_conversions(self, request): diff --git a/huaweicloud-sdk-bssintl/setup.py b/huaweicloud-sdk-bssintl/setup.py index 2fb402fc0..de928061f 100644 --- a/huaweicloud-sdk-bssintl/setup.py +++ b/huaweicloud-sdk-bssintl/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkbssintl" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/cbr_async_client.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/cbr_async_client.py index ae77ebbc8..c6c590abc 100644 --- a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/cbr_async_client.py +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/cbr_async_client.py @@ -38,8 +38,14 @@ class CbrAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkcbr.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CbrClient": + raise TypeError("client type error, support client type is CbrClient") + return ClientBuilder(clazz) def add_member_async(self, request): diff --git a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/cbr_client.py b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/cbr_client.py index d259d7645..573ab1790 100644 --- a/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/cbr_client.py +++ b/huaweicloud-sdk-cbr/huaweicloudsdkcbr/v1/cbr_client.py @@ -38,8 +38,14 @@ class CbrClient(Client): self.model_package = importlib.import_module("huaweicloudsdkcbr.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CbrClient": + raise TypeError("client type error, support client type is CbrClient") + return ClientBuilder(clazz) def add_member(self, request): diff --git a/huaweicloud-sdk-cbr/setup.py b/huaweicloud-sdk-cbr/setup.py index 609dfa906..ff4ec0d73 100644 --- a/huaweicloud-sdk-cbr/setup.py +++ b/huaweicloud-sdk-cbr/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkcbr" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-cce/huaweicloudsdkcce/v3/cce_async_client.py b/huaweicloud-sdk-cce/huaweicloudsdkcce/v3/cce_async_client.py index 610d8bd06..4ed1a7add 100644 --- a/huaweicloud-sdk-cce/huaweicloudsdkcce/v3/cce_async_client.py +++ b/huaweicloud-sdk-cce/huaweicloudsdkcce/v3/cce_async_client.py @@ -38,8 +38,14 @@ class CceAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkcce.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CceClient": + raise TypeError("client type error, support client type is CceClient") + return ClientBuilder(clazz) def awake_cluster_async(self, request): diff --git a/huaweicloud-sdk-cce/huaweicloudsdkcce/v3/cce_client.py b/huaweicloud-sdk-cce/huaweicloudsdkcce/v3/cce_client.py index 0b81c408f..84dda82d9 100644 --- a/huaweicloud-sdk-cce/huaweicloudsdkcce/v3/cce_client.py +++ b/huaweicloud-sdk-cce/huaweicloudsdkcce/v3/cce_client.py @@ -38,8 +38,14 @@ class CceClient(Client): self.model_package = importlib.import_module("huaweicloudsdkcce.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CceClient": + raise TypeError("client type error, support client type is CceClient") + return ClientBuilder(clazz) def awake_cluster(self, request): diff --git a/huaweicloud-sdk-cce/setup.py b/huaweicloud-sdk-cce/setup.py index cbc716f65..4e30e07fe 100644 --- a/huaweicloud-sdk-cce/setup.py +++ b/huaweicloud-sdk-cce/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkcce" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-ces/huaweicloudsdkces/v1/ces_async_client.py b/huaweicloud-sdk-ces/huaweicloudsdkces/v1/ces_async_client.py index e508c8583..922b69783 100644 --- a/huaweicloud-sdk-ces/huaweicloudsdkces/v1/ces_async_client.py +++ b/huaweicloud-sdk-ces/huaweicloudsdkces/v1/ces_async_client.py @@ -38,8 +38,14 @@ class CesAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkces.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CesClient": + raise TypeError("client type error, support client type is CesClient") + return ClientBuilder(clazz) def batch_list_metric_data_async(self, request): diff --git a/huaweicloud-sdk-ces/huaweicloudsdkces/v1/ces_client.py b/huaweicloud-sdk-ces/huaweicloudsdkces/v1/ces_client.py index 5e94f6e2b..ea585e09e 100644 --- a/huaweicloud-sdk-ces/huaweicloudsdkces/v1/ces_client.py +++ b/huaweicloud-sdk-ces/huaweicloudsdkces/v1/ces_client.py @@ -38,8 +38,14 @@ class CesClient(Client): self.model_package = importlib.import_module("huaweicloudsdkces.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CesClient": + raise TypeError("client type error, support client type is CesClient") + return ClientBuilder(clazz) def batch_list_metric_data(self, request): diff --git a/huaweicloud-sdk-ces/setup.py b/huaweicloud-sdk-ces/setup.py index 6cb309f95..8312d7771 100644 --- a/huaweicloud-sdk-ces/setup.py +++ b/huaweicloud-sdk-ces/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkces" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-classroom/huaweicloudsdkclassroom/v3/classroom_async_client.py b/huaweicloud-sdk-classroom/huaweicloudsdkclassroom/v3/classroom_async_client.py index eea1e10fb..b6ab07952 100644 --- a/huaweicloud-sdk-classroom/huaweicloudsdkclassroom/v3/classroom_async_client.py +++ b/huaweicloud-sdk-classroom/huaweicloudsdkclassroom/v3/classroom_async_client.py @@ -38,8 +38,14 @@ class ClassroomAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkclassroom.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ClassroomClient": + raise TypeError("client type error, support client type is ClassroomClient") + return ClientBuilder(clazz) def list_classroom_members_async(self, request): diff --git a/huaweicloud-sdk-classroom/huaweicloudsdkclassroom/v3/classroom_client.py b/huaweicloud-sdk-classroom/huaweicloudsdkclassroom/v3/classroom_client.py index fd3d27503..3235cecd9 100644 --- a/huaweicloud-sdk-classroom/huaweicloudsdkclassroom/v3/classroom_client.py +++ b/huaweicloud-sdk-classroom/huaweicloudsdkclassroom/v3/classroom_client.py @@ -38,8 +38,14 @@ class ClassroomClient(Client): self.model_package = importlib.import_module("huaweicloudsdkclassroom.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ClassroomClient": + raise TypeError("client type error, support client type is ClassroomClient") + return ClientBuilder(clazz) def list_classroom_members(self, request): diff --git a/huaweicloud-sdk-classroom/setup.py b/huaweicloud-sdk-classroom/setup.py index 170fd6ac5..52fb5f695 100644 --- a/huaweicloud-sdk-classroom/setup.py +++ b/huaweicloud-sdk-classroom/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkclassroom" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/__init__.py b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/__init__.py index 72cd3d57b..0d9c6fc4e 100644 --- a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/__init__.py +++ b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/__init__.py @@ -6,6 +6,7 @@ from __future__ import absolute_import from huaweicloudsdkcloudide.v2.cloudide_client import CloudIDEClient from huaweicloudsdkcloudide.v2.cloudide_async_client import CloudIDEAsyncClient # import models into sdk package +from huaweicloudsdkcloudide.v2.model.account_status import AccountStatus from huaweicloudsdkcloudide.v2.model.attributes import Attributes from huaweicloudsdkcloudide.v2.model.check_name_request import CheckNameRequest from huaweicloudsdkcloudide.v2.model.check_name_response import CheckNameResponse @@ -35,6 +36,8 @@ from huaweicloudsdkcloudide.v2.model.recipe import Recipe from huaweicloudsdkcloudide.v2.model.resource_price import ResourcePrice from huaweicloudsdkcloudide.v2.model.role import Role from huaweicloudsdkcloudide.v2.model.role_action import RoleAction +from huaweicloudsdkcloudide.v2.model.show_account_status_request import ShowAccountStatusRequest +from huaweicloudsdkcloudide.v2.model.show_account_status_response import ShowAccountStatusResponse from huaweicloudsdkcloudide.v2.model.show_instance_request import ShowInstanceRequest from huaweicloudsdkcloudide.v2.model.show_instance_response import ShowInstanceResponse from huaweicloudsdkcloudide.v2.model.show_price_request import ShowPriceRequest @@ -44,6 +47,7 @@ from huaweicloudsdkcloudide.v2.model.stacks import Stacks from huaweicloudsdkcloudide.v2.model.stacks_attribute import StacksAttribute from huaweicloudsdkcloudide.v2.model.stacks_config import StacksConfig from huaweicloudsdkcloudide.v2.model.stacks_tag import StacksTag +from huaweicloudsdkcloudide.v2.model.start_instance_param import StartInstanceParam from huaweicloudsdkcloudide.v2.model.start_instance_request import StartInstanceRequest from huaweicloudsdkcloudide.v2.model.start_instance_response import StartInstanceResponse from huaweicloudsdkcloudide.v2.model.stop_instance_request import StopInstanceRequest diff --git a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/cloudide_async_client.py b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/cloudide_async_client.py index 2bc871762..9e22ea559 100644 --- a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/cloudide_async_client.py +++ b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/cloudide_async_client.py @@ -38,8 +38,14 @@ class CloudIDEAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkcloudide.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CloudIDEClient": + raise TypeError("client type error, support client type is CloudIDEClient") + return ClientBuilder(clazz) def list_project_templates_async(self, request): @@ -171,6 +177,67 @@ class CloudIDEAsyncClient(Client): request_type=request.__class__.__name__) + def show_account_status_async(self, request): + """查询当前账号访问权限 + + 查询当前账号访问权限 + + :param ShowAccountStatusRequest request + :return: ShowAccountStatusResponse + """ + return self.show_account_status_with_http_info(request) + + def show_account_status_with_http_info(self, request): + """查询当前账号访问权限 + + 查询当前账号访问权限 + + :param ShowAccountStatusRequest request + :return: ShowAccountStatusResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/permission/account/status', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowAccountStatusResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_price_async(self, request): """获取技术栈计费信息 @@ -507,7 +574,7 @@ class CloudIDEAsyncClient(Client): :return: ListInstancesResponse """ - all_params = ['limit', 'offset', 'search', 'sort_dir', 'sort_key'] + all_params = ['limit', 'offset', 'is_temporary', 'label', 'search', 'sort_dir', 'sort_key'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -522,6 +589,10 @@ class CloudIDEAsyncClient(Client): query_params.append(('limit', local_var_params['limit'])) if 'offset' in local_var_params: query_params.append(('offset', local_var_params['offset'])) + if 'is_temporary' in local_var_params: + query_params.append(('is_temporary', local_var_params['is_temporary'])) + if 'label' in local_var_params: + query_params.append(('label', local_var_params['label'])) if 'search' in local_var_params: query_params.append(('search', local_var_params['search'])) if 'sort_dir' in local_var_params: @@ -712,7 +783,7 @@ class CloudIDEAsyncClient(Client): :return: StartInstanceResponse """ - all_params = ['instance_id'] + all_params = ['instance_id', 'start_instance_request_body'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -731,6 +802,8 @@ class CloudIDEAsyncClient(Client): form_params = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] if isinstance(request, SdkStreamRequest): body_params = request.get_file_stream() diff --git a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/cloudide_client.py b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/cloudide_client.py index d4848c48f..bb1349892 100644 --- a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/cloudide_client.py +++ b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/cloudide_client.py @@ -38,8 +38,14 @@ class CloudIDEClient(Client): self.model_package = importlib.import_module("huaweicloudsdkcloudide.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CloudIDEClient": + raise TypeError("client type error, support client type is CloudIDEClient") + return ClientBuilder(clazz) def list_project_templates(self, request): @@ -171,6 +177,67 @@ class CloudIDEClient(Client): request_type=request.__class__.__name__) + def show_account_status(self, request): + """查询当前账号访问权限 + + 查询当前账号访问权限 + + :param ShowAccountStatusRequest request + :return: ShowAccountStatusResponse + """ + return self.show_account_status_with_http_info(request) + + def show_account_status_with_http_info(self, request): + """查询当前账号访问权限 + + 查询当前账号访问权限 + + :param ShowAccountStatusRequest request + :return: ShowAccountStatusResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/permission/account/status', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowAccountStatusResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + def show_price(self, request): """获取技术栈计费信息 @@ -507,7 +574,7 @@ class CloudIDEClient(Client): :return: ListInstancesResponse """ - all_params = ['limit', 'offset', 'search', 'sort_dir', 'sort_key'] + all_params = ['limit', 'offset', 'is_temporary', 'label', 'search', 'sort_dir', 'sort_key'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -522,6 +589,10 @@ class CloudIDEClient(Client): query_params.append(('limit', local_var_params['limit'])) if 'offset' in local_var_params: query_params.append(('offset', local_var_params['offset'])) + if 'is_temporary' in local_var_params: + query_params.append(('is_temporary', local_var_params['is_temporary'])) + if 'label' in local_var_params: + query_params.append(('label', local_var_params['label'])) if 'search' in local_var_params: query_params.append(('search', local_var_params['search'])) if 'sort_dir' in local_var_params: @@ -712,7 +783,7 @@ class CloudIDEClient(Client): :return: StartInstanceResponse """ - all_params = ['instance_id'] + all_params = ['instance_id', 'start_instance_request_body'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -731,6 +802,8 @@ class CloudIDEClient(Client): form_params = {} body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] if isinstance(request, SdkStreamRequest): body_params = request.get_file_stream() diff --git a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/__init__.py b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/__init__.py index 0144b5901..1bd0896e1 100644 --- a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/__init__.py +++ b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/__init__.py @@ -3,6 +3,7 @@ from __future__ import absolute_import # import models into model package +from huaweicloudsdkcloudide.v2.model.account_status import AccountStatus from huaweicloudsdkcloudide.v2.model.attributes import Attributes from huaweicloudsdkcloudide.v2.model.check_name_request import CheckNameRequest from huaweicloudsdkcloudide.v2.model.check_name_response import CheckNameResponse @@ -32,6 +33,8 @@ from huaweicloudsdkcloudide.v2.model.recipe import Recipe from huaweicloudsdkcloudide.v2.model.resource_price import ResourcePrice from huaweicloudsdkcloudide.v2.model.role import Role from huaweicloudsdkcloudide.v2.model.role_action import RoleAction +from huaweicloudsdkcloudide.v2.model.show_account_status_request import ShowAccountStatusRequest +from huaweicloudsdkcloudide.v2.model.show_account_status_response import ShowAccountStatusResponse from huaweicloudsdkcloudide.v2.model.show_instance_request import ShowInstanceRequest from huaweicloudsdkcloudide.v2.model.show_instance_response import ShowInstanceResponse from huaweicloudsdkcloudide.v2.model.show_price_request import ShowPriceRequest @@ -41,6 +44,7 @@ from huaweicloudsdkcloudide.v2.model.stacks import Stacks from huaweicloudsdkcloudide.v2.model.stacks_attribute import StacksAttribute from huaweicloudsdkcloudide.v2.model.stacks_config import StacksConfig from huaweicloudsdkcloudide.v2.model.stacks_tag import StacksTag +from huaweicloudsdkcloudide.v2.model.start_instance_param import StartInstanceParam from huaweicloudsdkcloudide.v2.model.start_instance_request import StartInstanceRequest from huaweicloudsdkcloudide.v2.model.start_instance_response import StartInstanceResponse from huaweicloudsdkcloudide.v2.model.stop_instance_request import StopInstanceRequest diff --git a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/account_status.py b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/account_status.py new file mode 100644 index 000000000..b716322f8 --- /dev/null +++ b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/account_status.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class AccountStatus: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'cur_org_create_role': 'bool', + 'cur_org_open': 'bool', + 'has_free_trial': 'bool', + 'show_manage': 'bool' + } + + attribute_map = { + 'cur_org_create_role': 'cur_org_create_role', + 'cur_org_open': 'cur_org_open', + 'has_free_trial': 'has_free_trial', + 'show_manage': 'show_manage' + } + + def __init__(self, cur_org_create_role=None, cur_org_open=None, has_free_trial=None, show_manage=None): + """AccountStatus - a model defined in huaweicloud sdk""" + + + + self._cur_org_create_role = None + self._cur_org_open = None + self._has_free_trial = None + self._show_manage = None + self.discriminator = None + + if cur_org_create_role is not None: + self.cur_org_create_role = cur_org_create_role + if cur_org_open is not None: + self.cur_org_open = cur_org_open + if has_free_trial is not None: + self.has_free_trial = has_free_trial + if show_manage is not None: + self.show_manage = show_manage + + @property + def cur_org_create_role(self): + """Gets the cur_org_create_role of this AccountStatus. + + 是否有创建实例权限 + + :return: The cur_org_create_role of this AccountStatus. + :rtype: bool + """ + return self._cur_org_create_role + + @cur_org_create_role.setter + def cur_org_create_role(self, cur_org_create_role): + """Sets the cur_org_create_role of this AccountStatus. + + 是否有创建实例权限 + + :param cur_org_create_role: The cur_org_create_role of this AccountStatus. + :type: bool + """ + self._cur_org_create_role = cur_org_create_role + + @property + def cur_org_open(self): + """Gets the cur_org_open of this AccountStatus. + + 账号所属租户是否开通服务 + + :return: The cur_org_open of this AccountStatus. + :rtype: bool + """ + return self._cur_org_open + + @cur_org_open.setter + def cur_org_open(self, cur_org_open): + """Sets the cur_org_open of this AccountStatus. + + 账号所属租户是否开通服务 + + :param cur_org_open: The cur_org_open of this AccountStatus. + :type: bool + """ + self._cur_org_open = cur_org_open + + @property + def has_free_trial(self): + """Gets the has_free_trial of this AccountStatus. + + 免费试用 + + :return: The has_free_trial of this AccountStatus. + :rtype: bool + """ + return self._has_free_trial + + @has_free_trial.setter + def has_free_trial(self, has_free_trial): + """Sets the has_free_trial of this AccountStatus. + + 免费试用 + + :param has_free_trial: The has_free_trial of this AccountStatus. + :type: bool + """ + self._has_free_trial = has_free_trial + + @property + def show_manage(self): + """Gets the show_manage of this AccountStatus. + + 是否有管理入口的权限 + + :return: The show_manage of this AccountStatus. + :rtype: bool + """ + return self._show_manage + + @show_manage.setter + def show_manage(self, show_manage): + """Sets the show_manage of this AccountStatus. + + 是否有管理入口的权限 + + :param show_manage: The show_manage of this AccountStatus. + :type: bool + """ + self._show_manage = show_manage + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AccountStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/instance_param.py b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/instance_param.py index 59533af1e..61e81d4e8 100644 --- a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/instance_param.py +++ b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/instance_param.py @@ -32,12 +32,15 @@ class InstanceParam: 'label_tag': 'str', 'plugin_enable_list': 'list[str]', 'plugin_vars': 'dict(str, str)', + 'port_id': 'str', + 'private_ip': 'str', 'pvc_quantity': 'str', 'refresh_interval': 'str', 'repository_id': 'int', 'stack_id': 'str', 'task_type': 'str', - 'token': 'str' + 'token': 'str', + 'vpc_id': 'str' } attribute_map = { @@ -50,15 +53,18 @@ class InstanceParam: 'label_tag': 'label_tag', 'plugin_enable_list': 'plugin_enable_list', 'plugin_vars': 'plugin_vars', + 'port_id': 'port_id', + 'private_ip': 'private_ip', 'pvc_quantity': 'pvc_quantity', 'refresh_interval': 'refresh_interval', 'repository_id': 'repository_id', 'stack_id': 'stack_id', 'task_type': 'task_type', - 'token': 'token' + 'token': 'token', + 'vpc_id': 'vpc_id' } - def __init__(self, agent_id=None, arch=None, cpu_memory=None, description=None, display_name=None, is_temporary=None, label_tag=None, plugin_enable_list=None, plugin_vars=None, pvc_quantity=None, refresh_interval=None, repository_id=None, stack_id=None, task_type=None, token=None): + def __init__(self, agent_id=None, arch=None, cpu_memory=None, description=None, display_name=None, is_temporary=None, label_tag=None, plugin_enable_list=None, plugin_vars=None, port_id=None, private_ip=None, pvc_quantity=None, refresh_interval=None, repository_id=None, stack_id=None, task_type=None, token=None, vpc_id=None): """InstanceParam - a model defined in huaweicloud sdk""" @@ -72,12 +78,15 @@ class InstanceParam: self._label_tag = None self._plugin_enable_list = None self._plugin_vars = None + self._port_id = None + self._private_ip = None self._pvc_quantity = None self._refresh_interval = None self._repository_id = None self._stack_id = None self._task_type = None self._token = None + self._vpc_id = None self.discriminator = None if agent_id is not None: @@ -96,6 +105,10 @@ class InstanceParam: self.plugin_enable_list = plugin_enable_list if plugin_vars is not None: self.plugin_vars = plugin_vars + if port_id is not None: + self.port_id = port_id + if private_ip is not None: + self.private_ip = private_ip self.pvc_quantity = pvc_quantity self.refresh_interval = refresh_interval if repository_id is not None: @@ -105,6 +118,8 @@ class InstanceParam: self.task_type = task_type if token is not None: self.token = token + if vpc_id is not None: + self.vpc_id = vpc_id @property def agent_id(self): @@ -304,6 +319,50 @@ class InstanceParam: """ self._plugin_vars = plugin_vars + @property + def port_id(self): + """Gets the port_id of this InstanceParam. + + 云服务器对应的portId,标签为webshell-internal时使用 + + :return: The port_id of this InstanceParam. + :rtype: str + """ + return self._port_id + + @port_id.setter + def port_id(self, port_id): + """Sets the port_id of this InstanceParam. + + 云服务器对应的portId,标签为webshell-internal时使用 + + :param port_id: The port_id of this InstanceParam. + :type: str + """ + self._port_id = port_id + + @property + def private_ip(self): + """Gets the private_ip of this InstanceParam. + + 云服务器ip,标签为webshell-internal时使用 + + :return: The private_ip of this InstanceParam. + :rtype: str + """ + return self._private_ip + + @private_ip.setter + def private_ip(self, private_ip): + """Sets the private_ip of this InstanceParam. + + 云服务器ip,标签为webshell-internal时使用 + + :param private_ip: The private_ip of this InstanceParam. + :type: str + """ + self._private_ip = private_ip + @property def pvc_quantity(self): """Gets the pvc_quantity of this InstanceParam. @@ -436,6 +495,28 @@ class InstanceParam: """ self._token = token + @property + def vpc_id(self): + """Gets the vpc_id of this InstanceParam. + + 云服务器对应的vpcId,标签为webshell-internal时使用 + + :return: The vpc_id of this InstanceParam. + :rtype: str + """ + return self._vpc_id + + @vpc_id.setter + def vpc_id(self, vpc_id): + """Sets the vpc_id of this InstanceParam. + + 云服务器对应的vpcId,标签为webshell-internal时使用 + + :param vpc_id: The vpc_id of this InstanceParam. + :type: str + """ + self._vpc_id = vpc_id + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/list_instances_request.py b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/list_instances_request.py index 49def00de..62d9985a0 100644 --- a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/list_instances_request.py +++ b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/list_instances_request.py @@ -25,6 +25,8 @@ class ListInstancesRequest: openapi_types = { 'limit': 'int', 'offset': 'int', + 'is_temporary': 'bool', + 'label': 'str', 'search': 'str', 'sort_dir': 'str', 'sort_key': 'str' @@ -33,18 +35,22 @@ class ListInstancesRequest: attribute_map = { 'limit': 'limit', 'offset': 'offset', + 'is_temporary': 'is_temporary', + 'label': 'label', 'search': 'search', 'sort_dir': 'sort_dir', 'sort_key': 'sort_key' } - def __init__(self, limit=30, offset=0, search=None, sort_dir='desc', sort_key='created_time'): + def __init__(self, limit=30, offset=0, is_temporary=None, label=None, search=None, sort_dir='desc', sort_key='created_time'): """ListInstancesRequest - a model defined in huaweicloud sdk""" self._limit = None self._offset = None + self._is_temporary = None + self._label = None self._search = None self._sort_dir = None self._sort_key = None @@ -54,6 +60,10 @@ class ListInstancesRequest: self.limit = limit if offset is not None: self.offset = offset + if is_temporary is not None: + self.is_temporary = is_temporary + if label is not None: + self.label = label if search is not None: self.search = search if sort_dir is not None: @@ -101,6 +111,46 @@ class ListInstancesRequest: """ self._offset = offset + @property + def is_temporary(self): + """Gets the is_temporary of this ListInstancesRequest. + + + :return: The is_temporary of this ListInstancesRequest. + :rtype: bool + """ + return self._is_temporary + + @is_temporary.setter + def is_temporary(self, is_temporary): + """Sets the is_temporary of this ListInstancesRequest. + + + :param is_temporary: The is_temporary of this ListInstancesRequest. + :type: bool + """ + self._is_temporary = is_temporary + + @property + def label(self): + """Gets the label of this ListInstancesRequest. + + + :return: The label of this ListInstancesRequest. + :rtype: str + """ + return self._label + + @label.setter + def label(self, label): + """Sets the label of this ListInstancesRequest. + + + :param label: The label of this ListInstancesRequest. + :type: str + """ + self._label = label + @property def search(self): """Gets the search of this ListInstancesRequest. diff --git a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/show_account_status_request.py b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/show_account_status_request.py new file mode 100644 index 000000000..a123f8740 --- /dev/null +++ b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/show_account_status_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowAccountStatusRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ShowAccountStatusRequest - a model defined in huaweicloud sdk""" + + + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowAccountStatusRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/show_account_status_response.py b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/show_account_status_response.py new file mode 100644 index 000000000..357a66766 --- /dev/null +++ b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/show_account_status_response.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowAccountStatusResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'result': 'AccountStatus', + 'status': 'str' + } + + attribute_map = { + 'result': 'result', + 'status': 'status' + } + + def __init__(self, result=None, status=None): + """ShowAccountStatusResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._result = None + self._status = None + self.discriminator = None + + if result is not None: + self.result = result + if status is not None: + self.status = status + + @property + def result(self): + """Gets the result of this ShowAccountStatusResponse. + + + :return: The result of this ShowAccountStatusResponse. + :rtype: AccountStatus + """ + return self._result + + @result.setter + def result(self, result): + """Sets the result of this ShowAccountStatusResponse. + + + :param result: The result of this ShowAccountStatusResponse. + :type: AccountStatus + """ + self._result = result + + @property + def status(self): + """Gets the status of this ShowAccountStatusResponse. + + 状态 + + :return: The status of this ShowAccountStatusResponse. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this ShowAccountStatusResponse. + + 状态 + + :param status: The status of this ShowAccountStatusResponse. + :type: str + """ + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowAccountStatusResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/start_instance_param.py b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/start_instance_param.py new file mode 100644 index 000000000..005f8229a --- /dev/null +++ b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/start_instance_param.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class StartInstanceParam: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'plugin_enable_list': 'list[str]', + 'plugin_vars': 'dict(str, str)' + } + + attribute_map = { + 'plugin_enable_list': 'plugin_enable_list', + 'plugin_vars': 'plugin_vars' + } + + def __init__(self, plugin_enable_list=None, plugin_vars=None): + """StartInstanceParam - a model defined in huaweicloud sdk""" + + + + self._plugin_enable_list = None + self._plugin_vars = None + self.discriminator = None + + if plugin_enable_list is not None: + self.plugin_enable_list = plugin_enable_list + if plugin_vars is not None: + self.plugin_vars = plugin_vars + + @property + def plugin_enable_list(self): + """Gets the plugin_enable_list of this StartInstanceParam. + + 场景插件列表 + + :return: The plugin_enable_list of this StartInstanceParam. + :rtype: list[str] + """ + return self._plugin_enable_list + + @plugin_enable_list.setter + def plugin_enable_list(self, plugin_enable_list): + """Sets the plugin_enable_list of this StartInstanceParam. + + 场景插件列表 + + :param plugin_enable_list: The plugin_enable_list of this StartInstanceParam. + :type: list[str] + """ + self._plugin_enable_list = plugin_enable_list + + @property + def plugin_vars(self): + """Gets the plugin_vars of this StartInstanceParam. + + 场景插件参数 + + :return: The plugin_vars of this StartInstanceParam. + :rtype: dict(str, str) + """ + return self._plugin_vars + + @plugin_vars.setter + def plugin_vars(self, plugin_vars): + """Sets the plugin_vars of this StartInstanceParam. + + 场景插件参数 + + :param plugin_vars: The plugin_vars of this StartInstanceParam. + :type: dict(str, str) + """ + self._plugin_vars = plugin_vars + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StartInstanceParam): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/start_instance_request.py b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/start_instance_request.py index ab8016b47..eec3a9977 100644 --- a/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/start_instance_request.py +++ b/huaweicloud-sdk-cloudide/huaweicloudsdkcloudide/v2/model/start_instance_request.py @@ -23,22 +23,27 @@ class StartInstanceRequest: sensitive_list = [] openapi_types = { - 'instance_id': 'str' + 'instance_id': 'str', + 'body': 'StartInstanceParam' } attribute_map = { - 'instance_id': 'instance_id' + 'instance_id': 'instance_id', + 'body': 'body' } - def __init__(self, instance_id=None): + def __init__(self, instance_id=None, body=None): """StartInstanceRequest - a model defined in huaweicloud sdk""" self._instance_id = None + self._body = None self.discriminator = None self.instance_id = instance_id + if body is not None: + self.body = body @property def instance_id(self): @@ -60,6 +65,26 @@ class StartInstanceRequest: """ self._instance_id = instance_id + @property + def body(self): + """Gets the body of this StartInstanceRequest. + + + :return: The body of this StartInstanceRequest. + :rtype: StartInstanceParam + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this StartInstanceRequest. + + + :param body: The body of this StartInstanceRequest. + :type: StartInstanceParam + """ + self._body = body + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/huaweicloud-sdk-cloudide/setup.py b/huaweicloud-sdk-cloudide/setup.py index cf104647c..a2756474e 100644 --- a/huaweicloud-sdk-cloudide/setup.py +++ b/huaweicloud-sdk-cloudide/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkcloudide" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/cloudpipeline_async_client.py b/huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/cloudpipeline_async_client.py index 99f4bf72e..1b35f6ade 100644 --- a/huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/cloudpipeline_async_client.py +++ b/huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/cloudpipeline_async_client.py @@ -38,8 +38,14 @@ class CloudPipelineAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkcloudpipeline.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CloudPipelineClient": + raise TypeError("client type error, support client type is CloudPipelineClient") + return ClientBuilder(clazz) def batch_show_pipelines_status_async(self, request): diff --git a/huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/cloudpipeline_client.py b/huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/cloudpipeline_client.py index c60b0c78d..b6b56aac0 100644 --- a/huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/cloudpipeline_client.py +++ b/huaweicloud-sdk-cloudpipeline/huaweicloudsdkcloudpipeline/v2/cloudpipeline_client.py @@ -38,8 +38,14 @@ class CloudPipelineClient(Client): self.model_package = importlib.import_module("huaweicloudsdkcloudpipeline.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CloudPipelineClient": + raise TypeError("client type error, support client type is CloudPipelineClient") + return ClientBuilder(clazz) def batch_show_pipelines_status(self, request): diff --git a/huaweicloud-sdk-cloudpipeline/setup.py b/huaweicloud-sdk-cloudpipeline/setup.py index a86033db4..5cbc87b80 100644 --- a/huaweicloud-sdk-cloudpipeline/setup.py +++ b/huaweicloud-sdk-cloudpipeline/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkcloudpipeline" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-cloudtest/huaweicloudsdkcloudtest/v1/cloudtest_async_client.py b/huaweicloud-sdk-cloudtest/huaweicloudsdkcloudtest/v1/cloudtest_async_client.py index 59ed34c9d..2984b00f8 100644 --- a/huaweicloud-sdk-cloudtest/huaweicloudsdkcloudtest/v1/cloudtest_async_client.py +++ b/huaweicloud-sdk-cloudtest/huaweicloudsdkcloudtest/v1/cloudtest_async_client.py @@ -38,8 +38,14 @@ class CloudtestAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkcloudtest.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CloudtestClient": + raise TypeError("client type error, support client type is CloudtestClient") + return ClientBuilder(clazz) def create_plan_async(self, request): diff --git a/huaweicloud-sdk-cloudtest/huaweicloudsdkcloudtest/v1/cloudtest_client.py b/huaweicloud-sdk-cloudtest/huaweicloudsdkcloudtest/v1/cloudtest_client.py index cf14132c5..1b8e5c648 100644 --- a/huaweicloud-sdk-cloudtest/huaweicloudsdkcloudtest/v1/cloudtest_client.py +++ b/huaweicloud-sdk-cloudtest/huaweicloudsdkcloudtest/v1/cloudtest_client.py @@ -38,8 +38,14 @@ class CloudtestClient(Client): self.model_package = importlib.import_module("huaweicloudsdkcloudtest.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CloudtestClient": + raise TypeError("client type error, support client type is CloudtestClient") + return ClientBuilder(clazz) def create_plan(self, request): diff --git a/huaweicloud-sdk-cloudtest/setup.py b/huaweicloud-sdk-cloudtest/setup.py index 03c5dfd54..da1016017 100644 --- a/huaweicloud-sdk-cloudtest/setup.py +++ b/huaweicloud-sdk-cloudtest/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkcloudtest" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-core/setup.py b/huaweicloud-sdk-core/setup.py index 1c50a4b5d..e022306c1 100644 --- a/huaweicloud-sdk-core/setup.py +++ b/huaweicloud-sdk-core/setup.py @@ -22,7 +22,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkcore" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-cts/huaweicloudsdkcts/v3/cts_async_client.py b/huaweicloud-sdk-cts/huaweicloudsdkcts/v3/cts_async_client.py index ae630ae69..395f897e1 100644 --- a/huaweicloud-sdk-cts/huaweicloudsdkcts/v3/cts_async_client.py +++ b/huaweicloud-sdk-cts/huaweicloudsdkcts/v3/cts_async_client.py @@ -38,8 +38,14 @@ class CtsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkcts.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CtsClient": + raise TypeError("client type error, support client type is CtsClient") + return ClientBuilder(clazz) def create_tracker_async(self, request): diff --git a/huaweicloud-sdk-cts/huaweicloudsdkcts/v3/cts_client.py b/huaweicloud-sdk-cts/huaweicloudsdkcts/v3/cts_client.py index b552a9040..6326c4563 100644 --- a/huaweicloud-sdk-cts/huaweicloudsdkcts/v3/cts_client.py +++ b/huaweicloud-sdk-cts/huaweicloudsdkcts/v3/cts_client.py @@ -38,8 +38,14 @@ class CtsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkcts.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "CtsClient": + raise TypeError("client type error, support client type is CtsClient") + return ClientBuilder(clazz) def create_tracker(self, request): diff --git a/huaweicloud-sdk-cts/setup.py b/huaweicloud-sdk-cts/setup.py index 1abe1d291..b3a35add5 100644 --- a/huaweicloud-sdk-cts/setup.py +++ b/huaweicloud-sdk-cts/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkcts" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/dcs_async_client.py b/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/dcs_async_client.py index 7d872593f..1e3da5c0a 100644 --- a/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/dcs_async_client.py +++ b/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/dcs_async_client.py @@ -38,8 +38,14 @@ class DcsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkdcs.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "DcsClient": + raise TypeError("client type error, support client type is DcsClient") + return ClientBuilder(clazz) def batch_create_or_delete_tags_async(self, request): diff --git a/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/dcs_client.py b/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/dcs_client.py index 973dc4506..8a3374a4c 100644 --- a/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/dcs_client.py +++ b/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/dcs_client.py @@ -38,8 +38,14 @@ class DcsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkdcs.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "DcsClient": + raise TypeError("client type error, support client type is DcsClient") + return ClientBuilder(clazz) def batch_create_or_delete_tags(self, request): diff --git a/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/bigkeys_body.py b/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/bigkeys_body.py index bd392b60c..a624e6a54 100644 --- a/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/bigkeys_body.py +++ b/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/bigkeys_body.py @@ -26,7 +26,7 @@ class BigkeysBody: 'name': 'str', 'type': 'str', 'shard': 'str', - 'db': 'str', + 'db': 'int', 'size': 'int', 'unit': 'str' } @@ -139,7 +139,7 @@ class BigkeysBody: 大key所在的db :return: The db of this BigkeysBody. - :rtype: str + :rtype: int """ return self._db @@ -150,7 +150,7 @@ class BigkeysBody: 大key所在的db :param db: The db of this BigkeysBody. - :type: str + :type: int """ self._db = db diff --git a/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/hotkeys_body.py b/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/hotkeys_body.py index db63b6932..302af5c89 100644 --- a/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/hotkeys_body.py +++ b/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/hotkeys_body.py @@ -26,7 +26,7 @@ class HotkeysBody: 'name': 'str', 'type': 'str', 'shard': 'str', - 'db': 'str', + 'db': 'int', 'size': 'int', 'unit': 'str', 'freq': 'int' @@ -119,7 +119,7 @@ class HotkeysBody: def shard(self): """Gets the shard of this HotkeysBody. - 大key所在的分片,仅在实例类型为集群时支持,格式为ip:port + 热key所在的分片,仅在实例类型为集群时支持,格式为ip:port :return: The shard of this HotkeysBody. :rtype: str @@ -130,7 +130,7 @@ class HotkeysBody: def shard(self, shard): """Sets the shard of this HotkeysBody. - 大key所在的分片,仅在实例类型为集群时支持,格式为ip:port + 热key所在的分片,仅在实例类型为集群时支持,格式为ip:port :param shard: The shard of this HotkeysBody. :type: str @@ -141,10 +141,10 @@ class HotkeysBody: def db(self): """Gets the db of this HotkeysBody. - 大key所在的db + 热key所在的db :return: The db of this HotkeysBody. - :rtype: str + :rtype: int """ return self._db @@ -152,10 +152,10 @@ class HotkeysBody: def db(self, db): """Sets the db of this HotkeysBody. - 大key所在的db + 热key所在的db :param db: The db of this HotkeysBody. - :type: str + :type: int """ self._db = db diff --git a/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/instance_list_info.py b/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/instance_list_info.py index 1fbe3fe4b..d357780be 100644 --- a/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/instance_list_info.py +++ b/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/instance_list_info.py @@ -54,7 +54,7 @@ class InstanceListInfo: 'name': 'str', 'spec_code': 'str', 'status': 'str', - 'tags': 'list[Tag]', + 'tags': 'list[ResourceTag]', 'enterprise_project_id': 'str' } @@ -890,7 +890,7 @@ class InstanceListInfo: 实例标签键值。 :return: The tags of this InstanceListInfo. - :rtype: list[Tag] + :rtype: list[ResourceTag] """ return self._tags @@ -901,7 +901,7 @@ class InstanceListInfo: 实例标签键值。 :param tags: The tags of this InstanceListInfo. - :type: list[Tag] + :type: list[ResourceTag] """ self._tags = tags diff --git a/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/slowlog_item.py b/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/slowlog_item.py index d9eebb6d8..b891b11eb 100644 --- a/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/slowlog_item.py +++ b/huaweicloud-sdk-dcs/huaweicloudsdkdcs/v2/model/slowlog_item.py @@ -26,7 +26,7 @@ class SlowlogItem: 'id': 'int', 'command': 'str', 'start_time': 'str', - 'duration': 'int', + 'duration': 'str', 'shard_name': 'str' } @@ -134,7 +134,7 @@ class SlowlogItem: 持续时间,单位是ms :return: The duration of this SlowlogItem. - :rtype: int + :rtype: str """ return self._duration @@ -145,7 +145,7 @@ class SlowlogItem: 持续时间,单位是ms :param duration: The duration of this SlowlogItem. - :type: int + :type: str """ self._duration = duration diff --git a/huaweicloud-sdk-dcs/setup.py b/huaweicloud-sdk-dcs/setup.py index 92527fe18..2ff0b0ed7 100644 --- a/huaweicloud-sdk-dcs/setup.py +++ b/huaweicloud-sdk-dcs/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkdcs" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-dds/huaweicloudsdkdds/v3/dds_async_client.py b/huaweicloud-sdk-dds/huaweicloudsdkdds/v3/dds_async_client.py index af561a7bc..354164a92 100644 --- a/huaweicloud-sdk-dds/huaweicloudsdkdds/v3/dds_async_client.py +++ b/huaweicloud-sdk-dds/huaweicloudsdkdds/v3/dds_async_client.py @@ -38,8 +38,14 @@ class DdsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkdds.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "DdsClient": + raise TypeError("client type error, support client type is DdsClient") + return ClientBuilder(clazz) def add_sharding_node_async(self, request): diff --git a/huaweicloud-sdk-dds/huaweicloudsdkdds/v3/dds_client.py b/huaweicloud-sdk-dds/huaweicloudsdkdds/v3/dds_client.py index d74b97447..e7745789e 100644 --- a/huaweicloud-sdk-dds/huaweicloudsdkdds/v3/dds_client.py +++ b/huaweicloud-sdk-dds/huaweicloudsdkdds/v3/dds_client.py @@ -38,8 +38,14 @@ class DdsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkdds.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "DdsClient": + raise TypeError("client type error, support client type is DdsClient") + return ClientBuilder(clazz) def add_sharding_node(self, request): diff --git a/huaweicloud-sdk-dds/setup.py b/huaweicloud-sdk-dds/setup.py index 557b05f72..64f12af9e 100644 --- a/huaweicloud-sdk-dds/setup.py +++ b/huaweicloud-sdk-dds/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkdds" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-devstar/huaweicloudsdkdevstar/v1/devstar_async_client.py b/huaweicloud-sdk-devstar/huaweicloudsdkdevstar/v1/devstar_async_client.py index 70a54bc62..0e1daf0ce 100644 --- a/huaweicloud-sdk-devstar/huaweicloudsdkdevstar/v1/devstar_async_client.py +++ b/huaweicloud-sdk-devstar/huaweicloudsdkdevstar/v1/devstar_async_client.py @@ -38,8 +38,14 @@ class DevStarAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkdevstar.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials") + + if clazz.__name__ != "DevStarClient": + raise TypeError("client type error, support client type is DevStarClient") + return ClientBuilder(clazz, "GlobalCredentials") def download_application_code_async(self, request): diff --git a/huaweicloud-sdk-devstar/huaweicloudsdkdevstar/v1/devstar_client.py b/huaweicloud-sdk-devstar/huaweicloudsdkdevstar/v1/devstar_client.py index dc1d61489..1ce986366 100644 --- a/huaweicloud-sdk-devstar/huaweicloudsdkdevstar/v1/devstar_client.py +++ b/huaweicloud-sdk-devstar/huaweicloudsdkdevstar/v1/devstar_client.py @@ -38,8 +38,14 @@ class DevStarClient(Client): self.model_package = importlib.import_module("huaweicloudsdkdevstar.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials") + + if clazz.__name__ != "DevStarClient": + raise TypeError("client type error, support client type is DevStarClient") + return ClientBuilder(clazz, "GlobalCredentials") def download_application_code(self, request): diff --git a/huaweicloud-sdk-devstar/setup.py b/huaweicloud-sdk-devstar/setup.py index d3ef6a25b..85a1969e7 100644 --- a/huaweicloud-sdk-devstar/setup.py +++ b/huaweicloud-sdk-devstar/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkdevstar" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-dgc/LICENSE b/huaweicloud-sdk-dgc/LICENSE new file mode 100644 index 000000000..808e3296c --- /dev/null +++ b/huaweicloud-sdk-dgc/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-dgc/README_PYPI.md b/huaweicloud-sdk-dgc/README_PYPI.md new file mode 100644 index 000000000..9711543c7 --- /dev/null +++ b/huaweicloud-sdk-dgc/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-dgc/huaweicloudsdkdgc/__init__.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/__init__.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/__init__.py new file mode 100644 index 000000000..aec1eea5f --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/__init__.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +from __future__ import absolute_import + +# import DgcClient +from huaweicloudsdkdgc.v1.dgc_client import DgcClient +from huaweicloudsdkdgc.v1.dgc_async_client import DgcAsyncClient +# import models into sdk package +from huaweicloudsdkdgc.v1.model.connection_info import ConnectionInfo +from huaweicloudsdkdgc.v1.model.connection_param import ConnectionParam +from huaweicloudsdkdgc.v1.model.create_connection_request import CreateConnectionRequest +from huaweicloudsdkdgc.v1.model.create_connection_response import CreateConnectionResponse +from huaweicloudsdkdgc.v1.model.delete_connction_request import DeleteConnctionRequest +from huaweicloudsdkdgc.v1.model.delete_connction_response import DeleteConnctionResponse +from huaweicloudsdkdgc.v1.model.export_connections_request import ExportConnectionsRequest +from huaweicloudsdkdgc.v1.model.export_connections_response import ExportConnectionsResponse +from huaweicloudsdkdgc.v1.model.import_connection_req import ImportConnectionReq +from huaweicloudsdkdgc.v1.model.import_connections_request import ImportConnectionsRequest +from huaweicloudsdkdgc.v1.model.import_connections_response import ImportConnectionsResponse +from huaweicloudsdkdgc.v1.model.list_connections_request import ListConnectionsRequest +from huaweicloudsdkdgc.v1.model.list_connections_response import ListConnectionsResponse +from huaweicloudsdkdgc.v1.model.show_connection_request import ShowConnectionRequest +from huaweicloudsdkdgc.v1.model.show_connection_response import ShowConnectionResponse +from huaweicloudsdkdgc.v1.model.update_connection_request import UpdateConnectionRequest +from huaweicloudsdkdgc.v1.model.update_connection_response import UpdateConnectionResponse + diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/dgc_async_client.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/dgc_async_client.py new file mode 100644 index 000000000..af96f7614 --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/dgc_async_client.py @@ -0,0 +1,511 @@ +# coding: utf-8 + +from __future__ import absolute_import + +import datetime +import re +import importlib + +import six + +from huaweicloudsdkcore.client import Client, ClientBuilder +from huaweicloudsdkcore.exceptions import exceptions +from huaweicloudsdkcore.utils import http_utils +from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest + + +class DgcAsyncClient(Client): + """ + :param configuration: .Configuration object for this client + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self): + super(DgcAsyncClient, self).__init__() + self.model_package = importlib.import_module("huaweicloudsdkdgc.v1.model") + self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} + + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "DgcClient": + raise TypeError("client type error, support client type is DgcClient") + + return ClientBuilder(clazz) + + def create_connection_async(self, request): + """创建连接 + + + :param CreateConnectionRequest request + :return: CreateConnectionResponse + """ + return self.create_connection_with_http_info(request) + + def create_connection_with_http_info(self, request): + """创建连接 + + + :param CreateConnectionRequest request + :return: CreateConnectionResponse + """ + + all_params = ['body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json;charset=UTF-8']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreateConnectionResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_connction_async(self, request): + """删除连接 + + + :param DeleteConnctionRequest request + :return: DeleteConnctionResponse + """ + return self.delete_connction_with_http_info(request) + + def delete_connction_with_http_info(self, request): + """删除连接 + + + :param DeleteConnctionRequest request + :return: DeleteConnctionResponse + """ + + all_params = ['connection_name'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connection_name' in local_var_params: + path_params['connection_name'] = local_var_params['connection_name'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections/{connection_name}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteConnctionResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def export_connections_async(self, request): + """导出连接 + + + :param ExportConnectionsRequest request + :return: ExportConnectionsResponse + """ + return self.export_connections_with_http_info(request) + + def export_connections_with_http_info(self, request): + """导出连接 + + + :param ExportConnectionsRequest request + :return: ExportConnectionsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections/export', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ExportConnectionsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def import_connections_async(self, request): + """导入连接 + + + :param ImportConnectionsRequest request + :return: ImportConnectionsResponse + """ + return self.import_connections_with_http_info(request) + + def import_connections_with_http_info(self, request): + """导入连接 + + + :param ImportConnectionsRequest request + :return: ImportConnectionsResponse + """ + + all_params = ['body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json;charset=UTF-8']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections/import', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ImportConnectionsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_connections_async(self, request): + """查询连接列表 + + + :param ListConnectionsRequest request + :return: ListConnectionsResponse + """ + return self.list_connections_with_http_info(request) + + def list_connections_with_http_info(self, request): + """查询连接列表 + + + :param ListConnectionsRequest request + :return: ListConnectionsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListConnectionsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_connection_async(self, request): + """查询连接详情 + + + :param ShowConnectionRequest request + :return: ShowConnectionResponse + """ + return self.show_connection_with_http_info(request) + + def show_connection_with_http_info(self, request): + """查询连接详情 + + + :param ShowConnectionRequest request + :return: ShowConnectionResponse + """ + + all_params = ['connection_name'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connection_name' in local_var_params: + path_params['connection_name'] = local_var_params['connection_name'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections/{connection_name}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowConnectionResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_connection_async(self, request): + """修改连接 + + + :param UpdateConnectionRequest request + :return: UpdateConnectionResponse + """ + return self.update_connection_with_http_info(request) + + def update_connection_with_http_info(self, request): + """修改连接 + + + :param UpdateConnectionRequest request + :return: UpdateConnectionResponse + """ + + all_params = ['connection_name', 'body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connection_name' in local_var_params: + path_params['connection_name'] = local_var_params['connection_name'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json;charset=UTF-8']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections/{connection_name}', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateConnectionResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, + post_params=None, response_type=None, response_headers=None, auth_settings=None, + collection_formats=None, request_type=None): + """Makes the HTTP request and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response_type: Response data type. + :param response_headers: Header should be added to response data. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param request_type: Request data type. + :return: + Return the response directly. + """ + return self.do_http_request( + method=method, + resource_path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body, + post_params=post_params, + response_type=response_type, + response_headers=response_headers, + collection_formats=collection_formats, + request_type=request_type, + async_request=True) diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/dgc_client.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/dgc_client.py new file mode 100644 index 000000000..d925dcfcc --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/dgc_client.py @@ -0,0 +1,509 @@ +# coding: utf-8 + +from __future__ import absolute_import + +import datetime +import re +import importlib + +import six + +from huaweicloudsdkcore.client import Client, ClientBuilder +from huaweicloudsdkcore.exceptions import exceptions +from huaweicloudsdkcore.utils import http_utils +from huaweicloudsdkcore.sdk_stream_request import SdkStreamRequest + + +class DgcClient(Client): + """ + :param configuration: .Configuration object for this client + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self): + super(DgcClient, self).__init__() + self.model_package = importlib.import_module("huaweicloudsdkdgc.v1.model") + self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} + + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "DgcClient": + raise TypeError("client type error, support client type is DgcClient") + + return ClientBuilder(clazz) + + def create_connection(self, request): + """创建连接 + + + :param CreateConnectionRequest request + :return: CreateConnectionResponse + """ + return self.create_connection_with_http_info(request) + + def create_connection_with_http_info(self, request): + """创建连接 + + + :param CreateConnectionRequest request + :return: CreateConnectionResponse + """ + + all_params = ['body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json;charset=UTF-8']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='CreateConnectionResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def delete_connction(self, request): + """删除连接 + + + :param DeleteConnctionRequest request + :return: DeleteConnctionResponse + """ + return self.delete_connction_with_http_info(request) + + def delete_connction_with_http_info(self, request): + """删除连接 + + + :param DeleteConnctionRequest request + :return: DeleteConnctionResponse + """ + + all_params = ['connection_name'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connection_name' in local_var_params: + path_params['connection_name'] = local_var_params['connection_name'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections/{connection_name}', + method='DELETE', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='DeleteConnctionResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def export_connections(self, request): + """导出连接 + + + :param ExportConnectionsRequest request + :return: ExportConnectionsResponse + """ + return self.export_connections_with_http_info(request) + + def export_connections_with_http_info(self, request): + """导出连接 + + + :param ExportConnectionsRequest request + :return: ExportConnectionsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections/export', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ExportConnectionsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def import_connections(self, request): + """导入连接 + + + :param ImportConnectionsRequest request + :return: ImportConnectionsResponse + """ + return self.import_connections_with_http_info(request) + + def import_connections_with_http_info(self, request): + """导入连接 + + + :param ImportConnectionsRequest request + :return: ImportConnectionsResponse + """ + + all_params = ['body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json;charset=UTF-8']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections/import', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ImportConnectionsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def list_connections(self, request): + """查询连接列表 + + + :param ListConnectionsRequest request + :return: ListConnectionsResponse + """ + return self.list_connections_with_http_info(request) + + def list_connections_with_http_info(self, request): + """查询连接列表 + + + :param ListConnectionsRequest request + :return: ListConnectionsResponse + """ + + all_params = [] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ListConnectionsResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def show_connection(self, request): + """查询连接详情 + + + :param ShowConnectionRequest request + :return: ShowConnectionResponse + """ + return self.show_connection_with_http_info(request) + + def show_connection_with_http_info(self, request): + """查询连接详情 + + + :param ShowConnectionRequest request + :return: ShowConnectionResponse + """ + + all_params = ['connection_name'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connection_name' in local_var_params: + path_params['connection_name'] = local_var_params['connection_name'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections/{connection_name}', + method='GET', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='ShowConnectionResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def update_connection(self, request): + """修改连接 + + + :param UpdateConnectionRequest request + :return: UpdateConnectionResponse + """ + return self.update_connection_with_http_info(request) + + def update_connection_with_http_info(self, request): + """修改连接 + + + :param UpdateConnectionRequest request + :return: UpdateConnectionResponse + """ + + all_params = ['connection_name', 'body'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if 'connection_name' in local_var_params: + path_params['connection_name'] = local_var_params['connection_name'] + + query_params = [] + + header_params = {} + + form_params = {} + + body_params = None + if 'body' in local_var_params: + body_params = local_var_params['body'] + if isinstance(request, SdkStreamRequest): + body_params = request.get_file_stream() + + response_headers = [] + + header_params['Content-Type'] = http_utils.select_header_content_type( + ['application/json;charset=UTF-8']) + + auth_settings = [] + + return self.call_api( + resource_path='/v1/{project_id}/connections/{connection_name}', + method='PUT', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='UpdateConnectionResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def call_api(self, resource_path, method, path_params=None, query_params=None, header_params=None, body=None, + post_params=None, response_type=None, response_headers=None, auth_settings=None, + collection_formats=None, request_type=None): + """Makes the HTTP request and returns deserialized data. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response_type: Response data type. + :param response_headers: Header should be added to response data. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param request_type: Request data type. + :return: + Return the response directly. + """ + return self.do_http_request( + method=method, + resource_path=resource_path, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body, + post_params=post_params, + response_type=response_type, + response_headers=response_headers, + collection_formats=collection_formats, + request_type=request_type) diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/exception_handler.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/exception_handler.py new file mode 100644 index 000000000..583d24d87 --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/exception_handler.py @@ -0,0 +1,19 @@ +import json + +from huaweicloudsdkcore.exceptions import exceptions + +class DgcError: + def __init__(self, request_id=None, error_code=None, error_msg=None): + self.error_msg = error_msg + self.error_code = error_code + self.request_id = request_id + +def handle_exception(response_body): + dgc_error = DgcError() + + dgc_error_dict = json.loads(response_body) + for key in dgc_error_dict: + if type(dgc_error_dict[key]) == dict and "error_code" in dgc_error_dict[key] and "error_msg" in \ + dgc_error_dict[key]: + dgc_error = DgcError("0a04ffbcb5db120ce371f27e078e8980", dgc_error_dict[key]["error_code"], dgc_error_dict[key]["error_msg"]) + return dgc_error \ No newline at end of file diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/__init__.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/__init__.py new file mode 100644 index 000000000..10f81a1c4 --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/__init__.py @@ -0,0 +1,22 @@ +# coding: utf-8 + +from __future__ import absolute_import + +# import models into model package +from huaweicloudsdkdgc.v1.model.connection_info import ConnectionInfo +from huaweicloudsdkdgc.v1.model.connection_param import ConnectionParam +from huaweicloudsdkdgc.v1.model.create_connection_request import CreateConnectionRequest +from huaweicloudsdkdgc.v1.model.create_connection_response import CreateConnectionResponse +from huaweicloudsdkdgc.v1.model.delete_connction_request import DeleteConnctionRequest +from huaweicloudsdkdgc.v1.model.delete_connction_response import DeleteConnctionResponse +from huaweicloudsdkdgc.v1.model.export_connections_request import ExportConnectionsRequest +from huaweicloudsdkdgc.v1.model.export_connections_response import ExportConnectionsResponse +from huaweicloudsdkdgc.v1.model.import_connection_req import ImportConnectionReq +from huaweicloudsdkdgc.v1.model.import_connections_request import ImportConnectionsRequest +from huaweicloudsdkdgc.v1.model.import_connections_response import ImportConnectionsResponse +from huaweicloudsdkdgc.v1.model.list_connections_request import ListConnectionsRequest +from huaweicloudsdkdgc.v1.model.list_connections_response import ListConnectionsResponse +from huaweicloudsdkdgc.v1.model.show_connection_request import ShowConnectionRequest +from huaweicloudsdkdgc.v1.model.show_connection_response import ShowConnectionResponse +from huaweicloudsdkdgc.v1.model.update_connection_request import UpdateConnectionRequest +from huaweicloudsdkdgc.v1.model.update_connection_response import UpdateConnectionResponse diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/connection_info.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/connection_info.py new file mode 100644 index 000000000..46037968e --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/connection_info.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConnectionInfo: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'connection_type': 'str', + 'config': 'object' + } + + attribute_map = { + 'name': 'name', + 'connection_type': 'connectionType', + 'config': 'config' + } + + def __init__(self, name=None, connection_type=None, config=None): + """ConnectionInfo - a model defined in huaweicloud sdk""" + + + + self._name = None + self._connection_type = None + self._config = None + self.discriminator = None + + if name is not None: + self.name = name + if connection_type is not None: + self.connection_type = connection_type + if config is not None: + self.config = config + + @property + def name(self): + """Gets the name of this ConnectionInfo. + + + :return: The name of this ConnectionInfo. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ConnectionInfo. + + + :param name: The name of this ConnectionInfo. + :type: str + """ + self._name = name + + @property + def connection_type(self): + """Gets the connection_type of this ConnectionInfo. + + + :return: The connection_type of this ConnectionInfo. + :rtype: str + """ + return self._connection_type + + @connection_type.setter + def connection_type(self, connection_type): + """Sets the connection_type of this ConnectionInfo. + + + :param connection_type: The connection_type of this ConnectionInfo. + :type: str + """ + self._connection_type = connection_type + + @property + def config(self): + """Gets the config of this ConnectionInfo. + + + :return: The config of this ConnectionInfo. + :rtype: object + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this ConnectionInfo. + + + :param config: The config of this ConnectionInfo. + :type: object + """ + self._config = config + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConnectionInfo): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/connection_param.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/connection_param.py new file mode 100644 index 000000000..45f5cb66c --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/connection_param.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ConnectionParam: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'connection_type': 'str', + 'params': 'object' + } + + attribute_map = { + 'name': 'name', + 'connection_type': 'connectionType', + 'params': 'params' + } + + def __init__(self, name=None, connection_type=None, params=None): + """ConnectionParam - a model defined in huaweicloud sdk""" + + + + self._name = None + self._connection_type = None + self._params = None + self.discriminator = None + + if name is not None: + self.name = name + if connection_type is not None: + self.connection_type = connection_type + if params is not None: + self.params = params + + @property + def name(self): + """Gets the name of this ConnectionParam. + + + :return: The name of this ConnectionParam. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ConnectionParam. + + + :param name: The name of this ConnectionParam. + :type: str + """ + self._name = name + + @property + def connection_type(self): + """Gets the connection_type of this ConnectionParam. + + + :return: The connection_type of this ConnectionParam. + :rtype: str + """ + return self._connection_type + + @connection_type.setter + def connection_type(self, connection_type): + """Sets the connection_type of this ConnectionParam. + + + :param connection_type: The connection_type of this ConnectionParam. + :type: str + """ + self._connection_type = connection_type + + @property + def params(self): + """Gets the params of this ConnectionParam. + + + :return: The params of this ConnectionParam. + :rtype: object + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this ConnectionParam. + + + :param params: The params of this ConnectionParam. + :type: object + """ + self._params = params + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ConnectionParam): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/create_connection_request.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/create_connection_request.py new file mode 100644 index 000000000..b03de276d --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/create_connection_request.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateConnectionRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'body': 'ConnectionInfo' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """CreateConnectionRequest - a model defined in huaweicloud sdk""" + + + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this CreateConnectionRequest. + + + :return: The body of this CreateConnectionRequest. + :rtype: ConnectionInfo + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreateConnectionRequest. + + + :param body: The body of this CreateConnectionRequest. + :type: ConnectionInfo + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateConnectionRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/create_connection_response.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/create_connection_response.py new file mode 100644 index 000000000..eaf15d005 --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/create_connection_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class CreateConnectionResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """CreateConnectionResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateConnectionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/delete_connction_request.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/delete_connction_request.py new file mode 100644 index 000000000..3ac5c8653 --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/delete_connction_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class DeleteConnctionRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'connection_name': 'str' + } + + attribute_map = { + 'connection_name': 'connection_name' + } + + def __init__(self, connection_name=None): + """DeleteConnctionRequest - a model defined in huaweicloud sdk""" + + + + self._connection_name = None + self.discriminator = None + + self.connection_name = connection_name + + @property + def connection_name(self): + """Gets the connection_name of this DeleteConnctionRequest. + + + :return: The connection_name of this DeleteConnctionRequest. + :rtype: str + """ + return self._connection_name + + @connection_name.setter + def connection_name(self, connection_name): + """Sets the connection_name of this DeleteConnctionRequest. + + + :param connection_name: The connection_name of this DeleteConnctionRequest. + :type: str + """ + self._connection_name = connection_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteConnctionRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/delete_connction_response.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/delete_connction_response.py new file mode 100644 index 000000000..2e6cc263d --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/delete_connction_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class DeleteConnctionResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """DeleteConnctionResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DeleteConnctionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/export_connections_request.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/export_connections_request.py new file mode 100644 index 000000000..18bb5f2c0 --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/export_connections_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ExportConnectionsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ExportConnectionsRequest - a model defined in huaweicloud sdk""" + + + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExportConnectionsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/export_connections_response.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/export_connections_response.py new file mode 100644 index 000000000..ef177bd00 --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/export_connections_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ExportConnectionsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ExportConnectionsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ExportConnectionsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/import_connection_req.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/import_connection_req.py new file mode 100644 index 000000000..91f1e61c7 --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/import_connection_req.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ImportConnectionReq: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'path': 'str', + 'params': 'list[ConnectionParam]', + 'same_name_policy': 'str' + } + + attribute_map = { + 'path': 'path', + 'params': 'params', + 'same_name_policy': 'sameNamePolicy' + } + + def __init__(self, path=None, params=None, same_name_policy=None): + """ImportConnectionReq - a model defined in huaweicloud sdk""" + + + + self._path = None + self._params = None + self._same_name_policy = None + self.discriminator = None + + if path is not None: + self.path = path + if params is not None: + self.params = params + if same_name_policy is not None: + self.same_name_policy = same_name_policy + + @property + def path(self): + """Gets the path of this ImportConnectionReq. + + + :return: The path of this ImportConnectionReq. + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this ImportConnectionReq. + + + :param path: The path of this ImportConnectionReq. + :type: str + """ + self._path = path + + @property + def params(self): + """Gets the params of this ImportConnectionReq. + + 连接参数 + + :return: The params of this ImportConnectionReq. + :rtype: list[ConnectionParam] + """ + return self._params + + @params.setter + def params(self, params): + """Sets the params of this ImportConnectionReq. + + 连接参数 + + :param params: The params of this ImportConnectionReq. + :type: list[ConnectionParam] + """ + self._params = params + + @property + def same_name_policy(self): + """Gets the same_name_policy of this ImportConnectionReq. + + + :return: The same_name_policy of this ImportConnectionReq. + :rtype: str + """ + return self._same_name_policy + + @same_name_policy.setter + def same_name_policy(self, same_name_policy): + """Sets the same_name_policy of this ImportConnectionReq. + + + :param same_name_policy: The same_name_policy of this ImportConnectionReq. + :type: str + """ + self._same_name_policy = same_name_policy + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ImportConnectionReq): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/import_connections_request.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/import_connections_request.py new file mode 100644 index 000000000..1d45bc51f --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/import_connections_request.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ImportConnectionsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'body': 'ImportConnectionReq' + } + + attribute_map = { + 'body': 'body' + } + + def __init__(self, body=None): + """ImportConnectionsRequest - a model defined in huaweicloud sdk""" + + + + self._body = None + self.discriminator = None + + if body is not None: + self.body = body + + @property + def body(self): + """Gets the body of this ImportConnectionsRequest. + + + :return: The body of this ImportConnectionsRequest. + :rtype: ImportConnectionReq + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this ImportConnectionsRequest. + + + :param body: The body of this ImportConnectionsRequest. + :type: ImportConnectionReq + """ + self._body = body + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ImportConnectionsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_response.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/import_connections_response.py similarity index 67% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_response.py rename to huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/import_connections_response.py index 0484e3e32..5c5defb20 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_response.py +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/import_connections_response.py @@ -9,7 +9,7 @@ import six from huaweicloudsdkcore.sdk_response import SdkResponse -class RecognizeFinancialStatementResponse(SdkResponse): +class ImportConnectionsResponse(SdkResponse): """ @@ -23,43 +23,45 @@ class RecognizeFinancialStatementResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeFinancialStatementResultResponse' + 'task_id': 'str' } attribute_map = { - 'result': 'result' + 'task_id': 'taskId' } - def __init__(self, result=None): - """RecognizeFinancialStatementResponse - a model defined in huaweicloud sdk""" + def __init__(self, task_id=None): + """ImportConnectionsResponse - a model defined in huaweicloud sdk""" super().__init__() - self._result = None + self._task_id = None self.discriminator = None - if result is not None: - self.result = result + if task_id is not None: + self.task_id = task_id @property - def result(self): - """Gets the result of this RecognizeFinancialStatementResponse. + def task_id(self): + """Gets the task_id of this ImportConnectionsResponse. + 任务id - :return: The result of this RecognizeFinancialStatementResponse. - :rtype: RecognizeFinancialStatementResultResponse + :return: The task_id of this ImportConnectionsResponse. + :rtype: str """ - return self._result + return self._task_id - @result.setter - def result(self, result): - """Sets the result of this RecognizeFinancialStatementResponse. + @task_id.setter + def task_id(self, task_id): + """Sets the task_id of this ImportConnectionsResponse. + 任务id - :param result: The result of this RecognizeFinancialStatementResponse. - :type: RecognizeFinancialStatementResultResponse + :param task_id: The task_id of this ImportConnectionsResponse. + :type: str """ - self._result = result + self._task_id = task_id def to_dict(self): """Returns the model properties as a dict""" @@ -98,7 +100,7 @@ class RecognizeFinancialStatementResponse(SdkResponse): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeFinancialStatementResponse): + if not isinstance(other, ImportConnectionsResponse): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/list_connections_request.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/list_connections_request.py new file mode 100644 index 000000000..5648f5e1f --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/list_connections_request.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ListConnectionsRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """ListConnectionsRequest - a model defined in huaweicloud sdk""" + + + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListConnectionsRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/list_connections_response.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/list_connections_response.py new file mode 100644 index 000000000..01d91f772 --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/list_connections_response.py @@ -0,0 +1,133 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ListConnectionsResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'total': 'str', + 'connections': 'list[ConnectionInfo]' + } + + attribute_map = { + 'total': 'total', + 'connections': 'connections' + } + + def __init__(self, total=None, connections=None): + """ListConnectionsResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._total = None + self._connections = None + self.discriminator = None + + if total is not None: + self.total = total + if connections is not None: + self.connections = connections + + @property + def total(self): + """Gets the total of this ListConnectionsResponse. + + + :return: The total of this ListConnectionsResponse. + :rtype: str + """ + return self._total + + @total.setter + def total(self, total): + """Sets the total of this ListConnectionsResponse. + + + :param total: The total of this ListConnectionsResponse. + :type: str + """ + self._total = total + + @property + def connections(self): + """Gets the connections of this ListConnectionsResponse. + + + :return: The connections of this ListConnectionsResponse. + :rtype: list[ConnectionInfo] + """ + return self._connections + + @connections.setter + def connections(self, connections): + """Sets the connections of this ListConnectionsResponse. + + + :param connections: The connections of this ListConnectionsResponse. + :type: list[ConnectionInfo] + """ + self._connections = connections + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ListConnectionsResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/show_connection_request.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/show_connection_request.py new file mode 100644 index 000000000..d1695b31e --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/show_connection_request.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class ShowConnectionRequest: + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'connection_name': 'str' + } + + attribute_map = { + 'connection_name': 'connection_name' + } + + def __init__(self, connection_name=None): + """ShowConnectionRequest - a model defined in huaweicloud sdk""" + + + + self._connection_name = None + self.discriminator = None + + self.connection_name = connection_name + + @property + def connection_name(self): + """Gets the connection_name of this ShowConnectionRequest. + + + :return: The connection_name of this ShowConnectionRequest. + :rtype: str + """ + return self._connection_name + + @connection_name.setter + def connection_name(self, connection_name): + """Sets the connection_name of this ShowConnectionRequest. + + + :param connection_name: The connection_name of this ShowConnectionRequest. + :type: str + """ + self._connection_name = connection_name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowConnectionRequest): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/show_connection_response.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/show_connection_response.py new file mode 100644 index 000000000..f8a5b8a4d --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/show_connection_response.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class ShowConnectionResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + 'name': 'str', + 'connection_type': 'str', + 'config': 'object' + } + + attribute_map = { + 'name': 'name', + 'connection_type': 'connectionType', + 'config': 'config' + } + + def __init__(self, name=None, connection_type=None, config=None): + """ShowConnectionResponse - a model defined in huaweicloud sdk""" + + super().__init__() + + self._name = None + self._connection_type = None + self._config = None + self.discriminator = None + + if name is not None: + self.name = name + if connection_type is not None: + self.connection_type = connection_type + if config is not None: + self.config = config + + @property + def name(self): + """Gets the name of this ShowConnectionResponse. + + + :return: The name of this ShowConnectionResponse. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this ShowConnectionResponse. + + + :param name: The name of this ShowConnectionResponse. + :type: str + """ + self._name = name + + @property + def connection_type(self): + """Gets the connection_type of this ShowConnectionResponse. + + + :return: The connection_type of this ShowConnectionResponse. + :rtype: str + """ + return self._connection_type + + @connection_type.setter + def connection_type(self, connection_type): + """Sets the connection_type of this ShowConnectionResponse. + + + :param connection_type: The connection_type of this ShowConnectionResponse. + :type: str + """ + self._connection_type = connection_type + + @property + def config(self): + """Gets the config of this ShowConnectionResponse. + + + :return: The config of this ShowConnectionResponse. + :rtype: object + """ + return self._config + + @config.setter + def config(self, config): + """Sets the config of this ShowConnectionResponse. + + + :param config: The config of this ShowConnectionResponse. + :type: object + """ + self._config = config + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ShowConnectionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_request.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/update_connection_request.py similarity index 63% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_request.py rename to huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/update_connection_request.py index 93e8788c1..7e91ee31e 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_request.py +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/update_connection_request.py @@ -9,7 +9,7 @@ import six -class RecognizeFinancialStatementRequest: +class UpdateConnectionRequest: """ @@ -23,65 +23,65 @@ class RecognizeFinancialStatementRequest: sensitive_list = [] openapi_types = { - 'project_id': 'str', - 'body': 'RecognizeFinancialStatementRequestBody' + 'connection_name': 'str', + 'body': 'ConnectionInfo' } attribute_map = { - 'project_id': 'project_id', + 'connection_name': 'connection_name', 'body': 'body' } - def __init__(self, project_id=None, body=None): - """RecognizeFinancialStatementRequest - a model defined in huaweicloud sdk""" + def __init__(self, connection_name=None, body=None): + """UpdateConnectionRequest - a model defined in huaweicloud sdk""" - self._project_id = None + self._connection_name = None self._body = None self.discriminator = None - self.project_id = project_id + self.connection_name = connection_name if body is not None: self.body = body @property - def project_id(self): - """Gets the project_id of this RecognizeFinancialStatementRequest. + def connection_name(self): + """Gets the connection_name of this UpdateConnectionRequest. - :return: The project_id of this RecognizeFinancialStatementRequest. + :return: The connection_name of this UpdateConnectionRequest. :rtype: str """ - return self._project_id + return self._connection_name - @project_id.setter - def project_id(self, project_id): - """Sets the project_id of this RecognizeFinancialStatementRequest. + @connection_name.setter + def connection_name(self, connection_name): + """Sets the connection_name of this UpdateConnectionRequest. - :param project_id: The project_id of this RecognizeFinancialStatementRequest. + :param connection_name: The connection_name of this UpdateConnectionRequest. :type: str """ - self._project_id = project_id + self._connection_name = connection_name @property def body(self): - """Gets the body of this RecognizeFinancialStatementRequest. + """Gets the body of this UpdateConnectionRequest. - :return: The body of this RecognizeFinancialStatementRequest. - :rtype: RecognizeFinancialStatementRequestBody + :return: The body of this UpdateConnectionRequest. + :rtype: ConnectionInfo """ return self._body @body.setter def body(self, body): - """Sets the body of this RecognizeFinancialStatementRequest. + """Sets the body of this UpdateConnectionRequest. - :param body: The body of this RecognizeFinancialStatementRequest. - :type: RecognizeFinancialStatementRequestBody + :param body: The body of this UpdateConnectionRequest. + :type: ConnectionInfo """ self._body = body @@ -122,7 +122,7 @@ class RecognizeFinancialStatementRequest: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeFinancialStatementRequest): + if not isinstance(other, UpdateConnectionRequest): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/update_connection_response.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/update_connection_response.py new file mode 100644 index 000000000..86b5e1301 --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/model/update_connection_response.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +import pprint +import re + +import six + + +from huaweicloudsdkcore.sdk_response import SdkResponse + + +class UpdateConnectionResponse(SdkResponse): + + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + + sensitive_list = [] + + openapi_types = { + } + + attribute_map = { + } + + def __init__(self): + """UpdateConnectionResponse - a model defined in huaweicloud sdk""" + + super().__init__() + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, UpdateConnectionResponse): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/region/__init__.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/region/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/region/dgc_region.py b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/region/dgc_region.py new file mode 100644 index 000000000..e9290625c --- /dev/null +++ b/huaweicloud-sdk-dgc/huaweicloudsdkdgc/v1/region/dgc_region.py @@ -0,0 +1,26 @@ +# coding: utf-8 + +from huaweicloudsdkcore.region.region import Region + + +class DgcRegion: + def __init__(self): + pass + + CN_NORTH_1 = Region(id="cn-north-1", endpoint="https://dayu-dlf.cn-north-1.myhuaweicloud.com") + + CN_NORTH_4 = Region(id="cn-north-4", endpoint="https://dayu-dlf.cn-north-4.myhuaweicloud.com") + + CN_EAST_3 = Region(id="cn-east-3", endpoint="https://dayu-dlf.cn-east-3.myhuaweicloud.com") + + CN_EAST_2 = Region(id="cn-east-2", endpoint="https://dayu-dlf.cn-east-2.myhuaweicloud.com") + + CN_SOUTH_1 = Region(id="cn-south-1", endpoint="https://dayu-dlf.cn-south-1.myhuaweicloud.com") + + AP_SOUTHEAST_3 = Region(id="ap-southeast-3", endpoint="https://dayu-dlf.ap-southeast-3.myhuaweicloud.com") + + AP_SOUTHEAST_1 = Region(id="ap-southeast-1", endpoint="https://dayu-dlf.ap-southeast-3.myhuaweicloud.com") + + RU_NORTHWEST_2 = Region(id="ru-northwest-2", endpoint="https://dayu-dlf.ru-northwest-2.myhuaweicloud.com") + + diff --git a/huaweicloud-sdk-dgc/requirements.txt b/huaweicloud-sdk-dgc/requirements.txt new file mode 100644 index 000000000..bf54e8e3d --- /dev/null +++ b/huaweicloud-sdk-dgc/requirements.txt @@ -0,0 +1 @@ +huaweicloud-sdk-python-core diff --git a/huaweicloud-sdk-dgc/setup.py b/huaweicloud-sdk-dgc/setup.py new file mode 100644 index 000000000..0da1c8f40 --- /dev/null +++ b/huaweicloud-sdk-dgc/setup.py @@ -0,0 +1,45 @@ +# coding: utf-8 +from os import path + +from setuptools import setup, find_packages + +NAME = "huaweicloudsdkdgc" +VERSION = "3.0.29-beta" +AUTHOR = "HuaweiCloud SDK" +AUTHOR_EMAIL = "hwcloudsdk@huawei.com" +URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" + +DESCRIPTION = "DGC" +this_directory = path.abspath(path.dirname(__file__)) +with open(path.join(this_directory, 'README_PYPI.md'), encoding='utf-8') as f: + LONG_DESCRIPTION = f.read() + +REQUIRES = ["huaweicloudsdkcore"] + +setup( + name=NAME, + version=VERSION, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', + author=AUTHOR, + author_email=AUTHOR_EMAIL, + license="Apache LICENSE 2.0", + url=URL, + keywords=["huaweicloud", "sdk", "DGC"], + packages=find_packages(exclude=["tests*"]), + install_requires=REQUIRES, + include_package_data=True, + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Topic :: Software Development' + ] +) diff --git a/huaweicloud-sdk-dgc/test-requirements.txt b/huaweicloud-sdk-dgc/test-requirements.txt new file mode 100644 index 000000000..2702246c0 --- /dev/null +++ b/huaweicloud-sdk-dgc/test-requirements.txt @@ -0,0 +1,5 @@ +coverage>=4.0.3 +nose>=1.3.7 +pluggy>=0.3.1 +py>=1.4.31 +randomize>=0.13 diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_async_client.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_async_client.py index cf5aba82f..64a645776 100644 --- a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_async_client.py +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_async_client.py @@ -38,8 +38,14 @@ class DmsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkdms.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "DmsClient": + raise TypeError("client type error, support client type is DmsClient") + return ClientBuilder(clazz) def batch_create_or_delete_queue_tag_async(self, request): diff --git a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_client.py b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_client.py index 7056313c2..8101d02c1 100644 --- a/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_client.py +++ b/huaweicloud-sdk-dms/huaweicloudsdkdms/v2/dms_client.py @@ -38,8 +38,14 @@ class DmsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkdms.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "DmsClient": + raise TypeError("client type error, support client type is DmsClient") + return ClientBuilder(clazz) def batch_create_or_delete_queue_tag(self, request): diff --git a/huaweicloud-sdk-dms/setup.py b/huaweicloud-sdk-dms/setup.py index 78ff4c253..1615cafe7 100644 --- a/huaweicloud-sdk-dms/setup.py +++ b/huaweicloud-sdk-dms/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkdms" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-ecs/huaweicloudsdkecs/v2/ecs_async_client.py b/huaweicloud-sdk-ecs/huaweicloudsdkecs/v2/ecs_async_client.py index 19713ec4e..b5878cfc8 100644 --- a/huaweicloud-sdk-ecs/huaweicloudsdkecs/v2/ecs_async_client.py +++ b/huaweicloud-sdk-ecs/huaweicloudsdkecs/v2/ecs_async_client.py @@ -38,8 +38,14 @@ class EcsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkecs.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "EcsClient": + raise TypeError("client type error, support client type is EcsClient") + return ClientBuilder(clazz) def add_server_group_member_async(self, request): diff --git a/huaweicloud-sdk-ecs/huaweicloudsdkecs/v2/ecs_client.py b/huaweicloud-sdk-ecs/huaweicloudsdkecs/v2/ecs_client.py index e3d2f7a6d..d07ee1bba 100644 --- a/huaweicloud-sdk-ecs/huaweicloudsdkecs/v2/ecs_client.py +++ b/huaweicloud-sdk-ecs/huaweicloudsdkecs/v2/ecs_client.py @@ -38,8 +38,14 @@ class EcsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkecs.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "EcsClient": + raise TypeError("client type error, support client type is EcsClient") + return ClientBuilder(clazz) def add_server_group_member(self, request): diff --git a/huaweicloud-sdk-ecs/setup.py b/huaweicloud-sdk-ecs/setup.py index 93946f8e6..4df9c471d 100644 --- a/huaweicloud-sdk-ecs/setup.py +++ b/huaweicloud-sdk-ecs/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkecs" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-eip/huaweicloudsdkeip/v2/eip_async_client.py b/huaweicloud-sdk-eip/huaweicloudsdkeip/v2/eip_async_client.py index 400a6dcfb..5d1427956 100644 --- a/huaweicloud-sdk-eip/huaweicloudsdkeip/v2/eip_async_client.py +++ b/huaweicloud-sdk-eip/huaweicloudsdkeip/v2/eip_async_client.py @@ -38,8 +38,14 @@ class EipAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkeip.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "EipClient": + raise TypeError("client type error, support client type is EipClient") + return ClientBuilder(clazz) def add_publicips_into_shared_bandwidth_async(self, request): diff --git a/huaweicloud-sdk-eip/huaweicloudsdkeip/v2/eip_client.py b/huaweicloud-sdk-eip/huaweicloudsdkeip/v2/eip_client.py index b7ecc4a10..a120635ea 100644 --- a/huaweicloud-sdk-eip/huaweicloudsdkeip/v2/eip_client.py +++ b/huaweicloud-sdk-eip/huaweicloudsdkeip/v2/eip_client.py @@ -38,8 +38,14 @@ class EipClient(Client): self.model_package = importlib.import_module("huaweicloudsdkeip.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "EipClient": + raise TypeError("client type error, support client type is EipClient") + return ClientBuilder(clazz) def add_publicips_into_shared_bandwidth(self, request): diff --git a/huaweicloud-sdk-eip/setup.py b/huaweicloud-sdk-eip/setup.py index 1ee8a3069..d773ad3b9 100644 --- a/huaweicloud-sdk-eip/setup.py +++ b/huaweicloud-sdk-eip/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkeip" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-elb/huaweicloudsdkelb/v2/elb_async_client.py b/huaweicloud-sdk-elb/huaweicloudsdkelb/v2/elb_async_client.py index b3eb48434..340b2dd76 100644 --- a/huaweicloud-sdk-elb/huaweicloudsdkelb/v2/elb_async_client.py +++ b/huaweicloud-sdk-elb/huaweicloudsdkelb/v2/elb_async_client.py @@ -38,8 +38,14 @@ class ElbAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkelb.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ElbClient": + raise TypeError("client type error, support client type is ElbClient") + return ClientBuilder(clazz) def create_healthmonitor_async(self, request): diff --git a/huaweicloud-sdk-elb/huaweicloudsdkelb/v2/elb_client.py b/huaweicloud-sdk-elb/huaweicloudsdkelb/v2/elb_client.py index a02b234f7..77af240ff 100644 --- a/huaweicloud-sdk-elb/huaweicloudsdkelb/v2/elb_client.py +++ b/huaweicloud-sdk-elb/huaweicloudsdkelb/v2/elb_client.py @@ -38,8 +38,14 @@ class ElbClient(Client): self.model_package = importlib.import_module("huaweicloudsdkelb.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ElbClient": + raise TypeError("client type error, support client type is ElbClient") + return ClientBuilder(clazz) def create_healthmonitor(self, request): diff --git a/huaweicloud-sdk-elb/huaweicloudsdkelb/v3/elb_async_client.py b/huaweicloud-sdk-elb/huaweicloudsdkelb/v3/elb_async_client.py index 83e81d323..94202b44e 100644 --- a/huaweicloud-sdk-elb/huaweicloudsdkelb/v3/elb_async_client.py +++ b/huaweicloud-sdk-elb/huaweicloudsdkelb/v3/elb_async_client.py @@ -38,8 +38,14 @@ class ElbAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkelb.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ElbClient": + raise TypeError("client type error, support client type is ElbClient") + return ClientBuilder(clazz) def create_certificate_async(self, request): diff --git a/huaweicloud-sdk-elb/huaweicloudsdkelb/v3/elb_client.py b/huaweicloud-sdk-elb/huaweicloudsdkelb/v3/elb_client.py index 2a721b245..e2b531145 100644 --- a/huaweicloud-sdk-elb/huaweicloudsdkelb/v3/elb_client.py +++ b/huaweicloud-sdk-elb/huaweicloudsdkelb/v3/elb_client.py @@ -38,8 +38,14 @@ class ElbClient(Client): self.model_package = importlib.import_module("huaweicloudsdkelb.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ElbClient": + raise TypeError("client type error, support client type is ElbClient") + return ClientBuilder(clazz) def create_certificate(self, request): diff --git a/huaweicloud-sdk-elb/setup.py b/huaweicloud-sdk-elb/setup.py index 87d48a72a..49ec58443 100644 --- a/huaweicloud-sdk-elb/setup.py +++ b/huaweicloud-sdk-elb/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkelb" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-eps/huaweicloudsdkeps/v1/eps_async_client.py b/huaweicloud-sdk-eps/huaweicloudsdkeps/v1/eps_async_client.py index b3adc2136..fa72e1cfb 100644 --- a/huaweicloud-sdk-eps/huaweicloudsdkeps/v1/eps_async_client.py +++ b/huaweicloud-sdk-eps/huaweicloudsdkeps/v1/eps_async_client.py @@ -38,8 +38,14 @@ class EpsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkeps.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials") + + if clazz.__name__ != "EpsClient": + raise TypeError("client type error, support client type is EpsClient") + return ClientBuilder(clazz, "GlobalCredentials") def create_enterprise_project_async(self, request): diff --git a/huaweicloud-sdk-eps/huaweicloudsdkeps/v1/eps_client.py b/huaweicloud-sdk-eps/huaweicloudsdkeps/v1/eps_client.py index 9ec5f3754..0943b813b 100644 --- a/huaweicloud-sdk-eps/huaweicloudsdkeps/v1/eps_client.py +++ b/huaweicloud-sdk-eps/huaweicloudsdkeps/v1/eps_client.py @@ -38,8 +38,14 @@ class EpsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkeps.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials") + + if clazz.__name__ != "EpsClient": + raise TypeError("client type error, support client type is EpsClient") + return ClientBuilder(clazz, "GlobalCredentials") def create_enterprise_project(self, request): diff --git a/huaweicloud-sdk-eps/setup.py b/huaweicloud-sdk-eps/setup.py index 5e89b8730..b93652725 100644 --- a/huaweicloud-sdk-eps/setup.py +++ b/huaweicloud-sdk-eps/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkeps" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-evs/huaweicloudsdkevs/v2/evs_async_client.py b/huaweicloud-sdk-evs/huaweicloudsdkevs/v2/evs_async_client.py index ce4d28a6f..8e90ce024 100644 --- a/huaweicloud-sdk-evs/huaweicloudsdkevs/v2/evs_async_client.py +++ b/huaweicloud-sdk-evs/huaweicloudsdkevs/v2/evs_async_client.py @@ -38,8 +38,14 @@ class EvsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkevs.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "EvsClient": + raise TypeError("client type error, support client type is EvsClient") + return ClientBuilder(clazz) def batch_create_volume_tags_async(self, request): diff --git a/huaweicloud-sdk-evs/huaweicloudsdkevs/v2/evs_client.py b/huaweicloud-sdk-evs/huaweicloudsdkevs/v2/evs_client.py index 91cef6f4e..e1186519a 100644 --- a/huaweicloud-sdk-evs/huaweicloudsdkevs/v2/evs_client.py +++ b/huaweicloud-sdk-evs/huaweicloudsdkevs/v2/evs_client.py @@ -38,8 +38,14 @@ class EvsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkevs.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "EvsClient": + raise TypeError("client type error, support client type is EvsClient") + return ClientBuilder(clazz) def batch_create_volume_tags(self, request): diff --git a/huaweicloud-sdk-evs/setup.py b/huaweicloud-sdk-evs/setup.py index 89338e546..5f7baad59 100644 --- a/huaweicloud-sdk-evs/setup.py +++ b/huaweicloud-sdk-evs/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkevs" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/functiongraph_async_client.py b/huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/functiongraph_async_client.py index ab232429a..6db959303 100644 --- a/huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/functiongraph_async_client.py +++ b/huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/functiongraph_async_client.py @@ -38,8 +38,14 @@ class FunctionGraphAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkfunctiongraph.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "FunctionGraphClient": + raise TypeError("client type error, support client type is FunctionGraphClient") + return ClientBuilder(clazz) def async_invoke_function_async(self, request): diff --git a/huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/functiongraph_client.py b/huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/functiongraph_client.py index 5000c3214..7a40af1ec 100644 --- a/huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/functiongraph_client.py +++ b/huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/functiongraph_client.py @@ -38,8 +38,14 @@ class FunctionGraphClient(Client): self.model_package = importlib.import_module("huaweicloudsdkfunctiongraph.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "FunctionGraphClient": + raise TypeError("client type error, support client type is FunctionGraphClient") + return ClientBuilder(clazz) def async_invoke_function(self, request): diff --git a/huaweicloud-sdk-functiongraph/setup.py b/huaweicloud-sdk-functiongraph/setup.py index 4e6c267a7..c71eb603b 100644 --- a/huaweicloud-sdk-functiongraph/setup.py +++ b/huaweicloud-sdk-functiongraph/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkfunctiongraph" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-iam/huaweicloudsdkiam/v3/iam_async_client.py b/huaweicloud-sdk-iam/huaweicloudsdkiam/v3/iam_async_client.py index 65e1575f0..3f4eef847 100644 --- a/huaweicloud-sdk-iam/huaweicloudsdkiam/v3/iam_async_client.py +++ b/huaweicloud-sdk-iam/huaweicloudsdkiam/v3/iam_async_client.py @@ -38,8 +38,14 @@ class IamAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkiam.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials,BasicCredentials") + + if clazz.__name__ != "IamClient": + raise TypeError("client type error, support client type is IamClient") + return ClientBuilder(clazz, "GlobalCredentials,BasicCredentials") def associate_agency_with_all_projects_permission_async(self, request): diff --git a/huaweicloud-sdk-iam/huaweicloudsdkiam/v3/iam_client.py b/huaweicloud-sdk-iam/huaweicloudsdkiam/v3/iam_client.py index d018dfcc4..b2c5ad227 100644 --- a/huaweicloud-sdk-iam/huaweicloudsdkiam/v3/iam_client.py +++ b/huaweicloud-sdk-iam/huaweicloudsdkiam/v3/iam_client.py @@ -38,8 +38,14 @@ class IamClient(Client): self.model_package = importlib.import_module("huaweicloudsdkiam.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials,BasicCredentials") + + if clazz.__name__ != "IamClient": + raise TypeError("client type error, support client type is IamClient") + return ClientBuilder(clazz, "GlobalCredentials,BasicCredentials") def associate_agency_with_all_projects_permission(self, request): diff --git a/huaweicloud-sdk-iam/setup.py b/huaweicloud-sdk-iam/setup.py index a6f6bf8a2..d645bd7ea 100644 --- a/huaweicloud-sdk-iam/setup.py +++ b/huaweicloud-sdk-iam/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkiam" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-image/huaweicloudsdkimage/v1/image_async_client.py b/huaweicloud-sdk-image/huaweicloudsdkimage/v1/image_async_client.py index 80718e726..785c1f338 100644 --- a/huaweicloud-sdk-image/huaweicloudsdkimage/v1/image_async_client.py +++ b/huaweicloud-sdk-image/huaweicloudsdkimage/v1/image_async_client.py @@ -38,8 +38,14 @@ class ImageAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkimage.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ImageClient": + raise TypeError("client type error, support client type is ImageClient") + return ClientBuilder(clazz) def run_celebrity_recognition_async(self, request): diff --git a/huaweicloud-sdk-image/huaweicloudsdkimage/v1/image_client.py b/huaweicloud-sdk-image/huaweicloudsdkimage/v1/image_client.py index 2e0797a6c..0a51f623e 100644 --- a/huaweicloud-sdk-image/huaweicloudsdkimage/v1/image_client.py +++ b/huaweicloud-sdk-image/huaweicloudsdkimage/v1/image_client.py @@ -38,8 +38,14 @@ class ImageClient(Client): self.model_package = importlib.import_module("huaweicloudsdkimage.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ImageClient": + raise TypeError("client type error, support client type is ImageClient") + return ClientBuilder(clazz) def run_celebrity_recognition(self, request): diff --git a/huaweicloud-sdk-image/setup.py b/huaweicloud-sdk-image/setup.py index 21bf44aae..81c29b223 100644 --- a/huaweicloud-sdk-image/setup.py +++ b/huaweicloud-sdk-image/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkimage" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-ims/huaweicloudsdkims/v2/ims_async_client.py b/huaweicloud-sdk-ims/huaweicloudsdkims/v2/ims_async_client.py index 0b27922aa..c8fb05c1d 100644 --- a/huaweicloud-sdk-ims/huaweicloudsdkims/v2/ims_async_client.py +++ b/huaweicloud-sdk-ims/huaweicloudsdkims/v2/ims_async_client.py @@ -38,8 +38,14 @@ class ImsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkims.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ImsClient": + raise TypeError("client type error, support client type is ImsClient") + return ClientBuilder(clazz) def batch_add_members_async(self, request): diff --git a/huaweicloud-sdk-ims/huaweicloudsdkims/v2/ims_client.py b/huaweicloud-sdk-ims/huaweicloudsdkims/v2/ims_client.py index 66e7520fa..fd3fd3f20 100644 --- a/huaweicloud-sdk-ims/huaweicloudsdkims/v2/ims_client.py +++ b/huaweicloud-sdk-ims/huaweicloudsdkims/v2/ims_client.py @@ -38,8 +38,14 @@ class ImsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkims.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ImsClient": + raise TypeError("client type error, support client type is ImsClient") + return ClientBuilder(clazz) def batch_add_members(self, request): diff --git a/huaweicloud-sdk-ims/setup.py b/huaweicloud-sdk-ims/setup.py index 55f6fc423..21d1cce59 100644 --- a/huaweicloud-sdk-ims/setup.py +++ b/huaweicloud-sdk-ims/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkims" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/iotda_async_client.py b/huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/iotda_async_client.py index c9ce4518c..a48503548 100644 --- a/huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/iotda_async_client.py +++ b/huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/iotda_async_client.py @@ -38,8 +38,14 @@ class IoTDAAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkiotda.v5.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "IoTDAClient": + raise TypeError("client type error, support client type is IoTDAClient") + return ClientBuilder(clazz) def create_access_code_async(self, request): diff --git a/huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/iotda_client.py b/huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/iotda_client.py index fa8151c93..90d93daa1 100644 --- a/huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/iotda_client.py +++ b/huaweicloud-sdk-iotda/huaweicloudsdkiotda/v5/iotda_client.py @@ -38,8 +38,14 @@ class IoTDAClient(Client): self.model_package = importlib.import_module("huaweicloudsdkiotda.v5.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "IoTDAClient": + raise TypeError("client type error, support client type is IoTDAClient") + return ClientBuilder(clazz) def create_access_code(self, request): diff --git a/huaweicloud-sdk-iotda/setup.py b/huaweicloud-sdk-iotda/setup.py index a08c62019..ee9bfd737 100644 --- a/huaweicloud-sdk-iotda/setup.py +++ b/huaweicloud-sdk-iotda/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkiotda" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_async_client.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_async_client.py index a4cbaf59a..98a0d1abe 100644 --- a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_async_client.py +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_async_client.py @@ -38,8 +38,14 @@ class KafkaAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkkafka.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "KafkaClient": + raise TypeError("client type error, support client type is KafkaClient") + return ClientBuilder(clazz) def batch_create_or_delete_instance_tag_async(self, request): diff --git a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_client.py b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_client.py index 6b6e6074b..0d8f46eb4 100644 --- a/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_client.py +++ b/huaweicloud-sdk-kafka/huaweicloudsdkkafka/v2/kafka_client.py @@ -38,8 +38,14 @@ class KafkaClient(Client): self.model_package = importlib.import_module("huaweicloudsdkkafka.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "KafkaClient": + raise TypeError("client type error, support client type is KafkaClient") + return ClientBuilder(clazz) def batch_create_or_delete_instance_tag(self, request): diff --git a/huaweicloud-sdk-kafka/setup.py b/huaweicloud-sdk-kafka/setup.py index 17ce7c3fd..a5f713660 100644 --- a/huaweicloud-sdk-kafka/setup.py +++ b/huaweicloud-sdk-kafka/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkkafka" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-kms/huaweicloudsdkkms/v1/kms_async_client.py b/huaweicloud-sdk-kms/huaweicloudsdkkms/v1/kms_async_client.py index f75c3ee55..49a5eafc0 100644 --- a/huaweicloud-sdk-kms/huaweicloudsdkkms/v1/kms_async_client.py +++ b/huaweicloud-sdk-kms/huaweicloudsdkkms/v1/kms_async_client.py @@ -38,8 +38,14 @@ class KmsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkkms.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "KmsClient": + raise TypeError("client type error, support client type is KmsClient") + return ClientBuilder(clazz) def batch_create_kms_tags_async(self, request): diff --git a/huaweicloud-sdk-kms/huaweicloudsdkkms/v1/kms_client.py b/huaweicloud-sdk-kms/huaweicloudsdkkms/v1/kms_client.py index 763761690..0e6e64d61 100644 --- a/huaweicloud-sdk-kms/huaweicloudsdkkms/v1/kms_client.py +++ b/huaweicloud-sdk-kms/huaweicloudsdkkms/v1/kms_client.py @@ -38,8 +38,14 @@ class KmsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkkms.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "KmsClient": + raise TypeError("client type error, support client type is KmsClient") + return ClientBuilder(clazz) def batch_create_kms_tags(self, request): diff --git a/huaweicloud-sdk-kms/setup.py b/huaweicloud-sdk-kms/setup.py index c51f9a1d5..e43a1ff61 100644 --- a/huaweicloud-sdk-kms/setup.py +++ b/huaweicloud-sdk-kms/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkkms" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-live/huaweicloudsdklive/v1/live_async_client.py b/huaweicloud-sdk-live/huaweicloudsdklive/v1/live_async_client.py index 8ad451bfb..7c68b9e4a 100644 --- a/huaweicloud-sdk-live/huaweicloudsdklive/v1/live_async_client.py +++ b/huaweicloud-sdk-live/huaweicloudsdklive/v1/live_async_client.py @@ -38,8 +38,14 @@ class LiveAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdklive.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "LiveClient": + raise TypeError("client type error, support client type is LiveClient") + return ClientBuilder(clazz) def create_record_config_async(self, request): diff --git a/huaweicloud-sdk-live/huaweicloudsdklive/v1/live_client.py b/huaweicloud-sdk-live/huaweicloudsdklive/v1/live_client.py index a071bda92..872e7b0a1 100644 --- a/huaweicloud-sdk-live/huaweicloudsdklive/v1/live_client.py +++ b/huaweicloud-sdk-live/huaweicloudsdklive/v1/live_client.py @@ -38,8 +38,14 @@ class LiveClient(Client): self.model_package = importlib.import_module("huaweicloudsdklive.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "LiveClient": + raise TypeError("client type error, support client type is LiveClient") + return ClientBuilder(clazz) def create_record_config(self, request): diff --git a/huaweicloud-sdk-live/huaweicloudsdklive/v2/live_async_client.py b/huaweicloud-sdk-live/huaweicloudsdklive/v2/live_async_client.py index 830140dbf..f2b7d0dc3 100644 --- a/huaweicloud-sdk-live/huaweicloudsdklive/v2/live_async_client.py +++ b/huaweicloud-sdk-live/huaweicloudsdklive/v2/live_async_client.py @@ -38,8 +38,14 @@ class LiveAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdklive.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "LiveClient": + raise TypeError("client type error, support client type is LiveClient") + return ClientBuilder(clazz) def list_bandwidth_detail_async(self, request): diff --git a/huaweicloud-sdk-live/huaweicloudsdklive/v2/live_client.py b/huaweicloud-sdk-live/huaweicloudsdklive/v2/live_client.py index 87204eb6b..b96343a03 100644 --- a/huaweicloud-sdk-live/huaweicloudsdklive/v2/live_client.py +++ b/huaweicloud-sdk-live/huaweicloudsdklive/v2/live_client.py @@ -38,8 +38,14 @@ class LiveClient(Client): self.model_package = importlib.import_module("huaweicloudsdklive.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "LiveClient": + raise TypeError("client type error, support client type is LiveClient") + return ClientBuilder(clazz) def list_bandwidth_detail(self, request): diff --git a/huaweicloud-sdk-live/setup.py b/huaweicloud-sdk-live/setup.py index 5a188dbb8..59b06e796 100644 --- a/huaweicloud-sdk-live/setup.py +++ b/huaweicloud-sdk-live/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdklive" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_async_client.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_async_client.py index d3ac7b3e8..908893e39 100644 --- a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_async_client.py +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_async_client.py @@ -38,8 +38,14 @@ class MeetingAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkmeeting.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "MeetingCredentials") + + if clazz.__name__ != "MeetingClient": + raise TypeError("client type error, support client type is MeetingClient") + return ClientBuilder(clazz, "MeetingCredentials") def add_corp_async(self, request): diff --git a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_client.py b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_client.py index 5ca2f57ae..42b68e74b 100644 --- a/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_client.py +++ b/huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/meeting_client.py @@ -38,8 +38,14 @@ class MeetingClient(Client): self.model_package = importlib.import_module("huaweicloudsdkmeeting.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "MeetingCredentials") + + if clazz.__name__ != "MeetingClient": + raise TypeError("client type error, support client type is MeetingClient") + return ClientBuilder(clazz, "MeetingCredentials") def add_corp(self, request): diff --git a/huaweicloud-sdk-meeting/setup.py b/huaweicloud-sdk-meeting/setup.py index 234aa6277..8a0568cec 100644 --- a/huaweicloud-sdk-meeting/setup.py +++ b/huaweicloud-sdk-meeting/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkmeeting" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-moderation/huaweicloudsdkmoderation/v1/moderation_async_client.py b/huaweicloud-sdk-moderation/huaweicloudsdkmoderation/v1/moderation_async_client.py index 023dc2ebb..05dd8216b 100644 --- a/huaweicloud-sdk-moderation/huaweicloudsdkmoderation/v1/moderation_async_client.py +++ b/huaweicloud-sdk-moderation/huaweicloudsdkmoderation/v1/moderation_async_client.py @@ -38,8 +38,14 @@ class ModerationAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkmoderation.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ModerationClient": + raise TypeError("client type error, support client type is ModerationClient") + return ClientBuilder(clazz) def run_image_batch_moderation_async(self, request): diff --git a/huaweicloud-sdk-moderation/huaweicloudsdkmoderation/v1/moderation_client.py b/huaweicloud-sdk-moderation/huaweicloudsdkmoderation/v1/moderation_client.py index 2f310fd47..0941d3c3d 100644 --- a/huaweicloud-sdk-moderation/huaweicloudsdkmoderation/v1/moderation_client.py +++ b/huaweicloud-sdk-moderation/huaweicloudsdkmoderation/v1/moderation_client.py @@ -38,8 +38,14 @@ class ModerationClient(Client): self.model_package = importlib.import_module("huaweicloudsdkmoderation.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ModerationClient": + raise TypeError("client type error, support client type is ModerationClient") + return ClientBuilder(clazz) def run_image_batch_moderation(self, request): diff --git a/huaweicloud-sdk-moderation/setup.py b/huaweicloud-sdk-moderation/setup.py index 036ee52d4..e192fbebf 100644 --- a/huaweicloud-sdk-moderation/setup.py +++ b/huaweicloud-sdk-moderation/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkmoderation" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/mpc_async_client.py b/huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/mpc_async_client.py index cc4952790..99dcdf171 100644 --- a/huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/mpc_async_client.py +++ b/huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/mpc_async_client.py @@ -38,8 +38,14 @@ class MpcAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkmpc.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "MpcClient": + raise TypeError("client type error, support client type is MpcClient") + return ClientBuilder(clazz) def create_animated_graphics_task_async(self, request): diff --git a/huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/mpc_client.py b/huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/mpc_client.py index 8b488c9e5..91eeb16da 100644 --- a/huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/mpc_client.py +++ b/huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/mpc_client.py @@ -38,8 +38,14 @@ class MpcClient(Client): self.model_package = importlib.import_module("huaweicloudsdkmpc.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "MpcClient": + raise TypeError("client type error, support client type is MpcClient") + return ClientBuilder(clazz) def create_animated_graphics_task(self, request): diff --git a/huaweicloud-sdk-mpc/setup.py b/huaweicloud-sdk-mpc/setup.py index 3c5f0f76e..61b4e3a74 100644 --- a/huaweicloud-sdk-mpc/setup.py +++ b/huaweicloud-sdk-mpc/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkmpc" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-nat/huaweicloudsdknat/v2/nat_async_client.py b/huaweicloud-sdk-nat/huaweicloudsdknat/v2/nat_async_client.py index 77e8fa702..4719ef03d 100644 --- a/huaweicloud-sdk-nat/huaweicloudsdknat/v2/nat_async_client.py +++ b/huaweicloud-sdk-nat/huaweicloudsdknat/v2/nat_async_client.py @@ -38,8 +38,14 @@ class NatAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdknat.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "NatClient": + raise TypeError("client type error, support client type is NatClient") + return ClientBuilder(clazz) def batch_create_nat_gateway_dnat_rules_async(self, request): diff --git a/huaweicloud-sdk-nat/huaweicloudsdknat/v2/nat_client.py b/huaweicloud-sdk-nat/huaweicloudsdknat/v2/nat_client.py index 355670204..28bb2e4b7 100644 --- a/huaweicloud-sdk-nat/huaweicloudsdknat/v2/nat_client.py +++ b/huaweicloud-sdk-nat/huaweicloudsdknat/v2/nat_client.py @@ -38,8 +38,14 @@ class NatClient(Client): self.model_package = importlib.import_module("huaweicloudsdknat.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "NatClient": + raise TypeError("client type error, support client type is NatClient") + return ClientBuilder(clazz) def batch_create_nat_gateway_dnat_rules(self, request): diff --git a/huaweicloud-sdk-nat/setup.py b/huaweicloud-sdk-nat/setup.py index 0c8ceefc7..3fbd47c03 100644 --- a/huaweicloud-sdk-nat/setup.py +++ b/huaweicloud-sdk-nat/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdknat" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/__init__.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/__init__.py index 5ababb2f4..fb704033d 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/__init__.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/__init__.py @@ -6,91 +6,81 @@ from __future__ import absolute_import from huaweicloudsdkocr.v1.ocr_client import OcrClient from huaweicloudsdkocr.v1.ocr_async_client import OcrAsyncClient # import models into sdk package +from huaweicloudsdkocr.v1.model.auto_classification_req import AutoClassificationReq +from huaweicloudsdkocr.v1.model.auto_classification_response_body_item import AutoClassificationResponseBodyItem +from huaweicloudsdkocr.v1.model.bankcard_req import BankcardReq +from huaweicloudsdkocr.v1.model.bankcard_result_body import BankcardResultBody +from huaweicloudsdkocr.v1.model.business_card_items_response import BusinessCardItemsResponse +from huaweicloudsdkocr.v1.model.business_card_req import BusinessCardReq +from huaweicloudsdkocr.v1.model.business_card_response_body_item import BusinessCardResponseBodyItem +from huaweicloudsdkocr.v1.model.business_license_req import BusinessLicenseReq +from huaweicloudsdkocr.v1.model.business_license_result_body import BusinessLicenseResultBody +from huaweicloudsdkocr.v1.model.flight_itinerary_items_response import FlightItineraryItemsResponse +from huaweicloudsdkocr.v1.model.flight_itinerary_req import FlightItineraryReq +from huaweicloudsdkocr.v1.model.flight_itinerary_response_body_item import FlightItineraryResponseBodyItem +from huaweicloudsdkocr.v1.model.general_text_items_response import GeneralTextItemsResponse +from huaweicloudsdkocr.v1.model.general_text_req import GeneralTextReq +from huaweicloudsdkocr.v1.model.general_text_response_body_items import GeneralTextResponseBodyItems +from huaweicloudsdkocr.v1.model.handwriting_items2_response import HandwritingItems2Response +from huaweicloudsdkocr.v1.model.handwriting_items3_response import HandwritingItems3Response +from huaweicloudsdkocr.v1.model.handwriting_items4_response import HandwritingItems4Response +from huaweicloudsdkocr.v1.model.handwriting_items_response import HandwritingItemsResponse +from huaweicloudsdkocr.v1.model.handwriting_req import HandwritingReq +from huaweicloudsdkocr.v1.model.handwriting_response_body_item import HandwritingResponseBodyItem +from huaweicloudsdkocr.v1.model.id_card_req import IDCardReq +from huaweicloudsdkocr.v1.model.id_card_result_body import IDCardResultBody +from huaweicloudsdkocr.v1.model.license_plate_req import LicensePlateReq +from huaweicloudsdkocr.v1.model.license_plate_response_body_item import LicensePlateResponseBodyItem +from huaweicloudsdkocr.v1.model.mvs_invoice_req import MvsInvoiceReq +from huaweicloudsdkocr.v1.model.mvs_invoice_result_body import MvsInvoiceResultBody +from huaweicloudsdkocr.v1.model.passport_req import PassportReq +from huaweicloudsdkocr.v1.model.passport_result_body import PassportResultBody +from huaweicloudsdkocr.v1.model.quota_invoice_req import QuotaInvoiceReq +from huaweicloudsdkocr.v1.model.quota_invoice_result_body import QuotaInvoiceResultBody from huaweicloudsdkocr.v1.model.recognize_auto_classification_request import RecognizeAutoClassificationRequest -from huaweicloudsdkocr.v1.model.recognize_auto_classification_request_body import RecognizeAutoClassificationRequestBody from huaweicloudsdkocr.v1.model.recognize_auto_classification_response import RecognizeAutoClassificationResponse -from huaweicloudsdkocr.v1.model.recognize_auto_classification_result_item_response import RecognizeAutoClassificationResultItemResponse from huaweicloudsdkocr.v1.model.recognize_bankcard_request import RecognizeBankcardRequest -from huaweicloudsdkocr.v1.model.recognize_bankcard_request_body import RecognizeBankcardRequestBody from huaweicloudsdkocr.v1.model.recognize_bankcard_response import RecognizeBankcardResponse -from huaweicloudsdkocr.v1.model.recognize_bankcard_result_response import RecognizeBankcardResultResponse -from huaweicloudsdkocr.v1.model.recognize_business_card_items_response import RecognizeBusinessCardItemsResponse from huaweicloudsdkocr.v1.model.recognize_business_card_request import RecognizeBusinessCardRequest -from huaweicloudsdkocr.v1.model.recognize_business_card_request_body import RecognizeBusinessCardRequestBody from huaweicloudsdkocr.v1.model.recognize_business_card_response import RecognizeBusinessCardResponse -from huaweicloudsdkocr.v1.model.recognize_business_card_result_response import RecognizeBusinessCardResultResponse from huaweicloudsdkocr.v1.model.recognize_business_license_request import RecognizeBusinessLicenseRequest -from huaweicloudsdkocr.v1.model.recognize_business_license_request_body import RecognizeBusinessLicenseRequestBody from huaweicloudsdkocr.v1.model.recognize_business_license_response import RecognizeBusinessLicenseResponse -from huaweicloudsdkocr.v1.model.recognize_business_license_result_response import RecognizeBusinessLicenseResultResponse from huaweicloudsdkocr.v1.model.recognize_driver_license_request import RecognizeDriverLicenseRequest from huaweicloudsdkocr.v1.model.recognize_driver_license_request_body import RecognizeDriverLicenseRequestBody from huaweicloudsdkocr.v1.model.recognize_driver_license_response import RecognizeDriverLicenseResponse from huaweicloudsdkocr.v1.model.recognize_driver_license_result_response import RecognizeDriverLicenseResultResponse -from huaweicloudsdkocr.v1.model.recognize_financial_statement_request import RecognizeFinancialStatementRequest -from huaweicloudsdkocr.v1.model.recognize_financial_statement_request_body import RecognizeFinancialStatementRequestBody -from huaweicloudsdkocr.v1.model.recognize_financial_statement_response import RecognizeFinancialStatementResponse -from huaweicloudsdkocr.v1.model.recognize_financial_statement_result_response import RecognizeFinancialStatementResultResponse -from huaweicloudsdkocr.v1.model.recognize_financial_statement_words_block_items_response import RecognizeFinancialStatementWordsBlockItemsResponse -from huaweicloudsdkocr.v1.model.recognize_financial_statement_words_list_items_response import RecognizeFinancialStatementWordsListItemsResponse -from huaweicloudsdkocr.v1.model.recognize_financial_statement_words_region_items_response import RecognizeFinancialStatementWordsRegionItemsResponse -from huaweicloudsdkocr.v1.model.recognize_flight_itinerary_items_response import RecognizeFlightItineraryItemsResponse from huaweicloudsdkocr.v1.model.recognize_flight_itinerary_request import RecognizeFlightItineraryRequest -from huaweicloudsdkocr.v1.model.recognize_flight_itinerary_request_body import RecognizeFlightItineraryRequestBody from huaweicloudsdkocr.v1.model.recognize_flight_itinerary_response import RecognizeFlightItineraryResponse -from huaweicloudsdkocr.v1.model.recognize_flight_itinerary_result_response import RecognizeFlightItineraryResultResponse from huaweicloudsdkocr.v1.model.recognize_general_table_items2_response import RecognizeGeneralTableItems2Response from huaweicloudsdkocr.v1.model.recognize_general_table_items_response import RecognizeGeneralTableItemsResponse from huaweicloudsdkocr.v1.model.recognize_general_table_request import RecognizeGeneralTableRequest from huaweicloudsdkocr.v1.model.recognize_general_table_request_body import RecognizeGeneralTableRequestBody from huaweicloudsdkocr.v1.model.recognize_general_table_response import RecognizeGeneralTableResponse from huaweicloudsdkocr.v1.model.recognize_general_table_result_response import RecognizeGeneralTableResultResponse -from huaweicloudsdkocr.v1.model.recognize_general_text_items_response import RecognizeGeneralTextItemsResponse from huaweicloudsdkocr.v1.model.recognize_general_text_request import RecognizeGeneralTextRequest -from huaweicloudsdkocr.v1.model.recognize_general_text_request_body import RecognizeGeneralTextRequestBody from huaweicloudsdkocr.v1.model.recognize_general_text_response import RecognizeGeneralTextResponse -from huaweicloudsdkocr.v1.model.recognize_general_text_result_response import RecognizeGeneralTextResultResponse -from huaweicloudsdkocr.v1.model.recognize_handwriting_items_response import RecognizeHandwritingItemsResponse from huaweicloudsdkocr.v1.model.recognize_handwriting_request import RecognizeHandwritingRequest -from huaweicloudsdkocr.v1.model.recognize_handwriting_request_body import RecognizeHandwritingRequestBody from huaweicloudsdkocr.v1.model.recognize_handwriting_response import RecognizeHandwritingResponse -from huaweicloudsdkocr.v1.model.recognize_handwriting_result_response import RecognizeHandwritingResultResponse -from huaweicloudsdkocr.v1.model.recognize_id_card_request import RecognizeIdCardRequest -from huaweicloudsdkocr.v1.model.recognize_id_card_request_body import RecognizeIdCardRequestBody -from huaweicloudsdkocr.v1.model.recognize_id_card_response import RecognizeIdCardResponse -from huaweicloudsdkocr.v1.model.recognize_id_card_result_response import RecognizeIdCardResultResponse +from huaweicloudsdkocr.v1.model.recognize_id_card_request import RecognizeIDCardRequest +from huaweicloudsdkocr.v1.model.recognize_id_card_response import RecognizeIDCardResponse from huaweicloudsdkocr.v1.model.recognize_license_plate_request import RecognizeLicensePlateRequest -from huaweicloudsdkocr.v1.model.recognize_license_plate_request_body import RecognizeLicensePlateRequestBody from huaweicloudsdkocr.v1.model.recognize_license_plate_response import RecognizeLicensePlateResponse -from huaweicloudsdkocr.v1.model.recognize_license_plate_result_items_response import RecognizeLicensePlateResultItemsResponse from huaweicloudsdkocr.v1.model.recognize_mvs_invoice_request import RecognizeMvsInvoiceRequest -from huaweicloudsdkocr.v1.model.recognize_mvs_invoice_request_body import RecognizeMvsInvoiceRequestBody from huaweicloudsdkocr.v1.model.recognize_mvs_invoice_response import RecognizeMvsInvoiceResponse -from huaweicloudsdkocr.v1.model.recognize_mvs_invoice_result_response import RecognizeMvsInvoiceResultResponse from huaweicloudsdkocr.v1.model.recognize_passport_request import RecognizePassportRequest -from huaweicloudsdkocr.v1.model.recognize_passport_request_body import RecognizePassportRequestBody from huaweicloudsdkocr.v1.model.recognize_passport_response import RecognizePassportResponse -from huaweicloudsdkocr.v1.model.recognize_passport_result_response import RecognizePassportResultResponse from huaweicloudsdkocr.v1.model.recognize_quota_invoice_request import RecognizeQuotaInvoiceRequest -from huaweicloudsdkocr.v1.model.recognize_quota_invoice_request_body import RecognizeQuotaInvoiceRequestBody from huaweicloudsdkocr.v1.model.recognize_quota_invoice_response import RecognizeQuotaInvoiceResponse -from huaweicloudsdkocr.v1.model.recognize_quota_invoice_result_response import RecognizeQuotaInvoiceResultResponse from huaweicloudsdkocr.v1.model.recognize_taxi_invoice_request import RecognizeTaxiInvoiceRequest -from huaweicloudsdkocr.v1.model.recognize_taxi_invoice_request_body import RecognizeTaxiInvoiceRequestBody from huaweicloudsdkocr.v1.model.recognize_taxi_invoice_response import RecognizeTaxiInvoiceResponse -from huaweicloudsdkocr.v1.model.recognize_taxi_invoice_result_response import RecognizeTaxiInvoiceResultResponse from huaweicloudsdkocr.v1.model.recognize_toll_invoice_request import RecognizeTollInvoiceRequest -from huaweicloudsdkocr.v1.model.recognize_toll_invoice_request_body import RecognizeTollInvoiceRequestBody from huaweicloudsdkocr.v1.model.recognize_toll_invoice_response import RecognizeTollInvoiceResponse -from huaweicloudsdkocr.v1.model.recognize_toll_invoice_result_response import RecognizeTollInvoiceResultResponse from huaweicloudsdkocr.v1.model.recognize_train_ticket_request import RecognizeTrainTicketRequest -from huaweicloudsdkocr.v1.model.recognize_train_ticket_request_body import RecognizeTrainTicketRequestBody from huaweicloudsdkocr.v1.model.recognize_train_ticket_response import RecognizeTrainTicketResponse -from huaweicloudsdkocr.v1.model.recognize_train_ticket_result_response import RecognizeTrainTicketResultResponse from huaweicloudsdkocr.v1.model.recognize_transportation_license_request import RecognizeTransportationLicenseRequest -from huaweicloudsdkocr.v1.model.recognize_transportation_license_request_body import RecognizeTransportationLicenseRequestBody from huaweicloudsdkocr.v1.model.recognize_transportation_license_response import RecognizeTransportationLicenseResponse -from huaweicloudsdkocr.v1.model.recognize_transportation_license_result_response import RecognizeTransportationLicenseResultResponse +from huaweicloudsdkocr.v1.model.recognize_vin_request import RecognizeVINRequest +from huaweicloudsdkocr.v1.model.recognize_vin_response import RecognizeVINResponse from huaweicloudsdkocr.v1.model.recognize_vat_invoice_items_response import RecognizeVatInvoiceItemsResponse from huaweicloudsdkocr.v1.model.recognize_vat_invoice_request import RecognizeVatInvoiceRequest from huaweicloudsdkocr.v1.model.recognize_vat_invoice_request_body import RecognizeVatInvoiceRequestBody @@ -100,13 +90,19 @@ from huaweicloudsdkocr.v1.model.recognize_vehicle_license_request import Recogni from huaweicloudsdkocr.v1.model.recognize_vehicle_license_request_body import RecognizeVehicleLicenseRequestBody from huaweicloudsdkocr.v1.model.recognize_vehicle_license_response import RecognizeVehicleLicenseResponse from huaweicloudsdkocr.v1.model.recognize_vehicle_license_result_response import RecognizeVehicleLicenseResultResponse -from huaweicloudsdkocr.v1.model.recognize_vin_request import RecognizeVinRequest -from huaweicloudsdkocr.v1.model.recognize_vin_request_body import RecognizeVinRequestBody -from huaweicloudsdkocr.v1.model.recognize_vin_response import RecognizeVinResponse -from huaweicloudsdkocr.v1.model.recognize_vin_result_response import RecognizeVinResultResponse -from huaweicloudsdkocr.v1.model.recognize_web_image_items_response import RecognizeWebImageItemsResponse from huaweicloudsdkocr.v1.model.recognize_web_image_request import RecognizeWebImageRequest -from huaweicloudsdkocr.v1.model.recognize_web_image_request_body import RecognizeWebImageRequestBody from huaweicloudsdkocr.v1.model.recognize_web_image_response import RecognizeWebImageResponse -from huaweicloudsdkocr.v1.model.recognize_web_image_result_response import RecognizeWebImageResultResponse +from huaweicloudsdkocr.v1.model.taxi_invoice_req import TaxiInvoiceReq +from huaweicloudsdkocr.v1.model.taxi_invoice_result_body import TaxiInvoiceResultBody +from huaweicloudsdkocr.v1.model.toll_invoice_req import TollInvoiceReq +from huaweicloudsdkocr.v1.model.toll_invoice_result_body import TollInvoiceResultBody +from huaweicloudsdkocr.v1.model.train_ticket_req import TrainTicketReq +from huaweicloudsdkocr.v1.model.train_ticket_result_body import TrainTicketResultBody +from huaweicloudsdkocr.v1.model.transportation_license_req import TransportationLicenseReq +from huaweicloudsdkocr.v1.model.transportation_license_result_body import TransportationLicenseResultBody +from huaweicloudsdkocr.v1.model.vin_req import VINReq +from huaweicloudsdkocr.v1.model.vin_response_body_item import VINResponseBodyItem +from huaweicloudsdkocr.v1.model.web_image_items_response import WebImageItemsResponse +from huaweicloudsdkocr.v1.model.web_image_req import WebImageReq +from huaweicloudsdkocr.v1.model.web_image_response_body_item import WebImageResponseBodyItem diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/__init__.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/__init__.py index 02eef460d..0751de9c3 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/__init__.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/__init__.py @@ -3,91 +3,81 @@ from __future__ import absolute_import # import models into model package +from huaweicloudsdkocr.v1.model.auto_classification_req import AutoClassificationReq +from huaweicloudsdkocr.v1.model.auto_classification_response_body_item import AutoClassificationResponseBodyItem +from huaweicloudsdkocr.v1.model.bankcard_req import BankcardReq +from huaweicloudsdkocr.v1.model.bankcard_result_body import BankcardResultBody +from huaweicloudsdkocr.v1.model.business_card_items_response import BusinessCardItemsResponse +from huaweicloudsdkocr.v1.model.business_card_req import BusinessCardReq +from huaweicloudsdkocr.v1.model.business_card_response_body_item import BusinessCardResponseBodyItem +from huaweicloudsdkocr.v1.model.business_license_req import BusinessLicenseReq +from huaweicloudsdkocr.v1.model.business_license_result_body import BusinessLicenseResultBody +from huaweicloudsdkocr.v1.model.flight_itinerary_items_response import FlightItineraryItemsResponse +from huaweicloudsdkocr.v1.model.flight_itinerary_req import FlightItineraryReq +from huaweicloudsdkocr.v1.model.flight_itinerary_response_body_item import FlightItineraryResponseBodyItem +from huaweicloudsdkocr.v1.model.general_text_items_response import GeneralTextItemsResponse +from huaweicloudsdkocr.v1.model.general_text_req import GeneralTextReq +from huaweicloudsdkocr.v1.model.general_text_response_body_items import GeneralTextResponseBodyItems +from huaweicloudsdkocr.v1.model.handwriting_items2_response import HandwritingItems2Response +from huaweicloudsdkocr.v1.model.handwriting_items3_response import HandwritingItems3Response +from huaweicloudsdkocr.v1.model.handwriting_items4_response import HandwritingItems4Response +from huaweicloudsdkocr.v1.model.handwriting_items_response import HandwritingItemsResponse +from huaweicloudsdkocr.v1.model.handwriting_req import HandwritingReq +from huaweicloudsdkocr.v1.model.handwriting_response_body_item import HandwritingResponseBodyItem +from huaweicloudsdkocr.v1.model.id_card_req import IDCardReq +from huaweicloudsdkocr.v1.model.id_card_result_body import IDCardResultBody +from huaweicloudsdkocr.v1.model.license_plate_req import LicensePlateReq +from huaweicloudsdkocr.v1.model.license_plate_response_body_item import LicensePlateResponseBodyItem +from huaweicloudsdkocr.v1.model.mvs_invoice_req import MvsInvoiceReq +from huaweicloudsdkocr.v1.model.mvs_invoice_result_body import MvsInvoiceResultBody +from huaweicloudsdkocr.v1.model.passport_req import PassportReq +from huaweicloudsdkocr.v1.model.passport_result_body import PassportResultBody +from huaweicloudsdkocr.v1.model.quota_invoice_req import QuotaInvoiceReq +from huaweicloudsdkocr.v1.model.quota_invoice_result_body import QuotaInvoiceResultBody from huaweicloudsdkocr.v1.model.recognize_auto_classification_request import RecognizeAutoClassificationRequest -from huaweicloudsdkocr.v1.model.recognize_auto_classification_request_body import RecognizeAutoClassificationRequestBody from huaweicloudsdkocr.v1.model.recognize_auto_classification_response import RecognizeAutoClassificationResponse -from huaweicloudsdkocr.v1.model.recognize_auto_classification_result_item_response import RecognizeAutoClassificationResultItemResponse from huaweicloudsdkocr.v1.model.recognize_bankcard_request import RecognizeBankcardRequest -from huaweicloudsdkocr.v1.model.recognize_bankcard_request_body import RecognizeBankcardRequestBody from huaweicloudsdkocr.v1.model.recognize_bankcard_response import RecognizeBankcardResponse -from huaweicloudsdkocr.v1.model.recognize_bankcard_result_response import RecognizeBankcardResultResponse -from huaweicloudsdkocr.v1.model.recognize_business_card_items_response import RecognizeBusinessCardItemsResponse from huaweicloudsdkocr.v1.model.recognize_business_card_request import RecognizeBusinessCardRequest -from huaweicloudsdkocr.v1.model.recognize_business_card_request_body import RecognizeBusinessCardRequestBody from huaweicloudsdkocr.v1.model.recognize_business_card_response import RecognizeBusinessCardResponse -from huaweicloudsdkocr.v1.model.recognize_business_card_result_response import RecognizeBusinessCardResultResponse from huaweicloudsdkocr.v1.model.recognize_business_license_request import RecognizeBusinessLicenseRequest -from huaweicloudsdkocr.v1.model.recognize_business_license_request_body import RecognizeBusinessLicenseRequestBody from huaweicloudsdkocr.v1.model.recognize_business_license_response import RecognizeBusinessLicenseResponse -from huaweicloudsdkocr.v1.model.recognize_business_license_result_response import RecognizeBusinessLicenseResultResponse from huaweicloudsdkocr.v1.model.recognize_driver_license_request import RecognizeDriverLicenseRequest from huaweicloudsdkocr.v1.model.recognize_driver_license_request_body import RecognizeDriverLicenseRequestBody from huaweicloudsdkocr.v1.model.recognize_driver_license_response import RecognizeDriverLicenseResponse from huaweicloudsdkocr.v1.model.recognize_driver_license_result_response import RecognizeDriverLicenseResultResponse -from huaweicloudsdkocr.v1.model.recognize_financial_statement_request import RecognizeFinancialStatementRequest -from huaweicloudsdkocr.v1.model.recognize_financial_statement_request_body import RecognizeFinancialStatementRequestBody -from huaweicloudsdkocr.v1.model.recognize_financial_statement_response import RecognizeFinancialStatementResponse -from huaweicloudsdkocr.v1.model.recognize_financial_statement_result_response import RecognizeFinancialStatementResultResponse -from huaweicloudsdkocr.v1.model.recognize_financial_statement_words_block_items_response import RecognizeFinancialStatementWordsBlockItemsResponse -from huaweicloudsdkocr.v1.model.recognize_financial_statement_words_list_items_response import RecognizeFinancialStatementWordsListItemsResponse -from huaweicloudsdkocr.v1.model.recognize_financial_statement_words_region_items_response import RecognizeFinancialStatementWordsRegionItemsResponse -from huaweicloudsdkocr.v1.model.recognize_flight_itinerary_items_response import RecognizeFlightItineraryItemsResponse from huaweicloudsdkocr.v1.model.recognize_flight_itinerary_request import RecognizeFlightItineraryRequest -from huaweicloudsdkocr.v1.model.recognize_flight_itinerary_request_body import RecognizeFlightItineraryRequestBody from huaweicloudsdkocr.v1.model.recognize_flight_itinerary_response import RecognizeFlightItineraryResponse -from huaweicloudsdkocr.v1.model.recognize_flight_itinerary_result_response import RecognizeFlightItineraryResultResponse from huaweicloudsdkocr.v1.model.recognize_general_table_items2_response import RecognizeGeneralTableItems2Response from huaweicloudsdkocr.v1.model.recognize_general_table_items_response import RecognizeGeneralTableItemsResponse from huaweicloudsdkocr.v1.model.recognize_general_table_request import RecognizeGeneralTableRequest from huaweicloudsdkocr.v1.model.recognize_general_table_request_body import RecognizeGeneralTableRequestBody from huaweicloudsdkocr.v1.model.recognize_general_table_response import RecognizeGeneralTableResponse from huaweicloudsdkocr.v1.model.recognize_general_table_result_response import RecognizeGeneralTableResultResponse -from huaweicloudsdkocr.v1.model.recognize_general_text_items_response import RecognizeGeneralTextItemsResponse from huaweicloudsdkocr.v1.model.recognize_general_text_request import RecognizeGeneralTextRequest -from huaweicloudsdkocr.v1.model.recognize_general_text_request_body import RecognizeGeneralTextRequestBody from huaweicloudsdkocr.v1.model.recognize_general_text_response import RecognizeGeneralTextResponse -from huaweicloudsdkocr.v1.model.recognize_general_text_result_response import RecognizeGeneralTextResultResponse -from huaweicloudsdkocr.v1.model.recognize_handwriting_items_response import RecognizeHandwritingItemsResponse from huaweicloudsdkocr.v1.model.recognize_handwriting_request import RecognizeHandwritingRequest -from huaweicloudsdkocr.v1.model.recognize_handwriting_request_body import RecognizeHandwritingRequestBody from huaweicloudsdkocr.v1.model.recognize_handwriting_response import RecognizeHandwritingResponse -from huaweicloudsdkocr.v1.model.recognize_handwriting_result_response import RecognizeHandwritingResultResponse -from huaweicloudsdkocr.v1.model.recognize_id_card_request import RecognizeIdCardRequest -from huaweicloudsdkocr.v1.model.recognize_id_card_request_body import RecognizeIdCardRequestBody -from huaweicloudsdkocr.v1.model.recognize_id_card_response import RecognizeIdCardResponse -from huaweicloudsdkocr.v1.model.recognize_id_card_result_response import RecognizeIdCardResultResponse +from huaweicloudsdkocr.v1.model.recognize_id_card_request import RecognizeIDCardRequest +from huaweicloudsdkocr.v1.model.recognize_id_card_response import RecognizeIDCardResponse from huaweicloudsdkocr.v1.model.recognize_license_plate_request import RecognizeLicensePlateRequest -from huaweicloudsdkocr.v1.model.recognize_license_plate_request_body import RecognizeLicensePlateRequestBody from huaweicloudsdkocr.v1.model.recognize_license_plate_response import RecognizeLicensePlateResponse -from huaweicloudsdkocr.v1.model.recognize_license_plate_result_items_response import RecognizeLicensePlateResultItemsResponse from huaweicloudsdkocr.v1.model.recognize_mvs_invoice_request import RecognizeMvsInvoiceRequest -from huaweicloudsdkocr.v1.model.recognize_mvs_invoice_request_body import RecognizeMvsInvoiceRequestBody from huaweicloudsdkocr.v1.model.recognize_mvs_invoice_response import RecognizeMvsInvoiceResponse -from huaweicloudsdkocr.v1.model.recognize_mvs_invoice_result_response import RecognizeMvsInvoiceResultResponse from huaweicloudsdkocr.v1.model.recognize_passport_request import RecognizePassportRequest -from huaweicloudsdkocr.v1.model.recognize_passport_request_body import RecognizePassportRequestBody from huaweicloudsdkocr.v1.model.recognize_passport_response import RecognizePassportResponse -from huaweicloudsdkocr.v1.model.recognize_passport_result_response import RecognizePassportResultResponse from huaweicloudsdkocr.v1.model.recognize_quota_invoice_request import RecognizeQuotaInvoiceRequest -from huaweicloudsdkocr.v1.model.recognize_quota_invoice_request_body import RecognizeQuotaInvoiceRequestBody from huaweicloudsdkocr.v1.model.recognize_quota_invoice_response import RecognizeQuotaInvoiceResponse -from huaweicloudsdkocr.v1.model.recognize_quota_invoice_result_response import RecognizeQuotaInvoiceResultResponse from huaweicloudsdkocr.v1.model.recognize_taxi_invoice_request import RecognizeTaxiInvoiceRequest -from huaweicloudsdkocr.v1.model.recognize_taxi_invoice_request_body import RecognizeTaxiInvoiceRequestBody from huaweicloudsdkocr.v1.model.recognize_taxi_invoice_response import RecognizeTaxiInvoiceResponse -from huaweicloudsdkocr.v1.model.recognize_taxi_invoice_result_response import RecognizeTaxiInvoiceResultResponse from huaweicloudsdkocr.v1.model.recognize_toll_invoice_request import RecognizeTollInvoiceRequest -from huaweicloudsdkocr.v1.model.recognize_toll_invoice_request_body import RecognizeTollInvoiceRequestBody from huaweicloudsdkocr.v1.model.recognize_toll_invoice_response import RecognizeTollInvoiceResponse -from huaweicloudsdkocr.v1.model.recognize_toll_invoice_result_response import RecognizeTollInvoiceResultResponse from huaweicloudsdkocr.v1.model.recognize_train_ticket_request import RecognizeTrainTicketRequest -from huaweicloudsdkocr.v1.model.recognize_train_ticket_request_body import RecognizeTrainTicketRequestBody from huaweicloudsdkocr.v1.model.recognize_train_ticket_response import RecognizeTrainTicketResponse -from huaweicloudsdkocr.v1.model.recognize_train_ticket_result_response import RecognizeTrainTicketResultResponse from huaweicloudsdkocr.v1.model.recognize_transportation_license_request import RecognizeTransportationLicenseRequest -from huaweicloudsdkocr.v1.model.recognize_transportation_license_request_body import RecognizeTransportationLicenseRequestBody from huaweicloudsdkocr.v1.model.recognize_transportation_license_response import RecognizeTransportationLicenseResponse -from huaweicloudsdkocr.v1.model.recognize_transportation_license_result_response import RecognizeTransportationLicenseResultResponse +from huaweicloudsdkocr.v1.model.recognize_vin_request import RecognizeVINRequest +from huaweicloudsdkocr.v1.model.recognize_vin_response import RecognizeVINResponse from huaweicloudsdkocr.v1.model.recognize_vat_invoice_items_response import RecognizeVatInvoiceItemsResponse from huaweicloudsdkocr.v1.model.recognize_vat_invoice_request import RecognizeVatInvoiceRequest from huaweicloudsdkocr.v1.model.recognize_vat_invoice_request_body import RecognizeVatInvoiceRequestBody @@ -97,12 +87,18 @@ from huaweicloudsdkocr.v1.model.recognize_vehicle_license_request import Recogni from huaweicloudsdkocr.v1.model.recognize_vehicle_license_request_body import RecognizeVehicleLicenseRequestBody from huaweicloudsdkocr.v1.model.recognize_vehicle_license_response import RecognizeVehicleLicenseResponse from huaweicloudsdkocr.v1.model.recognize_vehicle_license_result_response import RecognizeVehicleLicenseResultResponse -from huaweicloudsdkocr.v1.model.recognize_vin_request import RecognizeVinRequest -from huaweicloudsdkocr.v1.model.recognize_vin_request_body import RecognizeVinRequestBody -from huaweicloudsdkocr.v1.model.recognize_vin_response import RecognizeVinResponse -from huaweicloudsdkocr.v1.model.recognize_vin_result_response import RecognizeVinResultResponse -from huaweicloudsdkocr.v1.model.recognize_web_image_items_response import RecognizeWebImageItemsResponse from huaweicloudsdkocr.v1.model.recognize_web_image_request import RecognizeWebImageRequest -from huaweicloudsdkocr.v1.model.recognize_web_image_request_body import RecognizeWebImageRequestBody from huaweicloudsdkocr.v1.model.recognize_web_image_response import RecognizeWebImageResponse -from huaweicloudsdkocr.v1.model.recognize_web_image_result_response import RecognizeWebImageResultResponse +from huaweicloudsdkocr.v1.model.taxi_invoice_req import TaxiInvoiceReq +from huaweicloudsdkocr.v1.model.taxi_invoice_result_body import TaxiInvoiceResultBody +from huaweicloudsdkocr.v1.model.toll_invoice_req import TollInvoiceReq +from huaweicloudsdkocr.v1.model.toll_invoice_result_body import TollInvoiceResultBody +from huaweicloudsdkocr.v1.model.train_ticket_req import TrainTicketReq +from huaweicloudsdkocr.v1.model.train_ticket_result_body import TrainTicketResultBody +from huaweicloudsdkocr.v1.model.transportation_license_req import TransportationLicenseReq +from huaweicloudsdkocr.v1.model.transportation_license_result_body import TransportationLicenseResultBody +from huaweicloudsdkocr.v1.model.vin_req import VINReq +from huaweicloudsdkocr.v1.model.vin_response_body_item import VINResponseBodyItem +from huaweicloudsdkocr.v1.model.web_image_items_response import WebImageItemsResponse +from huaweicloudsdkocr.v1.model.web_image_req import WebImageReq +from huaweicloudsdkocr.v1.model.web_image_response_body_item import WebImageResponseBodyItem diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/auto_classification_req.py similarity index 81% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_request_body.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/auto_classification_req.py index 7d0468b41..c9875bba0 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/auto_classification_req.py @@ -9,7 +9,7 @@ import six -class RecognizeAutoClassificationRequestBody: +class AutoClassificationReq: """ @@ -35,7 +35,7 @@ class RecognizeAutoClassificationRequestBody: } def __init__(self, url=None, image=None, type_list=None): - """RecognizeAutoClassificationRequestBody - a model defined in huaweicloud sdk""" + """AutoClassificationReq - a model defined in huaweicloud sdk""" @@ -53,66 +53,66 @@ class RecognizeAutoClassificationRequestBody: @property def url(self): - """Gets the url of this RecognizeAutoClassificationRequestBody. + """Gets the url of this AutoClassificationReq. 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - :return: The url of this RecognizeAutoClassificationRequestBody. + :return: The url of this AutoClassificationReq. :rtype: str """ return self._url @url.setter def url(self, url): - """Sets the url of this RecognizeAutoClassificationRequestBody. + """Sets the url of this AutoClassificationReq. 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - :param url: The url of this RecognizeAutoClassificationRequestBody. + :param url: The url of this AutoClassificationReq. :type: str """ self._url = url @property def image(self): - """Gets the image of this RecognizeAutoClassificationRequestBody. + """Gets the image of this AutoClassificationReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :return: The image of this RecognizeAutoClassificationRequestBody. + :return: The image of this AutoClassificationReq. :rtype: str """ return self._image @image.setter def image(self, image): - """Sets the image of this RecognizeAutoClassificationRequestBody. + """Sets the image of this AutoClassificationReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :param image: The image of this RecognizeAutoClassificationRequestBody. + :param image: The image of this AutoClassificationReq. :type: str """ self._image = image @property def type_list(self): - """Gets the type_list of this RecognizeAutoClassificationRequestBody. + """Gets the type_list of this AutoClassificationReq. 可以指定要识别的票证,指定后不出现在此List的票证不识别。不指定时默认返回所有支持类别票证的识别信息。 当前版本支持的票证类型请参见表2。 - :return: The type_list of this RecognizeAutoClassificationRequestBody. + :return: The type_list of this AutoClassificationReq. :rtype: list[str] """ return self._type_list @type_list.setter def type_list(self, type_list): - """Sets the type_list of this RecognizeAutoClassificationRequestBody. + """Sets the type_list of this AutoClassificationReq. 可以指定要识别的票证,指定后不出现在此List的票证不识别。不指定时默认返回所有支持类别票证的识别信息。 当前版本支持的票证类型请参见表2。 - :param type_list: The type_list of this RecognizeAutoClassificationRequestBody. + :param type_list: The type_list of this AutoClassificationReq. :type: list[str] """ self._type_list = type_list @@ -154,7 +154,7 @@ class RecognizeAutoClassificationRequestBody: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeAutoClassificationRequestBody): + if not isinstance(other, AutoClassificationReq): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_result_item_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/auto_classification_response_body_item.py similarity index 67% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_result_item_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/auto_classification_response_body_item.py index dd4cbdd48..dafb3fb26 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_result_item_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/auto_classification_response_body_item.py @@ -9,7 +9,7 @@ import six -class RecognizeAutoClassificationResultItemResponse: +class AutoClassificationResponseBodyItem: """ @@ -39,7 +39,7 @@ class RecognizeAutoClassificationResultItemResponse: } def __init__(self, status=None, content=None, type=None, location=None, confidence=None): - """RecognizeAutoClassificationResultItemResponse - a model defined in huaweicloud sdk""" + """AutoClassificationResponseBodyItem - a model defined in huaweicloud sdk""" @@ -59,110 +59,110 @@ class RecognizeAutoClassificationResultItemResponse: @property def status(self): - """Gets the status of this RecognizeAutoClassificationResultItemResponse. + """Gets the status of this AutoClassificationResponseBodyItem. - 指示各对应票证的识别状态。 + 指示各对应票证的识别状态。 - :return: The status of this RecognizeAutoClassificationResultItemResponse. + :return: The status of this AutoClassificationResponseBodyItem. :rtype: object """ return self._status @status.setter def status(self, status): - """Sets the status of this RecognizeAutoClassificationResultItemResponse. + """Sets the status of this AutoClassificationResponseBodyItem. - 指示各对应票证的识别状态。 + 指示各对应票证的识别状态。 - :param status: The status of this RecognizeAutoClassificationResultItemResponse. + :param status: The status of this AutoClassificationResponseBodyItem. :type: object """ self._status = status @property def content(self): - """Gets the content of this RecognizeAutoClassificationResultItemResponse. + """Gets the content of this AutoClassificationResponseBodyItem. 对应票证具体结构化识别的结果。 - :return: The content of this RecognizeAutoClassificationResultItemResponse. + :return: The content of this AutoClassificationResponseBodyItem. :rtype: object """ return self._content @content.setter def content(self, content): - """Sets the content of this RecognizeAutoClassificationResultItemResponse. + """Sets the content of this AutoClassificationResponseBodyItem. 对应票证具体结构化识别的结果。 - :param content: The content of this RecognizeAutoClassificationResultItemResponse. + :param content: The content of this AutoClassificationResponseBodyItem. :type: object """ self._content = content @property def type(self): - """Gets the type of this RecognizeAutoClassificationResultItemResponse. + """Gets the type of this AutoClassificationResponseBodyItem. - 对应票证的类别。 + 对应票证的类别。 - :return: The type of this RecognizeAutoClassificationResultItemResponse. + :return: The type of this AutoClassificationResponseBodyItem. :rtype: str """ return self._type @type.setter def type(self, type): - """Sets the type of this RecognizeAutoClassificationResultItemResponse. + """Sets the type of this AutoClassificationResponseBodyItem. - 对应票证的类别。 + 对应票证的类别。 - :param type: The type of this RecognizeAutoClassificationResultItemResponse. + :param type: The type of this AutoClassificationResponseBodyItem. :type: str """ self._type = type @property def location(self): - """Gets the location of this RecognizeAutoClassificationResultItemResponse. + """Gets the location of this AutoClassificationResponseBodyItem. 文字块的区域位置信息,列表形式,包含文字区域四个顶点的二维坐标(x,y);坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - :return: The location of this RecognizeAutoClassificationResultItemResponse. + :return: The location of this AutoClassificationResponseBodyItem. :rtype: list[int] """ return self._location @location.setter def location(self, location): - """Sets the location of this RecognizeAutoClassificationResultItemResponse. + """Sets the location of this AutoClassificationResponseBodyItem. 文字块的区域位置信息,列表形式,包含文字区域四个顶点的二维坐标(x,y);坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - :param location: The location of this RecognizeAutoClassificationResultItemResponse. + :param location: The location of this AutoClassificationResponseBodyItem. :type: list[int] """ self._location = location @property def confidence(self): - """Gets the confidence of this RecognizeAutoClassificationResultItemResponse. + """Gets the confidence of this AutoClassificationResponseBodyItem. - 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 + 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :return: The confidence of this RecognizeAutoClassificationResultItemResponse. + :return: The confidence of this AutoClassificationResponseBodyItem. :rtype: object """ return self._confidence @confidence.setter def confidence(self, confidence): - """Sets the confidence of this RecognizeAutoClassificationResultItemResponse. + """Sets the confidence of this AutoClassificationResponseBodyItem. - 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 + 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :param confidence: The confidence of this RecognizeAutoClassificationResultItemResponse. + :param confidence: The confidence of this AutoClassificationResponseBodyItem. :type: object """ self._confidence = confidence @@ -204,7 +204,7 @@ class RecognizeAutoClassificationResultItemResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeAutoClassificationResultItemResponse): + if not isinstance(other, AutoClassificationResponseBodyItem): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/bankcard_req.py similarity index 53% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_request_body.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/bankcard_req.py index db96fb646..8f42babd0 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/bankcard_req.py @@ -9,7 +9,7 @@ import six -class RecognizeMvsInvoiceRequestBody: +class BankcardReq: """ @@ -23,73 +23,73 @@ class RecognizeMvsInvoiceRequestBody: sensitive_list = [] openapi_types = { - 'url': 'str', - 'image': 'str' + 'image': 'str', + 'url': 'str' } attribute_map = { - 'url': 'url', - 'image': 'image' + 'image': 'image', + 'url': 'url' } - def __init__(self, url=None, image=None): - """RecognizeMvsInvoiceRequestBody - a model defined in huaweicloud sdk""" + def __init__(self, image=None, url=None): + """BankcardReq - a model defined in huaweicloud sdk""" - self._url = None self._image = None + self._url = None self.discriminator = None - if url is not None: - self.url = url if image is not None: self.image = image - - @property - def url(self): - """Gets the url of this RecognizeMvsInvoiceRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :return: The url of this RecognizeMvsInvoiceRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeMvsInvoiceRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :param url: The url of this RecognizeMvsInvoiceRequestBody. - :type: str - """ - self._url = url + if url is not None: + self.url = url @property def image(self): - """Gets the image of this RecognizeMvsInvoiceRequestBody. + """Gets the image of this BankcardReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :return: The image of this RecognizeMvsInvoiceRequestBody. + :return: The image of this BankcardReq. :rtype: str """ return self._image @image.setter def image(self, image): - """Sets the image of this RecognizeMvsInvoiceRequestBody. + """Sets the image of this BankcardReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :param image: The image of this RecognizeMvsInvoiceRequestBody. + :param image: The image of this BankcardReq. :type: str """ self._image = image + @property + def url(self): + """Gets the url of this BankcardReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this BankcardReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this BankcardReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this BankcardReq. + :type: str + """ + self._url = url + def to_dict(self): """Returns the model properties as a dict""" result = {} @@ -127,7 +127,7 @@ class RecognizeMvsInvoiceRequestBody: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeMvsInvoiceRequestBody): + if not isinstance(other, BankcardReq): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/bankcard_result_body.py similarity index 72% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/bankcard_result_body.py index 185271417..2279eac9c 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/bankcard_result_body.py @@ -9,7 +9,7 @@ import six -class RecognizeBankcardResultResponse: +class BankcardResultBody: """ @@ -41,7 +41,7 @@ class RecognizeBankcardResultResponse: } def __init__(self, bank_name=None, card_number=None, issue_date=None, expiry_date=None, type=None, confidence=None): - """RecognizeBankcardResultResponse - a model defined in huaweicloud sdk""" + """BankcardResultBody - a model defined in huaweicloud sdk""" @@ -68,132 +68,132 @@ class RecognizeBankcardResultResponse: @property def bank_name(self): - """Gets the bank_name of this RecognizeBankcardResultResponse. + """Gets the bank_name of this BankcardResultBody. 发卡行。 - :return: The bank_name of this RecognizeBankcardResultResponse. + :return: The bank_name of this BankcardResultBody. :rtype: str """ return self._bank_name @bank_name.setter def bank_name(self, bank_name): - """Sets the bank_name of this RecognizeBankcardResultResponse. + """Sets the bank_name of this BankcardResultBody. 发卡行。 - :param bank_name: The bank_name of this RecognizeBankcardResultResponse. + :param bank_name: The bank_name of this BankcardResultBody. :type: str """ self._bank_name = bank_name @property def card_number(self): - """Gets the card_number of this RecognizeBankcardResultResponse. + """Gets the card_number of this BankcardResultBody. 银行卡号。 - :return: The card_number of this RecognizeBankcardResultResponse. + :return: The card_number of this BankcardResultBody. :rtype: str """ return self._card_number @card_number.setter def card_number(self, card_number): - """Sets the card_number of this RecognizeBankcardResultResponse. + """Sets the card_number of this BankcardResultBody. 银行卡号。 - :param card_number: The card_number of this RecognizeBankcardResultResponse. + :param card_number: The card_number of this BankcardResultBody. :type: str """ self._card_number = card_number @property def issue_date(self): - """Gets the issue_date of this RecognizeBankcardResultResponse. + """Gets the issue_date of this BankcardResultBody. 有效期开始日期。 - :return: The issue_date of this RecognizeBankcardResultResponse. + :return: The issue_date of this BankcardResultBody. :rtype: str """ return self._issue_date @issue_date.setter def issue_date(self, issue_date): - """Sets the issue_date of this RecognizeBankcardResultResponse. + """Sets the issue_date of this BankcardResultBody. 有效期开始日期。 - :param issue_date: The issue_date of this RecognizeBankcardResultResponse. + :param issue_date: The issue_date of this BankcardResultBody. :type: str """ self._issue_date = issue_date @property def expiry_date(self): - """Gets the expiry_date of this RecognizeBankcardResultResponse. + """Gets the expiry_date of this BankcardResultBody. 有效期截止日期。 - :return: The expiry_date of this RecognizeBankcardResultResponse. + :return: The expiry_date of this BankcardResultBody. :rtype: str """ return self._expiry_date @expiry_date.setter def expiry_date(self, expiry_date): - """Sets the expiry_date of this RecognizeBankcardResultResponse. + """Sets the expiry_date of this BankcardResultBody. 有效期截止日期。 - :param expiry_date: The expiry_date of this RecognizeBankcardResultResponse. + :param expiry_date: The expiry_date of this BankcardResultBody. :type: str """ self._expiry_date = expiry_date @property def type(self): - """Gets the type of this RecognizeBankcardResultResponse. + """Gets the type of this BankcardResultBody. 银行卡类别,如:储蓄卡,信用卡。 - :return: The type of this RecognizeBankcardResultResponse. + :return: The type of this BankcardResultBody. :rtype: str """ return self._type @type.setter def type(self, type): - """Sets the type of this RecognizeBankcardResultResponse. + """Sets the type of this BankcardResultBody. 银行卡类别,如:储蓄卡,信用卡。 - :param type: The type of this RecognizeBankcardResultResponse. + :param type: The type of this BankcardResultBody. :type: str """ self._type = type @property def confidence(self): - """Gets the confidence of this RecognizeBankcardResultResponse. + """Gets the confidence of this BankcardResultBody. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :return: The confidence of this RecognizeBankcardResultResponse. + :return: The confidence of this BankcardResultBody. :rtype: object """ return self._confidence @confidence.setter def confidence(self, confidence): - """Sets the confidence of this RecognizeBankcardResultResponse. + """Sets the confidence of this BankcardResultBody. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :param confidence: The confidence of this RecognizeBankcardResultResponse. + :param confidence: The confidence of this BankcardResultBody. :type: object """ self._confidence = confidence @@ -235,7 +235,7 @@ class RecognizeBankcardResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeBankcardResultResponse): + if not isinstance(other, BankcardResultBody): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_items_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_card_items_response.py similarity index 77% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_items_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_card_items_response.py index 72ca97cbc..8111eea3a 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_items_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_card_items_response.py @@ -9,7 +9,7 @@ import six -class RecognizeBusinessCardItemsResponse: +class BusinessCardItemsResponse: """ @@ -35,7 +35,7 @@ class RecognizeBusinessCardItemsResponse: } def __init__(self, item=None, value=None, note=None): - """RecognizeBusinessCardItemsResponse - a model defined in huaweicloud sdk""" + """BusinessCardItemsResponse - a model defined in huaweicloud sdk""" @@ -53,66 +53,66 @@ class RecognizeBusinessCardItemsResponse: @property def item(self): - """Gets the item of this RecognizeBusinessCardItemsResponse. + """Gets the item of this BusinessCardItemsResponse. 表示key值,可能是qq, wechat, alipay及bank等。 - :return: The item of this RecognizeBusinessCardItemsResponse. + :return: The item of this BusinessCardItemsResponse. :rtype: str """ return self._item @item.setter def item(self, item): - """Sets the item of this RecognizeBusinessCardItemsResponse. + """Sets the item of this BusinessCardItemsResponse. 表示key值,可能是qq, wechat, alipay及bank等。 - :param item: The item of this RecognizeBusinessCardItemsResponse. + :param item: The item of this BusinessCardItemsResponse. :type: str """ self._item = item @property def value(self): - """Gets the value of this RecognizeBusinessCardItemsResponse. + """Gets the value of this BusinessCardItemsResponse. 表示value值,对应qq, wechat, alipay及bank等的账号。 - :return: The value of this RecognizeBusinessCardItemsResponse. + :return: The value of this BusinessCardItemsResponse. :rtype: str """ return self._value @value.setter def value(self, value): - """Sets the value of this RecognizeBusinessCardItemsResponse. + """Sets the value of this BusinessCardItemsResponse. 表示value值,对应qq, wechat, alipay及bank等的账号。 - :param value: The value of this RecognizeBusinessCardItemsResponse. + :param value: The value of this BusinessCardItemsResponse. :type: str """ self._value = value @property def note(self): - """Gets the note of this RecognizeBusinessCardItemsResponse. + """Gets the note of this BusinessCardItemsResponse. 对应item关联的额外信息,为bank时第一个默认为户名,第二个为开户行,为alipay时第一个默认为账号名。 - :return: The note of this RecognizeBusinessCardItemsResponse. + :return: The note of this BusinessCardItemsResponse. :rtype: list[str] """ return self._note @note.setter def note(self, note): - """Sets the note of this RecognizeBusinessCardItemsResponse. + """Sets the note of this BusinessCardItemsResponse. 对应item关联的额外信息,为bank时第一个默认为户名,第二个为开户行,为alipay时第一个默认为账号名。 - :param note: The note of this RecognizeBusinessCardItemsResponse. + :param note: The note of this BusinessCardItemsResponse. :type: list[str] """ self._note = note @@ -154,7 +154,7 @@ class RecognizeBusinessCardItemsResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeBusinessCardItemsResponse): + if not isinstance(other, BusinessCardItemsResponse): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_card_req.py similarity index 67% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_request_body.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_card_req.py index 493e4c0aa..9b01ac8ae 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_card_req.py @@ -9,7 +9,7 @@ import six -class RecognizeBusinessCardRequestBody: +class BusinessCardReq: """ @@ -37,7 +37,7 @@ class RecognizeBusinessCardRequestBody: } def __init__(self, image=None, url=None, detect_direction=None, return_adjusted_image=None): - """RecognizeBusinessCardRequestBody - a model defined in huaweicloud sdk""" + """BusinessCardReq - a model defined in huaweicloud sdk""" @@ -58,88 +58,88 @@ class RecognizeBusinessCardRequestBody: @property def image(self): - """Gets the image of this RecognizeBusinessCardRequestBody. + """Gets the image of this BusinessCardReq. - 图像数据,base64编码,要求base64编码后大小不超过10MB。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :return: The image of this RecognizeBusinessCardRequestBody. + :return: The image of this BusinessCardReq. :rtype: str """ return self._image @image.setter def image(self, image): - """Sets the image of this RecognizeBusinessCardRequestBody. + """Sets the image of this BusinessCardReq. - 图像数据,base64编码,要求base64编码后大小不超过10MB。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :param image: The image of this RecognizeBusinessCardRequestBody. + :param image: The image of this BusinessCardReq. :type: str """ self._image = image @property def url(self): - """Gets the url of this RecognizeBusinessCardRequestBody. + """Gets the url of this BusinessCardReq. - 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 - :return: The url of this RecognizeBusinessCardRequestBody. + :return: The url of this BusinessCardReq. :rtype: str """ return self._url @url.setter def url(self, url): - """Sets the url of this RecognizeBusinessCardRequestBody. + """Sets the url of this BusinessCardReq. - 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 - :param url: The url of this RecognizeBusinessCardRequestBody. + :param url: The url of this BusinessCardReq. :type: str """ self._url = url @property def detect_direction(self): - """Gets the detect_direction of this RecognizeBusinessCardRequestBody. + """Gets the detect_direction of this BusinessCardReq. 图片朝向检测开关,可选值包括: - true:检测图片朝向; - false:不检测图片朝向。 > 说明: - 支持任意角度的图片朝向检测。未传入该参数时默认为false,即不检测图片朝向。 - :return: The detect_direction of this RecognizeBusinessCardRequestBody. + :return: The detect_direction of this BusinessCardReq. :rtype: bool """ return self._detect_direction @detect_direction.setter def detect_direction(self, detect_direction): - """Sets the detect_direction of this RecognizeBusinessCardRequestBody. + """Sets the detect_direction of this BusinessCardReq. 图片朝向检测开关,可选值包括: - true:检测图片朝向; - false:不检测图片朝向。 > 说明: - 支持任意角度的图片朝向检测。未传入该参数时默认为false,即不检测图片朝向。 - :param detect_direction: The detect_direction of this RecognizeBusinessCardRequestBody. + :param detect_direction: The detect_direction of this BusinessCardReq. :type: bool """ self._detect_direction = detect_direction @property def return_adjusted_image(self): - """Gets the return_adjusted_image of this RecognizeBusinessCardRequestBody. + """Gets the return_adjusted_image of this BusinessCardReq. 返回矫正后的名片图像的BASE64编码的开关,可选值包括: - true:返回BASE64编码; - false:不返回BASE64编码。 > 说明: - 未传入该参数时默认为false,即不返回BASE64编码。 - :return: The return_adjusted_image of this RecognizeBusinessCardRequestBody. + :return: The return_adjusted_image of this BusinessCardReq. :rtype: bool """ return self._return_adjusted_image @return_adjusted_image.setter def return_adjusted_image(self, return_adjusted_image): - """Sets the return_adjusted_image of this RecognizeBusinessCardRequestBody. + """Sets the return_adjusted_image of this BusinessCardReq. 返回矫正后的名片图像的BASE64编码的开关,可选值包括: - true:返回BASE64编码; - false:不返回BASE64编码。 > 说明: - 未传入该参数时默认为false,即不返回BASE64编码。 - :param return_adjusted_image: The return_adjusted_image of this RecognizeBusinessCardRequestBody. + :param return_adjusted_image: The return_adjusted_image of this BusinessCardReq. :type: bool """ self._return_adjusted_image = return_adjusted_image @@ -181,7 +181,7 @@ class RecognizeBusinessCardRequestBody: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeBusinessCardRequestBody): + if not isinstance(other, BusinessCardReq): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_card_response_body_item.py similarity index 65% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_card_response_body_item.py index 7822058df..249f769d4 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_card_response_body_item.py @@ -9,7 +9,7 @@ import six -class RecognizeBusinessCardResultResponse: +class BusinessCardResponseBodyItem: """ @@ -33,7 +33,7 @@ class RecognizeBusinessCardResultResponse: 'fax': 'list[str]', 'postcode': 'list[str]', 'website': 'list[str]', - 'extra_info_list': 'list[RecognizeBusinessCardItemsResponse]', + 'extra_info_list': 'list[BusinessCardItemsResponse]', 'adjusted_image': 'str' } @@ -53,7 +53,7 @@ class RecognizeBusinessCardResultResponse: } def __init__(self, name=None, title=None, company=None, department=None, phone=None, address=None, email=None, fax=None, postcode=None, website=None, extra_info_list=None, adjusted_image=None): - """RecognizeBusinessCardResultResponse - a model defined in huaweicloud sdk""" + """BusinessCardResponseBodyItem - a model defined in huaweicloud sdk""" @@ -98,264 +98,264 @@ class RecognizeBusinessCardResultResponse: @property def name(self): - """Gets the name of this RecognizeBusinessCardResultResponse. + """Gets the name of this BusinessCardResponseBodyItem. 姓名列表。 - :return: The name of this RecognizeBusinessCardResultResponse. + :return: The name of this BusinessCardResponseBodyItem. :rtype: list[str] """ return self._name @name.setter def name(self, name): - """Sets the name of this RecognizeBusinessCardResultResponse. + """Sets the name of this BusinessCardResponseBodyItem. 姓名列表。 - :param name: The name of this RecognizeBusinessCardResultResponse. + :param name: The name of this BusinessCardResponseBodyItem. :type: list[str] """ self._name = name @property def title(self): - """Gets the title of this RecognizeBusinessCardResultResponse. + """Gets the title of this BusinessCardResponseBodyItem. 职位头衔列表。 - :return: The title of this RecognizeBusinessCardResultResponse. + :return: The title of this BusinessCardResponseBodyItem. :rtype: list[str] """ return self._title @title.setter def title(self, title): - """Sets the title of this RecognizeBusinessCardResultResponse. + """Sets the title of this BusinessCardResponseBodyItem. 职位头衔列表。 - :param title: The title of this RecognizeBusinessCardResultResponse. + :param title: The title of this BusinessCardResponseBodyItem. :type: list[str] """ self._title = title @property def company(self): - """Gets the company of this RecognizeBusinessCardResultResponse. + """Gets the company of this BusinessCardResponseBodyItem. 公司列表。 - :return: The company of this RecognizeBusinessCardResultResponse. + :return: The company of this BusinessCardResponseBodyItem. :rtype: list[str] """ return self._company @company.setter def company(self, company): - """Sets the company of this RecognizeBusinessCardResultResponse. + """Sets the company of this BusinessCardResponseBodyItem. 公司列表。 - :param company: The company of this RecognizeBusinessCardResultResponse. + :param company: The company of this BusinessCardResponseBodyItem. :type: list[str] """ self._company = company @property def department(self): - """Gets the department of this RecognizeBusinessCardResultResponse. + """Gets the department of this BusinessCardResponseBodyItem. 部门列表。 - :return: The department of this RecognizeBusinessCardResultResponse. + :return: The department of this BusinessCardResponseBodyItem. :rtype: list[str] """ return self._department @department.setter def department(self, department): - """Sets the department of this RecognizeBusinessCardResultResponse. + """Sets the department of this BusinessCardResponseBodyItem. 部门列表。 - :param department: The department of this RecognizeBusinessCardResultResponse. + :param department: The department of this BusinessCardResponseBodyItem. :type: list[str] """ self._department = department @property def phone(self): - """Gets the phone of this RecognizeBusinessCardResultResponse. + """Gets the phone of this BusinessCardResponseBodyItem. 联系方式列表。 - :return: The phone of this RecognizeBusinessCardResultResponse. + :return: The phone of this BusinessCardResponseBodyItem. :rtype: list[str] """ return self._phone @phone.setter def phone(self, phone): - """Sets the phone of this RecognizeBusinessCardResultResponse. + """Sets the phone of this BusinessCardResponseBodyItem. 联系方式列表。 - :param phone: The phone of this RecognizeBusinessCardResultResponse. + :param phone: The phone of this BusinessCardResponseBodyItem. :type: list[str] """ self._phone = phone @property def address(self): - """Gets the address of this RecognizeBusinessCardResultResponse. + """Gets the address of this BusinessCardResponseBodyItem. 地址列表。 - :return: The address of this RecognizeBusinessCardResultResponse. + :return: The address of this BusinessCardResponseBodyItem. :rtype: list[str] """ return self._address @address.setter def address(self, address): - """Sets the address of this RecognizeBusinessCardResultResponse. + """Sets the address of this BusinessCardResponseBodyItem. 地址列表。 - :param address: The address of this RecognizeBusinessCardResultResponse. + :param address: The address of this BusinessCardResponseBodyItem. :type: list[str] """ self._address = address @property def email(self): - """Gets the email of this RecognizeBusinessCardResultResponse. + """Gets the email of this BusinessCardResponseBodyItem. 邮箱列表。 - :return: The email of this RecognizeBusinessCardResultResponse. + :return: The email of this BusinessCardResponseBodyItem. :rtype: list[str] """ return self._email @email.setter def email(self, email): - """Sets the email of this RecognizeBusinessCardResultResponse. + """Sets the email of this BusinessCardResponseBodyItem. 邮箱列表。 - :param email: The email of this RecognizeBusinessCardResultResponse. + :param email: The email of this BusinessCardResponseBodyItem. :type: list[str] """ self._email = email @property def fax(self): - """Gets the fax of this RecognizeBusinessCardResultResponse. + """Gets the fax of this BusinessCardResponseBodyItem. 传真列表。 - :return: The fax of this RecognizeBusinessCardResultResponse. + :return: The fax of this BusinessCardResponseBodyItem. :rtype: list[str] """ return self._fax @fax.setter def fax(self, fax): - """Sets the fax of this RecognizeBusinessCardResultResponse. + """Sets the fax of this BusinessCardResponseBodyItem. 传真列表。 - :param fax: The fax of this RecognizeBusinessCardResultResponse. + :param fax: The fax of this BusinessCardResponseBodyItem. :type: list[str] """ self._fax = fax @property def postcode(self): - """Gets the postcode of this RecognizeBusinessCardResultResponse. + """Gets the postcode of this BusinessCardResponseBodyItem. 邮编列表。 - :return: The postcode of this RecognizeBusinessCardResultResponse. + :return: The postcode of this BusinessCardResponseBodyItem. :rtype: list[str] """ return self._postcode @postcode.setter def postcode(self, postcode): - """Sets the postcode of this RecognizeBusinessCardResultResponse. + """Sets the postcode of this BusinessCardResponseBodyItem. 邮编列表。 - :param postcode: The postcode of this RecognizeBusinessCardResultResponse. + :param postcode: The postcode of this BusinessCardResponseBodyItem. :type: list[str] """ self._postcode = postcode @property def website(self): - """Gets the website of this RecognizeBusinessCardResultResponse. + """Gets the website of this BusinessCardResponseBodyItem. 公司网址列表。 - :return: The website of this RecognizeBusinessCardResultResponse. + :return: The website of this BusinessCardResponseBodyItem. :rtype: list[str] """ return self._website @website.setter def website(self, website): - """Sets the website of this RecognizeBusinessCardResultResponse. + """Sets the website of this BusinessCardResponseBodyItem. 公司网址列表。 - :param website: The website of this RecognizeBusinessCardResultResponse. + :param website: The website of this BusinessCardResponseBodyItem. :type: list[str] """ self._website = website @property def extra_info_list(self): - """Gets the extra_info_list of this RecognizeBusinessCardResultResponse. + """Gets the extra_info_list of this BusinessCardResponseBodyItem. 其余信息列表。 - :return: The extra_info_list of this RecognizeBusinessCardResultResponse. - :rtype: list[RecognizeBusinessCardItemsResponse] + :return: The extra_info_list of this BusinessCardResponseBodyItem. + :rtype: list[BusinessCardItemsResponse] """ return self._extra_info_list @extra_info_list.setter def extra_info_list(self, extra_info_list): - """Sets the extra_info_list of this RecognizeBusinessCardResultResponse. + """Sets the extra_info_list of this BusinessCardResponseBodyItem. 其余信息列表。 - :param extra_info_list: The extra_info_list of this RecognizeBusinessCardResultResponse. - :type: list[RecognizeBusinessCardItemsResponse] + :param extra_info_list: The extra_info_list of this BusinessCardResponseBodyItem. + :type: list[BusinessCardItemsResponse] """ self._extra_info_list = extra_info_list @property def adjusted_image(self): - """Gets the adjusted_image of this RecognizeBusinessCardResultResponse. + """Gets the adjusted_image of this BusinessCardResponseBodyItem. 返回矫正后的名片图像的BASE64编码。 - :return: The adjusted_image of this RecognizeBusinessCardResultResponse. + :return: The adjusted_image of this BusinessCardResponseBodyItem. :rtype: str """ return self._adjusted_image @adjusted_image.setter def adjusted_image(self, adjusted_image): - """Sets the adjusted_image of this RecognizeBusinessCardResultResponse. + """Sets the adjusted_image of this BusinessCardResponseBodyItem. 返回矫正后的名片图像的BASE64编码。 - :param adjusted_image: The adjusted_image of this RecognizeBusinessCardResultResponse. + :param adjusted_image: The adjusted_image of this BusinessCardResponseBodyItem. :type: str """ self._adjusted_image = adjusted_image @@ -397,7 +397,7 @@ class RecognizeBusinessCardResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeBusinessCardResultResponse): + if not isinstance(other, BusinessCardResponseBodyItem): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_license_req.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_license_req.py new file mode 100644 index 000000000..908a1d813 --- /dev/null +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_license_req.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class BusinessLicenseReq: + + + """ + 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 = { + 'image': 'str', + 'url': 'str' + } + + attribute_map = { + 'image': 'image', + 'url': 'url' + } + + def __init__(self, image=None, url=None): + """BusinessLicenseReq - a model defined in huaweicloud sdk""" + + + + self._image = None + self._url = None + self.discriminator = None + + if image is not None: + self.image = image + if url is not None: + self.url = url + + @property + def image(self): + """Gets the image of this BusinessLicenseReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :return: The image of this BusinessLicenseReq. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this BusinessLicenseReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :param image: The image of this BusinessLicenseReq. + :type: str + """ + self._image = image + + @property + def url(self): + """Gets the url of this BusinessLicenseReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this BusinessLicenseReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this BusinessLicenseReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this BusinessLicenseReq. + :type: str + """ + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BusinessLicenseReq): + 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-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_license_result_body.py similarity index 69% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_license_result_body.py index d65dbc5be..035c40794 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/business_license_result_body.py @@ -9,7 +9,7 @@ import six -class RecognizeBusinessLicenseResultResponse: +class BusinessLicenseResultBody: """ @@ -51,7 +51,7 @@ class RecognizeBusinessLicenseResultResponse: } def __init__(self, registration_number=None, name=None, type=None, address=None, legal_representative=None, registered_capital=None, found_date=None, business_term=None, business_scope=None, issue_date=None, confidence=None): - """RecognizeBusinessLicenseResultResponse - a model defined in huaweicloud sdk""" + """BusinessLicenseResultBody - a model defined in huaweicloud sdk""" @@ -93,242 +93,242 @@ class RecognizeBusinessLicenseResultResponse: @property def registration_number(self): - """Gets the registration_number of this RecognizeBusinessLicenseResultResponse. + """Gets the registration_number of this BusinessLicenseResultBody. - 老版本营业执照对应注册号。 - 新三证合一版本营业执照对应社会保障号。 - :return: The registration_number of this RecognizeBusinessLicenseResultResponse. + :return: The registration_number of this BusinessLicenseResultBody. :rtype: str """ return self._registration_number @registration_number.setter def registration_number(self, registration_number): - """Sets the registration_number of this RecognizeBusinessLicenseResultResponse. + """Sets the registration_number of this BusinessLicenseResultBody. - 老版本营业执照对应注册号。 - 新三证合一版本营业执照对应社会保障号。 - :param registration_number: The registration_number of this RecognizeBusinessLicenseResultResponse. + :param registration_number: The registration_number of this BusinessLicenseResultBody. :type: str """ self._registration_number = registration_number @property def name(self): - """Gets the name of this RecognizeBusinessLicenseResultResponse. + """Gets the name of this BusinessLicenseResultBody. 企业名称。 - :return: The name of this RecognizeBusinessLicenseResultResponse. + :return: The name of this BusinessLicenseResultBody. :rtype: str """ return self._name @name.setter def name(self, name): - """Sets the name of this RecognizeBusinessLicenseResultResponse. + """Sets the name of this BusinessLicenseResultBody. 企业名称。 - :param name: The name of this RecognizeBusinessLicenseResultResponse. + :param name: The name of this BusinessLicenseResultBody. :type: str """ self._name = name @property def type(self): - """Gets the type of this RecognizeBusinessLicenseResultResponse. + """Gets the type of this BusinessLicenseResultBody. 公司/企业类型/主体类型。 - :return: The type of this RecognizeBusinessLicenseResultResponse. + :return: The type of this BusinessLicenseResultBody. :rtype: str """ return self._type @type.setter def type(self, type): - """Sets the type of this RecognizeBusinessLicenseResultResponse. + """Sets the type of this BusinessLicenseResultBody. 公司/企业类型/主体类型。 - :param type: The type of this RecognizeBusinessLicenseResultResponse. + :param type: The type of this BusinessLicenseResultBody. :type: str """ self._type = type @property def address(self): - """Gets the address of this RecognizeBusinessLicenseResultResponse. + """Gets the address of this BusinessLicenseResultBody. 住所/营业场所/企业住所。 - :return: The address of this RecognizeBusinessLicenseResultResponse. + :return: The address of this BusinessLicenseResultBody. :rtype: str """ return self._address @address.setter def address(self, address): - """Sets the address of this RecognizeBusinessLicenseResultResponse. + """Sets the address of this BusinessLicenseResultBody. 住所/营业场所/企业住所。 - :param address: The address of this RecognizeBusinessLicenseResultResponse. + :param address: The address of this BusinessLicenseResultBody. :type: str """ self._address = address @property def legal_representative(self): - """Gets the legal_representative of this RecognizeBusinessLicenseResultResponse. + """Gets the legal_representative of this BusinessLicenseResultBody. 法定代表人/负责人。 - :return: The legal_representative of this RecognizeBusinessLicenseResultResponse. + :return: The legal_representative of this BusinessLicenseResultBody. :rtype: str """ return self._legal_representative @legal_representative.setter def legal_representative(self, legal_representative): - """Sets the legal_representative of this RecognizeBusinessLicenseResultResponse. + """Sets the legal_representative of this BusinessLicenseResultBody. 法定代表人/负责人。 - :param legal_representative: The legal_representative of this RecognizeBusinessLicenseResultResponse. + :param legal_representative: The legal_representative of this BusinessLicenseResultBody. :type: str """ self._legal_representative = legal_representative @property def registered_capital(self): - """Gets the registered_capital of this RecognizeBusinessLicenseResultResponse. + """Gets the registered_capital of this BusinessLicenseResultBody. 注册资本。 - :return: The registered_capital of this RecognizeBusinessLicenseResultResponse. + :return: The registered_capital of this BusinessLicenseResultBody. :rtype: str """ return self._registered_capital @registered_capital.setter def registered_capital(self, registered_capital): - """Sets the registered_capital of this RecognizeBusinessLicenseResultResponse. + """Sets the registered_capital of this BusinessLicenseResultBody. 注册资本。 - :param registered_capital: The registered_capital of this RecognizeBusinessLicenseResultResponse. + :param registered_capital: The registered_capital of this BusinessLicenseResultBody. :type: str """ self._registered_capital = registered_capital @property def found_date(self): - """Gets the found_date of this RecognizeBusinessLicenseResultResponse. + """Gets the found_date of this BusinessLicenseResultBody. 成立日期。 - :return: The found_date of this RecognizeBusinessLicenseResultResponse. + :return: The found_date of this BusinessLicenseResultBody. :rtype: str """ return self._found_date @found_date.setter def found_date(self, found_date): - """Sets the found_date of this RecognizeBusinessLicenseResultResponse. + """Sets the found_date of this BusinessLicenseResultBody. 成立日期。 - :param found_date: The found_date of this RecognizeBusinessLicenseResultResponse. + :param found_date: The found_date of this BusinessLicenseResultBody. :type: str """ self._found_date = found_date @property def business_term(self): - """Gets the business_term of this RecognizeBusinessLicenseResultResponse. + """Gets the business_term of this BusinessLicenseResultBody. 营业期限。 - :return: The business_term of this RecognizeBusinessLicenseResultResponse. + :return: The business_term of this BusinessLicenseResultBody. :rtype: str """ return self._business_term @business_term.setter def business_term(self, business_term): - """Sets the business_term of this RecognizeBusinessLicenseResultResponse. + """Sets the business_term of this BusinessLicenseResultBody. 营业期限。 - :param business_term: The business_term of this RecognizeBusinessLicenseResultResponse. + :param business_term: The business_term of this BusinessLicenseResultBody. :type: str """ self._business_term = business_term @property def business_scope(self): - """Gets the business_scope of this RecognizeBusinessLicenseResultResponse. + """Gets the business_scope of this BusinessLicenseResultBody. 经营范围。 - :return: The business_scope of this RecognizeBusinessLicenseResultResponse. + :return: The business_scope of this BusinessLicenseResultBody. :rtype: str """ return self._business_scope @business_scope.setter def business_scope(self, business_scope): - """Sets the business_scope of this RecognizeBusinessLicenseResultResponse. + """Sets the business_scope of this BusinessLicenseResultBody. 经营范围。 - :param business_scope: The business_scope of this RecognizeBusinessLicenseResultResponse. + :param business_scope: The business_scope of this BusinessLicenseResultBody. :type: str """ self._business_scope = business_scope @property def issue_date(self): - """Gets the issue_date of this RecognizeBusinessLicenseResultResponse. + """Gets the issue_date of this BusinessLicenseResultBody. 发照日期。 - :return: The issue_date of this RecognizeBusinessLicenseResultResponse. + :return: The issue_date of this BusinessLicenseResultBody. :rtype: str """ return self._issue_date @issue_date.setter def issue_date(self, issue_date): - """Sets the issue_date of this RecognizeBusinessLicenseResultResponse. + """Sets the issue_date of this BusinessLicenseResultBody. 发照日期。 - :param issue_date: The issue_date of this RecognizeBusinessLicenseResultResponse. + :param issue_date: The issue_date of this BusinessLicenseResultBody. :type: str """ self._issue_date = issue_date @property def confidence(self): - """Gets the confidence of this RecognizeBusinessLicenseResultResponse. + """Gets the confidence of this BusinessLicenseResultBody. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :return: The confidence of this RecognizeBusinessLicenseResultResponse. + :return: The confidence of this BusinessLicenseResultBody. :rtype: object """ return self._confidence @confidence.setter def confidence(self, confidence): - """Sets the confidence of this RecognizeBusinessLicenseResultResponse. + """Sets the confidence of this BusinessLicenseResultBody. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :param confidence: The confidence of this RecognizeBusinessLicenseResultResponse. + :param confidence: The confidence of this BusinessLicenseResultBody. :type: object """ self._confidence = confidence @@ -370,7 +370,7 @@ class RecognizeBusinessLicenseResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeBusinessLicenseResultResponse): + if not isinstance(other, BusinessLicenseResultBody): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_items_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/flight_itinerary_items_response.py similarity index 69% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_items_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/flight_itinerary_items_response.py index d31affc22..cb3f34cc6 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_items_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/flight_itinerary_items_response.py @@ -9,7 +9,7 @@ import six -class RecognizeFlightItineraryItemsResponse: +class FlightItineraryItemsResponse: """ @@ -51,7 +51,7 @@ class RecognizeFlightItineraryItemsResponse: } def __init__(self, departure_station=None, destination_station=None, carrier=None, flight=None, cabin_class=None, date=None, time=None, fare_basis=None, effective_date=None, expiry_date=None, baggage_allowance=None): - """RecognizeFlightItineraryItemsResponse - a model defined in huaweicloud sdk""" + """FlightItineraryItemsResponse - a model defined in huaweicloud sdk""" @@ -93,242 +93,242 @@ class RecognizeFlightItineraryItemsResponse: @property def departure_station(self): - """Gets the departure_station of this RecognizeFlightItineraryItemsResponse. + """Gets the departure_station of this FlightItineraryItemsResponse. 始发站。 - :return: The departure_station of this RecognizeFlightItineraryItemsResponse. + :return: The departure_station of this FlightItineraryItemsResponse. :rtype: str """ return self._departure_station @departure_station.setter def departure_station(self, departure_station): - """Sets the departure_station of this RecognizeFlightItineraryItemsResponse. + """Sets the departure_station of this FlightItineraryItemsResponse. 始发站。 - :param departure_station: The departure_station of this RecognizeFlightItineraryItemsResponse. + :param departure_station: The departure_station of this FlightItineraryItemsResponse. :type: str """ self._departure_station = departure_station @property def destination_station(self): - """Gets the destination_station of this RecognizeFlightItineraryItemsResponse. + """Gets the destination_station of this FlightItineraryItemsResponse. 目的站。 - :return: The destination_station of this RecognizeFlightItineraryItemsResponse. + :return: The destination_station of this FlightItineraryItemsResponse. :rtype: str """ return self._destination_station @destination_station.setter def destination_station(self, destination_station): - """Sets the destination_station of this RecognizeFlightItineraryItemsResponse. + """Sets the destination_station of this FlightItineraryItemsResponse. 目的站。 - :param destination_station: The destination_station of this RecognizeFlightItineraryItemsResponse. + :param destination_station: The destination_station of this FlightItineraryItemsResponse. :type: str """ self._destination_station = destination_station @property def carrier(self): - """Gets the carrier of this RecognizeFlightItineraryItemsResponse. + """Gets the carrier of this FlightItineraryItemsResponse. 承运人。 - :return: The carrier of this RecognizeFlightItineraryItemsResponse. + :return: The carrier of this FlightItineraryItemsResponse. :rtype: str """ return self._carrier @carrier.setter def carrier(self, carrier): - """Sets the carrier of this RecognizeFlightItineraryItemsResponse. + """Sets the carrier of this FlightItineraryItemsResponse. 承运人。 - :param carrier: The carrier of this RecognizeFlightItineraryItemsResponse. + :param carrier: The carrier of this FlightItineraryItemsResponse. :type: str """ self._carrier = carrier @property def flight(self): - """Gets the flight of this RecognizeFlightItineraryItemsResponse. + """Gets the flight of this FlightItineraryItemsResponse. 航班号。 - :return: The flight of this RecognizeFlightItineraryItemsResponse. + :return: The flight of this FlightItineraryItemsResponse. :rtype: str """ return self._flight @flight.setter def flight(self, flight): - """Sets the flight of this RecognizeFlightItineraryItemsResponse. + """Sets the flight of this FlightItineraryItemsResponse. 航班号。 - :param flight: The flight of this RecognizeFlightItineraryItemsResponse. + :param flight: The flight of this FlightItineraryItemsResponse. :type: str """ self._flight = flight @property def cabin_class(self): - """Gets the cabin_class of this RecognizeFlightItineraryItemsResponse. + """Gets the cabin_class of this FlightItineraryItemsResponse. 座位等级。 - :return: The cabin_class of this RecognizeFlightItineraryItemsResponse. + :return: The cabin_class of this FlightItineraryItemsResponse. :rtype: str """ return self._cabin_class @cabin_class.setter def cabin_class(self, cabin_class): - """Sets the cabin_class of this RecognizeFlightItineraryItemsResponse. + """Sets the cabin_class of this FlightItineraryItemsResponse. 座位等级。 - :param cabin_class: The cabin_class of this RecognizeFlightItineraryItemsResponse. + :param cabin_class: The cabin_class of this FlightItineraryItemsResponse. :type: str """ self._cabin_class = cabin_class @property def date(self): - """Gets the date of this RecognizeFlightItineraryItemsResponse. + """Gets the date of this FlightItineraryItemsResponse. 日期。 - :return: The date of this RecognizeFlightItineraryItemsResponse. + :return: The date of this FlightItineraryItemsResponse. :rtype: str """ return self._date @date.setter def date(self, date): - """Sets the date of this RecognizeFlightItineraryItemsResponse. + """Sets the date of this FlightItineraryItemsResponse. 日期。 - :param date: The date of this RecognizeFlightItineraryItemsResponse. + :param date: The date of this FlightItineraryItemsResponse. :type: str """ self._date = date @property def time(self): - """Gets the time of this RecognizeFlightItineraryItemsResponse. + """Gets the time of this FlightItineraryItemsResponse. 时间。 - :return: The time of this RecognizeFlightItineraryItemsResponse. + :return: The time of this FlightItineraryItemsResponse. :rtype: str """ return self._time @time.setter def time(self, time): - """Sets the time of this RecognizeFlightItineraryItemsResponse. + """Sets the time of this FlightItineraryItemsResponse. 时间。 - :param time: The time of this RecognizeFlightItineraryItemsResponse. + :param time: The time of this FlightItineraryItemsResponse. :type: str """ self._time = time @property def fare_basis(self): - """Gets the fare_basis of this RecognizeFlightItineraryItemsResponse. + """Gets the fare_basis of this FlightItineraryItemsResponse. 客票类别。 - :return: The fare_basis of this RecognizeFlightItineraryItemsResponse. + :return: The fare_basis of this FlightItineraryItemsResponse. :rtype: str """ return self._fare_basis @fare_basis.setter def fare_basis(self, fare_basis): - """Sets the fare_basis of this RecognizeFlightItineraryItemsResponse. + """Sets the fare_basis of this FlightItineraryItemsResponse. 客票类别。 - :param fare_basis: The fare_basis of this RecognizeFlightItineraryItemsResponse. + :param fare_basis: The fare_basis of this FlightItineraryItemsResponse. :type: str """ self._fare_basis = fare_basis @property def effective_date(self): - """Gets the effective_date of this RecognizeFlightItineraryItemsResponse. + """Gets the effective_date of this FlightItineraryItemsResponse. 客票生效日期。 - :return: The effective_date of this RecognizeFlightItineraryItemsResponse. + :return: The effective_date of this FlightItineraryItemsResponse. :rtype: str """ return self._effective_date @effective_date.setter def effective_date(self, effective_date): - """Sets the effective_date of this RecognizeFlightItineraryItemsResponse. + """Sets the effective_date of this FlightItineraryItemsResponse. 客票生效日期。 - :param effective_date: The effective_date of this RecognizeFlightItineraryItemsResponse. + :param effective_date: The effective_date of this FlightItineraryItemsResponse. :type: str """ self._effective_date = effective_date @property def expiry_date(self): - """Gets the expiry_date of this RecognizeFlightItineraryItemsResponse. + """Gets the expiry_date of this FlightItineraryItemsResponse. 有效截止日期。 - :return: The expiry_date of this RecognizeFlightItineraryItemsResponse. + :return: The expiry_date of this FlightItineraryItemsResponse. :rtype: str """ return self._expiry_date @expiry_date.setter def expiry_date(self, expiry_date): - """Sets the expiry_date of this RecognizeFlightItineraryItemsResponse. + """Sets the expiry_date of this FlightItineraryItemsResponse. 有效截止日期。 - :param expiry_date: The expiry_date of this RecognizeFlightItineraryItemsResponse. + :param expiry_date: The expiry_date of this FlightItineraryItemsResponse. :type: str """ self._expiry_date = expiry_date @property def baggage_allowance(self): - """Gets the baggage_allowance of this RecognizeFlightItineraryItemsResponse. + """Gets the baggage_allowance of this FlightItineraryItemsResponse. 免费行李。 - :return: The baggage_allowance of this RecognizeFlightItineraryItemsResponse. + :return: The baggage_allowance of this FlightItineraryItemsResponse. :rtype: str """ return self._baggage_allowance @baggage_allowance.setter def baggage_allowance(self, baggage_allowance): - """Sets the baggage_allowance of this RecognizeFlightItineraryItemsResponse. + """Sets the baggage_allowance of this FlightItineraryItemsResponse. 免费行李。 - :param baggage_allowance: The baggage_allowance of this RecognizeFlightItineraryItemsResponse. + :param baggage_allowance: The baggage_allowance of this FlightItineraryItemsResponse. :type: str """ self._baggage_allowance = baggage_allowance @@ -370,7 +370,7 @@ class RecognizeFlightItineraryItemsResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeFlightItineraryItemsResponse): + if not isinstance(other, FlightItineraryItemsResponse): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/flight_itinerary_req.py similarity index 85% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_request_body.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/flight_itinerary_req.py index e1cc57520..9711b9c01 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/flight_itinerary_req.py @@ -9,7 +9,7 @@ import six -class RecognizeBankcardRequestBody: +class FlightItineraryReq: """ @@ -33,7 +33,7 @@ class RecognizeBankcardRequestBody: } def __init__(self, url=None, image=None): - """RecognizeBankcardRequestBody - a model defined in huaweicloud sdk""" + """FlightItineraryReq - a model defined in huaweicloud sdk""" @@ -48,44 +48,44 @@ class RecognizeBankcardRequestBody: @property def url(self): - """Gets the url of this RecognizeBankcardRequestBody. + """Gets the url of this FlightItineraryReq. 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - :return: The url of this RecognizeBankcardRequestBody. + :return: The url of this FlightItineraryReq. :rtype: str """ return self._url @url.setter def url(self, url): - """Sets the url of this RecognizeBankcardRequestBody. + """Sets the url of this FlightItineraryReq. 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - :param url: The url of this RecognizeBankcardRequestBody. + :param url: The url of this FlightItineraryReq. :type: str """ self._url = url @property def image(self): - """Gets the image of this RecognizeBankcardRequestBody. + """Gets the image of this FlightItineraryReq. 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :return: The image of this RecognizeBankcardRequestBody. + :return: The image of this FlightItineraryReq. :rtype: str """ return self._image @image.setter def image(self, image): - """Sets the image of this RecognizeBankcardRequestBody. + """Sets the image of this FlightItineraryReq. 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :param image: The image of this RecognizeBankcardRequestBody. + :param image: The image of this FlightItineraryReq. :type: str """ self._image = image @@ -127,7 +127,7 @@ class RecognizeBankcardRequestBody: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeBankcardRequestBody): + if not isinstance(other, FlightItineraryReq): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/flight_itinerary_response_body_item.py similarity index 65% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/flight_itinerary_response_body_item.py index 089e011f1..e136af993 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/flight_itinerary_response_body_item.py @@ -9,7 +9,7 @@ import six -class RecognizeFlightItineraryResultResponse: +class FlightItineraryResponseBodyItem: """ @@ -40,7 +40,7 @@ class RecognizeFlightItineraryResultResponse: 'agent_code': 'str', 'issue_organization': 'str', 'issue_date': 'str', - 'itinerary_list': 'list[RecognizeFlightItineraryItemsResponse]', + 'itinerary_list': 'list[FlightItineraryItemsResponse]', 'confidence': 'object' } @@ -67,7 +67,7 @@ class RecognizeFlightItineraryResultResponse: } def __init__(self, serial_number=None, passenger_name=None, id_number=None, endorsements_restrictions=None, order_number=None, fare=None, caac_development_fund=None, fuel_surcharge=None, other_taxes=None, total=None, e_ticket_number=None, check_code=None, reference_information=None, insurance=None, agent_code=None, issue_organization=None, issue_date=None, itinerary_list=None, confidence=None): - """RecognizeFlightItineraryResultResponse - a model defined in huaweicloud sdk""" + """FlightItineraryResponseBodyItem - a model defined in huaweicloud sdk""" @@ -133,418 +133,418 @@ class RecognizeFlightItineraryResultResponse: @property def serial_number(self): - """Gets the serial_number of this RecognizeFlightItineraryResultResponse. + """Gets the serial_number of this FlightItineraryResponseBodyItem. 印刷序号。 - :return: The serial_number of this RecognizeFlightItineraryResultResponse. + :return: The serial_number of this FlightItineraryResponseBodyItem. :rtype: str """ return self._serial_number @serial_number.setter def serial_number(self, serial_number): - """Sets the serial_number of this RecognizeFlightItineraryResultResponse. + """Sets the serial_number of this FlightItineraryResponseBodyItem. 印刷序号。 - :param serial_number: The serial_number of this RecognizeFlightItineraryResultResponse. + :param serial_number: The serial_number of this FlightItineraryResponseBodyItem. :type: str """ self._serial_number = serial_number @property def passenger_name(self): - """Gets the passenger_name of this RecognizeFlightItineraryResultResponse. + """Gets the passenger_name of this FlightItineraryResponseBodyItem. 旅客姓名。 - :return: The passenger_name of this RecognizeFlightItineraryResultResponse. + :return: The passenger_name of this FlightItineraryResponseBodyItem. :rtype: str """ return self._passenger_name @passenger_name.setter def passenger_name(self, passenger_name): - """Sets the passenger_name of this RecognizeFlightItineraryResultResponse. + """Sets the passenger_name of this FlightItineraryResponseBodyItem. 旅客姓名。 - :param passenger_name: The passenger_name of this RecognizeFlightItineraryResultResponse. + :param passenger_name: The passenger_name of this FlightItineraryResponseBodyItem. :type: str """ self._passenger_name = passenger_name @property def id_number(self): - """Gets the id_number of this RecognizeFlightItineraryResultResponse. + """Gets the id_number of this FlightItineraryResponseBodyItem. 有效身份证件号码。 - :return: The id_number of this RecognizeFlightItineraryResultResponse. + :return: The id_number of this FlightItineraryResponseBodyItem. :rtype: str """ return self._id_number @id_number.setter def id_number(self, id_number): - """Sets the id_number of this RecognizeFlightItineraryResultResponse. + """Sets the id_number of this FlightItineraryResponseBodyItem. 有效身份证件号码。 - :param id_number: The id_number of this RecognizeFlightItineraryResultResponse. + :param id_number: The id_number of this FlightItineraryResponseBodyItem. :type: str """ self._id_number = id_number @property def endorsements_restrictions(self): - """Gets the endorsements_restrictions of this RecognizeFlightItineraryResultResponse. + """Gets the endorsements_restrictions of this FlightItineraryResponseBodyItem. 备注。 - :return: The endorsements_restrictions of this RecognizeFlightItineraryResultResponse. + :return: The endorsements_restrictions of this FlightItineraryResponseBodyItem. :rtype: str """ return self._endorsements_restrictions @endorsements_restrictions.setter def endorsements_restrictions(self, endorsements_restrictions): - """Sets the endorsements_restrictions of this RecognizeFlightItineraryResultResponse. + """Sets the endorsements_restrictions of this FlightItineraryResponseBodyItem. 备注。 - :param endorsements_restrictions: The endorsements_restrictions of this RecognizeFlightItineraryResultResponse. + :param endorsements_restrictions: The endorsements_restrictions of this FlightItineraryResponseBodyItem. :type: str """ self._endorsements_restrictions = endorsements_restrictions @property def order_number(self): - """Gets the order_number of this RecognizeFlightItineraryResultResponse. + """Gets the order_number of this FlightItineraryResponseBodyItem. 订单号。 - :return: The order_number of this RecognizeFlightItineraryResultResponse. + :return: The order_number of this FlightItineraryResponseBodyItem. :rtype: str """ return self._order_number @order_number.setter def order_number(self, order_number): - """Sets the order_number of this RecognizeFlightItineraryResultResponse. + """Sets the order_number of this FlightItineraryResponseBodyItem. 订单号。 - :param order_number: The order_number of this RecognizeFlightItineraryResultResponse. + :param order_number: The order_number of this FlightItineraryResponseBodyItem. :type: str """ self._order_number = order_number @property def fare(self): - """Gets the fare of this RecognizeFlightItineraryResultResponse. + """Gets the fare of this FlightItineraryResponseBodyItem. 票价。 - :return: The fare of this RecognizeFlightItineraryResultResponse. + :return: The fare of this FlightItineraryResponseBodyItem. :rtype: str """ return self._fare @fare.setter def fare(self, fare): - """Sets the fare of this RecognizeFlightItineraryResultResponse. + """Sets the fare of this FlightItineraryResponseBodyItem. 票价。 - :param fare: The fare of this RecognizeFlightItineraryResultResponse. + :param fare: The fare of this FlightItineraryResponseBodyItem. :type: str """ self._fare = fare @property def caac_development_fund(self): - """Gets the caac_development_fund of this RecognizeFlightItineraryResultResponse. + """Gets the caac_development_fund of this FlightItineraryResponseBodyItem. 民航(CAAC)发展基金。 - :return: The caac_development_fund of this RecognizeFlightItineraryResultResponse. + :return: The caac_development_fund of this FlightItineraryResponseBodyItem. :rtype: str """ return self._caac_development_fund @caac_development_fund.setter def caac_development_fund(self, caac_development_fund): - """Sets the caac_development_fund of this RecognizeFlightItineraryResultResponse. + """Sets the caac_development_fund of this FlightItineraryResponseBodyItem. 民航(CAAC)发展基金。 - :param caac_development_fund: The caac_development_fund of this RecognizeFlightItineraryResultResponse. + :param caac_development_fund: The caac_development_fund of this FlightItineraryResponseBodyItem. :type: str """ self._caac_development_fund = caac_development_fund @property def fuel_surcharge(self): - """Gets the fuel_surcharge of this RecognizeFlightItineraryResultResponse. + """Gets the fuel_surcharge of this FlightItineraryResponseBodyItem. 燃油附加费。 - :return: The fuel_surcharge of this RecognizeFlightItineraryResultResponse. + :return: The fuel_surcharge of this FlightItineraryResponseBodyItem. :rtype: str """ return self._fuel_surcharge @fuel_surcharge.setter def fuel_surcharge(self, fuel_surcharge): - """Sets the fuel_surcharge of this RecognizeFlightItineraryResultResponse. + """Sets the fuel_surcharge of this FlightItineraryResponseBodyItem. 燃油附加费。 - :param fuel_surcharge: The fuel_surcharge of this RecognizeFlightItineraryResultResponse. + :param fuel_surcharge: The fuel_surcharge of this FlightItineraryResponseBodyItem. :type: str """ self._fuel_surcharge = fuel_surcharge @property def other_taxes(self): - """Gets the other_taxes of this RecognizeFlightItineraryResultResponse. + """Gets the other_taxes of this FlightItineraryResponseBodyItem. 其他税费。 - :return: The other_taxes of this RecognizeFlightItineraryResultResponse. + :return: The other_taxes of this FlightItineraryResponseBodyItem. :rtype: str """ return self._other_taxes @other_taxes.setter def other_taxes(self, other_taxes): - """Sets the other_taxes of this RecognizeFlightItineraryResultResponse. + """Sets the other_taxes of this FlightItineraryResponseBodyItem. 其他税费。 - :param other_taxes: The other_taxes of this RecognizeFlightItineraryResultResponse. + :param other_taxes: The other_taxes of this FlightItineraryResponseBodyItem. :type: str """ self._other_taxes = other_taxes @property def total(self): - """Gets the total of this RecognizeFlightItineraryResultResponse. + """Gets the total of this FlightItineraryResponseBodyItem. 合计。 - :return: The total of this RecognizeFlightItineraryResultResponse. + :return: The total of this FlightItineraryResponseBodyItem. :rtype: str """ return self._total @total.setter def total(self, total): - """Sets the total of this RecognizeFlightItineraryResultResponse. + """Sets the total of this FlightItineraryResponseBodyItem. 合计。 - :param total: The total of this RecognizeFlightItineraryResultResponse. + :param total: The total of this FlightItineraryResponseBodyItem. :type: str """ self._total = total @property def e_ticket_number(self): - """Gets the e_ticket_number of this RecognizeFlightItineraryResultResponse. + """Gets the e_ticket_number of this FlightItineraryResponseBodyItem. 电子客票号码。 - :return: The e_ticket_number of this RecognizeFlightItineraryResultResponse. + :return: The e_ticket_number of this FlightItineraryResponseBodyItem. :rtype: str """ return self._e_ticket_number @e_ticket_number.setter def e_ticket_number(self, e_ticket_number): - """Sets the e_ticket_number of this RecognizeFlightItineraryResultResponse. + """Sets the e_ticket_number of this FlightItineraryResponseBodyItem. 电子客票号码。 - :param e_ticket_number: The e_ticket_number of this RecognizeFlightItineraryResultResponse. + :param e_ticket_number: The e_ticket_number of this FlightItineraryResponseBodyItem. :type: str """ self._e_ticket_number = e_ticket_number @property def check_code(self): - """Gets the check_code of this RecognizeFlightItineraryResultResponse. + """Gets the check_code of this FlightItineraryResponseBodyItem. 验证码。 - :return: The check_code of this RecognizeFlightItineraryResultResponse. + :return: The check_code of this FlightItineraryResponseBodyItem. :rtype: str """ return self._check_code @check_code.setter def check_code(self, check_code): - """Sets the check_code of this RecognizeFlightItineraryResultResponse. + """Sets the check_code of this FlightItineraryResponseBodyItem. 验证码。 - :param check_code: The check_code of this RecognizeFlightItineraryResultResponse. + :param check_code: The check_code of this FlightItineraryResponseBodyItem. :type: str """ self._check_code = check_code @property def reference_information(self): - """Gets the reference_information of this RecognizeFlightItineraryResultResponse. + """Gets the reference_information of this FlightItineraryResponseBodyItem. 提示信息。 - :return: The reference_information of this RecognizeFlightItineraryResultResponse. + :return: The reference_information of this FlightItineraryResponseBodyItem. :rtype: str """ return self._reference_information @reference_information.setter def reference_information(self, reference_information): - """Sets the reference_information of this RecognizeFlightItineraryResultResponse. + """Sets the reference_information of this FlightItineraryResponseBodyItem. 提示信息。 - :param reference_information: The reference_information of this RecognizeFlightItineraryResultResponse. + :param reference_information: The reference_information of this FlightItineraryResponseBodyItem. :type: str """ self._reference_information = reference_information @property def insurance(self): - """Gets the insurance of this RecognizeFlightItineraryResultResponse. + """Gets the insurance of this FlightItineraryResponseBodyItem. 保险费。 - :return: The insurance of this RecognizeFlightItineraryResultResponse. + :return: The insurance of this FlightItineraryResponseBodyItem. :rtype: str """ return self._insurance @insurance.setter def insurance(self, insurance): - """Sets the insurance of this RecognizeFlightItineraryResultResponse. + """Sets the insurance of this FlightItineraryResponseBodyItem. 保险费。 - :param insurance: The insurance of this RecognizeFlightItineraryResultResponse. + :param insurance: The insurance of this FlightItineraryResponseBodyItem. :type: str """ self._insurance = insurance @property def agent_code(self): - """Gets the agent_code of this RecognizeFlightItineraryResultResponse. + """Gets the agent_code of this FlightItineraryResponseBodyItem. 销售单位代号。 - :return: The agent_code of this RecognizeFlightItineraryResultResponse. + :return: The agent_code of this FlightItineraryResponseBodyItem. :rtype: str """ return self._agent_code @agent_code.setter def agent_code(self, agent_code): - """Sets the agent_code of this RecognizeFlightItineraryResultResponse. + """Sets the agent_code of this FlightItineraryResponseBodyItem. 销售单位代号。 - :param agent_code: The agent_code of this RecognizeFlightItineraryResultResponse. + :param agent_code: The agent_code of this FlightItineraryResponseBodyItem. :type: str """ self._agent_code = agent_code @property def issue_organization(self): - """Gets the issue_organization of this RecognizeFlightItineraryResultResponse. + """Gets the issue_organization of this FlightItineraryResponseBodyItem. 填开单位。 - :return: The issue_organization of this RecognizeFlightItineraryResultResponse. + :return: The issue_organization of this FlightItineraryResponseBodyItem. :rtype: str """ return self._issue_organization @issue_organization.setter def issue_organization(self, issue_organization): - """Sets the issue_organization of this RecognizeFlightItineraryResultResponse. + """Sets the issue_organization of this FlightItineraryResponseBodyItem. 填开单位。 - :param issue_organization: The issue_organization of this RecognizeFlightItineraryResultResponse. + :param issue_organization: The issue_organization of this FlightItineraryResponseBodyItem. :type: str """ self._issue_organization = issue_organization @property def issue_date(self): - """Gets the issue_date of this RecognizeFlightItineraryResultResponse. + """Gets the issue_date of this FlightItineraryResponseBodyItem. 填开日期。 - :return: The issue_date of this RecognizeFlightItineraryResultResponse. + :return: The issue_date of this FlightItineraryResponseBodyItem. :rtype: str """ return self._issue_date @issue_date.setter def issue_date(self, issue_date): - """Sets the issue_date of this RecognizeFlightItineraryResultResponse. + """Sets the issue_date of this FlightItineraryResponseBodyItem. 填开日期。 - :param issue_date: The issue_date of this RecognizeFlightItineraryResultResponse. + :param issue_date: The issue_date of this FlightItineraryResponseBodyItem. :type: str """ self._issue_date = issue_date @property def itinerary_list(self): - """Gets the itinerary_list of this RecognizeFlightItineraryResultResponse. + """Gets the itinerary_list of this FlightItineraryResponseBodyItem. 机票行程列表。 - :return: The itinerary_list of this RecognizeFlightItineraryResultResponse. - :rtype: list[RecognizeFlightItineraryItemsResponse] + :return: The itinerary_list of this FlightItineraryResponseBodyItem. + :rtype: list[FlightItineraryItemsResponse] """ return self._itinerary_list @itinerary_list.setter def itinerary_list(self, itinerary_list): - """Sets the itinerary_list of this RecognizeFlightItineraryResultResponse. + """Sets the itinerary_list of this FlightItineraryResponseBodyItem. 机票行程列表。 - :param itinerary_list: The itinerary_list of this RecognizeFlightItineraryResultResponse. - :type: list[RecognizeFlightItineraryItemsResponse] + :param itinerary_list: The itinerary_list of this FlightItineraryResponseBodyItem. + :type: list[FlightItineraryItemsResponse] """ self._itinerary_list = itinerary_list @property def confidence(self): - """Gets the confidence of this RecognizeFlightItineraryResultResponse. + """Gets the confidence of this FlightItineraryResponseBodyItem. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :return: The confidence of this RecognizeFlightItineraryResultResponse. + :return: The confidence of this FlightItineraryResponseBodyItem. :rtype: object """ return self._confidence @confidence.setter def confidence(self, confidence): - """Sets the confidence of this RecognizeFlightItineraryResultResponse. + """Sets the confidence of this FlightItineraryResponseBodyItem. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :param confidence: The confidence of this RecognizeFlightItineraryResultResponse. + :param confidence: The confidence of this FlightItineraryResponseBodyItem. :type: object """ self._confidence = confidence @@ -586,7 +586,7 @@ class RecognizeFlightItineraryResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeFlightItineraryResultResponse): + if not isinstance(other, FlightItineraryResponseBodyItem): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_items_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/general_text_items_response.py similarity index 80% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_items_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/general_text_items_response.py index 561d2d721..80fb57053 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_items_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/general_text_items_response.py @@ -9,7 +9,7 @@ import six -class RecognizeGeneralTextItemsResponse: +class GeneralTextItemsResponse: """ @@ -33,7 +33,7 @@ class RecognizeGeneralTextItemsResponse: } def __init__(self, words=None, location=None): - """RecognizeGeneralTextItemsResponse - a model defined in huaweicloud sdk""" + """GeneralTextItemsResponse - a model defined in huaweicloud sdk""" @@ -46,44 +46,44 @@ class RecognizeGeneralTextItemsResponse: @property def words(self): - """Gets the words of this RecognizeGeneralTextItemsResponse. + """Gets the words of this GeneralTextItemsResponse. 文字块识别结果。 - :return: The words of this RecognizeGeneralTextItemsResponse. + :return: The words of this GeneralTextItemsResponse. :rtype: str """ return self._words @words.setter def words(self, words): - """Sets the words of this RecognizeGeneralTextItemsResponse. + """Sets the words of this GeneralTextItemsResponse. 文字块识别结果。 - :param words: The words of this RecognizeGeneralTextItemsResponse. + :param words: The words of this GeneralTextItemsResponse. :type: str """ self._words = words @property def location(self): - """Gets the location of this RecognizeGeneralTextItemsResponse. + """Gets the location of this GeneralTextItemsResponse. 文字块的区域位置信息,列表形式,包含文字区域四个顶点的二维坐标(x,y);坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - :return: The location of this RecognizeGeneralTextItemsResponse. + :return: The location of this GeneralTextItemsResponse. :rtype: list[int] """ return self._location @location.setter def location(self, location): - """Sets the location of this RecognizeGeneralTextItemsResponse. + """Sets the location of this GeneralTextItemsResponse. 文字块的区域位置信息,列表形式,包含文字区域四个顶点的二维坐标(x,y);坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - :param location: The location of this RecognizeGeneralTextItemsResponse. + :param location: The location of this GeneralTextItemsResponse. :type: list[int] """ self._location = location @@ -125,7 +125,7 @@ class RecognizeGeneralTextItemsResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeGeneralTextItemsResponse): + if not isinstance(other, GeneralTextItemsResponse): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/general_text_req.py similarity index 60% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_request_body.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/general_text_req.py index ad02da5c6..313f19d99 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/general_text_req.py @@ -9,7 +9,7 @@ import six -class RecognizeGeneralTextRequestBody: +class GeneralTextReq: """ @@ -23,123 +23,123 @@ class RecognizeGeneralTextRequestBody: sensitive_list = [] openapi_types = { - 'url': 'str', 'image': 'str', + 'url': 'str', 'detect_direction': 'bool', 'quick_mode': 'bool' } attribute_map = { - 'url': 'url', 'image': 'image', + 'url': 'url', 'detect_direction': 'detect_direction', 'quick_mode': 'quick_mode' } - def __init__(self, url=None, image=None, detect_direction=None, quick_mode=None): - """RecognizeGeneralTextRequestBody - a model defined in huaweicloud sdk""" + def __init__(self, image=None, url=None, detect_direction=None, quick_mode=None): + """GeneralTextReq - a model defined in huaweicloud sdk""" - self._url = None self._image = None + self._url = None self._detect_direction = None self._quick_mode = None self.discriminator = None - if url is not None: - self.url = url if image is not None: self.image = image + if url is not None: + self.url = url if detect_direction is not None: self.detect_direction = detect_direction if quick_mode is not None: self.quick_mode = quick_mode - @property - def url(self): - """Gets the url of this RecognizeGeneralTextRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :return: The url of this RecognizeGeneralTextRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeGeneralTextRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :param url: The url of this RecognizeGeneralTextRequestBody. - :type: str - """ - self._url = url - @property def image(self): - """Gets the image of this RecognizeGeneralTextRequestBody. + """Gets the image of this GeneralTextReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :return: The image of this RecognizeGeneralTextRequestBody. + :return: The image of this GeneralTextReq. :rtype: str """ return self._image @image.setter def image(self, image): - """Sets the image of this RecognizeGeneralTextRequestBody. + """Sets the image of this GeneralTextReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :param image: The image of this RecognizeGeneralTextRequestBody. + :param image: The image of this GeneralTextReq. :type: str """ self._image = image + @property + def url(self): + """Gets the url of this GeneralTextReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this GeneralTextReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this GeneralTextReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this GeneralTextReq. + :type: str + """ + self._url = url + @property def detect_direction(self): - """Gets the detect_direction of this RecognizeGeneralTextRequestBody. + """Gets the detect_direction of this GeneralTextReq. 图片朝向检测开关,可选值包括: - true:检测图片朝向; - false:不检测图片朝向。 > 说明: - 支持任意角度的图片朝向检测。未传入该参数时默认为false,即不检测图片朝向。 - :return: The detect_direction of this RecognizeGeneralTextRequestBody. + :return: The detect_direction of this GeneralTextReq. :rtype: bool """ return self._detect_direction @detect_direction.setter def detect_direction(self, detect_direction): - """Sets the detect_direction of this RecognizeGeneralTextRequestBody. + """Sets the detect_direction of this GeneralTextReq. 图片朝向检测开关,可选值包括: - true:检测图片朝向; - false:不检测图片朝向。 > 说明: - 支持任意角度的图片朝向检测。未传入该参数时默认为false,即不检测图片朝向。 - :param detect_direction: The detect_direction of this RecognizeGeneralTextRequestBody. + :param detect_direction: The detect_direction of this GeneralTextReq. :type: bool """ self._detect_direction = detect_direction @property def quick_mode(self): - """Gets the quick_mode of this RecognizeGeneralTextRequestBody. + """Gets the quick_mode of this GeneralTextReq. 快速模式开关,针对单行文字图片(要求图片只包含一行文字,且文字区域占比超过50%),打开时可以更快返回识别。可选值包括: - true:打开快速模式; - false:关闭快速模式。 > 说明: - 未传入该参数时默认为false,即关闭快速模式。 - :return: The quick_mode of this RecognizeGeneralTextRequestBody. + :return: The quick_mode of this GeneralTextReq. :rtype: bool """ return self._quick_mode @quick_mode.setter def quick_mode(self, quick_mode): - """Sets the quick_mode of this RecognizeGeneralTextRequestBody. + """Sets the quick_mode of this GeneralTextReq. 快速模式开关,针对单行文字图片(要求图片只包含一行文字,且文字区域占比超过50%),打开时可以更快返回识别。可选值包括: - true:打开快速模式; - false:关闭快速模式。 > 说明: - 未传入该参数时默认为false,即关闭快速模式。 - :param quick_mode: The quick_mode of this RecognizeGeneralTextRequestBody. + :param quick_mode: The quick_mode of this GeneralTextReq. :type: bool """ self._quick_mode = quick_mode @@ -181,7 +181,7 @@ class RecognizeGeneralTextRequestBody: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeGeneralTextRequestBody): + if not isinstance(other, GeneralTextReq): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/general_text_response_body_items.py similarity index 74% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/general_text_response_body_items.py index 46191bf21..62969c437 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/general_text_response_body_items.py @@ -9,7 +9,7 @@ import six -class RecognizeGeneralTextResultResponse: +class GeneralTextResponseBodyItems: """ @@ -25,7 +25,7 @@ class RecognizeGeneralTextResultResponse: openapi_types = { 'direction': 'int', 'words_block_count': 'int', - 'words_block_list': 'list[RecognizeGeneralTextItemsResponse]' + 'words_block_list': 'list[GeneralTextItemsResponse]' } attribute_map = { @@ -35,7 +35,7 @@ class RecognizeGeneralTextResultResponse: } def __init__(self, direction=None, words_block_count=None, words_block_list=None): - """RecognizeGeneralTextResultResponse - a model defined in huaweicloud sdk""" + """GeneralTextResponseBodyItems - a model defined in huaweicloud sdk""" @@ -50,67 +50,67 @@ class RecognizeGeneralTextResultResponse: @property def direction(self): - """Gets the direction of this RecognizeGeneralTextResultResponse. + """Gets the direction of this GeneralTextResponseBodyItems. 图片朝向,仅当detect_direction为true时,该字段有效。返回图片逆时针旋转角度,值区间为[0, 359]。当detect_direction为false时,该字段值为 -1。 - :return: The direction of this RecognizeGeneralTextResultResponse. + :return: The direction of this GeneralTextResponseBodyItems. :rtype: int """ return self._direction @direction.setter def direction(self, direction): - """Sets the direction of this RecognizeGeneralTextResultResponse. + """Sets the direction of this GeneralTextResponseBodyItems. 图片朝向,仅当detect_direction为true时,该字段有效。返回图片逆时针旋转角度,值区间为[0, 359]。当detect_direction为false时,该字段值为 -1。 - :param direction: The direction of this RecognizeGeneralTextResultResponse. + :param direction: The direction of this GeneralTextResponseBodyItems. :type: int """ self._direction = direction @property def words_block_count(self): - """Gets the words_block_count of this RecognizeGeneralTextResultResponse. + """Gets the words_block_count of this GeneralTextResponseBodyItems. 识别文字块数目。 - :return: The words_block_count of this RecognizeGeneralTextResultResponse. + :return: The words_block_count of this GeneralTextResponseBodyItems. :rtype: int """ return self._words_block_count @words_block_count.setter def words_block_count(self, words_block_count): - """Sets the words_block_count of this RecognizeGeneralTextResultResponse. + """Sets the words_block_count of this GeneralTextResponseBodyItems. 识别文字块数目。 - :param words_block_count: The words_block_count of this RecognizeGeneralTextResultResponse. + :param words_block_count: The words_block_count of this GeneralTextResponseBodyItems. :type: int """ self._words_block_count = words_block_count @property def words_block_list(self): - """Gets the words_block_list of this RecognizeGeneralTextResultResponse. + """Gets the words_block_list of this GeneralTextResponseBodyItems. 识别文字块列表,输出顺序从左到右,先上后下。 - :return: The words_block_list of this RecognizeGeneralTextResultResponse. - :rtype: list[RecognizeGeneralTextItemsResponse] + :return: The words_block_list of this GeneralTextResponseBodyItems. + :rtype: list[GeneralTextItemsResponse] """ return self._words_block_list @words_block_list.setter def words_block_list(self, words_block_list): - """Sets the words_block_list of this RecognizeGeneralTextResultResponse. + """Sets the words_block_list of this GeneralTextResponseBodyItems. 识别文字块列表,输出顺序从左到右,先上后下。 - :param words_block_list: The words_block_list of this RecognizeGeneralTextResultResponse. - :type: list[RecognizeGeneralTextItemsResponse] + :param words_block_list: The words_block_list of this GeneralTextResponseBodyItems. + :type: list[GeneralTextItemsResponse] """ self._words_block_list = words_block_list @@ -151,7 +151,7 @@ class RecognizeGeneralTextResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeGeneralTextResultResponse): + if not isinstance(other, GeneralTextResponseBodyItems): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items2_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items2_response.py new file mode 100644 index 000000000..a2ccdef76 --- /dev/null +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items2_response.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class HandwritingItems2Response: + + + """ + 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 = { + 'math_info': 'HandwritingItems3Response' + } + + attribute_map = { + 'math_info': 'math_info' + } + + def __init__(self, math_info=None): + """HandwritingItems2Response - a model defined in huaweicloud sdk""" + + + + self._math_info = None + self.discriminator = None + + if math_info is not None: + self.math_info = math_info + + @property + def math_info(self): + """Gets the math_info of this HandwritingItems2Response. + + + :return: The math_info of this HandwritingItems2Response. + :rtype: HandwritingItems3Response + """ + return self._math_info + + @math_info.setter + def math_info(self, math_info): + """Sets the math_info of this HandwritingItems2Response. + + + :param math_info: The math_info of this HandwritingItems2Response. + :type: HandwritingItems3Response + """ + self._math_info = math_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""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HandwritingItems2Response): + 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-ocr/huaweicloudsdkocr/v1/model/handwriting_items3_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items3_response.py new file mode 100644 index 000000000..e4f64df4e --- /dev/null +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items3_response.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class HandwritingItems3Response: + + + """ + 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 = { + 'question_number': 'str', + 'answer_block_count': 'int', + 'answer_block_list': 'list[HandwritingItems4Response]' + } + + attribute_map = { + 'question_number': 'question_number', + 'answer_block_count': 'answer_block_count', + 'answer_block_list': 'answer_block_list' + } + + def __init__(self, question_number=None, answer_block_count=None, answer_block_list=None): + """HandwritingItems3Response - a model defined in huaweicloud sdk""" + + + + self._question_number = None + self._answer_block_count = None + self._answer_block_list = None + self.discriminator = None + + if question_number is not None: + self.question_number = question_number + if answer_block_count is not None: + self.answer_block_count = answer_block_count + if answer_block_list is not None: + self.answer_block_list = answer_block_list + + @property + def question_number(self): + """Gets the question_number of this HandwritingItems3Response. + + 数学试卷返回结果,表示题号。 + + :return: The question_number of this HandwritingItems3Response. + :rtype: str + """ + return self._question_number + + @question_number.setter + def question_number(self, question_number): + """Sets the question_number of this HandwritingItems3Response. + + 数学试卷返回结果,表示题号。 + + :param question_number: The question_number of this HandwritingItems3Response. + :type: str + """ + self._question_number = question_number + + @property + def answer_block_count(self): + """Gets the answer_block_count of this HandwritingItems3Response. + + 数学试卷答案的文字块数目。 + + :return: The answer_block_count of this HandwritingItems3Response. + :rtype: int + """ + return self._answer_block_count + + @answer_block_count.setter + def answer_block_count(self, answer_block_count): + """Sets the answer_block_count of this HandwritingItems3Response. + + 数学试卷答案的文字块数目。 + + :param answer_block_count: The answer_block_count of this HandwritingItems3Response. + :type: int + """ + self._answer_block_count = answer_block_count + + @property + def answer_block_list(self): + """Gets the answer_block_list of this HandwritingItems3Response. + + 数学试卷答案识别文字块列表,输出顺序从左到右,从上到下。 + + :return: The answer_block_list of this HandwritingItems3Response. + :rtype: list[HandwritingItems4Response] + """ + return self._answer_block_list + + @answer_block_list.setter + def answer_block_list(self, answer_block_list): + """Sets the answer_block_list of this HandwritingItems3Response. + + 数学试卷答案识别文字块列表,输出顺序从左到右,从上到下。 + + :param answer_block_list: The answer_block_list of this HandwritingItems3Response. + :type: list[HandwritingItems4Response] + """ + self._answer_block_list = answer_block_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""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HandwritingItems3Response): + 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-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_words_list_items_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items4_response.py similarity index 63% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_words_list_items_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items4_response.py index 56c8a0abd..1492fd8c8 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_words_list_items_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items4_response.py @@ -9,7 +9,7 @@ import six -class RecognizeFinancialStatementWordsListItemsResponse: +class HandwritingItems4Response: """ @@ -35,7 +35,7 @@ class RecognizeFinancialStatementWordsListItemsResponse: } def __init__(self, words=None, confidence=None, location=None): - """RecognizeFinancialStatementWordsListItemsResponse - a model defined in huaweicloud sdk""" + """HandwritingItems4Response - a model defined in huaweicloud sdk""" @@ -50,66 +50,66 @@ class RecognizeFinancialStatementWordsListItemsResponse: @property def words(self): - """Gets the words of this RecognizeFinancialStatementWordsListItemsResponse. + """Gets the words of this HandwritingItems4Response. - 区域属性:文本或表格。 + 文字块识别结果。 - :return: The words of this RecognizeFinancialStatementWordsListItemsResponse. + :return: The words of this HandwritingItems4Response. :rtype: str """ return self._words @words.setter def words(self, words): - """Sets the words of this RecognizeFinancialStatementWordsListItemsResponse. + """Sets the words of this HandwritingItems4Response. - 区域属性:文本或表格。 + 文字块识别结果。 - :param words: The words of this RecognizeFinancialStatementWordsListItemsResponse. + :param words: The words of this HandwritingItems4Response. :type: str """ self._words = words @property def confidence(self): - """Gets the confidence of this RecognizeFinancialStatementWordsListItemsResponse. + """Gets the confidence of this HandwritingItems4Response. - 区域内文字块数目。对文本区,文字块以文本字段为单位;对表格区,文字块以单元格内所有字段为单位。 + 文字块words的置信度。 - :return: The confidence of this RecognizeFinancialStatementWordsListItemsResponse. + :return: The confidence of this HandwritingItems4Response. :rtype: float """ return self._confidence @confidence.setter def confidence(self, confidence): - """Sets the confidence of this RecognizeFinancialStatementWordsListItemsResponse. + """Sets the confidence of this HandwritingItems4Response. - 区域内文字块数目。对文本区,文字块以文本字段为单位;对表格区,文字块以单元格内所有字段为单位。 + 文字块words的置信度。 - :param confidence: The confidence of this RecognizeFinancialStatementWordsListItemsResponse. + :param confidence: The confidence of this HandwritingItems4Response. :type: float """ self._confidence = confidence @property def location(self): - """Gets the location of this RecognizeFinancialStatementWordsListItemsResponse. + """Gets the location of this HandwritingItems4Response. - 文字块信息。 + 文字块words的区域位置信息,列表形式,分别表示文字块顶点的x, y坐标;坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - :return: The location of this RecognizeFinancialStatementWordsListItemsResponse. + :return: The location of this HandwritingItems4Response. :rtype: list[int] """ return self._location @location.setter def location(self, location): - """Sets the location of this RecognizeFinancialStatementWordsListItemsResponse. + """Sets the location of this HandwritingItems4Response. - 文字块信息。 + 文字块words的区域位置信息,列表形式,分别表示文字块顶点的x, y坐标;坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - :param location: The location of this RecognizeFinancialStatementWordsListItemsResponse. + :param location: The location of this HandwritingItems4Response. :type: list[int] """ self._location = location @@ -151,7 +151,7 @@ class RecognizeFinancialStatementWordsListItemsResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeFinancialStatementWordsListItemsResponse): + if not isinstance(other, HandwritingItems4Response): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_items_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items_response.py similarity index 54% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_items_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items_response.py index dc5d8cb4c..e1e06e48a 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_items_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_items_response.py @@ -9,7 +9,7 @@ import six -class RecognizeHandwritingItemsResponse: +class HandwritingItemsResponse: """ @@ -25,121 +25,125 @@ class RecognizeHandwritingItemsResponse: openapi_types = { 'words': 'str', 'type': 'str', - 'location': 'list[int]', - 'confidence': 'object' + 'confidence': 'float', + 'location': 'list[int]' } attribute_map = { 'words': 'words', 'type': 'type', - 'location': 'location', - 'confidence': 'confidence' + 'confidence': 'confidence', + 'location': 'location' } - def __init__(self, words=None, type=None, location=None, confidence=None): - """RecognizeHandwritingItemsResponse - a model defined in huaweicloud sdk""" + def __init__(self, words=None, type=None, confidence=None, location=None): + """HandwritingItemsResponse - a model defined in huaweicloud sdk""" self._words = None self._type = None - self._location = None self._confidence = None + self._location = None self.discriminator = None - self.words = words - self.type = type - self.location = location - self.confidence = confidence + if words is not None: + self.words = words + if type is not None: + self.type = type + if confidence is not None: + self.confidence = confidence + if location is not None: + self.location = location @property def words(self): - """Gets the words of this RecognizeHandwritingItemsResponse. + """Gets the words of this HandwritingItemsResponse. 文字块识别结果。 - :return: The words of this RecognizeHandwritingItemsResponse. + :return: The words of this HandwritingItemsResponse. :rtype: str """ return self._words @words.setter def words(self, words): - """Sets the words of this RecognizeHandwritingItemsResponse. + """Sets the words of this HandwritingItemsResponse. 文字块识别结果。 - :param words: The words of this RecognizeHandwritingItemsResponse. + :param words: The words of this HandwritingItemsResponse. :type: str """ self._words = words @property def type(self): - """Gets the type of this RecognizeHandwritingItemsResponse. + """Gets the type of this HandwritingItemsResponse. 说明该识别结果所属类型,例如:handwriting。 - :return: The type of this RecognizeHandwritingItemsResponse. + :return: The type of this HandwritingItemsResponse. :rtype: str """ return self._type @type.setter def type(self, type): - """Sets the type of this RecognizeHandwritingItemsResponse. + """Sets the type of this HandwritingItemsResponse. 说明该识别结果所属类型,例如:handwriting。 - :param type: The type of this RecognizeHandwritingItemsResponse. + :param type: The type of this HandwritingItemsResponse. :type: str """ self._type = type + @property + def confidence(self): + """Gets the confidence of this HandwritingItemsResponse. + + 文字块words的置信度。 + + :return: The confidence of this HandwritingItemsResponse. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """Sets the confidence of this HandwritingItemsResponse. + + 文字块words的置信度。 + + :param confidence: The confidence of this HandwritingItemsResponse. + :type: float + """ + self._confidence = confidence + @property def location(self): - """Gets the location of this RecognizeHandwritingItemsResponse. + """Gets the location of this HandwritingItemsResponse. - 文字块“words”的区域位置信息,列表形式,分别表示文字块顶点的(x,y)坐标;坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 + 文字块words的区域位置信息,列表形式,分别表示文字块顶点的x, y坐标;坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - :return: The location of this RecognizeHandwritingItemsResponse. + :return: The location of this HandwritingItemsResponse. :rtype: list[int] """ return self._location @location.setter def location(self, location): - """Sets the location of this RecognizeHandwritingItemsResponse. + """Sets the location of this HandwritingItemsResponse. - 文字块“words”的区域位置信息,列表形式,分别表示文字块顶点的(x,y)坐标;坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 + 文字块words的区域位置信息,列表形式,分别表示文字块顶点的x, y坐标;坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - :param location: The location of this RecognizeHandwritingItemsResponse. + :param location: The location of this HandwritingItemsResponse. :type: list[int] """ self._location = location - @property - def confidence(self): - """Gets the confidence of this RecognizeHandwritingItemsResponse. - - 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - - :return: The confidence of this RecognizeHandwritingItemsResponse. - :rtype: object - """ - return self._confidence - - @confidence.setter - def confidence(self, confidence): - """Sets the confidence of this RecognizeHandwritingItemsResponse. - - 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - - :param confidence: The confidence of this RecognizeHandwritingItemsResponse. - :type: object - """ - self._confidence = confidence - def to_dict(self): """Returns the model properties as a dict""" result = {} @@ -177,7 +181,7 @@ class RecognizeHandwritingItemsResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeHandwritingItemsResponse): + if not isinstance(other, HandwritingItemsResponse): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_req.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_req.py new file mode 100644 index 000000000..3a5bfccae --- /dev/null +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_req.py @@ -0,0 +1,218 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class HandwritingReq: + + + """ + 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 = { + 'image': 'str', + 'url': 'str', + 'quick_mode': 'bool', + 'char_set': 'list[str]', + 'detect_direction': 'bool' + } + + attribute_map = { + 'image': 'image', + 'url': 'url', + 'quick_mode': 'quick_mode', + 'char_set': 'char_set', + 'detect_direction': 'detect_direction' + } + + def __init__(self, image=None, url=None, quick_mode=None, char_set=None, detect_direction=None): + """HandwritingReq - a model defined in huaweicloud sdk""" + + + + self._image = None + self._url = None + self._quick_mode = None + self._char_set = None + self._detect_direction = None + self.discriminator = None + + if image is not None: + self.image = image + if url is not None: + self.url = url + if quick_mode is not None: + self.quick_mode = quick_mode + if char_set is not None: + self.char_set = char_set + if detect_direction is not None: + self.detect_direction = detect_direction + + @property + def image(self): + """Gets the image of this HandwritingReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :return: The image of this HandwritingReq. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this HandwritingReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :param image: The image of this HandwritingReq. + :type: str + """ + self._image = image + + @property + def url(self): + """Gets the url of this HandwritingReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this HandwritingReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this HandwritingReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this HandwritingReq. + :type: str + """ + self._url = url + + @property + def quick_mode(self): + """Gets the quick_mode of this HandwritingReq. + + 快速模式开关,针对单行文字图片(要求图片只包含一行文字,且文字区域占比超过50%),打开时可以更快返回识别内容。可选值包括: - true:打开快速模式; - false:关闭快速模式。 > 说明: - 未传入该参数时默认为false,即关闭快速模式 + + :return: The quick_mode of this HandwritingReq. + :rtype: bool + """ + return self._quick_mode + + @quick_mode.setter + def quick_mode(self, quick_mode): + """Sets the quick_mode of this HandwritingReq. + + 快速模式开关,针对单行文字图片(要求图片只包含一行文字,且文字区域占比超过50%),打开时可以更快返回识别内容。可选值包括: - true:打开快速模式; - false:关闭快速模式。 > 说明: - 未传入该参数时默认为false,即关闭快速模式 + + :param quick_mode: The quick_mode of this HandwritingReq. + :type: bool + """ + self._quick_mode = quick_mode + + @property + def char_set(self): + """Gets the char_set of this HandwritingReq. + + 字符集设置,用户可以根据实际需要限定输出字符集范围。可选值包括: + + :return: The char_set of this HandwritingReq. + :rtype: list[str] + """ + return self._char_set + + @char_set.setter + def char_set(self, char_set): + """Sets the char_set of this HandwritingReq. + + 字符集设置,用户可以根据实际需要限定输出字符集范围。可选值包括: + + :param char_set: The char_set of this HandwritingReq. + :type: list[str] + """ + self._char_set = char_set + + @property + def detect_direction(self): + """Gets the detect_direction of this HandwritingReq. + + 为Boolean类型,若不传该字段,默认不检测图像倾斜角度文字方向,为True时,支持任意角度的旋转倾斜(建议在场景内有大量倾斜图片时才开启以减少性能损失)。 + + :return: The detect_direction of this HandwritingReq. + :rtype: bool + """ + return self._detect_direction + + @detect_direction.setter + def detect_direction(self, detect_direction): + """Sets the detect_direction of this HandwritingReq. + + 为Boolean类型,若不传该字段,默认不检测图像倾斜角度文字方向,为True时,支持任意角度的旋转倾斜(建议在场景内有大量倾斜图片时才开启以减少性能损失)。 + + :param detect_direction: The detect_direction of this HandwritingReq. + :type: bool + """ + self._detect_direction = detect_direction + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, HandwritingReq): + 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-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_response_body_item.py similarity index 59% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_response_body_item.py index e69e4bcdd..e67e25f05 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/handwriting_response_body_item.py @@ -9,7 +9,7 @@ import six -class RecognizeHandwritingResultResponse: +class HandwritingResponseBodyItem: """ @@ -24,70 +24,95 @@ class RecognizeHandwritingResultResponse: openapi_types = { 'words_block_count': 'int', - 'words_block_list': 'list[RecognizeHandwritingItemsResponse]' + 'words_block_list': 'list[HandwritingItemsResponse]', + 'extracted_data': 'HandwritingItems2Response' } attribute_map = { 'words_block_count': 'words_block_count', - 'words_block_list': 'words_block_list' + 'words_block_list': 'words_block_list', + 'extracted_data': 'extracted_data' } - def __init__(self, words_block_count=None, words_block_list=None): - """RecognizeHandwritingResultResponse - a model defined in huaweicloud sdk""" + def __init__(self, words_block_count=None, words_block_list=None, extracted_data=None): + """HandwritingResponseBodyItem - a model defined in huaweicloud sdk""" self._words_block_count = None self._words_block_list = None + self._extracted_data = None self.discriminator = None self.words_block_count = words_block_count self.words_block_list = words_block_list + if extracted_data is not None: + self.extracted_data = extracted_data @property def words_block_count(self): - """Gets the words_block_count of this RecognizeHandwritingResultResponse. + """Gets the words_block_count of this HandwritingResponseBodyItem. - 代表检测识别出来的文字块数目。 + 代表检测识别出来的文字块数目。 \"segment_digit\" 和\"segment\"默认为1。 - :return: The words_block_count of this RecognizeHandwritingResultResponse. + :return: The words_block_count of this HandwritingResponseBodyItem. :rtype: int """ return self._words_block_count @words_block_count.setter def words_block_count(self, words_block_count): - """Sets the words_block_count of this RecognizeHandwritingResultResponse. + """Sets the words_block_count of this HandwritingResponseBodyItem. - 代表检测识别出来的文字块数目。 + 代表检测识别出来的文字块数目。 \"segment_digit\" 和\"segment\"默认为1。 - :param words_block_count: The words_block_count of this RecognizeHandwritingResultResponse. + :param words_block_count: The words_block_count of this HandwritingResponseBodyItem. :type: int """ self._words_block_count = words_block_count @property def words_block_list(self): - """Gets the words_block_list of this RecognizeHandwritingResultResponse. + """Gets the words_block_list of this HandwritingResponseBodyItem. 识别文字块列表,输出顺序从左到右,从上到下。 - :return: The words_block_list of this RecognizeHandwritingResultResponse. - :rtype: list[RecognizeHandwritingItemsResponse] + :return: The words_block_list of this HandwritingResponseBodyItem. + :rtype: list[HandwritingItemsResponse] """ return self._words_block_list @words_block_list.setter def words_block_list(self, words_block_list): - """Sets the words_block_list of this RecognizeHandwritingResultResponse. + """Sets the words_block_list of this HandwritingResponseBodyItem. 识别文字块列表,输出顺序从左到右,从上到下。 - :param words_block_list: The words_block_list of this RecognizeHandwritingResultResponse. - :type: list[RecognizeHandwritingItemsResponse] + :param words_block_list: The words_block_list of this HandwritingResponseBodyItem. + :type: list[HandwritingItemsResponse] """ self._words_block_list = words_block_list + @property + def extracted_data(self): + """Gets the extracted_data of this HandwritingResponseBodyItem. + + + :return: The extracted_data of this HandwritingResponseBodyItem. + :rtype: HandwritingItems2Response + """ + return self._extracted_data + + @extracted_data.setter + def extracted_data(self, extracted_data): + """Sets the extracted_data of this HandwritingResponseBodyItem. + + + :param extracted_data: The extracted_data of this HandwritingResponseBodyItem. + :type: HandwritingItems2Response + """ + self._extracted_data = extracted_data + def to_dict(self): """Returns the model properties as a dict""" result = {} @@ -125,7 +150,7 @@ class RecognizeHandwritingResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeHandwritingResultResponse): + if not isinstance(other, HandwritingResponseBodyItem): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/id_card_req.py similarity index 50% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_request_body.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/id_card_req.py index fdf112284..d5f50cb99 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/id_card_req.py @@ -9,7 +9,7 @@ import six -class RecognizeTaxiInvoiceRequestBody: +class IDCardReq: """ @@ -23,73 +23,100 @@ class RecognizeTaxiInvoiceRequestBody: sensitive_list = [] openapi_types = { + 'image': 'str', 'url': 'str', - 'image': 'str' + 'side': 'str' } attribute_map = { + 'image': 'image', 'url': 'url', - 'image': 'image' + 'side': 'side' } - def __init__(self, url=None, image=None): - """RecognizeTaxiInvoiceRequestBody - a model defined in huaweicloud sdk""" + def __init__(self, image=None, url=None, side=None): + """IDCardReq - a model defined in huaweicloud sdk""" - self._url = None self._image = None + self._url = None + self._side = None self.discriminator = None - if url is not None: - self.url = url if image is not None: self.image = image - - @property - def url(self): - """Gets the url of this RecognizeTaxiInvoiceRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :return: The url of this RecognizeTaxiInvoiceRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeTaxiInvoiceRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :param url: The url of this RecognizeTaxiInvoiceRequestBody. - :type: str - """ - self._url = url + if url is not None: + self.url = url + if side is not None: + self.side = side @property def image(self): - """Gets the image of this RecognizeTaxiInvoiceRequestBody. + """Gets the image of this IDCardReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :return: The image of this RecognizeTaxiInvoiceRequestBody. + :return: The image of this IDCardReq. :rtype: str """ return self._image @image.setter def image(self, image): - """Sets the image of this RecognizeTaxiInvoiceRequestBody. + """Sets the image of this IDCardReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :param image: The image of this RecognizeTaxiInvoiceRequestBody. + :param image: The image of this IDCardReq. :type: str """ self._image = image + @property + def url(self): + """Gets the url of this IDCardReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this IDCardReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this IDCardReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this IDCardReq. + :type: str + """ + self._url = url + + @property + def side(self): + """Gets the side of this IDCardReq. + + - front:身份证正面。 - back:身份证背面。 > 说明: 如果参数值为空或无该参数,系统自动识别,建议填写,准确率更高。 + + :return: The side of this IDCardReq. + :rtype: str + """ + return self._side + + @side.setter + def side(self, side): + """Sets the side of this IDCardReq. + + - front:身份证正面。 - back:身份证背面。 > 说明: 如果参数值为空或无该参数,系统自动识别,建议填写,准确率更高。 + + :param side: The side of this IDCardReq. + :type: str + """ + self._side = side + def to_dict(self): """Returns the model properties as a dict""" result = {} @@ -127,7 +154,7 @@ class RecognizeTaxiInvoiceRequestBody: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeTaxiInvoiceRequestBody): + if not isinstance(other, IDCardReq): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/id_card_result_body.py similarity index 66% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/id_card_result_body.py index 863e4e0e3..3e41b393d 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/id_card_result_body.py @@ -9,7 +9,7 @@ import six -class RecognizeIdCardResultResponse: +class IDCardResultBody: """ @@ -47,7 +47,7 @@ class RecognizeIdCardResultResponse: } def __init__(self, name=None, sex=None, birth=None, ethnicity=None, address=None, number=None, issue=None, valid_from=None, valid_to=None): - """RecognizeIdCardResultResponse - a model defined in huaweicloud sdk""" + """IDCardResultBody - a model defined in huaweicloud sdk""" @@ -83,198 +83,198 @@ class RecognizeIdCardResultResponse: @property def name(self): - """Gets the name of this RecognizeIdCardResultResponse. + """Gets the name of this IDCardResultBody. 姓名。 - :return: The name of this RecognizeIdCardResultResponse. + :return: The name of this IDCardResultBody. :rtype: str """ return self._name @name.setter def name(self, name): - """Sets the name of this RecognizeIdCardResultResponse. + """Sets the name of this IDCardResultBody. 姓名。 - :param name: The name of this RecognizeIdCardResultResponse. + :param name: The name of this IDCardResultBody. :type: str """ self._name = name @property def sex(self): - """Gets the sex of this RecognizeIdCardResultResponse. + """Gets the sex of this IDCardResultBody. 性别。 - :return: The sex of this RecognizeIdCardResultResponse. + :return: The sex of this IDCardResultBody. :rtype: str """ return self._sex @sex.setter def sex(self, sex): - """Sets the sex of this RecognizeIdCardResultResponse. + """Sets the sex of this IDCardResultBody. 性别。 - :param sex: The sex of this RecognizeIdCardResultResponse. + :param sex: The sex of this IDCardResultBody. :type: str """ self._sex = sex @property def birth(self): - """Gets the birth of this RecognizeIdCardResultResponse. + """Gets the birth of this IDCardResultBody. 出生日期。 - :return: The birth of this RecognizeIdCardResultResponse. + :return: The birth of this IDCardResultBody. :rtype: str """ return self._birth @birth.setter def birth(self, birth): - """Sets the birth of this RecognizeIdCardResultResponse. + """Sets the birth of this IDCardResultBody. 出生日期。 - :param birth: The birth of this RecognizeIdCardResultResponse. + :param birth: The birth of this IDCardResultBody. :type: str """ self._birth = birth @property def ethnicity(self): - """Gets the ethnicity of this RecognizeIdCardResultResponse. + """Gets the ethnicity of this IDCardResultBody. 民族。 - :return: The ethnicity of this RecognizeIdCardResultResponse. + :return: The ethnicity of this IDCardResultBody. :rtype: str """ return self._ethnicity @ethnicity.setter def ethnicity(self, ethnicity): - """Sets the ethnicity of this RecognizeIdCardResultResponse. + """Sets the ethnicity of this IDCardResultBody. 民族。 - :param ethnicity: The ethnicity of this RecognizeIdCardResultResponse. + :param ethnicity: The ethnicity of this IDCardResultBody. :type: str """ self._ethnicity = ethnicity @property def address(self): - """Gets the address of this RecognizeIdCardResultResponse. + """Gets the address of this IDCardResultBody. 地址。 - :return: The address of this RecognizeIdCardResultResponse. + :return: The address of this IDCardResultBody. :rtype: str """ return self._address @address.setter def address(self, address): - """Sets the address of this RecognizeIdCardResultResponse. + """Sets the address of this IDCardResultBody. 地址。 - :param address: The address of this RecognizeIdCardResultResponse. + :param address: The address of this IDCardResultBody. :type: str """ self._address = address @property def number(self): - """Gets the number of this RecognizeIdCardResultResponse. + """Gets the number of this IDCardResultBody. 身份证号。 - :return: The number of this RecognizeIdCardResultResponse. + :return: The number of this IDCardResultBody. :rtype: str """ return self._number @number.setter def number(self, number): - """Sets the number of this RecognizeIdCardResultResponse. + """Sets the number of this IDCardResultBody. 身份证号。 - :param number: The number of this RecognizeIdCardResultResponse. + :param number: The number of this IDCardResultBody. :type: str """ self._number = number @property def issue(self): - """Gets the issue of this RecognizeIdCardResultResponse. + """Gets the issue of this IDCardResultBody. 发证机关。 - :return: The issue of this RecognizeIdCardResultResponse. + :return: The issue of this IDCardResultBody. :rtype: str """ return self._issue @issue.setter def issue(self, issue): - """Sets the issue of this RecognizeIdCardResultResponse. + """Sets the issue of this IDCardResultBody. 发证机关。 - :param issue: The issue of this RecognizeIdCardResultResponse. + :param issue: The issue of this IDCardResultBody. :type: str """ self._issue = issue @property def valid_from(self): - """Gets the valid_from of this RecognizeIdCardResultResponse. + """Gets the valid_from of this IDCardResultBody. 有效起始日期。 - :return: The valid_from of this RecognizeIdCardResultResponse. + :return: The valid_from of this IDCardResultBody. :rtype: str """ return self._valid_from @valid_from.setter def valid_from(self, valid_from): - """Sets the valid_from of this RecognizeIdCardResultResponse. + """Sets the valid_from of this IDCardResultBody. 有效起始日期。 - :param valid_from: The valid_from of this RecognizeIdCardResultResponse. + :param valid_from: The valid_from of this IDCardResultBody. :type: str """ self._valid_from = valid_from @property def valid_to(self): - """Gets the valid_to of this RecognizeIdCardResultResponse. + """Gets the valid_to of this IDCardResultBody. - 有效结束日期。 > 说明: - 身份证识别只支持中国大陆汉族身份证识别。 + 有效结束日期。 > 说明: - 身份证识别只支持中国大陆汉族身份证识别。 - :return: The valid_to of this RecognizeIdCardResultResponse. + :return: The valid_to of this IDCardResultBody. :rtype: str """ return self._valid_to @valid_to.setter def valid_to(self, valid_to): - """Sets the valid_to of this RecognizeIdCardResultResponse. + """Sets the valid_to of this IDCardResultBody. - 有效结束日期。 > 说明: - 身份证识别只支持中国大陆汉族身份证识别。 + 有效结束日期。 > 说明: - 身份证识别只支持中国大陆汉族身份证识别。 - :param valid_to: The valid_to of this RecognizeIdCardResultResponse. + :param valid_to: The valid_to of this IDCardResultBody. :type: str """ self._valid_to = valid_to @@ -316,7 +316,7 @@ class RecognizeIdCardResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeIdCardResultResponse): + if not isinstance(other, IDCardResultBody): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/license_plate_req.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/license_plate_req.py new file mode 100644 index 000000000..cf05688b2 --- /dev/null +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/license_plate_req.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class LicensePlateReq: + + + """ + 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 = { + 'image': 'str', + 'url': 'str' + } + + attribute_map = { + 'image': 'image', + 'url': 'url' + } + + def __init__(self, image=None, url=None): + """LicensePlateReq - a model defined in huaweicloud sdk""" + + + + self._image = None + self._url = None + self.discriminator = None + + if image is not None: + self.image = image + if url is not None: + self.url = url + + @property + def image(self): + """Gets the image of this LicensePlateReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :return: The image of this LicensePlateReq. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this LicensePlateReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :param image: The image of this LicensePlateReq. + :type: str + """ + self._image = image + + @property + def url(self): + """Gets the url of this LicensePlateReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this LicensePlateReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this LicensePlateReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this LicensePlateReq. + :type: str + """ + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LicensePlateReq): + 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-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_result_items_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/license_plate_response_body_item.py similarity index 65% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_result_items_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/license_plate_response_body_item.py index 72434fe9c..db7acc4f8 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_result_items_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/license_plate_response_body_item.py @@ -9,7 +9,7 @@ import six -class RecognizeLicensePlateResultItemsResponse: +class LicensePlateResponseBodyItem: """ @@ -25,121 +25,121 @@ class RecognizeLicensePlateResultItemsResponse: openapi_types = { 'plate_number': 'str', 'plate_color': 'str', - 'confidence': 'float', - 'plate_location': 'list[int]' + 'plate_location': 'list[int]', + 'confidence': 'float' } attribute_map = { 'plate_number': 'plate_number', 'plate_color': 'plate_color', - 'confidence': 'confidence', - 'plate_location': 'plate_location' + 'plate_location': 'plate_location', + 'confidence': 'confidence' } - def __init__(self, plate_number=None, plate_color=None, confidence=None, plate_location=None): - """RecognizeLicensePlateResultItemsResponse - a model defined in huaweicloud sdk""" + def __init__(self, plate_number=None, plate_color=None, plate_location=None, confidence=None): + """LicensePlateResponseBodyItem - a model defined in huaweicloud sdk""" self._plate_number = None self._plate_color = None - self._confidence = None self._plate_location = None + self._confidence = None self.discriminator = None self.plate_number = plate_number self.plate_color = plate_color - self.confidence = confidence self.plate_location = plate_location + self.confidence = confidence @property def plate_number(self): - """Gets the plate_number of this RecognizeLicensePlateResultItemsResponse. + """Gets the plate_number of this LicensePlateResponseBodyItem. 车牌内容。 - :return: The plate_number of this RecognizeLicensePlateResultItemsResponse. + :return: The plate_number of this LicensePlateResponseBodyItem. :rtype: str """ return self._plate_number @plate_number.setter def plate_number(self, plate_number): - """Sets the plate_number of this RecognizeLicensePlateResultItemsResponse. + """Sets the plate_number of this LicensePlateResponseBodyItem. 车牌内容。 - :param plate_number: The plate_number of this RecognizeLicensePlateResultItemsResponse. + :param plate_number: The plate_number of this LicensePlateResponseBodyItem. :type: str """ self._plate_number = plate_number @property def plate_color(self): - """Gets the plate_color of this RecognizeLicensePlateResultItemsResponse. + """Gets the plate_color of this LicensePlateResponseBodyItem. - 识别出的车牌底色。 + 当前版本支持的车牌底色类型: - blue: 蓝色 - green: 绿色 - black: 黑色 - white: 白色 - yellow: 黄色 - :return: The plate_color of this RecognizeLicensePlateResultItemsResponse. + :return: The plate_color of this LicensePlateResponseBodyItem. :rtype: str """ return self._plate_color @plate_color.setter def plate_color(self, plate_color): - """Sets the plate_color of this RecognizeLicensePlateResultItemsResponse. + """Sets the plate_color of this LicensePlateResponseBodyItem. - 识别出的车牌底色。 + 当前版本支持的车牌底色类型: - blue: 蓝色 - green: 绿色 - black: 黑色 - white: 白色 - yellow: 黄色 - :param plate_color: The plate_color of this RecognizeLicensePlateResultItemsResponse. + :param plate_color: The plate_color of this LicensePlateResponseBodyItem. :type: str """ self._plate_color = plate_color - @property - def confidence(self): - """Gets the confidence of this RecognizeLicensePlateResultItemsResponse. - - 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 - - :return: The confidence of this RecognizeLicensePlateResultItemsResponse. - :rtype: float - """ - return self._confidence - - @confidence.setter - def confidence(self, confidence): - """Sets the confidence of this RecognizeLicensePlateResultItemsResponse. - - 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 - - :param confidence: The confidence of this RecognizeLicensePlateResultItemsResponse. - :type: float - """ - self._confidence = confidence - @property def plate_location(self): - """Gets the plate_location of this RecognizeLicensePlateResultItemsResponse. + """Gets the plate_location of this LicensePlateResponseBodyItem. 车牌的区域位置信息,列表形式,包含文字区域四个顶点的二维坐标(x,y);坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - :return: The plate_location of this RecognizeLicensePlateResultItemsResponse. + :return: The plate_location of this LicensePlateResponseBodyItem. :rtype: list[int] """ return self._plate_location @plate_location.setter def plate_location(self, plate_location): - """Sets the plate_location of this RecognizeLicensePlateResultItemsResponse. + """Sets the plate_location of this LicensePlateResponseBodyItem. 车牌的区域位置信息,列表形式,包含文字区域四个顶点的二维坐标(x,y);坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - :param plate_location: The plate_location of this RecognizeLicensePlateResultItemsResponse. + :param plate_location: The plate_location of this LicensePlateResponseBodyItem. :type: list[int] """ self._plate_location = plate_location + @property + def confidence(self): + """Gets the confidence of this LicensePlateResponseBodyItem. + + 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 + + :return: The confidence of this LicensePlateResponseBodyItem. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """Sets the confidence of this LicensePlateResponseBodyItem. + + 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 + + :param confidence: The confidence of this LicensePlateResponseBodyItem. + :type: float + """ + self._confidence = confidence + def to_dict(self): """Returns the model properties as a dict""" result = {} @@ -177,7 +177,7 @@ class RecognizeLicensePlateResultItemsResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeLicensePlateResultItemsResponse): + if not isinstance(other, LicensePlateResponseBodyItem): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/mvs_invoice_req.py similarity index 59% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_request_body.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/mvs_invoice_req.py index 5e59153d3..b50f8ce6a 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/mvs_invoice_req.py @@ -9,7 +9,7 @@ import six -class RecognizeVinRequestBody: +class MvsInvoiceReq: """ @@ -23,73 +23,73 @@ class RecognizeVinRequestBody: sensitive_list = [] openapi_types = { - 'url': 'str', - 'image': 'str' + 'image': 'str', + 'url': 'str' } attribute_map = { - 'url': 'url', - 'image': 'image' + 'image': 'image', + 'url': 'url' } - def __init__(self, url=None, image=None): - """RecognizeVinRequestBody - a model defined in huaweicloud sdk""" + def __init__(self, image=None, url=None): + """MvsInvoiceReq - a model defined in huaweicloud sdk""" - self._url = None self._image = None + self._url = None self.discriminator = None - if url is not None: - self.url = url if image is not None: self.image = image - - @property - def url(self): - """Gets the url of this RecognizeVinRequestBody. - - 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 - - :return: The url of this RecognizeVinRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeVinRequestBody. - - 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 - - :param url: The url of this RecognizeVinRequestBody. - :type: str - """ - self._url = url + if url is not None: + self.url = url @property def image(self): - """Gets the image of this RecognizeVinRequestBody. + """Gets the image of this MvsInvoiceReq. - 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :return: The image of this RecognizeVinRequestBody. + :return: The image of this MvsInvoiceReq. :rtype: str """ return self._image @image.setter def image(self, image): - """Sets the image of this RecognizeVinRequestBody. + """Sets the image of this MvsInvoiceReq. - 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :param image: The image of this RecognizeVinRequestBody. + :param image: The image of this MvsInvoiceReq. :type: str """ self._image = image + @property + def url(self): + """Gets the url of this MvsInvoiceReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this MvsInvoiceReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this MvsInvoiceReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this MvsInvoiceReq. + :type: str + """ + self._url = url + def to_dict(self): """Returns the model properties as a dict""" result = {} @@ -127,7 +127,7 @@ class RecognizeVinRequestBody: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeVinRequestBody): + if not isinstance(other, MvsInvoiceReq): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/mvs_invoice_result_body.py similarity index 66% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/mvs_invoice_result_body.py index 4d35e2df6..cc2dd6939 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/mvs_invoice_result_body.py @@ -9,7 +9,7 @@ import six -class RecognizeMvsInvoiceResultResponse: +class MvsInvoiceResultBody: """ @@ -97,7 +97,7 @@ class RecognizeMvsInvoiceResultResponse: } def __init__(self, code=None, number=None, machine_printed_code=None, machine_printed_number=None, issue_date=None, machine_number=None, buyer_name=None, buyer_organization_number=None, buyer_id=None, seller_name=None, seller_phone=None, seller_id=None, seller_account=None, seller_address=None, seller_bank=None, vehicle_type=None, brand_model=None, manufacturing_location=None, quality_certificate=None, import_certificate=None, inspection_number=None, engine_number=None, vehicle_identification_number=None, tonnage=None, seating_capacity=None, tax_authority=None, tax_authority_code=None, tax_payment_receipt=None, tax_rate=None, tax=None, tax_exclusive_price=None, total=None, total_chinese=None, fiscal_code=None): - """RecognizeMvsInvoiceResultResponse - a model defined in huaweicloud sdk""" + """MvsInvoiceResultBody - a model defined in huaweicloud sdk""" @@ -208,748 +208,748 @@ class RecognizeMvsInvoiceResultResponse: @property def code(self): - """Gets the code of this RecognizeMvsInvoiceResultResponse. + """Gets the code of this MvsInvoiceResultBody. 发票代码。 - :return: The code of this RecognizeMvsInvoiceResultResponse. + :return: The code of this MvsInvoiceResultBody. :rtype: str """ return self._code @code.setter def code(self, code): - """Sets the code of this RecognizeMvsInvoiceResultResponse. + """Sets the code of this MvsInvoiceResultBody. 发票代码。 - :param code: The code of this RecognizeMvsInvoiceResultResponse. + :param code: The code of this MvsInvoiceResultBody. :type: str """ self._code = code @property def number(self): - """Gets the number of this RecognizeMvsInvoiceResultResponse. + """Gets the number of this MvsInvoiceResultBody. 发票号码。 - :return: The number of this RecognizeMvsInvoiceResultResponse. + :return: The number of this MvsInvoiceResultBody. :rtype: str """ return self._number @number.setter def number(self, number): - """Sets the number of this RecognizeMvsInvoiceResultResponse. + """Sets the number of this MvsInvoiceResultBody. 发票号码。 - :param number: The number of this RecognizeMvsInvoiceResultResponse. + :param number: The number of this MvsInvoiceResultBody. :type: str """ self._number = number @property def machine_printed_code(self): - """Gets the machine_printed_code of this RecognizeMvsInvoiceResultResponse. + """Gets the machine_printed_code of this MvsInvoiceResultBody. 机打代码。 - :return: The machine_printed_code of this RecognizeMvsInvoiceResultResponse. + :return: The machine_printed_code of this MvsInvoiceResultBody. :rtype: str """ return self._machine_printed_code @machine_printed_code.setter def machine_printed_code(self, machine_printed_code): - """Sets the machine_printed_code of this RecognizeMvsInvoiceResultResponse. + """Sets the machine_printed_code of this MvsInvoiceResultBody. 机打代码。 - :param machine_printed_code: The machine_printed_code of this RecognizeMvsInvoiceResultResponse. + :param machine_printed_code: The machine_printed_code of this MvsInvoiceResultBody. :type: str """ self._machine_printed_code = machine_printed_code @property def machine_printed_number(self): - """Gets the machine_printed_number of this RecognizeMvsInvoiceResultResponse. + """Gets the machine_printed_number of this MvsInvoiceResultBody. 机打号码。 - :return: The machine_printed_number of this RecognizeMvsInvoiceResultResponse. + :return: The machine_printed_number of this MvsInvoiceResultBody. :rtype: str """ return self._machine_printed_number @machine_printed_number.setter def machine_printed_number(self, machine_printed_number): - """Sets the machine_printed_number of this RecognizeMvsInvoiceResultResponse. + """Sets the machine_printed_number of this MvsInvoiceResultBody. 机打号码。 - :param machine_printed_number: The machine_printed_number of this RecognizeMvsInvoiceResultResponse. + :param machine_printed_number: The machine_printed_number of this MvsInvoiceResultBody. :type: str """ self._machine_printed_number = machine_printed_number @property def issue_date(self): - """Gets the issue_date of this RecognizeMvsInvoiceResultResponse. + """Gets the issue_date of this MvsInvoiceResultBody. 开票日期。 - :return: The issue_date of this RecognizeMvsInvoiceResultResponse. + :return: The issue_date of this MvsInvoiceResultBody. :rtype: str """ return self._issue_date @issue_date.setter def issue_date(self, issue_date): - """Sets the issue_date of this RecognizeMvsInvoiceResultResponse. + """Sets the issue_date of this MvsInvoiceResultBody. 开票日期。 - :param issue_date: The issue_date of this RecognizeMvsInvoiceResultResponse. + :param issue_date: The issue_date of this MvsInvoiceResultBody. :type: str """ self._issue_date = issue_date @property def machine_number(self): - """Gets the machine_number of this RecognizeMvsInvoiceResultResponse. + """Gets the machine_number of this MvsInvoiceResultBody. 机器编号。 - :return: The machine_number of this RecognizeMvsInvoiceResultResponse. + :return: The machine_number of this MvsInvoiceResultBody. :rtype: str """ return self._machine_number @machine_number.setter def machine_number(self, machine_number): - """Sets the machine_number of this RecognizeMvsInvoiceResultResponse. + """Sets the machine_number of this MvsInvoiceResultBody. 机器编号。 - :param machine_number: The machine_number of this RecognizeMvsInvoiceResultResponse. + :param machine_number: The machine_number of this MvsInvoiceResultBody. :type: str """ self._machine_number = machine_number @property def buyer_name(self): - """Gets the buyer_name of this RecognizeMvsInvoiceResultResponse. + """Gets the buyer_name of this MvsInvoiceResultBody. 购买方名称。 - :return: The buyer_name of this RecognizeMvsInvoiceResultResponse. + :return: The buyer_name of this MvsInvoiceResultBody. :rtype: str """ return self._buyer_name @buyer_name.setter def buyer_name(self, buyer_name): - """Sets the buyer_name of this RecognizeMvsInvoiceResultResponse. + """Sets the buyer_name of this MvsInvoiceResultBody. 购买方名称。 - :param buyer_name: The buyer_name of this RecognizeMvsInvoiceResultResponse. + :param buyer_name: The buyer_name of this MvsInvoiceResultBody. :type: str """ self._buyer_name = buyer_name @property def buyer_organization_number(self): - """Gets the buyer_organization_number of this RecognizeMvsInvoiceResultResponse. + """Gets the buyer_organization_number of this MvsInvoiceResultBody. 购买方身份证号码/组织机构代码。 - :return: The buyer_organization_number of this RecognizeMvsInvoiceResultResponse. + :return: The buyer_organization_number of this MvsInvoiceResultBody. :rtype: str """ return self._buyer_organization_number @buyer_organization_number.setter def buyer_organization_number(self, buyer_organization_number): - """Sets the buyer_organization_number of this RecognizeMvsInvoiceResultResponse. + """Sets the buyer_organization_number of this MvsInvoiceResultBody. 购买方身份证号码/组织机构代码。 - :param buyer_organization_number: The buyer_organization_number of this RecognizeMvsInvoiceResultResponse. + :param buyer_organization_number: The buyer_organization_number of this MvsInvoiceResultBody. :type: str """ self._buyer_organization_number = buyer_organization_number @property def buyer_id(self): - """Gets the buyer_id of this RecognizeMvsInvoiceResultResponse. + """Gets the buyer_id of this MvsInvoiceResultBody. 购买方纳税人识别号。 - :return: The buyer_id of this RecognizeMvsInvoiceResultResponse. + :return: The buyer_id of this MvsInvoiceResultBody. :rtype: str """ return self._buyer_id @buyer_id.setter def buyer_id(self, buyer_id): - """Sets the buyer_id of this RecognizeMvsInvoiceResultResponse. + """Sets the buyer_id of this MvsInvoiceResultBody. 购买方纳税人识别号。 - :param buyer_id: The buyer_id of this RecognizeMvsInvoiceResultResponse. + :param buyer_id: The buyer_id of this MvsInvoiceResultBody. :type: str """ self._buyer_id = buyer_id @property def seller_name(self): - """Gets the seller_name of this RecognizeMvsInvoiceResultResponse. + """Gets the seller_name of this MvsInvoiceResultBody. 销货单位名称。 - :return: The seller_name of this RecognizeMvsInvoiceResultResponse. + :return: The seller_name of this MvsInvoiceResultBody. :rtype: str """ return self._seller_name @seller_name.setter def seller_name(self, seller_name): - """Sets the seller_name of this RecognizeMvsInvoiceResultResponse. + """Sets the seller_name of this MvsInvoiceResultBody. 销货单位名称。 - :param seller_name: The seller_name of this RecognizeMvsInvoiceResultResponse. + :param seller_name: The seller_name of this MvsInvoiceResultBody. :type: str """ self._seller_name = seller_name @property def seller_phone(self): - """Gets the seller_phone of this RecognizeMvsInvoiceResultResponse. + """Gets the seller_phone of this MvsInvoiceResultBody. 销售方电话。 - :return: The seller_phone of this RecognizeMvsInvoiceResultResponse. + :return: The seller_phone of this MvsInvoiceResultBody. :rtype: str """ return self._seller_phone @seller_phone.setter def seller_phone(self, seller_phone): - """Sets the seller_phone of this RecognizeMvsInvoiceResultResponse. + """Sets the seller_phone of this MvsInvoiceResultBody. 销售方电话。 - :param seller_phone: The seller_phone of this RecognizeMvsInvoiceResultResponse. + :param seller_phone: The seller_phone of this MvsInvoiceResultBody. :type: str """ self._seller_phone = seller_phone @property def seller_id(self): - """Gets the seller_id of this RecognizeMvsInvoiceResultResponse. + """Gets the seller_id of this MvsInvoiceResultBody. 销售方纳税人识别号。 - :return: The seller_id of this RecognizeMvsInvoiceResultResponse. + :return: The seller_id of this MvsInvoiceResultBody. :rtype: str """ return self._seller_id @seller_id.setter def seller_id(self, seller_id): - """Sets the seller_id of this RecognizeMvsInvoiceResultResponse. + """Sets the seller_id of this MvsInvoiceResultBody. 销售方纳税人识别号。 - :param seller_id: The seller_id of this RecognizeMvsInvoiceResultResponse. + :param seller_id: The seller_id of this MvsInvoiceResultBody. :type: str """ self._seller_id = seller_id @property def seller_account(self): - """Gets the seller_account of this RecognizeMvsInvoiceResultResponse. + """Gets the seller_account of this MvsInvoiceResultBody. 销售方账号。 - :return: The seller_account of this RecognizeMvsInvoiceResultResponse. + :return: The seller_account of this MvsInvoiceResultBody. :rtype: str """ return self._seller_account @seller_account.setter def seller_account(self, seller_account): - """Sets the seller_account of this RecognizeMvsInvoiceResultResponse. + """Sets the seller_account of this MvsInvoiceResultBody. 销售方账号。 - :param seller_account: The seller_account of this RecognizeMvsInvoiceResultResponse. + :param seller_account: The seller_account of this MvsInvoiceResultBody. :type: str """ self._seller_account = seller_account @property def seller_address(self): - """Gets the seller_address of this RecognizeMvsInvoiceResultResponse. + """Gets the seller_address of this MvsInvoiceResultBody. 销售方地址。 - :return: The seller_address of this RecognizeMvsInvoiceResultResponse. + :return: The seller_address of this MvsInvoiceResultBody. :rtype: str """ return self._seller_address @seller_address.setter def seller_address(self, seller_address): - """Sets the seller_address of this RecognizeMvsInvoiceResultResponse. + """Sets the seller_address of this MvsInvoiceResultBody. 销售方地址。 - :param seller_address: The seller_address of this RecognizeMvsInvoiceResultResponse. + :param seller_address: The seller_address of this MvsInvoiceResultBody. :type: str """ self._seller_address = seller_address @property def seller_bank(self): - """Gets the seller_bank of this RecognizeMvsInvoiceResultResponse. + """Gets the seller_bank of this MvsInvoiceResultBody. 销售方开户行。 - :return: The seller_bank of this RecognizeMvsInvoiceResultResponse. + :return: The seller_bank of this MvsInvoiceResultBody. :rtype: str """ return self._seller_bank @seller_bank.setter def seller_bank(self, seller_bank): - """Sets the seller_bank of this RecognizeMvsInvoiceResultResponse. + """Sets the seller_bank of this MvsInvoiceResultBody. 销售方开户行。 - :param seller_bank: The seller_bank of this RecognizeMvsInvoiceResultResponse. + :param seller_bank: The seller_bank of this MvsInvoiceResultBody. :type: str """ self._seller_bank = seller_bank @property def vehicle_type(self): - """Gets the vehicle_type of this RecognizeMvsInvoiceResultResponse. + """Gets the vehicle_type of this MvsInvoiceResultBody. 车辆类型。 - :return: The vehicle_type of this RecognizeMvsInvoiceResultResponse. + :return: The vehicle_type of this MvsInvoiceResultBody. :rtype: str """ return self._vehicle_type @vehicle_type.setter def vehicle_type(self, vehicle_type): - """Sets the vehicle_type of this RecognizeMvsInvoiceResultResponse. + """Sets the vehicle_type of this MvsInvoiceResultBody. 车辆类型。 - :param vehicle_type: The vehicle_type of this RecognizeMvsInvoiceResultResponse. + :param vehicle_type: The vehicle_type of this MvsInvoiceResultBody. :type: str """ self._vehicle_type = vehicle_type @property def brand_model(self): - """Gets the brand_model of this RecognizeMvsInvoiceResultResponse. + """Gets the brand_model of this MvsInvoiceResultBody. 厂牌型号。 - :return: The brand_model of this RecognizeMvsInvoiceResultResponse. + :return: The brand_model of this MvsInvoiceResultBody. :rtype: str """ return self._brand_model @brand_model.setter def brand_model(self, brand_model): - """Sets the brand_model of this RecognizeMvsInvoiceResultResponse. + """Sets the brand_model of this MvsInvoiceResultBody. 厂牌型号。 - :param brand_model: The brand_model of this RecognizeMvsInvoiceResultResponse. + :param brand_model: The brand_model of this MvsInvoiceResultBody. :type: str """ self._brand_model = brand_model @property def manufacturing_location(self): - """Gets the manufacturing_location of this RecognizeMvsInvoiceResultResponse. + """Gets the manufacturing_location of this MvsInvoiceResultBody. 产地。 - :return: The manufacturing_location of this RecognizeMvsInvoiceResultResponse. + :return: The manufacturing_location of this MvsInvoiceResultBody. :rtype: str """ return self._manufacturing_location @manufacturing_location.setter def manufacturing_location(self, manufacturing_location): - """Sets the manufacturing_location of this RecognizeMvsInvoiceResultResponse. + """Sets the manufacturing_location of this MvsInvoiceResultBody. 产地。 - :param manufacturing_location: The manufacturing_location of this RecognizeMvsInvoiceResultResponse. + :param manufacturing_location: The manufacturing_location of this MvsInvoiceResultBody. :type: str """ self._manufacturing_location = manufacturing_location @property def quality_certificate(self): - """Gets the quality_certificate of this RecognizeMvsInvoiceResultResponse. + """Gets the quality_certificate of this MvsInvoiceResultBody. 合格证号。 - :return: The quality_certificate of this RecognizeMvsInvoiceResultResponse. + :return: The quality_certificate of this MvsInvoiceResultBody. :rtype: str """ return self._quality_certificate @quality_certificate.setter def quality_certificate(self, quality_certificate): - """Sets the quality_certificate of this RecognizeMvsInvoiceResultResponse. + """Sets the quality_certificate of this MvsInvoiceResultBody. 合格证号。 - :param quality_certificate: The quality_certificate of this RecognizeMvsInvoiceResultResponse. + :param quality_certificate: The quality_certificate of this MvsInvoiceResultBody. :type: str """ self._quality_certificate = quality_certificate @property def import_certificate(self): - """Gets the import_certificate of this RecognizeMvsInvoiceResultResponse. + """Gets the import_certificate of this MvsInvoiceResultBody. 进口证明书号。 - :return: The import_certificate of this RecognizeMvsInvoiceResultResponse. + :return: The import_certificate of this MvsInvoiceResultBody. :rtype: str """ return self._import_certificate @import_certificate.setter def import_certificate(self, import_certificate): - """Sets the import_certificate of this RecognizeMvsInvoiceResultResponse. + """Sets the import_certificate of this MvsInvoiceResultBody. 进口证明书号。 - :param import_certificate: The import_certificate of this RecognizeMvsInvoiceResultResponse. + :param import_certificate: The import_certificate of this MvsInvoiceResultBody. :type: str """ self._import_certificate = import_certificate @property def inspection_number(self): - """Gets the inspection_number of this RecognizeMvsInvoiceResultResponse. + """Gets the inspection_number of this MvsInvoiceResultBody. 商检单号。 - :return: The inspection_number of this RecognizeMvsInvoiceResultResponse. + :return: The inspection_number of this MvsInvoiceResultBody. :rtype: str """ return self._inspection_number @inspection_number.setter def inspection_number(self, inspection_number): - """Sets the inspection_number of this RecognizeMvsInvoiceResultResponse. + """Sets the inspection_number of this MvsInvoiceResultBody. 商检单号。 - :param inspection_number: The inspection_number of this RecognizeMvsInvoiceResultResponse. + :param inspection_number: The inspection_number of this MvsInvoiceResultBody. :type: str """ self._inspection_number = inspection_number @property def engine_number(self): - """Gets the engine_number of this RecognizeMvsInvoiceResultResponse. + """Gets the engine_number of this MvsInvoiceResultBody. 发动机号码。 - :return: The engine_number of this RecognizeMvsInvoiceResultResponse. + :return: The engine_number of this MvsInvoiceResultBody. :rtype: str """ return self._engine_number @engine_number.setter def engine_number(self, engine_number): - """Sets the engine_number of this RecognizeMvsInvoiceResultResponse. + """Sets the engine_number of this MvsInvoiceResultBody. 发动机号码。 - :param engine_number: The engine_number of this RecognizeMvsInvoiceResultResponse. + :param engine_number: The engine_number of this MvsInvoiceResultBody. :type: str """ self._engine_number = engine_number @property def vehicle_identification_number(self): - """Gets the vehicle_identification_number of this RecognizeMvsInvoiceResultResponse. + """Gets the vehicle_identification_number of this MvsInvoiceResultBody. 车辆识别代号/车架号码。 - :return: The vehicle_identification_number of this RecognizeMvsInvoiceResultResponse. + :return: The vehicle_identification_number of this MvsInvoiceResultBody. :rtype: str """ return self._vehicle_identification_number @vehicle_identification_number.setter def vehicle_identification_number(self, vehicle_identification_number): - """Sets the vehicle_identification_number of this RecognizeMvsInvoiceResultResponse. + """Sets the vehicle_identification_number of this MvsInvoiceResultBody. 车辆识别代号/车架号码。 - :param vehicle_identification_number: The vehicle_identification_number of this RecognizeMvsInvoiceResultResponse. + :param vehicle_identification_number: The vehicle_identification_number of this MvsInvoiceResultBody. :type: str """ self._vehicle_identification_number = vehicle_identification_number @property def tonnage(self): - """Gets the tonnage of this RecognizeMvsInvoiceResultResponse. + """Gets the tonnage of this MvsInvoiceResultBody. 吨位。 - :return: The tonnage of this RecognizeMvsInvoiceResultResponse. + :return: The tonnage of this MvsInvoiceResultBody. :rtype: str """ return self._tonnage @tonnage.setter def tonnage(self, tonnage): - """Sets the tonnage of this RecognizeMvsInvoiceResultResponse. + """Sets the tonnage of this MvsInvoiceResultBody. 吨位。 - :param tonnage: The tonnage of this RecognizeMvsInvoiceResultResponse. + :param tonnage: The tonnage of this MvsInvoiceResultBody. :type: str """ self._tonnage = tonnage @property def seating_capacity(self): - """Gets the seating_capacity of this RecognizeMvsInvoiceResultResponse. + """Gets the seating_capacity of this MvsInvoiceResultBody. 限乘人数。 - :return: The seating_capacity of this RecognizeMvsInvoiceResultResponse. + :return: The seating_capacity of this MvsInvoiceResultBody. :rtype: str """ return self._seating_capacity @seating_capacity.setter def seating_capacity(self, seating_capacity): - """Sets the seating_capacity of this RecognizeMvsInvoiceResultResponse. + """Sets the seating_capacity of this MvsInvoiceResultBody. 限乘人数。 - :param seating_capacity: The seating_capacity of this RecognizeMvsInvoiceResultResponse. + :param seating_capacity: The seating_capacity of this MvsInvoiceResultBody. :type: str """ self._seating_capacity = seating_capacity @property def tax_authority(self): - """Gets the tax_authority of this RecognizeMvsInvoiceResultResponse. + """Gets the tax_authority of this MvsInvoiceResultBody. 主管税务机关。 - :return: The tax_authority of this RecognizeMvsInvoiceResultResponse. + :return: The tax_authority of this MvsInvoiceResultBody. :rtype: str """ return self._tax_authority @tax_authority.setter def tax_authority(self, tax_authority): - """Sets the tax_authority of this RecognizeMvsInvoiceResultResponse. + """Sets the tax_authority of this MvsInvoiceResultBody. 主管税务机关。 - :param tax_authority: The tax_authority of this RecognizeMvsInvoiceResultResponse. + :param tax_authority: The tax_authority of this MvsInvoiceResultBody. :type: str """ self._tax_authority = tax_authority @property def tax_authority_code(self): - """Gets the tax_authority_code of this RecognizeMvsInvoiceResultResponse. + """Gets the tax_authority_code of this MvsInvoiceResultBody. 主管税务机关代码。 - :return: The tax_authority_code of this RecognizeMvsInvoiceResultResponse. + :return: The tax_authority_code of this MvsInvoiceResultBody. :rtype: str """ return self._tax_authority_code @tax_authority_code.setter def tax_authority_code(self, tax_authority_code): - """Sets the tax_authority_code of this RecognizeMvsInvoiceResultResponse. + """Sets the tax_authority_code of this MvsInvoiceResultBody. 主管税务机关代码。 - :param tax_authority_code: The tax_authority_code of this RecognizeMvsInvoiceResultResponse. + :param tax_authority_code: The tax_authority_code of this MvsInvoiceResultBody. :type: str """ self._tax_authority_code = tax_authority_code @property def tax_payment_receipt(self): - """Gets the tax_payment_receipt of this RecognizeMvsInvoiceResultResponse. + """Gets the tax_payment_receipt of this MvsInvoiceResultBody. 完税凭证号码。 - :return: The tax_payment_receipt of this RecognizeMvsInvoiceResultResponse. + :return: The tax_payment_receipt of this MvsInvoiceResultBody. :rtype: str """ return self._tax_payment_receipt @tax_payment_receipt.setter def tax_payment_receipt(self, tax_payment_receipt): - """Sets the tax_payment_receipt of this RecognizeMvsInvoiceResultResponse. + """Sets the tax_payment_receipt of this MvsInvoiceResultBody. 完税凭证号码。 - :param tax_payment_receipt: The tax_payment_receipt of this RecognizeMvsInvoiceResultResponse. + :param tax_payment_receipt: The tax_payment_receipt of this MvsInvoiceResultBody. :type: str """ self._tax_payment_receipt = tax_payment_receipt @property def tax_rate(self): - """Gets the tax_rate of this RecognizeMvsInvoiceResultResponse. + """Gets the tax_rate of this MvsInvoiceResultBody. 增值税税率或征收率。 - :return: The tax_rate of this RecognizeMvsInvoiceResultResponse. + :return: The tax_rate of this MvsInvoiceResultBody. :rtype: str """ return self._tax_rate @tax_rate.setter def tax_rate(self, tax_rate): - """Sets the tax_rate of this RecognizeMvsInvoiceResultResponse. + """Sets the tax_rate of this MvsInvoiceResultBody. 增值税税率或征收率。 - :param tax_rate: The tax_rate of this RecognizeMvsInvoiceResultResponse. + :param tax_rate: The tax_rate of this MvsInvoiceResultBody. :type: str """ self._tax_rate = tax_rate @property def tax(self): - """Gets the tax of this RecognizeMvsInvoiceResultResponse. + """Gets the tax of this MvsInvoiceResultBody. 增值税税额。 - :return: The tax of this RecognizeMvsInvoiceResultResponse. + :return: The tax of this MvsInvoiceResultBody. :rtype: str """ return self._tax @tax.setter def tax(self, tax): - """Sets the tax of this RecognizeMvsInvoiceResultResponse. + """Sets the tax of this MvsInvoiceResultBody. 增值税税额。 - :param tax: The tax of this RecognizeMvsInvoiceResultResponse. + :param tax: The tax of this MvsInvoiceResultBody. :type: str """ self._tax = tax @property def tax_exclusive_price(self): - """Gets the tax_exclusive_price of this RecognizeMvsInvoiceResultResponse. + """Gets the tax_exclusive_price of this MvsInvoiceResultBody. 不含税价。 - :return: The tax_exclusive_price of this RecognizeMvsInvoiceResultResponse. + :return: The tax_exclusive_price of this MvsInvoiceResultBody. :rtype: str """ return self._tax_exclusive_price @tax_exclusive_price.setter def tax_exclusive_price(self, tax_exclusive_price): - """Sets the tax_exclusive_price of this RecognizeMvsInvoiceResultResponse. + """Sets the tax_exclusive_price of this MvsInvoiceResultBody. 不含税价。 - :param tax_exclusive_price: The tax_exclusive_price of this RecognizeMvsInvoiceResultResponse. + :param tax_exclusive_price: The tax_exclusive_price of this MvsInvoiceResultBody. :type: str """ self._tax_exclusive_price = tax_exclusive_price @property def total(self): - """Gets the total of this RecognizeMvsInvoiceResultResponse. + """Gets the total of this MvsInvoiceResultBody. 价税合计。 - :return: The total of this RecognizeMvsInvoiceResultResponse. + :return: The total of this MvsInvoiceResultBody. :rtype: str """ return self._total @total.setter def total(self, total): - """Sets the total of this RecognizeMvsInvoiceResultResponse. + """Sets the total of this MvsInvoiceResultBody. 价税合计。 - :param total: The total of this RecognizeMvsInvoiceResultResponse. + :param total: The total of this MvsInvoiceResultBody. :type: str """ self._total = total @property def total_chinese(self): - """Gets the total_chinese of this RecognizeMvsInvoiceResultResponse. + """Gets the total_chinese of this MvsInvoiceResultBody. 价税合计大写。 - :return: The total_chinese of this RecognizeMvsInvoiceResultResponse. + :return: The total_chinese of this MvsInvoiceResultBody. :rtype: str """ return self._total_chinese @total_chinese.setter def total_chinese(self, total_chinese): - """Sets the total_chinese of this RecognizeMvsInvoiceResultResponse. + """Sets the total_chinese of this MvsInvoiceResultBody. 价税合计大写。 - :param total_chinese: The total_chinese of this RecognizeMvsInvoiceResultResponse. + :param total_chinese: The total_chinese of this MvsInvoiceResultBody. :type: str """ self._total_chinese = total_chinese @property def fiscal_code(self): - """Gets the fiscal_code of this RecognizeMvsInvoiceResultResponse. + """Gets the fiscal_code of this MvsInvoiceResultBody. 税控码。 - :return: The fiscal_code of this RecognizeMvsInvoiceResultResponse. + :return: The fiscal_code of this MvsInvoiceResultBody. :rtype: str """ return self._fiscal_code @fiscal_code.setter def fiscal_code(self, fiscal_code): - """Sets the fiscal_code of this RecognizeMvsInvoiceResultResponse. + """Sets the fiscal_code of this MvsInvoiceResultBody. 税控码。 - :param fiscal_code: The fiscal_code of this RecognizeMvsInvoiceResultResponse. + :param fiscal_code: The fiscal_code of this MvsInvoiceResultBody. :type: str """ self._fiscal_code = fiscal_code @@ -991,7 +991,7 @@ class RecognizeMvsInvoiceResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeMvsInvoiceResultResponse): + if not isinstance(other, MvsInvoiceResultBody): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/passport_req.py similarity index 58% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_request_body.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/passport_req.py index a1bd0e126..ad12b7375 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/passport_req.py @@ -9,7 +9,7 @@ import six -class RecognizePassportRequestBody: +class PassportReq: """ @@ -23,96 +23,96 @@ class RecognizePassportRequestBody: sensitive_list = [] openapi_types = { - 'url': 'str', 'image': 'str', + 'url': 'str', 'country_code': 'str' } attribute_map = { - 'url': 'url', 'image': 'image', + 'url': 'url', 'country_code': 'country_code' } - def __init__(self, url=None, image=None, country_code=None): - """RecognizePassportRequestBody - a model defined in huaweicloud sdk""" + def __init__(self, image=None, url=None, country_code=None): + """PassportReq - a model defined in huaweicloud sdk""" - self._url = None self._image = None + self._url = None self._country_code = None self.discriminator = None - if url is not None: - self.url = url if image is not None: self.image = image + if url is not None: + self.url = url if country_code is not None: self.country_code = country_code - @property - def url(self): - """Gets the url of this RecognizePassportRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :return: The url of this RecognizePassportRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizePassportRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :param url: The url of this RecognizePassportRequestBody. - :type: str - """ - self._url = url - @property def image(self): - """Gets the image of this RecognizePassportRequestBody. + """Gets the image of this PassportReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :return: The image of this RecognizePassportRequestBody. + :return: The image of this PassportReq. :rtype: str """ return self._image @image.setter def image(self, image): - """Sets the image of this RecognizePassportRequestBody. + """Sets the image of this PassportReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :param image: The image of this RecognizePassportRequestBody. + :param image: The image of this PassportReq. :type: str """ self._image = image + @property + def url(self): + """Gets the url of this PassportReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this PassportReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this PassportReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this PassportReq. + :type: str + """ + self._url = url + @property def country_code(self): - """Gets the country_code of this RecognizePassportRequestBody. + """Gets the country_code of this PassportReq. 输入值为护照颁发国的国家码,根据国家码选择对应的护照识别服务。 - 若输入中未选此字段,服务会根据自己识别判断的护照类型匹配相应的护照识别服务。 - 若选择值为GENERAL,则选择护照机器码识别。 - 若选择值为CHN,则选择中国护照全字段识别。 - :return: The country_code of this RecognizePassportRequestBody. + :return: The country_code of this PassportReq. :rtype: str """ return self._country_code @country_code.setter def country_code(self, country_code): - """Sets the country_code of this RecognizePassportRequestBody. + """Sets the country_code of this PassportReq. 输入值为护照颁发国的国家码,根据国家码选择对应的护照识别服务。 - 若输入中未选此字段,服务会根据自己识别判断的护照类型匹配相应的护照识别服务。 - 若选择值为GENERAL,则选择护照机器码识别。 - 若选择值为CHN,则选择中国护照全字段识别。 - :param country_code: The country_code of this RecognizePassportRequestBody. + :param country_code: The country_code of this PassportReq. :type: str """ self._country_code = country_code @@ -154,7 +154,7 @@ class RecognizePassportRequestBody: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizePassportRequestBody): + if not isinstance(other, PassportReq): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/passport_result_body.py similarity index 69% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/passport_result_body.py index 1110d5296..f52d96885 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/passport_result_body.py @@ -9,7 +9,7 @@ import six -class RecognizePassportResultResponse: +class PassportResultBody: """ @@ -59,7 +59,7 @@ class RecognizePassportResultResponse: } def __init__(self, passport_type=None, country_code=None, passport_number=None, nationality=None, surname=None, given_name=None, sex=None, date_of_birth=None, date_of_expiry=None, date_of_issue=None, place_of_birth=None, place_of_issue=None, issuing_authority=None, confidence=None, extra_info=None): - """RecognizePassportResultResponse - a model defined in huaweicloud sdk""" + """PassportResultBody - a model defined in huaweicloud sdk""" @@ -113,330 +113,330 @@ class RecognizePassportResultResponse: @property def passport_type(self): - """Gets the passport_type of this RecognizePassportResultResponse. + """Gets the passport_type of this PassportResultBody. 护照类型(P:普通因私护照、W:外交护照、G:公务护照)(英文)。 - :return: The passport_type of this RecognizePassportResultResponse. + :return: The passport_type of this PassportResultBody. :rtype: str """ return self._passport_type @passport_type.setter def passport_type(self, passport_type): - """Sets the passport_type of this RecognizePassportResultResponse. + """Sets the passport_type of this PassportResultBody. 护照类型(P:普通因私护照、W:外交护照、G:公务护照)(英文)。 - :param passport_type: The passport_type of this RecognizePassportResultResponse. + :param passport_type: The passport_type of this PassportResultBody. :type: str """ self._passport_type = passport_type @property def country_code(self): - """Gets the country_code of this RecognizePassportResultResponse. + """Gets the country_code of this PassportResultBody. 护照签发国的国家码(英文)。 - :return: The country_code of this RecognizePassportResultResponse. + :return: The country_code of this PassportResultBody. :rtype: str """ return self._country_code @country_code.setter def country_code(self, country_code): - """Sets the country_code of this RecognizePassportResultResponse. + """Sets the country_code of this PassportResultBody. 护照签发国的国家码(英文)。 - :param country_code: The country_code of this RecognizePassportResultResponse. + :param country_code: The country_code of this PassportResultBody. :type: str """ self._country_code = country_code @property def passport_number(self): - """Gets the passport_number of this RecognizePassportResultResponse. + """Gets the passport_number of this PassportResultBody. 护照号码(英文)。 - :return: The passport_number of this RecognizePassportResultResponse. + :return: The passport_number of this PassportResultBody. :rtype: str """ return self._passport_number @passport_number.setter def passport_number(self, passport_number): - """Sets the passport_number of this RecognizePassportResultResponse. + """Sets the passport_number of this PassportResultBody. 护照号码(英文)。 - :param passport_number: The passport_number of this RecognizePassportResultResponse. + :param passport_number: The passport_number of this PassportResultBody. :type: str """ self._passport_number = passport_number @property def nationality(self): - """Gets the nationality of this RecognizePassportResultResponse. + """Gets the nationality of this PassportResultBody. 护照持有人国籍(英文)。 - :return: The nationality of this RecognizePassportResultResponse. + :return: The nationality of this PassportResultBody. :rtype: str """ return self._nationality @nationality.setter def nationality(self, nationality): - """Sets the nationality of this RecognizePassportResultResponse. + """Sets the nationality of this PassportResultBody. 护照持有人国籍(英文)。 - :param nationality: The nationality of this RecognizePassportResultResponse. + :param nationality: The nationality of this PassportResultBody. :type: str """ self._nationality = nationality @property def surname(self): - """Gets the surname of this RecognizePassportResultResponse. + """Gets the surname of this PassportResultBody. 姓(英文)。 - :return: The surname of this RecognizePassportResultResponse. + :return: The surname of this PassportResultBody. :rtype: str """ return self._surname @surname.setter def surname(self, surname): - """Sets the surname of this RecognizePassportResultResponse. + """Sets the surname of this PassportResultBody. 姓(英文)。 - :param surname: The surname of this RecognizePassportResultResponse. + :param surname: The surname of this PassportResultBody. :type: str """ self._surname = surname @property def given_name(self): - """Gets the given_name of this RecognizePassportResultResponse. + """Gets the given_name of this PassportResultBody. 名字(英文)。 - :return: The given_name of this RecognizePassportResultResponse. + :return: The given_name of this PassportResultBody. :rtype: str """ return self._given_name @given_name.setter def given_name(self, given_name): - """Sets the given_name of this RecognizePassportResultResponse. + """Sets the given_name of this PassportResultBody. 名字(英文)。 - :param given_name: The given_name of this RecognizePassportResultResponse. + :param given_name: The given_name of this PassportResultBody. :type: str """ self._given_name = given_name @property def sex(self): - """Gets the sex of this RecognizePassportResultResponse. + """Gets the sex of this PassportResultBody. 性别(英文)。 - :return: The sex of this RecognizePassportResultResponse. + :return: The sex of this PassportResultBody. :rtype: str """ return self._sex @sex.setter def sex(self, sex): - """Sets the sex of this RecognizePassportResultResponse. + """Sets the sex of this PassportResultBody. 性别(英文)。 - :param sex: The sex of this RecognizePassportResultResponse. + :param sex: The sex of this PassportResultBody. :type: str """ self._sex = sex @property def date_of_birth(self): - """Gets the date_of_birth of this RecognizePassportResultResponse. + """Gets the date_of_birth of this PassportResultBody. 出生日期(英文)。 - :return: The date_of_birth of this RecognizePassportResultResponse. + :return: The date_of_birth of this PassportResultBody. :rtype: str """ return self._date_of_birth @date_of_birth.setter def date_of_birth(self, date_of_birth): - """Sets the date_of_birth of this RecognizePassportResultResponse. + """Sets the date_of_birth of this PassportResultBody. 出生日期(英文)。 - :param date_of_birth: The date_of_birth of this RecognizePassportResultResponse. + :param date_of_birth: The date_of_birth of this PassportResultBody. :type: str """ self._date_of_birth = date_of_birth @property def date_of_expiry(self): - """Gets the date_of_expiry of this RecognizePassportResultResponse. + """Gets the date_of_expiry of this PassportResultBody. 护照有效期(英文)。 - :return: The date_of_expiry of this RecognizePassportResultResponse. + :return: The date_of_expiry of this PassportResultBody. :rtype: str """ return self._date_of_expiry @date_of_expiry.setter def date_of_expiry(self, date_of_expiry): - """Sets the date_of_expiry of this RecognizePassportResultResponse. + """Sets the date_of_expiry of this PassportResultBody. 护照有效期(英文)。 - :param date_of_expiry: The date_of_expiry of this RecognizePassportResultResponse. + :param date_of_expiry: The date_of_expiry of this PassportResultBody. :type: str """ self._date_of_expiry = date_of_expiry @property def date_of_issue(self): - """Gets the date_of_issue of this RecognizePassportResultResponse. + """Gets the date_of_issue of this PassportResultBody. 护照签发日期(英文)。 - :return: The date_of_issue of this RecognizePassportResultResponse. + :return: The date_of_issue of this PassportResultBody. :rtype: str """ return self._date_of_issue @date_of_issue.setter def date_of_issue(self, date_of_issue): - """Sets the date_of_issue of this RecognizePassportResultResponse. + """Sets the date_of_issue of this PassportResultBody. 护照签发日期(英文)。 - :param date_of_issue: The date_of_issue of this RecognizePassportResultResponse. + :param date_of_issue: The date_of_issue of this PassportResultBody. :type: str """ self._date_of_issue = date_of_issue @property def place_of_birth(self): - """Gets the place_of_birth of this RecognizePassportResultResponse. + """Gets the place_of_birth of this PassportResultBody. 出生地(英文)。 - :return: The place_of_birth of this RecognizePassportResultResponse. + :return: The place_of_birth of this PassportResultBody. :rtype: str """ return self._place_of_birth @place_of_birth.setter def place_of_birth(self, place_of_birth): - """Sets the place_of_birth of this RecognizePassportResultResponse. + """Sets the place_of_birth of this PassportResultBody. 出生地(英文)。 - :param place_of_birth: The place_of_birth of this RecognizePassportResultResponse. + :param place_of_birth: The place_of_birth of this PassportResultBody. :type: str """ self._place_of_birth = place_of_birth @property def place_of_issue(self): - """Gets the place_of_issue of this RecognizePassportResultResponse. + """Gets the place_of_issue of this PassportResultBody. 签发地(英文)。 - :return: The place_of_issue of this RecognizePassportResultResponse. + :return: The place_of_issue of this PassportResultBody. :rtype: str """ return self._place_of_issue @place_of_issue.setter def place_of_issue(self, place_of_issue): - """Sets the place_of_issue of this RecognizePassportResultResponse. + """Sets the place_of_issue of this PassportResultBody. 签发地(英文)。 - :param place_of_issue: The place_of_issue of this RecognizePassportResultResponse. + :param place_of_issue: The place_of_issue of this PassportResultBody. :type: str """ self._place_of_issue = place_of_issue @property def issuing_authority(self): - """Gets the issuing_authority of this RecognizePassportResultResponse. + """Gets the issuing_authority of this PassportResultBody. 签发机构(英文),其中对中国的英文简写统一输出为P.R.China。 - :return: The issuing_authority of this RecognizePassportResultResponse. + :return: The issuing_authority of this PassportResultBody. :rtype: str """ return self._issuing_authority @issuing_authority.setter def issuing_authority(self, issuing_authority): - """Sets the issuing_authority of this RecognizePassportResultResponse. + """Sets the issuing_authority of this PassportResultBody. 签发机构(英文),其中对中国的英文简写统一输出为P.R.China。 - :param issuing_authority: The issuing_authority of this RecognizePassportResultResponse. + :param issuing_authority: The issuing_authority of this PassportResultBody. :type: str """ self._issuing_authority = issuing_authority @property def confidence(self): - """Gets the confidence of this RecognizePassportResultResponse. + """Gets the confidence of this PassportResultBody. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :return: The confidence of this RecognizePassportResultResponse. + :return: The confidence of this PassportResultBody. :rtype: object """ return self._confidence @confidence.setter def confidence(self, confidence): - """Sets the confidence of this RecognizePassportResultResponse. + """Sets the confidence of this PassportResultBody. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :param confidence: The confidence of this RecognizePassportResultResponse. + :param confidence: The confidence of this PassportResultBody. :type: object """ self._confidence = confidence @property def extra_info(self): - """Gets the extra_info of this RecognizePassportResultResponse. + """Gets the extra_info of this PassportResultBody. 默认为空。对于部分常见国家的护照OCR服务,extra_info内会包含护照上由本地官方语言描述的字段信息及其他信息。 如中国护照,里面会包含汉字表达的姓名、出生地等信息。 - :return: The extra_info of this RecognizePassportResultResponse. + :return: The extra_info of this PassportResultBody. :rtype: object """ return self._extra_info @extra_info.setter def extra_info(self, extra_info): - """Sets the extra_info of this RecognizePassportResultResponse. + """Sets the extra_info of this PassportResultBody. 默认为空。对于部分常见国家的护照OCR服务,extra_info内会包含护照上由本地官方语言描述的字段信息及其他信息。 如中国护照,里面会包含汉字表达的姓名、出生地等信息。 - :param extra_info: The extra_info of this RecognizePassportResultResponse. + :param extra_info: The extra_info of this PassportResultBody. :type: object """ self._extra_info = extra_info @@ -478,7 +478,7 @@ class RecognizePassportResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizePassportResultResponse): + if not isinstance(other, PassportResultBody): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/quota_invoice_req.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/quota_invoice_req.py new file mode 100644 index 000000000..68eaceb8e --- /dev/null +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/quota_invoice_req.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class QuotaInvoiceReq: + + + """ + 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 = { + 'image': 'str', + 'url': 'str' + } + + attribute_map = { + 'image': 'image', + 'url': 'url' + } + + def __init__(self, image=None, url=None): + """QuotaInvoiceReq - a model defined in huaweicloud sdk""" + + + + self._image = None + self._url = None + self.discriminator = None + + if image is not None: + self.image = image + if url is not None: + self.url = url + + @property + def image(self): + """Gets the image of this QuotaInvoiceReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :return: The image of this QuotaInvoiceReq. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this QuotaInvoiceReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :param image: The image of this QuotaInvoiceReq. + :type: str + """ + self._image = image + + @property + def url(self): + """Gets the url of this QuotaInvoiceReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this QuotaInvoiceReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this QuotaInvoiceReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this QuotaInvoiceReq. + :type: str + """ + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, QuotaInvoiceReq): + 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-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/quota_invoice_result_body.py similarity index 70% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/quota_invoice_result_body.py index accf4754f..6befea9ca 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/quota_invoice_result_body.py @@ -9,7 +9,7 @@ import six -class RecognizeQuotaInvoiceResultResponse: +class QuotaInvoiceResultBody: """ @@ -39,7 +39,7 @@ class RecognizeQuotaInvoiceResultResponse: } def __init__(self, number=None, code=None, location=None, amount=None, confidence=None): - """RecognizeQuotaInvoiceResultResponse - a model defined in huaweicloud sdk""" + """QuotaInvoiceResultBody - a model defined in huaweicloud sdk""" @@ -63,110 +63,110 @@ class RecognizeQuotaInvoiceResultResponse: @property def number(self): - """Gets the number of this RecognizeQuotaInvoiceResultResponse. + """Gets the number of this QuotaInvoiceResultBody. 发票号码。 - :return: The number of this RecognizeQuotaInvoiceResultResponse. + :return: The number of this QuotaInvoiceResultBody. :rtype: str """ return self._number @number.setter def number(self, number): - """Sets the number of this RecognizeQuotaInvoiceResultResponse. + """Sets the number of this QuotaInvoiceResultBody. 发票号码。 - :param number: The number of this RecognizeQuotaInvoiceResultResponse. + :param number: The number of this QuotaInvoiceResultBody. :type: str """ self._number = number @property def code(self): - """Gets the code of this RecognizeQuotaInvoiceResultResponse. + """Gets the code of this QuotaInvoiceResultBody. 发票代码。 - :return: The code of this RecognizeQuotaInvoiceResultResponse. + :return: The code of this QuotaInvoiceResultBody. :rtype: str """ return self._code @code.setter def code(self, code): - """Sets the code of this RecognizeQuotaInvoiceResultResponse. + """Sets the code of this QuotaInvoiceResultBody. 发票代码。 - :param code: The code of this RecognizeQuotaInvoiceResultResponse. + :param code: The code of this QuotaInvoiceResultBody. :type: str """ self._code = code @property def location(self): - """Gets the location of this RecognizeQuotaInvoiceResultResponse. + """Gets the location of this QuotaInvoiceResultBody. 地址。 - :return: The location of this RecognizeQuotaInvoiceResultResponse. + :return: The location of this QuotaInvoiceResultBody. :rtype: str """ return self._location @location.setter def location(self, location): - """Sets the location of this RecognizeQuotaInvoiceResultResponse. + """Sets the location of this QuotaInvoiceResultBody. 地址。 - :param location: The location of this RecognizeQuotaInvoiceResultResponse. + :param location: The location of this QuotaInvoiceResultBody. :type: str """ self._location = location @property def amount(self): - """Gets the amount of this RecognizeQuotaInvoiceResultResponse. + """Gets the amount of this QuotaInvoiceResultBody. 发票金额。 - :return: The amount of this RecognizeQuotaInvoiceResultResponse. + :return: The amount of this QuotaInvoiceResultBody. :rtype: str """ return self._amount @amount.setter def amount(self, amount): - """Sets the amount of this RecognizeQuotaInvoiceResultResponse. + """Sets the amount of this QuotaInvoiceResultBody. 发票金额。 - :param amount: The amount of this RecognizeQuotaInvoiceResultResponse. + :param amount: The amount of this QuotaInvoiceResultBody. :type: str """ self._amount = amount @property def confidence(self): - """Gets the confidence of this RecognizeQuotaInvoiceResultResponse. + """Gets the confidence of this QuotaInvoiceResultBody. - 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 + 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :return: The confidence of this RecognizeQuotaInvoiceResultResponse. + :return: The confidence of this QuotaInvoiceResultBody. :rtype: object """ return self._confidence @confidence.setter def confidence(self, confidence): - """Sets the confidence of this RecognizeQuotaInvoiceResultResponse. + """Sets the confidence of this QuotaInvoiceResultBody. - 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 + 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :param confidence: The confidence of this RecognizeQuotaInvoiceResultResponse. + :param confidence: The confidence of this QuotaInvoiceResultBody. :type: object """ self._confidence = confidence @@ -208,7 +208,7 @@ class RecognizeQuotaInvoiceResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeQuotaInvoiceResultResponse): + if not isinstance(other, QuotaInvoiceResultBody): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_request.py index b35422d56..f0c78b1bb 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_request.py @@ -23,31 +23,55 @@ class RecognizeAutoClassificationRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeAutoClassificationRequestBody' + 'project_id': 'str', + 'body': 'AutoClassificationReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeAutoClassificationRequest - a model defined in huaweicloud sdk""" + 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 RecognizeAutoClassificationRequest. + + + :return: The project_id of this RecognizeAutoClassificationRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeAutoClassificationRequest. + + + :param project_id: The project_id of this RecognizeAutoClassificationRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeAutoClassificationRequest. :return: The body of this RecognizeAutoClassificationRequest. - :rtype: RecognizeAutoClassificationRequestBody + :rtype: AutoClassificationReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeAutoClassificationRequest: :param body: The body of this RecognizeAutoClassificationRequest. - :type: RecognizeAutoClassificationRequestBody + :type: AutoClassificationReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_response.py index 93073a78f..ba571fc4a 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_auto_classification_response.py @@ -23,7 +23,7 @@ class RecognizeAutoClassificationResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'list[RecognizeAutoClassificationResultItemResponse]' + 'result': 'AutoClassificationResponseBodyItem' } attribute_map = { @@ -45,10 +45,9 @@ class RecognizeAutoClassificationResponse(SdkResponse): def result(self): """Gets the result of this RecognizeAutoClassificationResponse. - 调用成功时表示调用结果。 调用失败时无此字段。 :return: The result of this RecognizeAutoClassificationResponse. - :rtype: list[RecognizeAutoClassificationResultItemResponse] + :rtype: AutoClassificationResponseBodyItem """ return self._result @@ -56,10 +55,9 @@ class RecognizeAutoClassificationResponse(SdkResponse): def result(self, result): """Sets the result of this RecognizeAutoClassificationResponse. - 调用成功时表示调用结果。 调用失败时无此字段。 :param result: The result of this RecognizeAutoClassificationResponse. - :type: list[RecognizeAutoClassificationResultItemResponse] + :type: AutoClassificationResponseBodyItem """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_request.py index 796a9ad15..959f7c348 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_request.py @@ -23,31 +23,55 @@ class RecognizeBankcardRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeBankcardRequestBody' + 'project_id': 'str', + 'body': 'BankcardReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeBankcardRequest - a model defined in huaweicloud sdk""" + 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 RecognizeBankcardRequest. + + + :return: The project_id of this RecognizeBankcardRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeBankcardRequest. + + + :param project_id: The project_id of this RecognizeBankcardRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeBankcardRequest. :return: The body of this RecognizeBankcardRequest. - :rtype: RecognizeBankcardRequestBody + :rtype: BankcardReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeBankcardRequest: :param body: The body of this RecognizeBankcardRequest. - :type: RecognizeBankcardRequestBody + :type: BankcardReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_response.py index 2688de6af..44dc344df 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_bankcard_response.py @@ -23,7 +23,7 @@ class RecognizeBankcardResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeBankcardResultResponse' + 'result': 'BankcardResultBody' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeBankcardResponse(SdkResponse): :return: The result of this RecognizeBankcardResponse. - :rtype: RecognizeBankcardResultResponse + :rtype: BankcardResultBody """ return self._result @@ -57,7 +57,7 @@ class RecognizeBankcardResponse(SdkResponse): :param result: The result of this RecognizeBankcardResponse. - :type: RecognizeBankcardResultResponse + :type: BankcardResultBody """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_request.py index 974e04ff8..6ab9d37e7 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_request.py @@ -23,31 +23,55 @@ class RecognizeBusinessCardRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeBusinessCardRequestBody' + 'project_id': 'str', + 'body': 'BusinessCardReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeBusinessCardRequest - a model defined in huaweicloud sdk""" + 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 RecognizeBusinessCardRequest. + + + :return: The project_id of this RecognizeBusinessCardRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeBusinessCardRequest. + + + :param project_id: The project_id of this RecognizeBusinessCardRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeBusinessCardRequest. :return: The body of this RecognizeBusinessCardRequest. - :rtype: RecognizeBusinessCardRequestBody + :rtype: BusinessCardReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeBusinessCardRequest: :param body: The body of this RecognizeBusinessCardRequest. - :type: RecognizeBusinessCardRequestBody + :type: BusinessCardReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_response.py index 635654dfc..e9c672b39 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_card_response.py @@ -23,7 +23,7 @@ class RecognizeBusinessCardResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeBusinessCardResultResponse' + 'result': 'BusinessCardResponseBodyItem' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeBusinessCardResponse(SdkResponse): :return: The result of this RecognizeBusinessCardResponse. - :rtype: RecognizeBusinessCardResultResponse + :rtype: BusinessCardResponseBodyItem """ return self._result @@ -57,7 +57,7 @@ class RecognizeBusinessCardResponse(SdkResponse): :param result: The result of this RecognizeBusinessCardResponse. - :type: RecognizeBusinessCardResultResponse + :type: BusinessCardResponseBodyItem """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_request.py index a58f8a38c..2e4d9db9e 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_request.py @@ -23,31 +23,55 @@ class RecognizeBusinessLicenseRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeBusinessLicenseRequestBody' + 'project_id': 'str', + 'body': 'BusinessLicenseReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeBusinessLicenseRequest - a model defined in huaweicloud sdk""" + 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 RecognizeBusinessLicenseRequest. + + + :return: The project_id of this RecognizeBusinessLicenseRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeBusinessLicenseRequest. + + + :param project_id: The project_id of this RecognizeBusinessLicenseRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeBusinessLicenseRequest. :return: The body of this RecognizeBusinessLicenseRequest. - :rtype: RecognizeBusinessLicenseRequestBody + :rtype: BusinessLicenseReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeBusinessLicenseRequest: :param body: The body of this RecognizeBusinessLicenseRequest. - :type: RecognizeBusinessLicenseRequestBody + :type: BusinessLicenseReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_request_body.py deleted file mode 100644 index 89b426270..000000000 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_request_body.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -import pprint -import re - -import six - - - - - -class RecognizeBusinessLicenseRequestBody: - - - """ - 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', - 'image': 'str' - } - - attribute_map = { - 'url': 'url', - 'image': 'image' - } - - def __init__(self, url=None, image=None): - """RecognizeBusinessLicenseRequestBody - a model defined in huaweicloud sdk""" - - - - self._url = None - self._image = None - self.discriminator = None - - if url is not None: - self.url = url - if image is not None: - self.image = image - - @property - def url(self): - """Gets the url of this RecognizeBusinessLicenseRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :return: The url of this RecognizeBusinessLicenseRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeBusinessLicenseRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :param url: The url of this RecognizeBusinessLicenseRequestBody. - :type: str - """ - self._url = url - - @property - def image(self): - """Gets the image of this RecognizeBusinessLicenseRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :return: The image of this RecognizeBusinessLicenseRequestBody. - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this RecognizeBusinessLicenseRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :param image: The image of this RecognizeBusinessLicenseRequestBody. - :type: str - """ - self._image = image - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - if attr in self.sensitive_list: - result[attr] = "****" - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RecognizeBusinessLicenseRequestBody): - 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-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_response.py index eccb9ffc7..cfb918dc0 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_business_license_response.py @@ -23,7 +23,7 @@ class RecognizeBusinessLicenseResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeBusinessLicenseResultResponse' + 'result': 'BusinessLicenseResultBody' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeBusinessLicenseResponse(SdkResponse): :return: The result of this RecognizeBusinessLicenseResponse. - :rtype: RecognizeBusinessLicenseResultResponse + :rtype: BusinessLicenseResultBody """ return self._result @@ -57,7 +57,7 @@ class RecognizeBusinessLicenseResponse(SdkResponse): :param result: The result of this RecognizeBusinessLicenseResponse. - :type: RecognizeBusinessLicenseResultResponse + :type: BusinessLicenseResultBody """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_driver_license_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_driver_license_request.py index 3830cf92f..bd8eb6c66 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_driver_license_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_driver_license_request.py @@ -23,24 +23,48 @@ class RecognizeDriverLicenseRequest: sensitive_list = [] openapi_types = { + 'project_id': 'str', 'body': 'RecognizeDriverLicenseRequestBody' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeDriverLicenseRequest - a model defined in huaweicloud sdk""" + 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 RecognizeDriverLicenseRequest. + + + :return: The project_id of this RecognizeDriverLicenseRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeDriverLicenseRequest. + + + :param project_id: The project_id of this RecognizeDriverLicenseRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeDriverLicenseRequest. diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_driver_license_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_driver_license_request_body.py index 24dfb42a2..c1ea13c1c 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_driver_license_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_driver_license_request_body.py @@ -25,16 +25,18 @@ class RecognizeDriverLicenseRequestBody: openapi_types = { 'url': 'str', 'image': 'str', - 'side': 'str' + 'side': 'str', + 'return_issuing_authority': 'bool' } attribute_map = { 'url': 'url', 'image': 'image', - 'side': 'side' + 'side': 'side', + 'return_issuing_authority': 'return_issuing_authority' } - def __init__(self, url=None, image=None, side=None): + def __init__(self, url=None, image=None, side=None, return_issuing_authority=None): """RecognizeDriverLicenseRequestBody - a model defined in huaweicloud sdk""" @@ -42,6 +44,7 @@ class RecognizeDriverLicenseRequestBody: self._url = None self._image = None self._side = None + self._return_issuing_authority = None self.discriminator = None if url is not None: @@ -50,6 +53,8 @@ class RecognizeDriverLicenseRequestBody: self.image = image if side is not None: self.side = side + if return_issuing_authority is not None: + self.return_issuing_authority = return_issuing_authority @property def url(self): @@ -77,7 +82,7 @@ class RecognizeDriverLicenseRequestBody: def image(self): """Gets the image of this RecognizeDriverLicenseRequestBody. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 图像数据, Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 :return: The image of this RecognizeDriverLicenseRequestBody. :rtype: str @@ -88,7 +93,7 @@ class RecognizeDriverLicenseRequestBody: def image(self, image): """Sets the image of this RecognizeDriverLicenseRequestBody. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 图像数据, Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 :param image: The image of this RecognizeDriverLicenseRequestBody. :type: str @@ -117,6 +122,28 @@ class RecognizeDriverLicenseRequestBody: """ self._side = side + @property + def return_issuing_authority(self): + """Gets the return_issuing_authority of this RecognizeDriverLicenseRequestBody. + + 是否返回发证机关的开关,可选值包括: true:返回发证机关 false:不返回发证机关 如果无该参数,系统默认不返回发证机关。如果输入参数不是Boolean类型,则会报非法参数错误。 + + :return: The return_issuing_authority of this RecognizeDriverLicenseRequestBody. + :rtype: bool + """ + return self._return_issuing_authority + + @return_issuing_authority.setter + def return_issuing_authority(self, return_issuing_authority): + """Sets the return_issuing_authority of this RecognizeDriverLicenseRequestBody. + + 是否返回发证机关的开关,可选值包括: true:返回发证机关 false:不返回发证机关 如果无该参数,系统默认不返回发证机关。如果输入参数不是Boolean类型,则会报非法参数错误。 + + :param return_issuing_authority: The return_issuing_authority of this RecognizeDriverLicenseRequestBody. + :type: bool + """ + self._return_issuing_authority = return_issuing_authority + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_driver_license_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_driver_license_result_response.py index 92200c279..fc78bda01 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_driver_license_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_driver_license_result_response.py @@ -33,6 +33,7 @@ class RecognizeDriverLicenseResultResponse: '_class': 'str', 'valid_from': 'str', 'valid_to': 'str', + 'issuing_authority': 'str', 'file_number': 'str', 'record': 'str' } @@ -48,11 +49,12 @@ class RecognizeDriverLicenseResultResponse: '_class': 'class', 'valid_from': 'valid_from', 'valid_to': 'valid_to', + 'issuing_authority': 'issuing_authority', 'file_number': 'file_number', 'record': 'record' } - def __init__(self, number=None, name=None, sex=None, nationality=None, address=None, birth=None, issue_date=None, _class=None, valid_from=None, valid_to=None, file_number=None, record=None): + def __init__(self, number=None, name=None, sex=None, nationality=None, address=None, birth=None, issue_date=None, _class=None, valid_from=None, valid_to=None, issuing_authority=None, file_number=None, record=None): """RecognizeDriverLicenseResultResponse - a model defined in huaweicloud sdk""" @@ -67,6 +69,7 @@ class RecognizeDriverLicenseResultResponse: self.__class = None self._valid_from = None self._valid_to = None + self._issuing_authority = None self._file_number = None self._record = None self.discriminator = None @@ -91,6 +94,8 @@ class RecognizeDriverLicenseResultResponse: self.valid_from = valid_from if valid_to is not None: self.valid_to = valid_to + if issuing_authority is not None: + self.issuing_authority = issuing_authority if file_number is not None: self.file_number = file_number if record is not None: @@ -316,6 +321,28 @@ class RecognizeDriverLicenseResultResponse: """ self._valid_to = valid_to + @property + def issuing_authority(self): + """Gets the issuing_authority of this RecognizeDriverLicenseResultResponse. + + 发证机关。 + + :return: The issuing_authority of this RecognizeDriverLicenseResultResponse. + :rtype: str + """ + return self._issuing_authority + + @issuing_authority.setter + def issuing_authority(self, issuing_authority): + """Sets the issuing_authority of this RecognizeDriverLicenseResultResponse. + + 发证机关。 + + :param issuing_authority: The issuing_authority of this RecognizeDriverLicenseResultResponse. + :type: str + """ + self._issuing_authority = issuing_authority + @property def file_number(self): """Gets the file_number of this RecognizeDriverLicenseResultResponse. diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_request_body.py deleted file mode 100644 index be68132cf..000000000 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_request_body.py +++ /dev/null @@ -1,272 +0,0 @@ -# coding: utf-8 - -import pprint -import re - -import six - - - - - -class RecognizeFinancialStatementRequestBody: - - - """ - 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 = { - 'image': 'str', - 'url': 'str', - 'return_text_location': 'bool', - 'return_confidence': 'bool', - 'return_excel': 'bool', - 'return_table_location': 'bool', - 'return_image_size': 'bool' - } - - attribute_map = { - 'image': 'image', - 'url': 'url', - 'return_text_location': 'return_text_location', - 'return_confidence': 'return_confidence', - 'return_excel': 'return_excel', - 'return_table_location': 'return_table_location', - 'return_image_size': 'return_image_size' - } - - def __init__(self, image=None, url=None, return_text_location=None, return_confidence=None, return_excel=None, return_table_location=None, return_image_size=None): - """RecognizeFinancialStatementRequestBody - a model defined in huaweicloud sdk""" - - - - self._image = None - self._url = None - self._return_text_location = None - self._return_confidence = None - self._return_excel = None - self._return_table_location = None - self._return_image_size = None - self.discriminator = None - - if image is not None: - self.image = image - if url is not None: - self.url = url - if return_text_location is not None: - self.return_text_location = return_text_location - if return_confidence is not None: - self.return_confidence = return_confidence - if return_excel is not None: - self.return_excel = return_excel - if return_table_location is not None: - self.return_table_location = return_table_location - if return_image_size is not None: - self.return_image_size = return_image_size - - @property - def image(self): - """Gets the image of this RecognizeFinancialStatementRequestBody. - - 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPG/PNG/BMP/TIFF格式 - - :return: The image of this RecognizeFinancialStatementRequestBody. - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this RecognizeFinancialStatementRequestBody. - - 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPG/PNG/BMP/TIFF格式 - - :param image: The image of this RecognizeFinancialStatementRequestBody. - :type: str - """ - self._image = image - - @property - def url(self): - """Gets the url of this RecognizeFinancialStatementRequestBody. - - 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 - - :return: The url of this RecognizeFinancialStatementRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeFinancialStatementRequestBody. - - 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 - - :param url: The url of this RecognizeFinancialStatementRequestBody. - :type: str - """ - self._url = url - - @property - def return_text_location(self): - """Gets the return_text_location of this RecognizeFinancialStatementRequestBody. - - 返回文本块坐标及单元格坐标信息,可选值包括: - true:返回文本块和单元格坐标; - false:不返回。 > 说明: - 未传入该参数时默认为false,即不返回。 - - :return: The return_text_location of this RecognizeFinancialStatementRequestBody. - :rtype: bool - """ - return self._return_text_location - - @return_text_location.setter - def return_text_location(self, return_text_location): - """Sets the return_text_location of this RecognizeFinancialStatementRequestBody. - - 返回文本块坐标及单元格坐标信息,可选值包括: - true:返回文本块和单元格坐标; - false:不返回。 > 说明: - 未传入该参数时默认为false,即不返回。 - - :param return_text_location: The return_text_location of this RecognizeFinancialStatementRequestBody. - :type: bool - """ - self._return_text_location = return_text_location - - @property - def return_confidence(self): - """Gets the return_confidence of this RecognizeFinancialStatementRequestBody. - - 返回字段识别置信度,小数点后四位。可选值包括: - true:返回字段置信度; - false:不返回。 > 说明: - 未传入该参数时默认为false,即不返回字段置信度。 - - :return: The return_confidence of this RecognizeFinancialStatementRequestBody. - :rtype: bool - """ - return self._return_confidence - - @return_confidence.setter - def return_confidence(self, return_confidence): - """Sets the return_confidence of this RecognizeFinancialStatementRequestBody. - - 返回字段识别置信度,小数点后四位。可选值包括: - true:返回字段置信度; - false:不返回。 > 说明: - 未传入该参数时默认为false,即不返回字段置信度。 - - :param return_confidence: The return_confidence of this RecognizeFinancialStatementRequestBody. - :type: bool - """ - self._return_confidence = return_confidence - - @property - def return_excel(self): - """Gets the return_excel of this RecognizeFinancialStatementRequestBody. - - 是否返回表格转换Microsoft Excel的base64编码字段。可选值包括: - true:返回’excel’字段,表示xlsx格式的表格识别结果的base64编码; - false:不返回。默认为false。 > 说明: - 对返回的Excel编码,可用Python函数 base64.b64decode解码后保存为xlsx文件。 - - :return: The return_excel of this RecognizeFinancialStatementRequestBody. - :rtype: bool - """ - return self._return_excel - - @return_excel.setter - def return_excel(self, return_excel): - """Sets the return_excel of this RecognizeFinancialStatementRequestBody. - - 是否返回表格转换Microsoft Excel的base64编码字段。可选值包括: - true:返回’excel’字段,表示xlsx格式的表格识别结果的base64编码; - false:不返回。默认为false。 > 说明: - 对返回的Excel编码,可用Python函数 base64.b64decode解码后保存为xlsx文件。 - - :param return_excel: The return_excel of this RecognizeFinancialStatementRequestBody. - :type: bool - """ - self._return_excel = return_excel - - @property - def return_table_location(self): - """Gets the return_table_location of this RecognizeFinancialStatementRequestBody. - - 返回表格坐标,可选值包括: - true:返回表格坐标; - false:不返回。 > 说明: - 未传入该参数时默认为false,即不返回。 - - :return: The return_table_location of this RecognizeFinancialStatementRequestBody. - :rtype: bool - """ - return self._return_table_location - - @return_table_location.setter - def return_table_location(self, return_table_location): - """Sets the return_table_location of this RecognizeFinancialStatementRequestBody. - - 返回表格坐标,可选值包括: - true:返回表格坐标; - false:不返回。 > 说明: - 未传入该参数时默认为false,即不返回。 - - :param return_table_location: The return_table_location of this RecognizeFinancialStatementRequestBody. - :type: bool - """ - self._return_table_location = return_table_location - - @property - def return_image_size(self): - """Gets the return_image_size of this RecognizeFinancialStatementRequestBody. - - 返回矫正后的图像大小,可选值包括: - true:返回矫正图像大小; - false:不返回。 > 说明: - 未传入该参数时默认为false,即不返回。 - - :return: The return_image_size of this RecognizeFinancialStatementRequestBody. - :rtype: bool - """ - return self._return_image_size - - @return_image_size.setter - def return_image_size(self, return_image_size): - """Sets the return_image_size of this RecognizeFinancialStatementRequestBody. - - 返回矫正后的图像大小,可选值包括: - true:返回矫正图像大小; - false:不返回。 > 说明: - 未传入该参数时默认为false,即不返回。 - - :param return_image_size: The return_image_size of this RecognizeFinancialStatementRequestBody. - :type: bool - """ - self._return_image_size = return_image_size - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - if attr in self.sensitive_list: - result[attr] = "****" - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RecognizeFinancialStatementRequestBody): - 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-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_result_response.py deleted file mode 100644 index 197fe158c..000000000 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_result_response.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -import pprint -import re - -import six - - - - - -class RecognizeFinancialStatementResultResponse: - - - """ - 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 = { - 'words_region_count': 'int', - 'words_region_list': 'list[RecognizeFinancialStatementWordsRegionItemsResponse]', - 'image_size': 'object' - } - - attribute_map = { - 'words_region_count': 'words_region_count', - 'words_region_list': 'words_region_list', - 'image_size': 'image_size' - } - - def __init__(self, words_region_count=None, words_region_list=None, image_size=None): - """RecognizeFinancialStatementResultResponse - a model defined in huaweicloud sdk""" - - - - self._words_region_count = None - self._words_region_list = None - self._image_size = None - self.discriminator = None - - self.words_region_count = words_region_count - self.words_region_list = words_region_list - self.image_size = image_size - - @property - def words_region_count(self): - """Gets the words_region_count of this RecognizeFinancialStatementResultResponse. - - 识别出来的表格、文本区域个数。 - - :return: The words_region_count of this RecognizeFinancialStatementResultResponse. - :rtype: int - """ - return self._words_region_count - - @words_region_count.setter - def words_region_count(self, words_region_count): - """Sets the words_region_count of this RecognizeFinancialStatementResultResponse. - - 识别出来的表格、文本区域个数。 - - :param words_region_count: The words_region_count of this RecognizeFinancialStatementResultResponse. - :type: int - """ - self._words_region_count = words_region_count - - @property - def words_region_list(self): - """Gets the words_region_list of this RecognizeFinancialStatementResultResponse. - - 返回的表格、文本区域列表。输出顺序从左到右,从上到下。 - - :return: The words_region_list of this RecognizeFinancialStatementResultResponse. - :rtype: list[RecognizeFinancialStatementWordsRegionItemsResponse] - """ - return self._words_region_list - - @words_region_list.setter - def words_region_list(self, words_region_list): - """Sets the words_region_list of this RecognizeFinancialStatementResultResponse. - - 返回的表格、文本区域列表。输出顺序从左到右,从上到下。 - - :param words_region_list: The words_region_list of this RecognizeFinancialStatementResultResponse. - :type: list[RecognizeFinancialStatementWordsRegionItemsResponse] - """ - self._words_region_list = words_region_list - - @property - def image_size(self): - """Gets the image_size of this RecognizeFinancialStatementResultResponse. - - 服务对倾斜、透视等输入图片自动矫正,该字段表示矫正后的图片大小,字典格式。 - - :return: The image_size of this RecognizeFinancialStatementResultResponse. - :rtype: object - """ - return self._image_size - - @image_size.setter - def image_size(self, image_size): - """Sets the image_size of this RecognizeFinancialStatementResultResponse. - - 服务对倾斜、透视等输入图片自动矫正,该字段表示矫正后的图片大小,字典格式。 - - :param image_size: The image_size of this RecognizeFinancialStatementResultResponse. - :type: object - """ - self._image_size = image_size - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - if attr in self.sensitive_list: - result[attr] = "****" - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RecognizeFinancialStatementResultResponse): - 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-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_words_block_items_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_words_block_items_response.py deleted file mode 100644 index ef1597197..000000000 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_words_block_items_response.py +++ /dev/null @@ -1,272 +0,0 @@ -# coding: utf-8 - -import pprint -import re - -import six - - - - - -class RecognizeFinancialStatementWordsBlockItemsResponse: - - - """ - 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 = { - 'words': 'str', - 'location': 'list[int]', - 'confidence': 'float', - 'rows': 'list[int]', - 'columns': 'list[int]', - 'cell_location': 'list[int]', - 'words_list': 'list[RecognizeFinancialStatementWordsListItemsResponse]' - } - - attribute_map = { - 'words': 'words', - 'location': 'location', - 'confidence': 'confidence', - 'rows': 'rows', - 'columns': 'columns', - 'cell_location': 'cell_location', - 'words_list': 'words_list' - } - - def __init__(self, words=None, location=None, confidence=None, rows=None, columns=None, cell_location=None, words_list=None): - """RecognizeFinancialStatementWordsBlockItemsResponse - a model defined in huaweicloud sdk""" - - - - self._words = None - self._location = None - self._confidence = None - self._rows = None - self._columns = None - self._cell_location = None - self._words_list = None - self.discriminator = None - - if words is not None: - self.words = words - if location is not None: - self.location = location - if confidence is not None: - self.confidence = confidence - if rows is not None: - self.rows = rows - if columns is not None: - self.columns = columns - if cell_location is not None: - self.cell_location = cell_location - if words_list is not None: - self.words_list = words_list - - @property - def words(self): - """Gets the words of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 文字块内容。当入参\"return_text_location\"为false时,每个单元格返回一个文本值,不同行文本由换行符 \"\\n\" 拼接。 - - :return: The words of this RecognizeFinancialStatementWordsBlockItemsResponse. - :rtype: str - """ - return self._words - - @words.setter - def words(self, words): - """Sets the words of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 文字块内容。当入参\"return_text_location\"为false时,每个单元格返回一个文本值,不同行文本由换行符 \"\\n\" 拼接。 - - :param words: The words of this RecognizeFinancialStatementWordsBlockItemsResponse. - :type: str - """ - self._words = words - - @property - def location(self): - """Gets the location of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 文字块信息。 - - :return: The location of this RecognizeFinancialStatementWordsBlockItemsResponse. - :rtype: list[int] - """ - return self._location - - @location.setter - def location(self, location): - """Sets the location of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 文字块信息。 - - :param location: The location of this RecognizeFinancialStatementWordsBlockItemsResponse. - :type: list[int] - """ - self._location = location - - @property - def confidence(self): - """Gets the confidence of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 文字块识别结果置信度信息,置信度越大,表示本次识别的对应字段的可靠性越大,在统计意义上,置信度越大正确率越高。注:置信度由算法给出,其不直接等价于对应字段的精度。 - - :return: The confidence of this RecognizeFinancialStatementWordsBlockItemsResponse. - :rtype: float - """ - return self._confidence - - @confidence.setter - def confidence(self, confidence): - """Sets the confidence of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 文字块识别结果置信度信息,置信度越大,表示本次识别的对应字段的可靠性越大,在统计意义上,置信度越大正确率越高。注:置信度由算法给出,其不直接等价于对应字段的精度。 - - :param confidence: The confidence of this RecognizeFinancialStatementWordsBlockItemsResponse. - :type: float - """ - self._confidence = confidence - - @property - def rows(self): - """Gets the rows of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 单元格行信息,列表形式。多个连续值表示单元格垮多行。 - - :return: The rows of this RecognizeFinancialStatementWordsBlockItemsResponse. - :rtype: list[int] - """ - return self._rows - - @rows.setter - def rows(self, rows): - """Sets the rows of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 单元格行信息,列表形式。多个连续值表示单元格垮多行。 - - :param rows: The rows of this RecognizeFinancialStatementWordsBlockItemsResponse. - :type: list[int] - """ - self._rows = rows - - @property - def columns(self): - """Gets the columns of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 单元格列信息,列表形式。多个连续值表示单元格垮多列。 - - :return: The columns of this RecognizeFinancialStatementWordsBlockItemsResponse. - :rtype: list[int] - """ - return self._columns - - @columns.setter - def columns(self, columns): - """Sets the columns of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 单元格列信息,列表形式。多个连续值表示单元格垮多列。 - - :param columns: The columns of this RecognizeFinancialStatementWordsBlockItemsResponse. - :type: list[int] - """ - self._columns = columns - - @property - def cell_location(self): - """Gets the cell_location of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 文字块信息。 - - :return: The cell_location of this RecognizeFinancialStatementWordsBlockItemsResponse. - :rtype: list[int] - """ - return self._cell_location - - @cell_location.setter - def cell_location(self, cell_location): - """Sets the cell_location of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 文字块信息。 - - :param cell_location: The cell_location of this RecognizeFinancialStatementWordsBlockItemsResponse. - :type: list[int] - """ - self._cell_location = cell_location - - @property - def words_list(self): - """Gets the words_list of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 文字块信息。 - - :return: The words_list of this RecognizeFinancialStatementWordsBlockItemsResponse. - :rtype: list[RecognizeFinancialStatementWordsListItemsResponse] - """ - return self._words_list - - @words_list.setter - def words_list(self, words_list): - """Sets the words_list of this RecognizeFinancialStatementWordsBlockItemsResponse. - - 文字块信息。 - - :param words_list: The words_list of this RecognizeFinancialStatementWordsBlockItemsResponse. - :type: list[RecognizeFinancialStatementWordsListItemsResponse] - """ - self._words_list = words_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""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RecognizeFinancialStatementWordsBlockItemsResponse): - 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-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_words_region_items_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_words_region_items_response.py deleted file mode 100644 index e1cecf61e..000000000 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_financial_statement_words_region_items_response.py +++ /dev/null @@ -1,215 +0,0 @@ -# coding: utf-8 - -import pprint -import re - -import six - - - - - -class RecognizeFinancialStatementWordsRegionItemsResponse: - - - """ - 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 = { - 'type': 'str', - 'words_block_count': 'str', - 'words_block_list': 'list[RecognizeFinancialStatementWordsBlockItemsResponse]', - 'table_location': 'list[int]', - 'confidence': 'float' - } - - attribute_map = { - 'type': 'type', - 'words_block_count': 'words_block_count', - 'words_block_list': 'words_block_list', - 'table_location': 'table_location', - 'confidence': 'confidence' - } - - def __init__(self, type=None, words_block_count=None, words_block_list=None, table_location=None, confidence=None): - """RecognizeFinancialStatementWordsRegionItemsResponse - a model defined in huaweicloud sdk""" - - - - self._type = None - self._words_block_count = None - self._words_block_list = None - self._table_location = None - self._confidence = None - self.discriminator = None - - self.type = type - self.words_block_count = words_block_count - self.words_block_list = words_block_list - if table_location is not None: - self.table_location = table_location - if confidence is not None: - self.confidence = confidence - - @property - def type(self): - """Gets the type of this RecognizeFinancialStatementWordsRegionItemsResponse. - - 区域属性:文本或表格。 - - :return: The type of this RecognizeFinancialStatementWordsRegionItemsResponse. - :rtype: str - """ - return self._type - - @type.setter - def type(self, type): - """Sets the type of this RecognizeFinancialStatementWordsRegionItemsResponse. - - 区域属性:文本或表格。 - - :param type: The type of this RecognizeFinancialStatementWordsRegionItemsResponse. - :type: str - """ - self._type = type - - @property - def words_block_count(self): - """Gets the words_block_count of this RecognizeFinancialStatementWordsRegionItemsResponse. - - 区域内文字块数目。对文本区,文字块以文本字段为单位;对表格区,文字块以单元格内所有字段为单位。 - - :return: The words_block_count of this RecognizeFinancialStatementWordsRegionItemsResponse. - :rtype: str - """ - return self._words_block_count - - @words_block_count.setter - def words_block_count(self, words_block_count): - """Sets the words_block_count of this RecognizeFinancialStatementWordsRegionItemsResponse. - - 区域内文字块数目。对文本区,文字块以文本字段为单位;对表格区,文字块以单元格内所有字段为单位。 - - :param words_block_count: The words_block_count of this RecognizeFinancialStatementWordsRegionItemsResponse. - :type: str - """ - self._words_block_count = words_block_count - - @property - def words_block_list(self): - """Gets the words_block_list of this RecognizeFinancialStatementWordsRegionItemsResponse. - - 区域内文字块列表,输出顺序从左到右,从上到下。 - - :return: The words_block_list of this RecognizeFinancialStatementWordsRegionItemsResponse. - :rtype: list[RecognizeFinancialStatementWordsBlockItemsResponse] - """ - return self._words_block_list - - @words_block_list.setter - def words_block_list(self, words_block_list): - """Sets the words_block_list of this RecognizeFinancialStatementWordsRegionItemsResponse. - - 区域内文字块列表,输出顺序从左到右,从上到下。 - - :param words_block_list: The words_block_list of this RecognizeFinancialStatementWordsRegionItemsResponse. - :type: list[RecognizeFinancialStatementWordsBlockItemsResponse] - """ - self._words_block_list = words_block_list - - @property - def table_location(self): - """Gets the table_location of this RecognizeFinancialStatementWordsRegionItemsResponse. - - 表格位置信息,列表形式,分别表示表格4个顶点的x, y坐标;坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - - :return: The table_location of this RecognizeFinancialStatementWordsRegionItemsResponse. - :rtype: list[int] - """ - return self._table_location - - @table_location.setter - def table_location(self, table_location): - """Sets the table_location of this RecognizeFinancialStatementWordsRegionItemsResponse. - - 表格位置信息,列表形式,分别表示表格4个顶点的x, y坐标;坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - - :param table_location: The table_location of this RecognizeFinancialStatementWordsRegionItemsResponse. - :type: list[int] - """ - self._table_location = table_location - - @property - def confidence(self): - """Gets the confidence of this RecognizeFinancialStatementWordsRegionItemsResponse. - - 文字块识别结果置信度信息,置信度越大,表示本次识别的对应字段的可靠性越大,在统计意义上,置信度越大正确率越高。注:置信度由算法给出,其不直接等价于对应字段的精度。 - - :return: The confidence of this RecognizeFinancialStatementWordsRegionItemsResponse. - :rtype: float - """ - return self._confidence - - @confidence.setter - def confidence(self, confidence): - """Sets the confidence of this RecognizeFinancialStatementWordsRegionItemsResponse. - - 文字块识别结果置信度信息,置信度越大,表示本次识别的对应字段的可靠性越大,在统计意义上,置信度越大正确率越高。注:置信度由算法给出,其不直接等价于对应字段的精度。 - - :param confidence: The confidence of this RecognizeFinancialStatementWordsRegionItemsResponse. - :type: float - """ - self._confidence = confidence - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - if attr in self.sensitive_list: - result[attr] = "****" - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RecognizeFinancialStatementWordsRegionItemsResponse): - 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-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_request.py index 4d2c8f323..40599babc 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_request.py @@ -23,31 +23,55 @@ class RecognizeFlightItineraryRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeFlightItineraryRequestBody' + 'project_id': 'str', + 'body': 'FlightItineraryReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeFlightItineraryRequest - a model defined in huaweicloud sdk""" + 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 RecognizeFlightItineraryRequest. + + + :return: The project_id of this RecognizeFlightItineraryRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeFlightItineraryRequest. + + + :param project_id: The project_id of this RecognizeFlightItineraryRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeFlightItineraryRequest. :return: The body of this RecognizeFlightItineraryRequest. - :rtype: RecognizeFlightItineraryRequestBody + :rtype: FlightItineraryReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeFlightItineraryRequest: :param body: The body of this RecognizeFlightItineraryRequest. - :type: RecognizeFlightItineraryRequestBody + :type: FlightItineraryReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_request_body.py deleted file mode 100644 index 29f9f69df..000000000 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_request_body.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -import pprint -import re - -import six - - - - - -class RecognizeFlightItineraryRequestBody: - - - """ - 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', - 'image': 'str' - } - - attribute_map = { - 'url': 'url', - 'image': 'image' - } - - def __init__(self, url=None, image=None): - """RecognizeFlightItineraryRequestBody - a model defined in huaweicloud sdk""" - - - - self._url = None - self._image = None - self.discriminator = None - - if url is not None: - self.url = url - if image is not None: - self.image = image - - @property - def url(self): - """Gets the url of this RecognizeFlightItineraryRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :return: The url of this RecognizeFlightItineraryRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeFlightItineraryRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :param url: The url of this RecognizeFlightItineraryRequestBody. - :type: str - """ - self._url = url - - @property - def image(self): - """Gets the image of this RecognizeFlightItineraryRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :return: The image of this RecognizeFlightItineraryRequestBody. - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this RecognizeFlightItineraryRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :param image: The image of this RecognizeFlightItineraryRequestBody. - :type: str - """ - self._image = image - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - if attr in self.sensitive_list: - result[attr] = "****" - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RecognizeFlightItineraryRequestBody): - 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-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_response.py index b2cae2291..0d408321e 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_flight_itinerary_response.py @@ -23,7 +23,7 @@ class RecognizeFlightItineraryResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeFlightItineraryResultResponse' + 'result': 'FlightItineraryResponseBodyItem' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeFlightItineraryResponse(SdkResponse): :return: The result of this RecognizeFlightItineraryResponse. - :rtype: RecognizeFlightItineraryResultResponse + :rtype: FlightItineraryResponseBodyItem """ return self._result @@ -57,7 +57,7 @@ class RecognizeFlightItineraryResponse(SdkResponse): :param result: The result of this RecognizeFlightItineraryResponse. - :type: RecognizeFlightItineraryResultResponse + :type: FlightItineraryResponseBodyItem """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_items2_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_items2_response.py index cd513f629..ea07baa30 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_items2_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_items2_response.py @@ -122,7 +122,7 @@ class RecognizeGeneralTableItems2Response: def confidence(self): """Gets the confidence of this RecognizeGeneralTableItems2Response. - 字段的平均置信度,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。置信度由算法给出,不直接等价于对应字段的准确率。 + 字段的平均置信度,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。置信度由算法给出,不直接等价于对应字段的准确率。 :return: The confidence of this RecognizeGeneralTableItems2Response. :rtype: float @@ -133,7 +133,7 @@ class RecognizeGeneralTableItems2Response: def confidence(self, confidence): """Sets the confidence of this RecognizeGeneralTableItems2Response. - 字段的平均置信度,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。置信度由算法给出,不直接等价于对应字段的准确率。 + 字段的平均置信度,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。置信度由算法给出,不直接等价于对应字段的准确率。 :param confidence: The confidence of this RecognizeGeneralTableItems2Response. :type: float diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_request.py index 50fe7c676..3fd171ea8 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_request.py @@ -23,24 +23,48 @@ class RecognizeGeneralTableRequest: sensitive_list = [] openapi_types = { + 'project_id': 'str', 'body': 'RecognizeGeneralTableRequestBody' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeGeneralTableRequest - a model defined in huaweicloud sdk""" + 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 RecognizeGeneralTableRequest. + + + :return: The project_id of this RecognizeGeneralTableRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeGeneralTableRequest. + + + :param project_id: The project_id of this RecognizeGeneralTableRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeGeneralTableRequest. diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_request_body.py index 50a8b90cf..f34eac806 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_request_body.py @@ -25,37 +25,47 @@ class RecognizeGeneralTableRequestBody: openapi_types = { 'url': 'str', 'image': 'str', - 'return_confidence': 'bool' + 'return_text_location': 'bool', + 'return_confidence': 'bool', + 'return_excel': 'bool' } attribute_map = { 'url': 'url', 'image': 'image', - 'return_confidence': 'return_confidence' + 'return_text_location': 'return_text_location', + 'return_confidence': 'return_confidence', + 'return_excel': 'return_excel' } - def __init__(self, url=None, image=None, return_confidence=None): + def __init__(self, url=None, image=None, return_text_location=None, return_confidence=None, return_excel=None): """RecognizeGeneralTableRequestBody - a model defined in huaweicloud sdk""" self._url = None self._image = None + self._return_text_location = None self._return_confidence = None + self._return_excel = None self.discriminator = None if url is not None: self.url = url if image is not None: self.image = image + if return_text_location is not None: + self.return_text_location = return_text_location if return_confidence is not None: self.return_confidence = return_confidence + if return_excel is not None: + self.return_excel = return_excel @property def url(self): """Gets the url of this RecognizeGeneralTableRequestBody. - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 + 图片的URL路径,目前支持: 公网HTTP/HTTPS URL 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 说明: 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 :return: The url of this RecognizeGeneralTableRequestBody. :rtype: str @@ -66,7 +76,7 @@ class RecognizeGeneralTableRequestBody: def url(self, url): """Sets the url of this RecognizeGeneralTableRequestBody. - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 + 图片的URL路径,目前支持: 公网HTTP/HTTPS URL 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 说明: 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 :param url: The url of this RecognizeGeneralTableRequestBody. :type: str @@ -77,7 +87,7 @@ class RecognizeGeneralTableRequestBody: def image(self): """Gets the image of this RecognizeGeneralTableRequestBody. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式 + 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 :return: The image of this RecognizeGeneralTableRequestBody. :rtype: str @@ -88,18 +98,40 @@ class RecognizeGeneralTableRequestBody: def image(self, image): """Sets the image of this RecognizeGeneralTableRequestBody. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式 + 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 :param image: The image of this RecognizeGeneralTableRequestBody. :type: str """ self._image = image + @property + def return_text_location(self): + """Gets the return_text_location of this RecognizeGeneralTableRequestBody. + + 返回文本块坐标及单元格坐标信息,可选值如下所示。 true:返回文本块和单元格坐标 false:不返回 如果未传入该参数时默认为false,即不返回。 + + :return: The return_text_location of this RecognizeGeneralTableRequestBody. + :rtype: bool + """ + return self._return_text_location + + @return_text_location.setter + def return_text_location(self, return_text_location): + """Sets the return_text_location of this RecognizeGeneralTableRequestBody. + + 返回文本块坐标及单元格坐标信息,可选值如下所示。 true:返回文本块和单元格坐标 false:不返回 如果未传入该参数时默认为false,即不返回。 + + :param return_text_location: The return_text_location of this RecognizeGeneralTableRequestBody. + :type: bool + """ + self._return_text_location = return_text_location + @property def return_confidence(self): """Gets the return_confidence of this RecognizeGeneralTableRequestBody. - 是否返回置信度的开关,可选值包括: - true:返回置信度; - false:不返回置信度。 > 说明: - 如果无该参数,系统默认不返回置信度。如果输入参数不是Boolean类型,则会报非法参数错误。 + 是否返回置信度的开关,可选值包括: true:返回置信度; false:不返回置信度。 说明: 如果无该参数,系统默认不返回置信度。如果输入参数不是Boolean类型,则会报非法参数错误。 :return: The return_confidence of this RecognizeGeneralTableRequestBody. :rtype: bool @@ -110,13 +142,35 @@ class RecognizeGeneralTableRequestBody: def return_confidence(self, return_confidence): """Sets the return_confidence of this RecognizeGeneralTableRequestBody. - 是否返回置信度的开关,可选值包括: - true:返回置信度; - false:不返回置信度。 > 说明: - 如果无该参数,系统默认不返回置信度。如果输入参数不是Boolean类型,则会报非法参数错误。 + 是否返回置信度的开关,可选值包括: true:返回置信度; false:不返回置信度。 说明: 如果无该参数,系统默认不返回置信度。如果输入参数不是Boolean类型,则会报非法参数错误。 :param return_confidence: The return_confidence of this RecognizeGeneralTableRequestBody. :type: bool """ self._return_confidence = return_confidence + @property + def return_excel(self): + """Gets the return_excel of this RecognizeGeneralTableRequestBody. + + 是否返回表格转换Microsoft Excel的base64编码字段。可选值包括: true: 返回'excel'字段,表示xlsx格式的表格识别结果的base64编码 false: 不返回。默认为false 对返回的Excel编码,可用Python函数 base64.b64decode解码后保存为.xlsx文件。 + + :return: The return_excel of this RecognizeGeneralTableRequestBody. + :rtype: bool + """ + return self._return_excel + + @return_excel.setter + def return_excel(self, return_excel): + """Sets the return_excel of this RecognizeGeneralTableRequestBody. + + 是否返回表格转换Microsoft Excel的base64编码字段。可选值包括: true: 返回'excel'字段,表示xlsx格式的表格识别结果的base64编码 false: 不返回。默认为false 对返回的Excel编码,可用Python函数 base64.b64decode解码后保存为.xlsx文件。 + + :param return_excel: The return_excel of this RecognizeGeneralTableRequestBody. + :type: bool + """ + self._return_excel = return_excel + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_result_response.py index 0d0ba9157..43a2e84c7 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_table_result_response.py @@ -48,7 +48,7 @@ class RecognizeGeneralTableResultResponse: def words_region_count(self): """Gets the words_region_count of this RecognizeGeneralTableResultResponse. - 文字区域数目。 + 文字区域数目。 :return: The words_region_count of this RecognizeGeneralTableResultResponse. :rtype: int @@ -59,7 +59,7 @@ class RecognizeGeneralTableResultResponse: def words_region_count(self, words_region_count): """Sets the words_region_count of this RecognizeGeneralTableResultResponse. - 文字区域数目。 + 文字区域数目。 :param words_region_count: The words_region_count of this RecognizeGeneralTableResultResponse. :type: int diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_request.py index 16755e569..0faa1a2a3 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_request.py @@ -23,31 +23,55 @@ class RecognizeGeneralTextRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeGeneralTextRequestBody' + 'project_id': 'str', + 'body': 'GeneralTextReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeGeneralTextRequest - a model defined in huaweicloud sdk""" + 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 RecognizeGeneralTextRequest. + + + :return: The project_id of this RecognizeGeneralTextRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeGeneralTextRequest. + + + :param project_id: The project_id of this RecognizeGeneralTextRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeGeneralTextRequest. :return: The body of this RecognizeGeneralTextRequest. - :rtype: RecognizeGeneralTextRequestBody + :rtype: GeneralTextReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeGeneralTextRequest: :param body: The body of this RecognizeGeneralTextRequest. - :type: RecognizeGeneralTextRequestBody + :type: GeneralTextReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_response.py index 4c9e8cfc8..944e661eb 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_general_text_response.py @@ -23,7 +23,7 @@ class RecognizeGeneralTextResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeGeneralTextResultResponse' + 'result': 'GeneralTextResponseBodyItems' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeGeneralTextResponse(SdkResponse): :return: The result of this RecognizeGeneralTextResponse. - :rtype: RecognizeGeneralTextResultResponse + :rtype: GeneralTextResponseBodyItems """ return self._result @@ -57,7 +57,7 @@ class RecognizeGeneralTextResponse(SdkResponse): :param result: The result of this RecognizeGeneralTextResponse. - :type: RecognizeGeneralTextResultResponse + :type: GeneralTextResponseBodyItems """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_request.py index a33c121d3..1fd89c938 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_request.py @@ -23,31 +23,55 @@ class RecognizeHandwritingRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeHandwritingRequestBody' + 'project_id': 'str', + 'body': 'HandwritingReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeHandwritingRequest - a model defined in huaweicloud sdk""" + 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 RecognizeHandwritingRequest. + + + :return: The project_id of this RecognizeHandwritingRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeHandwritingRequest. + + + :param project_id: The project_id of this RecognizeHandwritingRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeHandwritingRequest. :return: The body of this RecognizeHandwritingRequest. - :rtype: RecognizeHandwritingRequestBody + :rtype: HandwritingReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeHandwritingRequest: :param body: The body of this RecognizeHandwritingRequest. - :type: RecognizeHandwritingRequestBody + :type: HandwritingReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_request_body.py deleted file mode 100644 index 22e9103cb..000000000 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_request_body.py +++ /dev/null @@ -1,218 +0,0 @@ -# coding: utf-8 - -import pprint -import re - -import six - - - - - -class RecognizeHandwritingRequestBody: - - - """ - 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', - 'image': 'str', - 'quick_mode': 'bool', - 'charset': 'str', - 'detect_direction': 'bool' - } - - attribute_map = { - 'url': 'url', - 'image': 'image', - 'quick_mode': 'quick_mode', - 'charset': 'charset', - 'detect_direction': 'detect_direction' - } - - def __init__(self, url=None, image=None, quick_mode=None, charset=None, detect_direction=None): - """RecognizeHandwritingRequestBody - a model defined in huaweicloud sdk""" - - - - self._url = None - self._image = None - self._quick_mode = None - self._charset = None - self._detect_direction = None - self.discriminator = None - - if url is not None: - self.url = url - if image is not None: - self.image = image - if quick_mode is not None: - self.quick_mode = quick_mode - if charset is not None: - self.charset = charset - if detect_direction is not None: - self.detect_direction = detect_direction - - @property - def url(self): - """Gets the url of this RecognizeHandwritingRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :return: The url of this RecognizeHandwritingRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeHandwritingRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :param url: The url of this RecognizeHandwritingRequestBody. - :type: str - """ - self._url = url - - @property - def image(self): - """Gets the image of this RecognizeHandwritingRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JJPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :return: The image of this RecognizeHandwritingRequestBody. - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this RecognizeHandwritingRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JJPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :param image: The image of this RecognizeHandwritingRequestBody. - :type: str - """ - self._image = image - - @property - def quick_mode(self): - """Gets the quick_mode of this RecognizeHandwritingRequestBody. - - 快速模式开关,针对单行文字图片(要求图片只包含一行文字,且文字区域占比超过50%),打开时可以更快返回识别内容。可选值如下所示。 true:打开快速模式 false:关闭快速模式 未传入该参数时默认为false,即关闭快速模式。 - - :return: The quick_mode of this RecognizeHandwritingRequestBody. - :rtype: bool - """ - return self._quick_mode - - @quick_mode.setter - def quick_mode(self, quick_mode): - """Sets the quick_mode of this RecognizeHandwritingRequestBody. - - 快速模式开关,针对单行文字图片(要求图片只包含一行文字,且文字区域占比超过50%),打开时可以更快返回识别内容。可选值如下所示。 true:打开快速模式 false:关闭快速模式 未传入该参数时默认为false,即关闭快速模式。 - - :param quick_mode: The quick_mode of this RecognizeHandwritingRequestBody. - :type: bool - """ - self._quick_mode = quick_mode - - @property - def charset(self): - """Gets the charset of this RecognizeHandwritingRequestBody. - - 字符集设置,用户可以根据实际需要限定输出字符集范围。可选值如下所示。 digit:数字模式 letter:大小写字母模式 digit_letter:数字+字母模式 general:数字+字母+中文模式 未传入该参数时,默认为“general”模式。 - - :return: The charset of this RecognizeHandwritingRequestBody. - :rtype: str - """ - return self._charset - - @charset.setter - def charset(self, charset): - """Sets the charset of this RecognizeHandwritingRequestBody. - - 字符集设置,用户可以根据实际需要限定输出字符集范围。可选值如下所示。 digit:数字模式 letter:大小写字母模式 digit_letter:数字+字母模式 general:数字+字母+中文模式 未传入该参数时,默认为“general”模式。 - - :param charset: The charset of this RecognizeHandwritingRequestBody. - :type: str - """ - self._charset = charset - - @property - def detect_direction(self): - """Gets the detect_direction of this RecognizeHandwritingRequestBody. - - 图片朝向检测开关,可选值包括: - true:检测图片朝向 - false:不检测图片朝向 > 说明: - 支持图片朝向逆时针旋转0/90/180/270度检测。未传入该参数时,默认为false,即不检测图片朝向,只支持正常角度的图片识别。 - - :return: The detect_direction of this RecognizeHandwritingRequestBody. - :rtype: bool - """ - return self._detect_direction - - @detect_direction.setter - def detect_direction(self, detect_direction): - """Sets the detect_direction of this RecognizeHandwritingRequestBody. - - 图片朝向检测开关,可选值包括: - true:检测图片朝向 - false:不检测图片朝向 > 说明: - 支持图片朝向逆时针旋转0/90/180/270度检测。未传入该参数时,默认为false,即不检测图片朝向,只支持正常角度的图片识别。 - - :param detect_direction: The detect_direction of this RecognizeHandwritingRequestBody. - :type: bool - """ - self._detect_direction = detect_direction - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - if attr in self.sensitive_list: - result[attr] = "****" - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RecognizeHandwritingRequestBody): - 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-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_response.py index af742b7fa..0877d8535 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_handwriting_response.py @@ -23,7 +23,7 @@ class RecognizeHandwritingResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeHandwritingResultResponse' + 'result': 'HandwritingResponseBodyItem' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeHandwritingResponse(SdkResponse): :return: The result of this RecognizeHandwritingResponse. - :rtype: RecognizeHandwritingResultResponse + :rtype: HandwritingResponseBodyItem """ return self._result @@ -57,7 +57,7 @@ class RecognizeHandwritingResponse(SdkResponse): :param result: The result of this RecognizeHandwritingResponse. - :type: RecognizeHandwritingResultResponse + :type: HandwritingResponseBodyItem """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_request.py index 7af35460a..0bf907138 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_request.py @@ -9,7 +9,7 @@ import six -class RecognizeIdCardRequest: +class RecognizeIDCardRequest: """ @@ -23,41 +23,65 @@ class RecognizeIdCardRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeIdCardRequestBody' + 'project_id': 'str', + 'body': 'IDCardReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): - """RecognizeIdCardRequest - a model defined in huaweicloud sdk""" + def __init__(self, project_id=None, body=None): + """RecognizeIDCardRequest - a model defined in huaweicloud sdk""" + 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 RecognizeIDCardRequest. + + + :return: The project_id of this RecognizeIDCardRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeIDCardRequest. + + + :param project_id: The project_id of this RecognizeIDCardRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): - """Gets the body of this RecognizeIdCardRequest. + """Gets the body of this RecognizeIDCardRequest. - :return: The body of this RecognizeIdCardRequest. - :rtype: RecognizeIdCardRequestBody + :return: The body of this RecognizeIDCardRequest. + :rtype: IDCardReq """ return self._body @body.setter def body(self, body): - """Sets the body of this RecognizeIdCardRequest. + """Sets the body of this RecognizeIDCardRequest. - :param body: The body of this RecognizeIdCardRequest. - :type: RecognizeIdCardRequestBody + :param body: The body of this RecognizeIDCardRequest. + :type: IDCardReq """ self._body = body @@ -98,7 +122,7 @@ class RecognizeIdCardRequest: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeIdCardRequest): + if not isinstance(other, RecognizeIDCardRequest): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_request_body.py deleted file mode 100644 index 682c63bf7..000000000 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_request_body.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -import pprint -import re - -import six - - - - - -class RecognizeIdCardRequestBody: - - - """ - 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', - 'image': 'str', - 'side': 'str' - } - - attribute_map = { - 'url': 'url', - 'image': 'image', - 'side': 'side' - } - - def __init__(self, url=None, image=None, side=None): - """RecognizeIdCardRequestBody - a model defined in huaweicloud sdk""" - - - - self._url = None - self._image = None - self._side = None - self.discriminator = None - - if url is not None: - self.url = url - if image is not None: - self.image = image - if side is not None: - self.side = side - - @property - def url(self): - """Gets the url of this RecognizeIdCardRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :return: The url of this RecognizeIdCardRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeIdCardRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :param url: The url of this RecognizeIdCardRequestBody. - :type: str - """ - self._url = url - - @property - def image(self): - """Gets the image of this RecognizeIdCardRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :return: The image of this RecognizeIdCardRequestBody. - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this RecognizeIdCardRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :param image: The image of this RecognizeIdCardRequestBody. - :type: str - """ - self._image = image - - @property - def side(self): - """Gets the side of this RecognizeIdCardRequestBody. - - 检测场景: - front:身份证正面。 - back:身份证背面。 > 说明: 如果参数值为空或无该参数,系统自动识别,建议填写,准确率更高。 - - :return: The side of this RecognizeIdCardRequestBody. - :rtype: str - """ - return self._side - - @side.setter - def side(self, side): - """Sets the side of this RecognizeIdCardRequestBody. - - 检测场景: - front:身份证正面。 - back:身份证背面。 > 说明: 如果参数值为空或无该参数,系统自动识别,建议填写,准确率更高。 - - :param side: The side of this RecognizeIdCardRequestBody. - :type: str - """ - self._side = side - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - if attr in self.sensitive_list: - result[attr] = "****" - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RecognizeIdCardRequestBody): - 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-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_response.py index 0181cd3cc..4522a1b1d 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_id_card_response.py @@ -9,7 +9,7 @@ import six from huaweicloudsdkcore.sdk_response import SdkResponse -class RecognizeIdCardResponse(SdkResponse): +class RecognizeIDCardResponse(SdkResponse): """ @@ -23,7 +23,7 @@ class RecognizeIdCardResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeIdCardResultResponse' + 'result': 'IDCardResultBody' } attribute_map = { @@ -31,7 +31,7 @@ class RecognizeIdCardResponse(SdkResponse): } def __init__(self, result=None): - """RecognizeIdCardResponse - a model defined in huaweicloud sdk""" + """RecognizeIDCardResponse - a model defined in huaweicloud sdk""" super().__init__() @@ -43,21 +43,21 @@ class RecognizeIdCardResponse(SdkResponse): @property def result(self): - """Gets the result of this RecognizeIdCardResponse. + """Gets the result of this RecognizeIDCardResponse. - :return: The result of this RecognizeIdCardResponse. - :rtype: RecognizeIdCardResultResponse + :return: The result of this RecognizeIDCardResponse. + :rtype: IDCardResultBody """ return self._result @result.setter def result(self, result): - """Sets the result of this RecognizeIdCardResponse. + """Sets the result of this RecognizeIDCardResponse. - :param result: The result of this RecognizeIdCardResponse. - :type: RecognizeIdCardResultResponse + :param result: The result of this RecognizeIDCardResponse. + :type: IDCardResultBody """ self._result = result @@ -98,7 +98,7 @@ class RecognizeIdCardResponse(SdkResponse): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeIdCardResponse): + if not isinstance(other, RecognizeIDCardResponse): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_request.py index babb3072d..0d1051f3e 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_request.py @@ -23,31 +23,55 @@ class RecognizeLicensePlateRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeLicensePlateRequestBody' + 'project_id': 'str', + 'body': 'LicensePlateReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeLicensePlateRequest - a model defined in huaweicloud sdk""" + 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 RecognizeLicensePlateRequest. + + + :return: The project_id of this RecognizeLicensePlateRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeLicensePlateRequest. + + + :param project_id: The project_id of this RecognizeLicensePlateRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeLicensePlateRequest. :return: The body of this RecognizeLicensePlateRequest. - :rtype: RecognizeLicensePlateRequestBody + :rtype: LicensePlateReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeLicensePlateRequest: :param body: The body of this RecognizeLicensePlateRequest. - :type: RecognizeLicensePlateRequestBody + :type: LicensePlateReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_response.py index 11a3626b8..da9141c01 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_response.py @@ -23,7 +23,7 @@ class RecognizeLicensePlateResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'list[RecognizeLicensePlateResultItemsResponse]' + 'result': 'LicensePlateResponseBodyItem' } attribute_map = { @@ -45,10 +45,9 @@ class RecognizeLicensePlateResponse(SdkResponse): def result(self): """Gets the result of this RecognizeLicensePlateResponse. - 调用成功时表示调用结果。 调用失败时无此字段。 :return: The result of this RecognizeLicensePlateResponse. - :rtype: list[RecognizeLicensePlateResultItemsResponse] + :rtype: LicensePlateResponseBodyItem """ return self._result @@ -56,10 +55,9 @@ class RecognizeLicensePlateResponse(SdkResponse): def result(self, result): """Sets the result of this RecognizeLicensePlateResponse. - 调用成功时表示调用结果。 调用失败时无此字段。 :param result: The result of this RecognizeLicensePlateResponse. - :type: list[RecognizeLicensePlateResultItemsResponse] + :type: LicensePlateResponseBodyItem """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_request.py index 4cde8fc0c..61388cdb0 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_request.py @@ -23,31 +23,55 @@ class RecognizeMvsInvoiceRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeMvsInvoiceRequestBody' + 'project_id': 'str', + 'body': 'MvsInvoiceReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeMvsInvoiceRequest - a model defined in huaweicloud sdk""" + 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 RecognizeMvsInvoiceRequest. + + + :return: The project_id of this RecognizeMvsInvoiceRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeMvsInvoiceRequest. + + + :param project_id: The project_id of this RecognizeMvsInvoiceRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeMvsInvoiceRequest. :return: The body of this RecognizeMvsInvoiceRequest. - :rtype: RecognizeMvsInvoiceRequestBody + :rtype: MvsInvoiceReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeMvsInvoiceRequest: :param body: The body of this RecognizeMvsInvoiceRequest. - :type: RecognizeMvsInvoiceRequestBody + :type: MvsInvoiceReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_response.py index 1ca850559..e74f396d0 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_mvs_invoice_response.py @@ -23,7 +23,7 @@ class RecognizeMvsInvoiceResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeMvsInvoiceResultResponse' + 'result': 'MvsInvoiceResultBody' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeMvsInvoiceResponse(SdkResponse): :return: The result of this RecognizeMvsInvoiceResponse. - :rtype: RecognizeMvsInvoiceResultResponse + :rtype: MvsInvoiceResultBody """ return self._result @@ -57,7 +57,7 @@ class RecognizeMvsInvoiceResponse(SdkResponse): :param result: The result of this RecognizeMvsInvoiceResponse. - :type: RecognizeMvsInvoiceResultResponse + :type: MvsInvoiceResultBody """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_request.py index 55092a448..ebaea0c33 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_request.py @@ -23,31 +23,55 @@ class RecognizePassportRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizePassportRequestBody' + 'project_id': 'str', + 'body': 'PassportReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizePassportRequest - a model defined in huaweicloud sdk""" + 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 RecognizePassportRequest. + + + :return: The project_id of this RecognizePassportRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizePassportRequest. + + + :param project_id: The project_id of this RecognizePassportRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizePassportRequest. :return: The body of this RecognizePassportRequest. - :rtype: RecognizePassportRequestBody + :rtype: PassportReq """ return self._body @@ -57,7 +81,7 @@ class RecognizePassportRequest: :param body: The body of this RecognizePassportRequest. - :type: RecognizePassportRequestBody + :type: PassportReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_response.py index 422c00774..a10f7db76 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_passport_response.py @@ -23,7 +23,7 @@ class RecognizePassportResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizePassportResultResponse' + 'result': 'PassportResultBody' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizePassportResponse(SdkResponse): :return: The result of this RecognizePassportResponse. - :rtype: RecognizePassportResultResponse + :rtype: PassportResultBody """ return self._result @@ -57,7 +57,7 @@ class RecognizePassportResponse(SdkResponse): :param result: The result of this RecognizePassportResponse. - :type: RecognizePassportResultResponse + :type: PassportResultBody """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_request.py index a7e798294..b335012c3 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_request.py @@ -23,31 +23,55 @@ class RecognizeQuotaInvoiceRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeQuotaInvoiceRequestBody' + 'project_id': 'str', + 'body': 'QuotaInvoiceReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeQuotaInvoiceRequest - a model defined in huaweicloud sdk""" + 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 RecognizeQuotaInvoiceRequest. + + + :return: The project_id of this RecognizeQuotaInvoiceRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeQuotaInvoiceRequest. + + + :param project_id: The project_id of this RecognizeQuotaInvoiceRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeQuotaInvoiceRequest. :return: The body of this RecognizeQuotaInvoiceRequest. - :rtype: RecognizeQuotaInvoiceRequestBody + :rtype: QuotaInvoiceReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeQuotaInvoiceRequest: :param body: The body of this RecognizeQuotaInvoiceRequest. - :type: RecognizeQuotaInvoiceRequestBody + :type: QuotaInvoiceReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_request_body.py deleted file mode 100644 index 40c7c8df1..000000000 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_request_body.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -import pprint -import re - -import six - - - - - -class RecognizeQuotaInvoiceRequestBody: - - - """ - 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', - 'image': 'str' - } - - attribute_map = { - 'url': 'url', - 'image': 'image' - } - - def __init__(self, url=None, image=None): - """RecognizeQuotaInvoiceRequestBody - a model defined in huaweicloud sdk""" - - - - self._url = None - self._image = None - self.discriminator = None - - if url is not None: - self.url = url - if image is not None: - self.image = image - - @property - def url(self): - """Gets the url of this RecognizeQuotaInvoiceRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :return: The url of this RecognizeQuotaInvoiceRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeQuotaInvoiceRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :param url: The url of this RecognizeQuotaInvoiceRequestBody. - :type: str - """ - self._url = url - - @property - def image(self): - """Gets the image of this RecognizeQuotaInvoiceRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过12M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :return: The image of this RecognizeQuotaInvoiceRequestBody. - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this RecognizeQuotaInvoiceRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过12M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :param image: The image of this RecognizeQuotaInvoiceRequestBody. - :type: str - """ - self._image = image - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - if attr in self.sensitive_list: - result[attr] = "****" - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RecognizeQuotaInvoiceRequestBody): - 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-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_response.py index 88a0979b2..6db39b219 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_quota_invoice_response.py @@ -23,7 +23,7 @@ class RecognizeQuotaInvoiceResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeQuotaInvoiceResultResponse' + 'result': 'QuotaInvoiceResultBody' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeQuotaInvoiceResponse(SdkResponse): :return: The result of this RecognizeQuotaInvoiceResponse. - :rtype: RecognizeQuotaInvoiceResultResponse + :rtype: QuotaInvoiceResultBody """ return self._result @@ -57,7 +57,7 @@ class RecognizeQuotaInvoiceResponse(SdkResponse): :param result: The result of this RecognizeQuotaInvoiceResponse. - :type: RecognizeQuotaInvoiceResultResponse + :type: QuotaInvoiceResultBody """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_request.py index 5c3e6c9c3..729adf5c4 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_request.py @@ -23,31 +23,55 @@ class RecognizeTaxiInvoiceRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeTaxiInvoiceRequestBody' + 'project_id': 'str', + 'body': 'TaxiInvoiceReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeTaxiInvoiceRequest - a model defined in huaweicloud sdk""" + 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 RecognizeTaxiInvoiceRequest. + + + :return: The project_id of this RecognizeTaxiInvoiceRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeTaxiInvoiceRequest. + + + :param project_id: The project_id of this RecognizeTaxiInvoiceRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeTaxiInvoiceRequest. :return: The body of this RecognizeTaxiInvoiceRequest. - :rtype: RecognizeTaxiInvoiceRequestBody + :rtype: TaxiInvoiceReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeTaxiInvoiceRequest: :param body: The body of this RecognizeTaxiInvoiceRequest. - :type: RecognizeTaxiInvoiceRequestBody + :type: TaxiInvoiceReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_response.py index ee8f0265a..013282492 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_response.py @@ -23,7 +23,7 @@ class RecognizeTaxiInvoiceResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeTaxiInvoiceResultResponse' + 'result': 'TaxiInvoiceResultBody' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeTaxiInvoiceResponse(SdkResponse): :return: The result of this RecognizeTaxiInvoiceResponse. - :rtype: RecognizeTaxiInvoiceResultResponse + :rtype: TaxiInvoiceResultBody """ return self._result @@ -57,7 +57,7 @@ class RecognizeTaxiInvoiceResponse(SdkResponse): :param result: The result of this RecognizeTaxiInvoiceResponse. - :type: RecognizeTaxiInvoiceResultResponse + :type: TaxiInvoiceResultBody """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_request.py index c6137a440..8775aa3f6 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_request.py @@ -23,31 +23,55 @@ class RecognizeTollInvoiceRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeTollInvoiceRequestBody' + 'project_id': 'str', + 'body': 'TollInvoiceReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeTollInvoiceRequest - a model defined in huaweicloud sdk""" + 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 RecognizeTollInvoiceRequest. + + + :return: The project_id of this RecognizeTollInvoiceRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeTollInvoiceRequest. + + + :param project_id: The project_id of this RecognizeTollInvoiceRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeTollInvoiceRequest. :return: The body of this RecognizeTollInvoiceRequest. - :rtype: RecognizeTollInvoiceRequestBody + :rtype: TollInvoiceReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeTollInvoiceRequest: :param body: The body of this RecognizeTollInvoiceRequest. - :type: RecognizeTollInvoiceRequestBody + :type: TollInvoiceReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_request_body.py deleted file mode 100644 index 25367ad35..000000000 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_request_body.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -import pprint -import re - -import six - - - - - -class RecognizeTollInvoiceRequestBody: - - - """ - 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', - 'image': 'str' - } - - attribute_map = { - 'url': 'url', - 'image': 'image' - } - - def __init__(self, url=None, image=None): - """RecognizeTollInvoiceRequestBody - a model defined in huaweicloud sdk""" - - - - self._url = None - self._image = None - self.discriminator = None - - if url is not None: - self.url = url - if image is not None: - self.image = image - - @property - def url(self): - """Gets the url of this RecognizeTollInvoiceRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :return: The url of this RecognizeTollInvoiceRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeTollInvoiceRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :param url: The url of this RecognizeTollInvoiceRequestBody. - :type: str - """ - self._url = url - - @property - def image(self): - """Gets the image of this RecognizeTollInvoiceRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :return: The image of this RecognizeTollInvoiceRequestBody. - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this RecognizeTollInvoiceRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :param image: The image of this RecognizeTollInvoiceRequestBody. - :type: str - """ - self._image = image - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - if attr in self.sensitive_list: - result[attr] = "****" - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RecognizeTollInvoiceRequestBody): - 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-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_response.py index 9b4519cf3..3cf8430dc 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_response.py @@ -23,7 +23,7 @@ class RecognizeTollInvoiceResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeTollInvoiceResultResponse' + 'result': 'TollInvoiceResultBody' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeTollInvoiceResponse(SdkResponse): :return: The result of this RecognizeTollInvoiceResponse. - :rtype: RecognizeTollInvoiceResultResponse + :rtype: TollInvoiceResultBody """ return self._result @@ -57,7 +57,7 @@ class RecognizeTollInvoiceResponse(SdkResponse): :param result: The result of this RecognizeTollInvoiceResponse. - :type: RecognizeTollInvoiceResultResponse + :type: TollInvoiceResultBody """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_request.py index fda7155d8..9c70feb81 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_request.py @@ -23,31 +23,55 @@ class RecognizeTrainTicketRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeTrainTicketRequestBody' + 'project_id': 'str', + 'body': 'TrainTicketReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeTrainTicketRequest - a model defined in huaweicloud sdk""" + 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 RecognizeTrainTicketRequest. + + + :return: The project_id of this RecognizeTrainTicketRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeTrainTicketRequest. + + + :param project_id: The project_id of this RecognizeTrainTicketRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeTrainTicketRequest. :return: The body of this RecognizeTrainTicketRequest. - :rtype: RecognizeTrainTicketRequestBody + :rtype: TrainTicketReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeTrainTicketRequest: :param body: The body of this RecognizeTrainTicketRequest. - :type: RecognizeTrainTicketRequestBody + :type: TrainTicketReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_response.py index 0dedb7d66..bcd1f4176 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_response.py @@ -23,7 +23,7 @@ class RecognizeTrainTicketResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeTrainTicketResultResponse' + 'result': 'TrainTicketResultBody' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeTrainTicketResponse(SdkResponse): :return: The result of this RecognizeTrainTicketResponse. - :rtype: RecognizeTrainTicketResultResponse + :rtype: TrainTicketResultBody """ return self._result @@ -57,7 +57,7 @@ class RecognizeTrainTicketResponse(SdkResponse): :param result: The result of this RecognizeTrainTicketResponse. - :type: RecognizeTrainTicketResultResponse + :type: TrainTicketResultBody """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_request.py index 1a63a4709..2b655ad46 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_request.py @@ -23,31 +23,55 @@ class RecognizeTransportationLicenseRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeTransportationLicenseRequestBody' + 'project_id': 'str', + 'body': 'TransportationLicenseReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeTransportationLicenseRequest - a model defined in huaweicloud sdk""" + 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 RecognizeTransportationLicenseRequest. + + + :return: The project_id of this RecognizeTransportationLicenseRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeTransportationLicenseRequest. + + + :param project_id: The project_id of this RecognizeTransportationLicenseRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeTransportationLicenseRequest. :return: The body of this RecognizeTransportationLicenseRequest. - :rtype: RecognizeTransportationLicenseRequestBody + :rtype: TransportationLicenseReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeTransportationLicenseRequest: :param body: The body of this RecognizeTransportationLicenseRequest. - :type: RecognizeTransportationLicenseRequestBody + :type: TransportationLicenseReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_request_body.py deleted file mode 100644 index 2f1f7c7fa..000000000 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_request_body.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -import pprint -import re - -import six - - - - - -class RecognizeTransportationLicenseRequestBody: - - - """ - 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', - 'image': 'str' - } - - attribute_map = { - 'url': 'url', - 'image': 'image' - } - - def __init__(self, url=None, image=None): - """RecognizeTransportationLicenseRequestBody - a model defined in huaweicloud sdk""" - - - - self._url = None - self._image = None - self.discriminator = None - - if url is not None: - self.url = url - if image is not None: - self.image = image - - @property - def url(self): - """Gets the url of this RecognizeTransportationLicenseRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :return: The url of this RecognizeTransportationLicenseRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeTransportationLicenseRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :param url: The url of this RecognizeTransportationLicenseRequestBody. - :type: str - """ - self._url = url - - @property - def image(self): - """Gets the image of this RecognizeTransportationLicenseRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :return: The image of this RecognizeTransportationLicenseRequestBody. - :rtype: str - """ - return self._image - - @image.setter - def image(self, image): - """Sets the image of this RecognizeTransportationLicenseRequestBody. - - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - - :param image: The image of this RecognizeTransportationLicenseRequestBody. - :type: str - """ - self._image = image - - def to_dict(self): - """Returns the model properties as a dict""" - result = {} - - for attr, _ in six.iteritems(self.openapi_types): - value = getattr(self, attr) - if isinstance(value, list): - result[attr] = list(map( - lambda x: x.to_dict() if hasattr(x, "to_dict") else x, - value - )) - elif hasattr(value, "to_dict"): - result[attr] = value.to_dict() - elif isinstance(value, dict): - result[attr] = dict(map( - lambda item: (item[0], item[1].to_dict()) - if hasattr(item[1], "to_dict") else item, - value.items() - )) - else: - if attr in self.sensitive_list: - result[attr] = "****" - else: - result[attr] = value - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, RecognizeTransportationLicenseRequestBody): - 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-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_response.py index df460ef56..c8de2d9b9 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_response.py @@ -23,7 +23,7 @@ class RecognizeTransportationLicenseResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeTransportationLicenseResultResponse' + 'result': 'TransportationLicenseResultBody' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeTransportationLicenseResponse(SdkResponse): :return: The result of this RecognizeTransportationLicenseResponse. - :rtype: RecognizeTransportationLicenseResultResponse + :rtype: TransportationLicenseResultBody """ return self._result @@ -57,7 +57,7 @@ class RecognizeTransportationLicenseResponse(SdkResponse): :param result: The result of this RecognizeTransportationLicenseResponse. - :type: RecognizeTransportationLicenseResultResponse + :type: TransportationLicenseResultBody """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_items_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_items_response.py index 405997f46..4aaffb2b8 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_items_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_items_response.py @@ -28,9 +28,13 @@ class RecognizeVatInvoiceItemsResponse: 'unit': 'str', 'quantity': 'str', 'unit_price': 'str', + 'license_plate_number': 'str', 'amount': 'str', 'tax_rate': 'str', - 'tax': 'str' + 'tax': 'str', + 'end_date': 'str', + 'start_date': 'str', + 'vehicle_type': 'str' } attribute_map = { @@ -39,12 +43,16 @@ class RecognizeVatInvoiceItemsResponse: 'unit': 'unit', 'quantity': 'quantity', 'unit_price': 'unit_price', + 'license_plate_number': 'license_plate_number', 'amount': 'amount', 'tax_rate': 'tax_rate', - 'tax': 'tax' + 'tax': 'tax', + 'end_date': 'end_date', + 'start_date': 'start_date', + 'vehicle_type': 'vehicle_type' } - def __init__(self, name=None, specification=None, unit=None, quantity=None, unit_price=None, amount=None, tax_rate=None, tax=None): + def __init__(self, name=None, specification=None, unit=None, quantity=None, unit_price=None, license_plate_number=None, amount=None, tax_rate=None, tax=None, end_date=None, start_date=None, vehicle_type=None): """RecognizeVatInvoiceItemsResponse - a model defined in huaweicloud sdk""" @@ -54,9 +62,13 @@ class RecognizeVatInvoiceItemsResponse: self._unit = None self._quantity = None self._unit_price = None + self._license_plate_number = None self._amount = None self._tax_rate = None self._tax = None + self._end_date = None + self._start_date = None + self._vehicle_type = None self.discriminator = None if name is not None: @@ -69,12 +81,20 @@ class RecognizeVatInvoiceItemsResponse: self.quantity = quantity if unit_price is not None: self.unit_price = unit_price + if license_plate_number is not None: + self.license_plate_number = license_plate_number if amount is not None: self.amount = amount if tax_rate is not None: self.tax_rate = tax_rate if tax is not None: self.tax = tax + if end_date is not None: + self.end_date = end_date + if start_date is not None: + self.start_date = start_date + if vehicle_type is not None: + self.vehicle_type = vehicle_type @property def name(self): @@ -186,6 +206,28 @@ class RecognizeVatInvoiceItemsResponse: """ self._unit_price = unit_price + @property + def license_plate_number(self): + """Gets the license_plate_number of this RecognizeVatInvoiceItemsResponse. + + 车牌号码。 当“advanced_mode”设置为“true”时才返回。 + + :return: The license_plate_number of this RecognizeVatInvoiceItemsResponse. + :rtype: str + """ + return self._license_plate_number + + @license_plate_number.setter + def license_plate_number(self, license_plate_number): + """Sets the license_plate_number of this RecognizeVatInvoiceItemsResponse. + + 车牌号码。 当“advanced_mode”设置为“true”时才返回。 + + :param license_plate_number: The license_plate_number of this RecognizeVatInvoiceItemsResponse. + :type: str + """ + self._license_plate_number = license_plate_number + @property def amount(self): """Gets the amount of this RecognizeVatInvoiceItemsResponse. @@ -252,6 +294,72 @@ class RecognizeVatInvoiceItemsResponse: """ self._tax = tax + @property + def end_date(self): + """Gets the end_date of this RecognizeVatInvoiceItemsResponse. + + 通行日期止。 当“advanced_mode”设置为“true”时才返回。 + + :return: The end_date of this RecognizeVatInvoiceItemsResponse. + :rtype: str + """ + return self._end_date + + @end_date.setter + def end_date(self, end_date): + """Sets the end_date of this RecognizeVatInvoiceItemsResponse. + + 通行日期止。 当“advanced_mode”设置为“true”时才返回。 + + :param end_date: The end_date of this RecognizeVatInvoiceItemsResponse. + :type: str + """ + self._end_date = end_date + + @property + def start_date(self): + """Gets the start_date of this RecognizeVatInvoiceItemsResponse. + + 通行日期起。 当“advanced_mode”设置为“true”时才返回。 + + :return: The start_date of this RecognizeVatInvoiceItemsResponse. + :rtype: str + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """Sets the start_date of this RecognizeVatInvoiceItemsResponse. + + 通行日期起。 当“advanced_mode”设置为“true”时才返回。 + + :param start_date: The start_date of this RecognizeVatInvoiceItemsResponse. + :type: str + """ + self._start_date = start_date + + @property + def vehicle_type(self): + """Gets the vehicle_type of this RecognizeVatInvoiceItemsResponse. + + 车辆类型。 当“advanced_mode”设置为“true”时才返回。 + + :return: The vehicle_type of this RecognizeVatInvoiceItemsResponse. + :rtype: str + """ + return self._vehicle_type + + @vehicle_type.setter + def vehicle_type(self, vehicle_type): + """Sets the vehicle_type of this RecognizeVatInvoiceItemsResponse. + + 车辆类型。 当“advanced_mode”设置为“true”时才返回。 + + :param vehicle_type: The vehicle_type of this RecognizeVatInvoiceItemsResponse. + :type: str + """ + self._vehicle_type = vehicle_type + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_request.py index c519b0f62..1c1acd5e1 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_request.py @@ -23,24 +23,48 @@ class RecognizeVatInvoiceRequest: sensitive_list = [] openapi_types = { + 'project_id': 'str', 'body': 'RecognizeVatInvoiceRequestBody' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeVatInvoiceRequest - a model defined in huaweicloud sdk""" + 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 RecognizeVatInvoiceRequest. + + + :return: The project_id of this RecognizeVatInvoiceRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeVatInvoiceRequest. + + + :param project_id: The project_id of this RecognizeVatInvoiceRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeVatInvoiceRequest. diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_request_body.py index 1c88ec302..8bb001bce 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_request_body.py @@ -24,27 +24,32 @@ class RecognizeVatInvoiceRequestBody: openapi_types = { 'url': 'str', - 'image': 'str' + 'image': 'str', + 'advanced_mode': 'bool' } attribute_map = { 'url': 'url', - 'image': 'image' + 'image': 'image', + 'advanced_mode': 'advanced_mode' } - def __init__(self, url=None, image=None): + def __init__(self, url=None, image=None, advanced_mode=None): """RecognizeVatInvoiceRequestBody - a model defined in huaweicloud sdk""" self._url = None self._image = None + self._advanced_mode = None self.discriminator = None if url is not None: self.url = url if image is not None: self.image = image + if advanced_mode is not None: + self.advanced_mode = advanced_mode @property def url(self): @@ -72,7 +77,7 @@ class RecognizeVatInvoiceRequestBody: def image(self): """Gets the image of this RecognizeVatInvoiceRequestBody. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 :return: The image of this RecognizeVatInvoiceRequestBody. :rtype: str @@ -83,13 +88,35 @@ class RecognizeVatInvoiceRequestBody: def image(self, image): """Sets the image of this RecognizeVatInvoiceRequestBody. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 :param image: The image of this RecognizeVatInvoiceRequestBody. :type: str """ self._image = image + @property + def advanced_mode(self): + """Gets the advanced_mode of this RecognizeVatInvoiceRequestBody. + + 默认为false,如果传参为true,则返回更多字段 + + :return: The advanced_mode of this RecognizeVatInvoiceRequestBody. + :rtype: bool + """ + return self._advanced_mode + + @advanced_mode.setter + def advanced_mode(self, advanced_mode): + """Sets the advanced_mode of this RecognizeVatInvoiceRequestBody. + + 默认为false,如果传参为true,则返回更多字段 + + :param advanced_mode: The advanced_mode of this RecognizeVatInvoiceRequestBody. + :type: bool + """ + self._advanced_mode = advanced_mode + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_result_response.py index 91fca0ac3..b5b95e1ec 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vat_invoice_result_response.py @@ -24,9 +24,15 @@ class RecognizeVatInvoiceResultResponse: openapi_types = { 'type': 'str', + 'serial_number': 'str', + 'attribution': 'str', + 'supervision_seal': 'list[str]', 'code': 'str', + 'machine_number': 'str', + 'print_number': 'str', 'check_code': 'str', 'number': 'str', + 'issue_id': 'str', 'issue_date': 'str', 'encryption_block': 'str', 'buyer_name': 'str', @@ -40,14 +46,26 @@ class RecognizeVatInvoiceResultResponse: 'subtotal_amount': 'str', 'subtotal_tax': 'str', 'total': 'str', + 'total_in_words': 'str', + 'remarks': 'str', + 'receiver': 'str', + 'reviewer': 'str', + 'issuer': 'str', + 'seller_seal': 'str', 'item_list': 'list[RecognizeVatInvoiceItemsResponse]' } attribute_map = { 'type': 'type', + 'serial_number': 'serial_number', + 'attribution': 'attribution', + 'supervision_seal': 'supervision_seal', 'code': 'code', + 'machine_number': 'machine_number', + 'print_number': 'print_number', 'check_code': 'check_code', 'number': 'number', + 'issue_id': 'issue_id', 'issue_date': 'issue_date', 'encryption_block': 'encryption_block', 'buyer_name': 'buyer_name', @@ -61,18 +79,30 @@ class RecognizeVatInvoiceResultResponse: 'subtotal_amount': 'subtotal_amount', 'subtotal_tax': 'subtotal_tax', 'total': 'total', + 'total_in_words': 'total_in_words', + 'remarks': 'remarks', + 'receiver': 'receiver', + 'reviewer': 'reviewer', + 'issuer': 'issuer', + 'seller_seal': 'seller_seal', 'item_list': 'item_list' } - def __init__(self, type=None, code=None, check_code=None, number=None, issue_date=None, encryption_block=None, buyer_name=None, buyer_id=None, buyer_address=None, buyer_bank=None, seller_name=None, seller_id=None, seller_address=None, seller_bank=None, subtotal_amount=None, subtotal_tax=None, total=None, item_list=None): + def __init__(self, type=None, serial_number=None, attribution=None, supervision_seal=None, code=None, machine_number=None, print_number=None, check_code=None, number=None, issue_id=None, issue_date=None, encryption_block=None, buyer_name=None, buyer_id=None, buyer_address=None, buyer_bank=None, seller_name=None, seller_id=None, seller_address=None, seller_bank=None, subtotal_amount=None, subtotal_tax=None, total=None, total_in_words=None, remarks=None, receiver=None, reviewer=None, issuer=None, seller_seal=None, item_list=None): """RecognizeVatInvoiceResultResponse - a model defined in huaweicloud sdk""" self._type = None + self._serial_number = None + self._attribution = None + self._supervision_seal = None self._code = None + self._machine_number = None + self._print_number = None self._check_code = None self._number = None + self._issue_id = None self._issue_date = None self._encryption_block = None self._buyer_name = None @@ -86,17 +116,35 @@ class RecognizeVatInvoiceResultResponse: self._subtotal_amount = None self._subtotal_tax = None self._total = None + self._total_in_words = None + self._remarks = None + self._receiver = None + self._reviewer = None + self._issuer = None + self._seller_seal = None self._item_list = None self.discriminator = None if type is not None: self.type = type + if serial_number is not None: + self.serial_number = serial_number + if attribution is not None: + self.attribution = attribution + if supervision_seal is not None: + self.supervision_seal = supervision_seal if code is not None: self.code = code + if machine_number is not None: + self.machine_number = machine_number + if print_number is not None: + self.print_number = print_number if check_code is not None: self.check_code = check_code if number is not None: self.number = number + if issue_id is not None: + self.issue_id = issue_id if issue_date is not None: self.issue_date = issue_date if encryption_block is not None: @@ -123,6 +171,18 @@ class RecognizeVatInvoiceResultResponse: self.subtotal_tax = subtotal_tax if total is not None: self.total = total + if total_in_words is not None: + self.total_in_words = total_in_words + if remarks is not None: + self.remarks = remarks + if receiver is not None: + self.receiver = receiver + if reviewer is not None: + self.reviewer = reviewer + if issuer is not None: + self.issuer = issuer + if seller_seal is not None: + self.seller_seal = seller_seal if item_list is not None: self.item_list = item_list @@ -148,6 +208,72 @@ class RecognizeVatInvoiceResultResponse: """ self._type = type + @property + def serial_number(self): + """Gets the serial_number of this RecognizeVatInvoiceResultResponse. + + 发票联次。 当“advanced_mode”设置为“true”时才返回。 + + :return: The serial_number of this RecognizeVatInvoiceResultResponse. + :rtype: str + """ + return self._serial_number + + @serial_number.setter + def serial_number(self, serial_number): + """Sets the serial_number of this RecognizeVatInvoiceResultResponse. + + 发票联次。 当“advanced_mode”设置为“true”时才返回。 + + :param serial_number: The serial_number of this RecognizeVatInvoiceResultResponse. + :type: str + """ + self._serial_number = serial_number + + @property + def attribution(self): + """Gets the attribution of this RecognizeVatInvoiceResultResponse. + + 发票归属地。 当“advanced_mode”设置为“true”时才返回。 + + :return: The attribution of this RecognizeVatInvoiceResultResponse. + :rtype: str + """ + return self._attribution + + @attribution.setter + def attribution(self, attribution): + """Sets the attribution of this RecognizeVatInvoiceResultResponse. + + 发票归属地。 当“advanced_mode”设置为“true”时才返回。 + + :param attribution: The attribution of this RecognizeVatInvoiceResultResponse. + :type: str + """ + self._attribution = attribution + + @property + def supervision_seal(self): + """Gets the supervision_seal of this RecognizeVatInvoiceResultResponse. + + 发票监制章。 当“advanced_mode”设置为“true”时才返回。 + + :return: The supervision_seal of this RecognizeVatInvoiceResultResponse. + :rtype: list[str] + """ + return self._supervision_seal + + @supervision_seal.setter + def supervision_seal(self, supervision_seal): + """Sets the supervision_seal of this RecognizeVatInvoiceResultResponse. + + 发票监制章。 当“advanced_mode”设置为“true”时才返回。 + + :param supervision_seal: The supervision_seal of this RecognizeVatInvoiceResultResponse. + :type: list[str] + """ + self._supervision_seal = supervision_seal + @property def code(self): """Gets the code of this RecognizeVatInvoiceResultResponse. @@ -170,6 +296,50 @@ class RecognizeVatInvoiceResultResponse: """ self._code = code + @property + def machine_number(self): + """Gets the machine_number of this RecognizeVatInvoiceResultResponse. + + 机器编号。 当“advanced_mode”设置为“true”时才返回。 + + :return: The machine_number of this RecognizeVatInvoiceResultResponse. + :rtype: str + """ + return self._machine_number + + @machine_number.setter + def machine_number(self, machine_number): + """Sets the machine_number of this RecognizeVatInvoiceResultResponse. + + 机器编号。 当“advanced_mode”设置为“true”时才返回。 + + :param machine_number: The machine_number of this RecognizeVatInvoiceResultResponse. + :type: str + """ + self._machine_number = machine_number + + @property + def print_number(self): + """Gets the print_number of this RecognizeVatInvoiceResultResponse. + + 机打号码。 当“advanced_mode”设置为“true”时才返回 + + :return: The print_number of this RecognizeVatInvoiceResultResponse. + :rtype: str + """ + return self._print_number + + @print_number.setter + def print_number(self, print_number): + """Sets the print_number of this RecognizeVatInvoiceResultResponse. + + 机打号码。 当“advanced_mode”设置为“true”时才返回 + + :param print_number: The print_number of this RecognizeVatInvoiceResultResponse. + :type: str + """ + self._print_number = print_number + @property def check_code(self): """Gets the check_code of this RecognizeVatInvoiceResultResponse. @@ -214,6 +384,28 @@ class RecognizeVatInvoiceResultResponse: """ self._number = number + @property + def issue_id(self): + """Gets the issue_id of this RecognizeVatInvoiceResultResponse. + + 发票号码。 + + :return: The issue_id of this RecognizeVatInvoiceResultResponse. + :rtype: str + """ + return self._issue_id + + @issue_id.setter + def issue_id(self, issue_id): + """Sets the issue_id of this RecognizeVatInvoiceResultResponse. + + 发票号码。 + + :param issue_id: The issue_id of this RecognizeVatInvoiceResultResponse. + :type: str + """ + self._issue_id = issue_id + @property def issue_date(self): """Gets the issue_date of this RecognizeVatInvoiceResultResponse. @@ -500,6 +692,138 @@ class RecognizeVatInvoiceResultResponse: """ self._total = total + @property + def total_in_words(self): + """Gets the total_in_words of this RecognizeVatInvoiceResultResponse. + + 价税合计(大写)。 当“advanced_mode”设置为“true”时才返回。 + + :return: The total_in_words of this RecognizeVatInvoiceResultResponse. + :rtype: str + """ + return self._total_in_words + + @total_in_words.setter + def total_in_words(self, total_in_words): + """Sets the total_in_words of this RecognizeVatInvoiceResultResponse. + + 价税合计(大写)。 当“advanced_mode”设置为“true”时才返回。 + + :param total_in_words: The total_in_words of this RecognizeVatInvoiceResultResponse. + :type: str + """ + self._total_in_words = total_in_words + + @property + def remarks(self): + """Gets the remarks of this RecognizeVatInvoiceResultResponse. + + 备注。 当“advanced_mode”设置为“true”时才返回。 + + :return: The remarks of this RecognizeVatInvoiceResultResponse. + :rtype: str + """ + return self._remarks + + @remarks.setter + def remarks(self, remarks): + """Sets the remarks of this RecognizeVatInvoiceResultResponse. + + 备注。 当“advanced_mode”设置为“true”时才返回。 + + :param remarks: The remarks of this RecognizeVatInvoiceResultResponse. + :type: str + """ + self._remarks = remarks + + @property + def receiver(self): + """Gets the receiver of this RecognizeVatInvoiceResultResponse. + + 收款人。 当“advanced_mode”设置为“true”时才返回。 + + :return: The receiver of this RecognizeVatInvoiceResultResponse. + :rtype: str + """ + return self._receiver + + @receiver.setter + def receiver(self, receiver): + """Sets the receiver of this RecognizeVatInvoiceResultResponse. + + 收款人。 当“advanced_mode”设置为“true”时才返回。 + + :param receiver: The receiver of this RecognizeVatInvoiceResultResponse. + :type: str + """ + self._receiver = receiver + + @property + def reviewer(self): + """Gets the reviewer of this RecognizeVatInvoiceResultResponse. + + 复核。 当“advanced_mode”设置为“true”时才返回。 + + :return: The reviewer of this RecognizeVatInvoiceResultResponse. + :rtype: str + """ + return self._reviewer + + @reviewer.setter + def reviewer(self, reviewer): + """Sets the reviewer of this RecognizeVatInvoiceResultResponse. + + 复核。 当“advanced_mode”设置为“true”时才返回。 + + :param reviewer: The reviewer of this RecognizeVatInvoiceResultResponse. + :type: str + """ + self._reviewer = reviewer + + @property + def issuer(self): + """Gets the issuer of this RecognizeVatInvoiceResultResponse. + + 开票人。 当“advanced_mode”设置为“true”时才返回。 + + :return: The issuer of this RecognizeVatInvoiceResultResponse. + :rtype: str + """ + return self._issuer + + @issuer.setter + def issuer(self, issuer): + """Sets the issuer of this RecognizeVatInvoiceResultResponse. + + 开票人。 当“advanced_mode”设置为“true”时才返回。 + + :param issuer: The issuer of this RecognizeVatInvoiceResultResponse. + :type: str + """ + self._issuer = issuer + + @property + def seller_seal(self): + """Gets the seller_seal of this RecognizeVatInvoiceResultResponse. + + 销售方发票专用章。 当“advanced_mode”设置为“true”时才返回。 + + :return: The seller_seal of this RecognizeVatInvoiceResultResponse. + :rtype: str + """ + return self._seller_seal + + @seller_seal.setter + def seller_seal(self, seller_seal): + """Sets the seller_seal of this RecognizeVatInvoiceResultResponse. + + 销售方发票专用章。 当“advanced_mode”设置为“true”时才返回。 + + :param seller_seal: The seller_seal of this RecognizeVatInvoiceResultResponse. + :type: str + """ + self._seller_seal = seller_seal + @property def item_list(self): """Gets the item_list of this RecognizeVatInvoiceResultResponse. diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vehicle_license_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vehicle_license_request.py index 60c1553e8..359bfeaa2 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vehicle_license_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vehicle_license_request.py @@ -23,24 +23,48 @@ class RecognizeVehicleLicenseRequest: sensitive_list = [] openapi_types = { + 'project_id': 'str', 'body': 'RecognizeVehicleLicenseRequestBody' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeVehicleLicenseRequest - a model defined in huaweicloud sdk""" + 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 RecognizeVehicleLicenseRequest. + + + :return: The project_id of this RecognizeVehicleLicenseRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeVehicleLicenseRequest. + + + :param project_id: The project_id of this RecognizeVehicleLicenseRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeVehicleLicenseRequest. diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vehicle_license_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vehicle_license_request_body.py index 8fe574ba8..9457d7aeb 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vehicle_license_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vehicle_license_request_body.py @@ -25,16 +25,18 @@ class RecognizeVehicleLicenseRequestBody: openapi_types = { 'url': 'str', 'image': 'str', - 'side': 'str' + 'side': 'str', + 'return_issuing_authority': 'bool' } attribute_map = { 'url': 'url', 'image': 'image', - 'side': 'side' + 'side': 'side', + 'return_issuing_authority': 'return_issuing_authority' } - def __init__(self, url=None, image=None, side=None): + def __init__(self, url=None, image=None, side=None, return_issuing_authority=None): """RecognizeVehicleLicenseRequestBody - a model defined in huaweicloud sdk""" @@ -42,6 +44,7 @@ class RecognizeVehicleLicenseRequestBody: self._url = None self._image = None self._side = None + self._return_issuing_authority = None self.discriminator = None if url is not None: @@ -50,12 +53,14 @@ class RecognizeVehicleLicenseRequestBody: self.image = image if side is not None: self.side = side + if return_issuing_authority is not None: + self.return_issuing_authority = return_issuing_authority @property def url(self): """Gets the url of this RecognizeVehicleLicenseRequestBody. - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 + 图片的URL路径,目前支持: 公网HTTP/HTTPS URL 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 说明: 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 :return: The url of this RecognizeVehicleLicenseRequestBody. :rtype: str @@ -66,7 +71,7 @@ class RecognizeVehicleLicenseRequestBody: def url(self, url): """Sets the url of this RecognizeVehicleLicenseRequestBody. - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 + 图片的URL路径,目前支持: 公网HTTP/HTTPS URL 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 说明: 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 :param url: The url of this RecognizeVehicleLicenseRequestBody. :type: str @@ -77,7 +82,7 @@ class RecognizeVehicleLicenseRequestBody: def image(self): """Gets the image of this RecognizeVehicleLicenseRequestBody. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 :return: The image of this RecognizeVehicleLicenseRequestBody. :rtype: str @@ -88,7 +93,7 @@ class RecognizeVehicleLicenseRequestBody: def image(self, image): """Sets the image of this RecognizeVehicleLicenseRequestBody. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于100像素,最长边不超过8000像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 :param image: The image of this RecognizeVehicleLicenseRequestBody. :type: str @@ -99,7 +104,7 @@ class RecognizeVehicleLicenseRequestBody: def side(self): """Gets the side of this RecognizeVehicleLicenseRequestBody. - 检测场景: - front:行驶证主页。 - back:行驶证副页。 > 说明:如果参数值为空或无该参数,系统默认识别主页,建议填写,准确率更高。 + 检测场景: front:行驶证主页。 back:行驶证副页。 说明:如果参数值为空或无该参数,系统默认识别主页,建议填写,准确率更高。 :return: The side of this RecognizeVehicleLicenseRequestBody. :rtype: str @@ -110,13 +115,35 @@ class RecognizeVehicleLicenseRequestBody: def side(self, side): """Sets the side of this RecognizeVehicleLicenseRequestBody. - 检测场景: - front:行驶证主页。 - back:行驶证副页。 > 说明:如果参数值为空或无该参数,系统默认识别主页,建议填写,准确率更高。 + 检测场景: front:行驶证主页。 back:行驶证副页。 说明:如果参数值为空或无该参数,系统默认识别主页,建议填写,准确率更高。 :param side: The side of this RecognizeVehicleLicenseRequestBody. :type: str """ self._side = side + @property + def return_issuing_authority(self): + """Gets the return_issuing_authority of this RecognizeVehicleLicenseRequestBody. + + 是否返回发证机关的开关,可选值包括: true:返回发证机关 false:不返回发证机关 如果无该参数,系统默认不返回发证机关。如果输入参数不是Boolean类型,则会报非法参数错误。 + + :return: The return_issuing_authority of this RecognizeVehicleLicenseRequestBody. + :rtype: bool + """ + return self._return_issuing_authority + + @return_issuing_authority.setter + def return_issuing_authority(self, return_issuing_authority): + """Sets the return_issuing_authority of this RecognizeVehicleLicenseRequestBody. + + 是否返回发证机关的开关,可选值包括: true:返回发证机关 false:不返回发证机关 如果无该参数,系统默认不返回发证机关。如果输入参数不是Boolean类型,则会报非法参数错误。 + + :param return_issuing_authority: The return_issuing_authority of this RecognizeVehicleLicenseRequestBody. + :type: bool + """ + self._return_issuing_authority = return_issuing_authority + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vehicle_license_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vehicle_license_result_response.py index 1c5ff78f9..40b1283d9 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vehicle_license_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vehicle_license_result_response.py @@ -33,6 +33,7 @@ class RecognizeVehicleLicenseResultResponse: 'vin': 'str', 'register_date': 'str', 'issue_date': 'str', + 'issuing_authority': 'str', 'file_no': 'str', 'approved_passengers': 'str', 'gross_mass': 'str', @@ -56,6 +57,7 @@ class RecognizeVehicleLicenseResultResponse: 'vin': 'vin', 'register_date': 'register_date', 'issue_date': 'issue_date', + 'issuing_authority': 'issuing_authority', 'file_no': 'file_no', 'approved_passengers': 'approved_passengers', 'gross_mass': 'gross_mass', @@ -68,7 +70,7 @@ class RecognizeVehicleLicenseResultResponse: 'code_number': 'code_number' } - def __init__(self, number=None, vehicle_type=None, name=None, address=None, use_character=None, model=None, engine_no=None, vin=None, register_date=None, issue_date=None, file_no=None, approved_passengers=None, gross_mass=None, unladen_mass=None, approved_load=None, dimension=None, traction_mass=None, remarks=None, inspection_record=None, code_number=None): + def __init__(self, number=None, vehicle_type=None, name=None, address=None, use_character=None, model=None, engine_no=None, vin=None, register_date=None, issue_date=None, issuing_authority=None, file_no=None, approved_passengers=None, gross_mass=None, unladen_mass=None, approved_load=None, dimension=None, traction_mass=None, remarks=None, inspection_record=None, code_number=None): """RecognizeVehicleLicenseResultResponse - a model defined in huaweicloud sdk""" @@ -83,6 +85,7 @@ class RecognizeVehicleLicenseResultResponse: self._vin = None self._register_date = None self._issue_date = None + self._issuing_authority = None self._file_no = None self._approved_passengers = None self._gross_mass = None @@ -115,6 +118,8 @@ class RecognizeVehicleLicenseResultResponse: self.register_date = register_date if issue_date is not None: self.issue_date = issue_date + if issuing_authority is not None: + self.issuing_authority = issuing_authority if file_no is not None: self.file_no = file_no if approved_passengers is not None: @@ -356,6 +361,28 @@ class RecognizeVehicleLicenseResultResponse: """ self._issue_date = issue_date + @property + def issuing_authority(self): + """Gets the issuing_authority of this RecognizeVehicleLicenseResultResponse. + + 发证机关。 + + :return: The issuing_authority of this RecognizeVehicleLicenseResultResponse. + :rtype: str + """ + return self._issuing_authority + + @issuing_authority.setter + def issuing_authority(self, issuing_authority): + """Sets the issuing_authority of this RecognizeVehicleLicenseResultResponse. + + 发证机关。 + + :param issuing_authority: The issuing_authority of this RecognizeVehicleLicenseResultResponse. + :type: str + """ + self._issuing_authority = issuing_authority + @property def file_no(self): """Gets the file_no of this RecognizeVehicleLicenseResultResponse. diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_request.py index 45c2d5400..8fe2feb77 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_request.py @@ -9,7 +9,7 @@ import six -class RecognizeVinRequest: +class RecognizeVINRequest: """ @@ -23,41 +23,65 @@ class RecognizeVinRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeVinRequestBody' + 'project_id': 'str', + 'body': 'VINReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): - """RecognizeVinRequest - a model defined in huaweicloud sdk""" + def __init__(self, project_id=None, body=None): + """RecognizeVINRequest - a model defined in huaweicloud sdk""" + 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 RecognizeVINRequest. + + + :return: The project_id of this RecognizeVINRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeVINRequest. + + + :param project_id: The project_id of this RecognizeVINRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): - """Gets the body of this RecognizeVinRequest. + """Gets the body of this RecognizeVINRequest. - :return: The body of this RecognizeVinRequest. - :rtype: RecognizeVinRequestBody + :return: The body of this RecognizeVINRequest. + :rtype: VINReq """ return self._body @body.setter def body(self, body): - """Sets the body of this RecognizeVinRequest. + """Sets the body of this RecognizeVINRequest. - :param body: The body of this RecognizeVinRequest. - :type: RecognizeVinRequestBody + :param body: The body of this RecognizeVINRequest. + :type: VINReq """ self._body = body @@ -98,7 +122,7 @@ class RecognizeVinRequest: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeVinRequest): + if not isinstance(other, RecognizeVINRequest): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_response.py index bed930ed1..13058c5b2 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_response.py @@ -9,7 +9,7 @@ import six from huaweicloudsdkcore.sdk_response import SdkResponse -class RecognizeVinResponse(SdkResponse): +class RecognizeVINResponse(SdkResponse): """ @@ -23,7 +23,7 @@ class RecognizeVinResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeVinResultResponse' + 'result': 'VINResponseBodyItem' } attribute_map = { @@ -31,7 +31,7 @@ class RecognizeVinResponse(SdkResponse): } def __init__(self, result=None): - """RecognizeVinResponse - a model defined in huaweicloud sdk""" + """RecognizeVINResponse - a model defined in huaweicloud sdk""" super().__init__() @@ -43,21 +43,21 @@ class RecognizeVinResponse(SdkResponse): @property def result(self): - """Gets the result of this RecognizeVinResponse. + """Gets the result of this RecognizeVINResponse. - :return: The result of this RecognizeVinResponse. - :rtype: RecognizeVinResultResponse + :return: The result of this RecognizeVINResponse. + :rtype: VINResponseBodyItem """ return self._result @result.setter def result(self, result): - """Sets the result of this RecognizeVinResponse. + """Sets the result of this RecognizeVINResponse. - :param result: The result of this RecognizeVinResponse. - :type: RecognizeVinResultResponse + :param result: The result of this RecognizeVINResponse. + :type: VINResponseBodyItem """ self._result = result @@ -98,7 +98,7 @@ class RecognizeVinResponse(SdkResponse): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeVinResponse): + if not isinstance(other, RecognizeVINResponse): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_request.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_request.py index 8544c000e..67bca57ee 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_request.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_request.py @@ -23,31 +23,55 @@ class RecognizeWebImageRequest: sensitive_list = [] openapi_types = { - 'body': 'RecognizeWebImageRequestBody' + 'project_id': 'str', + 'body': 'WebImageReq' } attribute_map = { + 'project_id': 'project_id', 'body': 'body' } - def __init__(self, body=None): + def __init__(self, project_id=None, body=None): """RecognizeWebImageRequest - a model defined in huaweicloud sdk""" + 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 RecognizeWebImageRequest. + + + :return: The project_id of this RecognizeWebImageRequest. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this RecognizeWebImageRequest. + + + :param project_id: The project_id of this RecognizeWebImageRequest. + :type: str + """ + self._project_id = project_id + @property def body(self): """Gets the body of this RecognizeWebImageRequest. :return: The body of this RecognizeWebImageRequest. - :rtype: RecognizeWebImageRequestBody + :rtype: WebImageReq """ return self._body @@ -57,7 +81,7 @@ class RecognizeWebImageRequest: :param body: The body of this RecognizeWebImageRequest. - :type: RecognizeWebImageRequestBody + :type: WebImageReq """ self._body = body diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_response.py index 945cfd2c5..68d21b9d4 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_response.py @@ -23,7 +23,7 @@ class RecognizeWebImageResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'result': 'RecognizeWebImageResultResponse' + 'result': 'WebImageResponseBodyItem' } attribute_map = { @@ -47,7 +47,7 @@ class RecognizeWebImageResponse(SdkResponse): :return: The result of this RecognizeWebImageResponse. - :rtype: RecognizeWebImageResultResponse + :rtype: WebImageResponseBodyItem """ return self._result @@ -57,7 +57,7 @@ class RecognizeWebImageResponse(SdkResponse): :param result: The result of this RecognizeWebImageResponse. - :type: RecognizeWebImageResultResponse + :type: WebImageResponseBodyItem """ self._result = result diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/taxi_invoice_req.py similarity index 81% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_request_body.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/taxi_invoice_req.py index c9bc7e739..4e90404b6 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_license_plate_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/taxi_invoice_req.py @@ -9,7 +9,7 @@ import six -class RecognizeLicensePlateRequestBody: +class TaxiInvoiceReq: """ @@ -33,7 +33,7 @@ class RecognizeLicensePlateRequestBody: } def __init__(self, url=None, image=None): - """RecognizeLicensePlateRequestBody - a model defined in huaweicloud sdk""" + """TaxiInvoiceReq - a model defined in huaweicloud sdk""" @@ -48,44 +48,44 @@ class RecognizeLicensePlateRequestBody: @property def url(self): - """Gets the url of this RecognizeLicensePlateRequestBody. + """Gets the url of this TaxiInvoiceReq. 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - :return: The url of this RecognizeLicensePlateRequestBody. + :return: The url of this TaxiInvoiceReq. :rtype: str """ return self._url @url.setter def url(self, url): - """Sets the url of this RecognizeLicensePlateRequestBody. + """Sets the url of this TaxiInvoiceReq. 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - :param url: The url of this RecognizeLicensePlateRequestBody. + :param url: The url of this TaxiInvoiceReq. :type: str """ self._url = url @property def image(self): - """Gets the image of this RecognizeLicensePlateRequestBody. + """Gets the image of this TaxiInvoiceReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 + 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPG/PNG/BMP/TIFF格式。 - :return: The image of this RecognizeLicensePlateRequestBody. + :return: The image of this TaxiInvoiceReq. :rtype: str """ return self._image @image.setter def image(self, image): - """Sets the image of this RecognizeLicensePlateRequestBody. + """Sets the image of this TaxiInvoiceReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 + 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPG/PNG/BMP/TIFF格式。 - :param image: The image of this RecognizeLicensePlateRequestBody. + :param image: The image of this TaxiInvoiceReq. :type: str """ self._image = image @@ -127,7 +127,7 @@ class RecognizeLicensePlateRequestBody: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeLicensePlateRequestBody): + if not isinstance(other, TaxiInvoiceReq): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/taxi_invoice_result_body.py similarity index 66% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/taxi_invoice_result_body.py index 3f9bd9dc9..6a172be93 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_taxi_invoice_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/taxi_invoice_result_body.py @@ -9,7 +9,7 @@ import six -class RecognizeTaxiInvoiceResultResponse: +class TaxiInvoiceResultBody: """ @@ -69,7 +69,7 @@ class RecognizeTaxiInvoiceResultResponse: } def __init__(self, location=None, code=None, number=None, phone_number=None, company=None, taxi_number=None, certificate_number=None, identification_number=None, date=None, boarding_time=None, alighting_time=None, time=None, unit_price=None, distance=None, waiting_time=None, fare=None, fuel_oil_surcharge=None, call_service_surcharge=None, total=None, confidence=None): - """RecognizeTaxiInvoiceResultResponse - a model defined in huaweicloud sdk""" + """TaxiInvoiceResultBody - a model defined in huaweicloud sdk""" @@ -138,440 +138,440 @@ class RecognizeTaxiInvoiceResultResponse: @property def location(self): - """Gets the location of this RecognizeTaxiInvoiceResultResponse. + """Gets the location of this TaxiInvoiceResultBody. 归属地区。 - :return: The location of this RecognizeTaxiInvoiceResultResponse. + :return: The location of this TaxiInvoiceResultBody. :rtype: str """ return self._location @location.setter def location(self, location): - """Sets the location of this RecognizeTaxiInvoiceResultResponse. + """Sets the location of this TaxiInvoiceResultBody. 归属地区。 - :param location: The location of this RecognizeTaxiInvoiceResultResponse. + :param location: The location of this TaxiInvoiceResultBody. :type: str """ self._location = location @property def code(self): - """Gets the code of this RecognizeTaxiInvoiceResultResponse. + """Gets the code of this TaxiInvoiceResultBody. 发票代码。 - :return: The code of this RecognizeTaxiInvoiceResultResponse. + :return: The code of this TaxiInvoiceResultBody. :rtype: str """ return self._code @code.setter def code(self, code): - """Sets the code of this RecognizeTaxiInvoiceResultResponse. + """Sets the code of this TaxiInvoiceResultBody. 发票代码。 - :param code: The code of this RecognizeTaxiInvoiceResultResponse. + :param code: The code of this TaxiInvoiceResultBody. :type: str """ self._code = code @property def number(self): - """Gets the number of this RecognizeTaxiInvoiceResultResponse. + """Gets the number of this TaxiInvoiceResultBody. 发票号码。 - :return: The number of this RecognizeTaxiInvoiceResultResponse. + :return: The number of this TaxiInvoiceResultBody. :rtype: str """ return self._number @number.setter def number(self, number): - """Sets the number of this RecognizeTaxiInvoiceResultResponse. + """Sets the number of this TaxiInvoiceResultBody. 发票号码。 - :param number: The number of this RecognizeTaxiInvoiceResultResponse. + :param number: The number of this TaxiInvoiceResultBody. :type: str """ self._number = number @property def phone_number(self): - """Gets the phone_number of this RecognizeTaxiInvoiceResultResponse. + """Gets the phone_number of this TaxiInvoiceResultBody. 电话(包括电话、监督电话)。 - :return: The phone_number of this RecognizeTaxiInvoiceResultResponse. + :return: The phone_number of this TaxiInvoiceResultBody. :rtype: str """ return self._phone_number @phone_number.setter def phone_number(self, phone_number): - """Sets the phone_number of this RecognizeTaxiInvoiceResultResponse. + """Sets the phone_number of this TaxiInvoiceResultBody. 电话(包括电话、监督电话)。 - :param phone_number: The phone_number of this RecognizeTaxiInvoiceResultResponse. + :param phone_number: The phone_number of this TaxiInvoiceResultBody. :type: str """ self._phone_number = phone_number @property def company(self): - """Gets the company of this RecognizeTaxiInvoiceResultResponse. + """Gets the company of this TaxiInvoiceResultBody. 单位。 - :return: The company of this RecognizeTaxiInvoiceResultResponse. + :return: The company of this TaxiInvoiceResultBody. :rtype: str """ return self._company @company.setter def company(self, company): - """Sets the company of this RecognizeTaxiInvoiceResultResponse. + """Sets the company of this TaxiInvoiceResultBody. 单位。 - :param company: The company of this RecognizeTaxiInvoiceResultResponse. + :param company: The company of this TaxiInvoiceResultBody. :type: str """ self._company = company @property def taxi_number(self): - """Gets the taxi_number of this RecognizeTaxiInvoiceResultResponse. + """Gets the taxi_number of this TaxiInvoiceResultBody. 车号。 - :return: The taxi_number of this RecognizeTaxiInvoiceResultResponse. + :return: The taxi_number of this TaxiInvoiceResultBody. :rtype: str """ return self._taxi_number @taxi_number.setter def taxi_number(self, taxi_number): - """Sets the taxi_number of this RecognizeTaxiInvoiceResultResponse. + """Sets the taxi_number of this TaxiInvoiceResultBody. 车号。 - :param taxi_number: The taxi_number of this RecognizeTaxiInvoiceResultResponse. + :param taxi_number: The taxi_number of this TaxiInvoiceResultBody. :type: str """ self._taxi_number = taxi_number @property def certificate_number(self): - """Gets the certificate_number of this RecognizeTaxiInvoiceResultResponse. + """Gets the certificate_number of this TaxiInvoiceResultBody. 证号。 - :return: The certificate_number of this RecognizeTaxiInvoiceResultResponse. + :return: The certificate_number of this TaxiInvoiceResultBody. :rtype: str """ return self._certificate_number @certificate_number.setter def certificate_number(self, certificate_number): - """Sets the certificate_number of this RecognizeTaxiInvoiceResultResponse. + """Sets the certificate_number of this TaxiInvoiceResultBody. 证号。 - :param certificate_number: The certificate_number of this RecognizeTaxiInvoiceResultResponse. + :param certificate_number: The certificate_number of this TaxiInvoiceResultBody. :type: str """ self._certificate_number = certificate_number @property def identification_number(self): - """Gets the identification_number of this RecognizeTaxiInvoiceResultResponse. + """Gets the identification_number of this TaxiInvoiceResultBody. 识别编号。 - :return: The identification_number of this RecognizeTaxiInvoiceResultResponse. + :return: The identification_number of this TaxiInvoiceResultBody. :rtype: str """ return self._identification_number @identification_number.setter def identification_number(self, identification_number): - """Sets the identification_number of this RecognizeTaxiInvoiceResultResponse. + """Sets the identification_number of this TaxiInvoiceResultBody. 识别编号。 - :param identification_number: The identification_number of this RecognizeTaxiInvoiceResultResponse. + :param identification_number: The identification_number of this TaxiInvoiceResultBody. :type: str """ self._identification_number = identification_number @property def date(self): - """Gets the date of this RecognizeTaxiInvoiceResultResponse. + """Gets the date of this TaxiInvoiceResultBody. 开票日期。 - :return: The date of this RecognizeTaxiInvoiceResultResponse. + :return: The date of this TaxiInvoiceResultBody. :rtype: str """ return self._date @date.setter def date(self, date): - """Sets the date of this RecognizeTaxiInvoiceResultResponse. + """Sets the date of this TaxiInvoiceResultBody. 开票日期。 - :param date: The date of this RecognizeTaxiInvoiceResultResponse. + :param date: The date of this TaxiInvoiceResultBody. :type: str """ self._date = date @property def boarding_time(self): - """Gets the boarding_time of this RecognizeTaxiInvoiceResultResponse. + """Gets the boarding_time of this TaxiInvoiceResultBody. 上车时间。 - :return: The boarding_time of this RecognizeTaxiInvoiceResultResponse. + :return: The boarding_time of this TaxiInvoiceResultBody. :rtype: str """ return self._boarding_time @boarding_time.setter def boarding_time(self, boarding_time): - """Sets the boarding_time of this RecognizeTaxiInvoiceResultResponse. + """Sets the boarding_time of this TaxiInvoiceResultBody. 上车时间。 - :param boarding_time: The boarding_time of this RecognizeTaxiInvoiceResultResponse. + :param boarding_time: The boarding_time of this TaxiInvoiceResultBody. :type: str """ self._boarding_time = boarding_time @property def alighting_time(self): - """Gets the alighting_time of this RecognizeTaxiInvoiceResultResponse. + """Gets the alighting_time of this TaxiInvoiceResultBody. 下车时间。 - :return: The alighting_time of this RecognizeTaxiInvoiceResultResponse. + :return: The alighting_time of this TaxiInvoiceResultBody. :rtype: str """ return self._alighting_time @alighting_time.setter def alighting_time(self, alighting_time): - """Sets the alighting_time of this RecognizeTaxiInvoiceResultResponse. + """Sets the alighting_time of this TaxiInvoiceResultBody. 下车时间。 - :param alighting_time: The alighting_time of this RecognizeTaxiInvoiceResultResponse. + :param alighting_time: The alighting_time of this TaxiInvoiceResultBody. :type: str """ self._alighting_time = alighting_time @property def time(self): - """Gets the time of this RecognizeTaxiInvoiceResultResponse. + """Gets the time of this TaxiInvoiceResultBody. 时间(起止时间、上下车时间)。 - :return: The time of this RecognizeTaxiInvoiceResultResponse. + :return: The time of this TaxiInvoiceResultBody. :rtype: str """ return self._time @time.setter def time(self, time): - """Sets the time of this RecognizeTaxiInvoiceResultResponse. + """Sets the time of this TaxiInvoiceResultBody. 时间(起止时间、上下车时间)。 - :param time: The time of this RecognizeTaxiInvoiceResultResponse. + :param time: The time of this TaxiInvoiceResultBody. :type: str """ self._time = time @property def unit_price(self): - """Gets the unit_price of this RecognizeTaxiInvoiceResultResponse. + """Gets the unit_price of this TaxiInvoiceResultBody. 单价。 - :return: The unit_price of this RecognizeTaxiInvoiceResultResponse. + :return: The unit_price of this TaxiInvoiceResultBody. :rtype: str """ return self._unit_price @unit_price.setter def unit_price(self, unit_price): - """Sets the unit_price of this RecognizeTaxiInvoiceResultResponse. + """Sets the unit_price of this TaxiInvoiceResultBody. 单价。 - :param unit_price: The unit_price of this RecognizeTaxiInvoiceResultResponse. + :param unit_price: The unit_price of this TaxiInvoiceResultBody. :type: str """ self._unit_price = unit_price @property def distance(self): - """Gets the distance of this RecognizeTaxiInvoiceResultResponse. + """Gets the distance of this TaxiInvoiceResultBody. 总里程。 - :return: The distance of this RecognizeTaxiInvoiceResultResponse. + :return: The distance of this TaxiInvoiceResultBody. :rtype: str """ return self._distance @distance.setter def distance(self, distance): - """Sets the distance of this RecognizeTaxiInvoiceResultResponse. + """Sets the distance of this TaxiInvoiceResultBody. 总里程。 - :param distance: The distance of this RecognizeTaxiInvoiceResultResponse. + :param distance: The distance of this TaxiInvoiceResultBody. :type: str """ self._distance = distance @property def waiting_time(self): - """Gets the waiting_time of this RecognizeTaxiInvoiceResultResponse. + """Gets the waiting_time of this TaxiInvoiceResultBody. 等候时间。 - :return: The waiting_time of this RecognizeTaxiInvoiceResultResponse. + :return: The waiting_time of this TaxiInvoiceResultBody. :rtype: str """ return self._waiting_time @waiting_time.setter def waiting_time(self, waiting_time): - """Sets the waiting_time of this RecognizeTaxiInvoiceResultResponse. + """Sets the waiting_time of this TaxiInvoiceResultBody. 等候时间。 - :param waiting_time: The waiting_time of this RecognizeTaxiInvoiceResultResponse. + :param waiting_time: The waiting_time of this TaxiInvoiceResultBody. :type: str """ self._waiting_time = waiting_time @property def fare(self): - """Gets the fare of this RecognizeTaxiInvoiceResultResponse. + """Gets the fare of this TaxiInvoiceResultBody. 金额。 - :return: The fare of this RecognizeTaxiInvoiceResultResponse. + :return: The fare of this TaxiInvoiceResultBody. :rtype: str """ return self._fare @fare.setter def fare(self, fare): - """Sets the fare of this RecognizeTaxiInvoiceResultResponse. + """Sets the fare of this TaxiInvoiceResultBody. 金额。 - :param fare: The fare of this RecognizeTaxiInvoiceResultResponse. + :param fare: The fare of this TaxiInvoiceResultBody. :type: str """ self._fare = fare @property def fuel_oil_surcharge(self): - """Gets the fuel_oil_surcharge of this RecognizeTaxiInvoiceResultResponse. + """Gets the fuel_oil_surcharge of this TaxiInvoiceResultBody. 燃油附加费。 - :return: The fuel_oil_surcharge of this RecognizeTaxiInvoiceResultResponse. + :return: The fuel_oil_surcharge of this TaxiInvoiceResultBody. :rtype: str """ return self._fuel_oil_surcharge @fuel_oil_surcharge.setter def fuel_oil_surcharge(self, fuel_oil_surcharge): - """Sets the fuel_oil_surcharge of this RecognizeTaxiInvoiceResultResponse. + """Sets the fuel_oil_surcharge of this TaxiInvoiceResultBody. 燃油附加费。 - :param fuel_oil_surcharge: The fuel_oil_surcharge of this RecognizeTaxiInvoiceResultResponse. + :param fuel_oil_surcharge: The fuel_oil_surcharge of this TaxiInvoiceResultBody. :type: str """ self._fuel_oil_surcharge = fuel_oil_surcharge @property def call_service_surcharge(self): - """Gets the call_service_surcharge of this RecognizeTaxiInvoiceResultResponse. + """Gets the call_service_surcharge of this TaxiInvoiceResultBody. 电调费(预约费)。 - :return: The call_service_surcharge of this RecognizeTaxiInvoiceResultResponse. + :return: The call_service_surcharge of this TaxiInvoiceResultBody. :rtype: str """ return self._call_service_surcharge @call_service_surcharge.setter def call_service_surcharge(self, call_service_surcharge): - """Sets the call_service_surcharge of this RecognizeTaxiInvoiceResultResponse. + """Sets the call_service_surcharge of this TaxiInvoiceResultBody. 电调费(预约费)。 - :param call_service_surcharge: The call_service_surcharge of this RecognizeTaxiInvoiceResultResponse. + :param call_service_surcharge: The call_service_surcharge of this TaxiInvoiceResultBody. :type: str """ self._call_service_surcharge = call_service_surcharge @property def total(self): - """Gets the total of this RecognizeTaxiInvoiceResultResponse. + """Gets the total of this TaxiInvoiceResultBody. 实收金额。 - :return: The total of this RecognizeTaxiInvoiceResultResponse. + :return: The total of this TaxiInvoiceResultBody. :rtype: str """ return self._total @total.setter def total(self, total): - """Sets the total of this RecognizeTaxiInvoiceResultResponse. + """Sets the total of this TaxiInvoiceResultBody. 实收金额。 - :param total: The total of this RecognizeTaxiInvoiceResultResponse. + :param total: The total of this TaxiInvoiceResultBody. :type: str """ self._total = total @property def confidence(self): - """Gets the confidence of this RecognizeTaxiInvoiceResultResponse. + """Gets the confidence of this TaxiInvoiceResultBody. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :return: The confidence of this RecognizeTaxiInvoiceResultResponse. + :return: The confidence of this TaxiInvoiceResultBody. :rtype: object """ return self._confidence @confidence.setter def confidence(self, confidence): - """Sets the confidence of this RecognizeTaxiInvoiceResultResponse. + """Sets the confidence of this TaxiInvoiceResultBody. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :param confidence: The confidence of this RecognizeTaxiInvoiceResultResponse. + :param confidence: The confidence of this TaxiInvoiceResultBody. :type: object """ self._confidence = confidence @@ -613,7 +613,7 @@ class RecognizeTaxiInvoiceResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeTaxiInvoiceResultResponse): + if not isinstance(other, TaxiInvoiceResultBody): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/toll_invoice_req.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/toll_invoice_req.py new file mode 100644 index 000000000..e676c2e98 --- /dev/null +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/toll_invoice_req.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class TollInvoiceReq: + + + """ + 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 = { + 'image': 'str', + 'url': 'str' + } + + attribute_map = { + 'image': 'image', + 'url': 'url' + } + + def __init__(self, image=None, url=None): + """TollInvoiceReq - a model defined in huaweicloud sdk""" + + + + self._image = None + self._url = None + self.discriminator = None + + if image is not None: + self.image = image + if url is not None: + self.url = url + + @property + def image(self): + """Gets the image of this TollInvoiceReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :return: The image of this TollInvoiceReq. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this TollInvoiceReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :param image: The image of this TollInvoiceReq. + :type: str + """ + self._image = image + + @property + def url(self): + """Gets the url of this TollInvoiceReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this TollInvoiceReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this TollInvoiceReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this TollInvoiceReq. + :type: str + """ + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TollInvoiceReq): + 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-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/toll_invoice_result_body.py similarity index 66% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/toll_invoice_result_body.py index 972d0c917..4eec66ba0 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_toll_invoice_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/toll_invoice_result_body.py @@ -9,7 +9,7 @@ import six -class RecognizeTollInvoiceResultResponse: +class TollInvoiceResultBody: """ @@ -49,7 +49,7 @@ class RecognizeTollInvoiceResultResponse: } def __init__(self, code=None, number=None, entry=None, exit=None, amount=None, cashier=None, vehicle_type=None, date=None, time=None, confidence=None): - """RecognizeTollInvoiceResultResponse - a model defined in huaweicloud sdk""" + """TollInvoiceResultBody - a model defined in huaweicloud sdk""" @@ -88,220 +88,220 @@ class RecognizeTollInvoiceResultResponse: @property def code(self): - """Gets the code of this RecognizeTollInvoiceResultResponse. + """Gets the code of this TollInvoiceResultBody. 发票代码。 - :return: The code of this RecognizeTollInvoiceResultResponse. + :return: The code of this TollInvoiceResultBody. :rtype: str """ return self._code @code.setter def code(self, code): - """Sets the code of this RecognizeTollInvoiceResultResponse. + """Sets the code of this TollInvoiceResultBody. 发票代码。 - :param code: The code of this RecognizeTollInvoiceResultResponse. + :param code: The code of this TollInvoiceResultBody. :type: str """ self._code = code @property def number(self): - """Gets the number of this RecognizeTollInvoiceResultResponse. + """Gets the number of this TollInvoiceResultBody. 发票号码。 - :return: The number of this RecognizeTollInvoiceResultResponse. + :return: The number of this TollInvoiceResultBody. :rtype: str """ return self._number @number.setter def number(self, number): - """Sets the number of this RecognizeTollInvoiceResultResponse. + """Sets the number of this TollInvoiceResultBody. 发票号码。 - :param number: The number of this RecognizeTollInvoiceResultResponse. + :param number: The number of this TollInvoiceResultBody. :type: str """ self._number = number @property def entry(self): - """Gets the entry of this RecognizeTollInvoiceResultResponse. + """Gets the entry of this TollInvoiceResultBody. 入口。 - :return: The entry of this RecognizeTollInvoiceResultResponse. + :return: The entry of this TollInvoiceResultBody. :rtype: str """ return self._entry @entry.setter def entry(self, entry): - """Sets the entry of this RecognizeTollInvoiceResultResponse. + """Sets the entry of this TollInvoiceResultBody. 入口。 - :param entry: The entry of this RecognizeTollInvoiceResultResponse. + :param entry: The entry of this TollInvoiceResultBody. :type: str """ self._entry = entry @property def exit(self): - """Gets the exit of this RecognizeTollInvoiceResultResponse. + """Gets the exit of this TollInvoiceResultBody. 出口。 - :return: The exit of this RecognizeTollInvoiceResultResponse. + :return: The exit of this TollInvoiceResultBody. :rtype: str """ return self._exit @exit.setter def exit(self, exit): - """Sets the exit of this RecognizeTollInvoiceResultResponse. + """Sets the exit of this TollInvoiceResultBody. 出口。 - :param exit: The exit of this RecognizeTollInvoiceResultResponse. + :param exit: The exit of this TollInvoiceResultBody. :type: str """ self._exit = exit @property def amount(self): - """Gets the amount of this RecognizeTollInvoiceResultResponse. + """Gets the amount of this TollInvoiceResultBody. 收费金额。 - :return: The amount of this RecognizeTollInvoiceResultResponse. + :return: The amount of this TollInvoiceResultBody. :rtype: str """ return self._amount @amount.setter def amount(self, amount): - """Sets the amount of this RecognizeTollInvoiceResultResponse. + """Sets the amount of this TollInvoiceResultBody. 收费金额。 - :param amount: The amount of this RecognizeTollInvoiceResultResponse. + :param amount: The amount of this TollInvoiceResultBody. :type: str """ self._amount = amount @property def cashier(self): - """Gets the cashier of this RecognizeTollInvoiceResultResponse. + """Gets the cashier of this TollInvoiceResultBody. 收费员。 - :return: The cashier of this RecognizeTollInvoiceResultResponse. + :return: The cashier of this TollInvoiceResultBody. :rtype: str """ return self._cashier @cashier.setter def cashier(self, cashier): - """Sets the cashier of this RecognizeTollInvoiceResultResponse. + """Sets the cashier of this TollInvoiceResultBody. 收费员。 - :param cashier: The cashier of this RecognizeTollInvoiceResultResponse. + :param cashier: The cashier of this TollInvoiceResultBody. :type: str """ self._cashier = cashier @property def vehicle_type(self): - """Gets the vehicle_type of this RecognizeTollInvoiceResultResponse. + """Gets the vehicle_type of this TollInvoiceResultBody. 车辆类型。 - :return: The vehicle_type of this RecognizeTollInvoiceResultResponse. + :return: The vehicle_type of this TollInvoiceResultBody. :rtype: str """ return self._vehicle_type @vehicle_type.setter def vehicle_type(self, vehicle_type): - """Sets the vehicle_type of this RecognizeTollInvoiceResultResponse. + """Sets the vehicle_type of this TollInvoiceResultBody. 车辆类型。 - :param vehicle_type: The vehicle_type of this RecognizeTollInvoiceResultResponse. + :param vehicle_type: The vehicle_type of this TollInvoiceResultBody. :type: str """ self._vehicle_type = vehicle_type @property def date(self): - """Gets the date of this RecognizeTollInvoiceResultResponse. + """Gets the date of this TollInvoiceResultBody. 日期。 - :return: The date of this RecognizeTollInvoiceResultResponse. + :return: The date of this TollInvoiceResultBody. :rtype: str """ return self._date @date.setter def date(self, date): - """Sets the date of this RecognizeTollInvoiceResultResponse. + """Sets the date of this TollInvoiceResultBody. 日期。 - :param date: The date of this RecognizeTollInvoiceResultResponse. + :param date: The date of this TollInvoiceResultBody. :type: str """ self._date = date @property def time(self): - """Gets the time of this RecognizeTollInvoiceResultResponse. + """Gets the time of this TollInvoiceResultBody. 时间。 - :return: The time of this RecognizeTollInvoiceResultResponse. + :return: The time of this TollInvoiceResultBody. :rtype: str """ return self._time @time.setter def time(self, time): - """Sets the time of this RecognizeTollInvoiceResultResponse. + """Sets the time of this TollInvoiceResultBody. 时间。 - :param time: The time of this RecognizeTollInvoiceResultResponse. + :param time: The time of this TollInvoiceResultBody. :type: str """ self._time = time @property def confidence(self): - """Gets the confidence of this RecognizeTollInvoiceResultResponse. + """Gets the confidence of this TollInvoiceResultBody. - 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 + 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :return: The confidence of this RecognizeTollInvoiceResultResponse. + :return: The confidence of this TollInvoiceResultBody. :rtype: object """ return self._confidence @confidence.setter def confidence(self, confidence): - """Sets the confidence of this RecognizeTollInvoiceResultResponse. + """Sets the confidence of this TollInvoiceResultBody. - 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 + 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :param confidence: The confidence of this RecognizeTollInvoiceResultResponse. + :param confidence: The confidence of this TollInvoiceResultBody. :type: object """ self._confidence = confidence @@ -343,7 +343,7 @@ class RecognizeTollInvoiceResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeTollInvoiceResultResponse): + if not isinstance(other, TollInvoiceResultBody): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/train_ticket_req.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/train_ticket_req.py new file mode 100644 index 000000000..9c6dddd94 --- /dev/null +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/train_ticket_req.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class TrainTicketReq: + + + """ + 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 = { + 'image': 'str', + 'url': 'str' + } + + attribute_map = { + 'image': 'image', + 'url': 'url' + } + + def __init__(self, image=None, url=None): + """TrainTicketReq - a model defined in huaweicloud sdk""" + + + + self._image = None + self._url = None + self.discriminator = None + + if image is not None: + self.image = image + if url is not None: + self.url = url + + @property + def image(self): + """Gets the image of this TrainTicketReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :return: The image of this TrainTicketReq. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this TrainTicketReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :param image: The image of this TrainTicketReq. + :type: str + """ + self._image = image + + @property + def url(self): + """Gets the url of this TrainTicketReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this TrainTicketReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this TrainTicketReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this TrainTicketReq. + :type: str + """ + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TrainTicketReq): + 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-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/train_ticket_result_body.py similarity index 67% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/train_ticket_result_body.py index e3efe29ba..e7cc1887e 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/train_ticket_result_body.py @@ -9,7 +9,7 @@ import six -class RecognizeTrainTicketResultResponse: +class TrainTicketResultBody: """ @@ -65,7 +65,7 @@ class RecognizeTrainTicketResultResponse: } def __init__(self, ticket_id=None, check_port=None, train_number=None, departure_station=None, destination_station=None, departure_station_en=None, destination_station_en=None, departure_time=None, seat_number=None, ticket_price=None, sale_method=None, seat_category=None, ticket_changing=None, id_number=None, name=None, log_id=None, sale_location=None, confidence=None): - """RecognizeTrainTicketResultResponse - a model defined in huaweicloud sdk""" + """TrainTicketResultBody - a model defined in huaweicloud sdk""" @@ -128,396 +128,396 @@ class RecognizeTrainTicketResultResponse: @property def ticket_id(self): - """Gets the ticket_id of this RecognizeTrainTicketResultResponse. + """Gets the ticket_id of this TrainTicketResultBody. 火车票左上角的车票ID。 - :return: The ticket_id of this RecognizeTrainTicketResultResponse. + :return: The ticket_id of this TrainTicketResultBody. :rtype: str """ return self._ticket_id @ticket_id.setter def ticket_id(self, ticket_id): - """Sets the ticket_id of this RecognizeTrainTicketResultResponse. + """Sets the ticket_id of this TrainTicketResultBody. 火车票左上角的车票ID。 - :param ticket_id: The ticket_id of this RecognizeTrainTicketResultResponse. + :param ticket_id: The ticket_id of this TrainTicketResultBody. :type: str """ self._ticket_id = ticket_id @property def check_port(self): - """Gets the check_port of this RecognizeTrainTicketResultResponse. + """Gets the check_port of this TrainTicketResultBody. 检票口信息。 - :return: The check_port of this RecognizeTrainTicketResultResponse. + :return: The check_port of this TrainTicketResultBody. :rtype: str """ return self._check_port @check_port.setter def check_port(self, check_port): - """Sets the check_port of this RecognizeTrainTicketResultResponse. + """Sets the check_port of this TrainTicketResultBody. 检票口信息。 - :param check_port: The check_port of this RecognizeTrainTicketResultResponse. + :param check_port: The check_port of this TrainTicketResultBody. :type: str """ self._check_port = check_port @property def train_number(self): - """Gets the train_number of this RecognizeTrainTicketResultResponse. + """Gets the train_number of this TrainTicketResultBody. 车次。 - :return: The train_number of this RecognizeTrainTicketResultResponse. + :return: The train_number of this TrainTicketResultBody. :rtype: str """ return self._train_number @train_number.setter def train_number(self, train_number): - """Sets the train_number of this RecognizeTrainTicketResultResponse. + """Sets the train_number of this TrainTicketResultBody. 车次。 - :param train_number: The train_number of this RecognizeTrainTicketResultResponse. + :param train_number: The train_number of this TrainTicketResultBody. :type: str """ self._train_number = train_number @property def departure_station(self): - """Gets the departure_station of this RecognizeTrainTicketResultResponse. + """Gets the departure_station of this TrainTicketResultBody. 始发站。 - :return: The departure_station of this RecognizeTrainTicketResultResponse. + :return: The departure_station of this TrainTicketResultBody. :rtype: str """ return self._departure_station @departure_station.setter def departure_station(self, departure_station): - """Sets the departure_station of this RecognizeTrainTicketResultResponse. + """Sets the departure_station of this TrainTicketResultBody. 始发站。 - :param departure_station: The departure_station of this RecognizeTrainTicketResultResponse. + :param departure_station: The departure_station of this TrainTicketResultBody. :type: str """ self._departure_station = departure_station @property def destination_station(self): - """Gets the destination_station of this RecognizeTrainTicketResultResponse. + """Gets the destination_station of this TrainTicketResultBody. 终点站。 - :return: The destination_station of this RecognizeTrainTicketResultResponse. + :return: The destination_station of this TrainTicketResultBody. :rtype: str """ return self._destination_station @destination_station.setter def destination_station(self, destination_station): - """Sets the destination_station of this RecognizeTrainTicketResultResponse. + """Sets the destination_station of this TrainTicketResultBody. 终点站。 - :param destination_station: The destination_station of this RecognizeTrainTicketResultResponse. + :param destination_station: The destination_station of this TrainTicketResultBody. :type: str """ self._destination_station = destination_station @property def departure_station_en(self): - """Gets the departure_station_en of this RecognizeTrainTicketResultResponse. + """Gets the departure_station_en of this TrainTicketResultBody. 始发站拼音。 - :return: The departure_station_en of this RecognizeTrainTicketResultResponse. + :return: The departure_station_en of this TrainTicketResultBody. :rtype: str """ return self._departure_station_en @departure_station_en.setter def departure_station_en(self, departure_station_en): - """Sets the departure_station_en of this RecognizeTrainTicketResultResponse. + """Sets the departure_station_en of this TrainTicketResultBody. 始发站拼音。 - :param departure_station_en: The departure_station_en of this RecognizeTrainTicketResultResponse. + :param departure_station_en: The departure_station_en of this TrainTicketResultBody. :type: str """ self._departure_station_en = departure_station_en @property def destination_station_en(self): - """Gets the destination_station_en of this RecognizeTrainTicketResultResponse. + """Gets the destination_station_en of this TrainTicketResultBody. 终点站拼音。 - :return: The destination_station_en of this RecognizeTrainTicketResultResponse. + :return: The destination_station_en of this TrainTicketResultBody. :rtype: str """ return self._destination_station_en @destination_station_en.setter def destination_station_en(self, destination_station_en): - """Sets the destination_station_en of this RecognizeTrainTicketResultResponse. + """Sets the destination_station_en of this TrainTicketResultBody. 终点站拼音。 - :param destination_station_en: The destination_station_en of this RecognizeTrainTicketResultResponse. + :param destination_station_en: The destination_station_en of this TrainTicketResultBody. :type: str """ self._destination_station_en = destination_station_en @property def departure_time(self): - """Gets the departure_time of this RecognizeTrainTicketResultResponse. + """Gets the departure_time of this TrainTicketResultBody. 开车时间。 - :return: The departure_time of this RecognizeTrainTicketResultResponse. + :return: The departure_time of this TrainTicketResultBody. :rtype: str """ return self._departure_time @departure_time.setter def departure_time(self, departure_time): - """Sets the departure_time of this RecognizeTrainTicketResultResponse. + """Sets the departure_time of this TrainTicketResultBody. 开车时间。 - :param departure_time: The departure_time of this RecognizeTrainTicketResultResponse. + :param departure_time: The departure_time of this TrainTicketResultBody. :type: str """ self._departure_time = departure_time @property def seat_number(self): - """Gets the seat_number of this RecognizeTrainTicketResultResponse. + """Gets the seat_number of this TrainTicketResultBody. 座位号。 - :return: The seat_number of this RecognizeTrainTicketResultResponse. + :return: The seat_number of this TrainTicketResultBody. :rtype: str """ return self._seat_number @seat_number.setter def seat_number(self, seat_number): - """Sets the seat_number of this RecognizeTrainTicketResultResponse. + """Sets the seat_number of this TrainTicketResultBody. 座位号。 - :param seat_number: The seat_number of this RecognizeTrainTicketResultResponse. + :param seat_number: The seat_number of this TrainTicketResultBody. :type: str """ self._seat_number = seat_number @property def ticket_price(self): - """Gets the ticket_price of this RecognizeTrainTicketResultResponse. + """Gets the ticket_price of this TrainTicketResultBody. 票价。 - :return: The ticket_price of this RecognizeTrainTicketResultResponse. + :return: The ticket_price of this TrainTicketResultBody. :rtype: str """ return self._ticket_price @ticket_price.setter def ticket_price(self, ticket_price): - """Sets the ticket_price of this RecognizeTrainTicketResultResponse. + """Sets the ticket_price of this TrainTicketResultBody. 票价。 - :param ticket_price: The ticket_price of this RecognizeTrainTicketResultResponse. + :param ticket_price: The ticket_price of this TrainTicketResultBody. :type: str """ self._ticket_price = ticket_price @property def sale_method(self): - """Gets the sale_method of this RecognizeTrainTicketResultResponse. + """Gets the sale_method of this TrainTicketResultBody. 售票方式。 - :return: The sale_method of this RecognizeTrainTicketResultResponse. + :return: The sale_method of this TrainTicketResultBody. :rtype: str """ return self._sale_method @sale_method.setter def sale_method(self, sale_method): - """Sets the sale_method of this RecognizeTrainTicketResultResponse. + """Sets the sale_method of this TrainTicketResultBody. 售票方式。 - :param sale_method: The sale_method of this RecognizeTrainTicketResultResponse. + :param sale_method: The sale_method of this TrainTicketResultBody. :type: str """ self._sale_method = sale_method @property def seat_category(self): - """Gets the seat_category of this RecognizeTrainTicketResultResponse. + """Gets the seat_category of this TrainTicketResultBody. 座位类别。 - :return: The seat_category of this RecognizeTrainTicketResultResponse. + :return: The seat_category of this TrainTicketResultBody. :rtype: str """ return self._seat_category @seat_category.setter def seat_category(self, seat_category): - """Sets the seat_category of this RecognizeTrainTicketResultResponse. + """Sets the seat_category of this TrainTicketResultBody. 座位类别。 - :param seat_category: The seat_category of this RecognizeTrainTicketResultResponse. + :param seat_category: The seat_category of this TrainTicketResultBody. :type: str """ self._seat_category = seat_category @property def ticket_changing(self): - """Gets the ticket_changing of this RecognizeTrainTicketResultResponse. + """Gets the ticket_changing of this TrainTicketResultBody. 是否改签票, \"Yes\"表示改签票,\"No\"表示非改签票。 - :return: The ticket_changing of this RecognizeTrainTicketResultResponse. + :return: The ticket_changing of this TrainTicketResultBody. :rtype: str """ return self._ticket_changing @ticket_changing.setter def ticket_changing(self, ticket_changing): - """Sets the ticket_changing of this RecognizeTrainTicketResultResponse. + """Sets the ticket_changing of this TrainTicketResultBody. 是否改签票, \"Yes\"表示改签票,\"No\"表示非改签票。 - :param ticket_changing: The ticket_changing of this RecognizeTrainTicketResultResponse. + :param ticket_changing: The ticket_changing of this TrainTicketResultBody. :type: str """ self._ticket_changing = ticket_changing @property def id_number(self): - """Gets the id_number of this RecognizeTrainTicketResultResponse. + """Gets the id_number of this TrainTicketResultBody. 车票持有人的身份证号。 - :return: The id_number of this RecognizeTrainTicketResultResponse. + :return: The id_number of this TrainTicketResultBody. :rtype: str """ return self._id_number @id_number.setter def id_number(self, id_number): - """Sets the id_number of this RecognizeTrainTicketResultResponse. + """Sets the id_number of this TrainTicketResultBody. 车票持有人的身份证号。 - :param id_number: The id_number of this RecognizeTrainTicketResultResponse. + :param id_number: The id_number of this TrainTicketResultBody. :type: str """ self._id_number = id_number @property def name(self): - """Gets the name of this RecognizeTrainTicketResultResponse. + """Gets the name of this TrainTicketResultBody. 车票持有人姓名。 - :return: The name of this RecognizeTrainTicketResultResponse. + :return: The name of this TrainTicketResultBody. :rtype: str """ return self._name @name.setter def name(self, name): - """Sets the name of this RecognizeTrainTicketResultResponse. + """Sets the name of this TrainTicketResultBody. 车票持有人姓名。 - :param name: The name of this RecognizeTrainTicketResultResponse. + :param name: The name of this TrainTicketResultBody. :type: str """ self._name = name @property def log_id(self): - """Gets the log_id of this RecognizeTrainTicketResultResponse. + """Gets the log_id of this TrainTicketResultBody. 车票最下方的序列号。 - :return: The log_id of this RecognizeTrainTicketResultResponse. + :return: The log_id of this TrainTicketResultBody. :rtype: str """ return self._log_id @log_id.setter def log_id(self, log_id): - """Sets the log_id of this RecognizeTrainTicketResultResponse. + """Sets the log_id of this TrainTicketResultBody. 车票最下方的序列号。 - :param log_id: The log_id of this RecognizeTrainTicketResultResponse. + :param log_id: The log_id of this TrainTicketResultBody. :type: str """ self._log_id = log_id @property def sale_location(self): - """Gets the sale_location of this RecognizeTrainTicketResultResponse. + """Gets the sale_location of this TrainTicketResultBody. 车票售票地点。 - :return: The sale_location of this RecognizeTrainTicketResultResponse. + :return: The sale_location of this TrainTicketResultBody. :rtype: str """ return self._sale_location @sale_location.setter def sale_location(self, sale_location): - """Sets the sale_location of this RecognizeTrainTicketResultResponse. + """Sets the sale_location of this TrainTicketResultBody. 车票售票地点。 - :param sale_location: The sale_location of this RecognizeTrainTicketResultResponse. + :param sale_location: The sale_location of this TrainTicketResultBody. :type: str """ self._sale_location = sale_location @property def confidence(self): - """Gets the confidence of this RecognizeTrainTicketResultResponse. + """Gets the confidence of this TrainTicketResultBody. - 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 + 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :return: The confidence of this RecognizeTrainTicketResultResponse. + :return: The confidence of this TrainTicketResultBody. :rtype: object """ return self._confidence @confidence.setter def confidence(self, confidence): - """Sets the confidence of this RecognizeTrainTicketResultResponse. + """Sets the confidence of this TrainTicketResultBody. - 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 + 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :param confidence: The confidence of this RecognizeTrainTicketResultResponse. + :param confidence: The confidence of this TrainTicketResultBody. :type: object """ self._confidence = confidence @@ -559,7 +559,7 @@ class RecognizeTrainTicketResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeTrainTicketResultResponse): + if not isinstance(other, TrainTicketResultBody): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/transportation_license_req.py similarity index 84% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_request_body.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/transportation_license_req.py index e9eb397de..41f9dd9a3 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_train_ticket_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/transportation_license_req.py @@ -9,7 +9,7 @@ import six -class RecognizeTrainTicketRequestBody: +class TransportationLicenseReq: """ @@ -33,7 +33,7 @@ class RecognizeTrainTicketRequestBody: } def __init__(self, url=None, image=None): - """RecognizeTrainTicketRequestBody - a model defined in huaweicloud sdk""" + """TransportationLicenseReq - a model defined in huaweicloud sdk""" @@ -48,44 +48,44 @@ class RecognizeTrainTicketRequestBody: @property def url(self): - """Gets the url of this RecognizeTrainTicketRequestBody. + """Gets the url of this TransportationLicenseReq. 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - :return: The url of this RecognizeTrainTicketRequestBody. + :return: The url of this TransportationLicenseReq. :rtype: str """ return self._url @url.setter def url(self, url): - """Sets the url of this RecognizeTrainTicketRequestBody. + """Sets the url of this TransportationLicenseReq. 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - :param url: The url of this RecognizeTrainTicketRequestBody. + :param url: The url of this TransportationLicenseReq. :type: str """ self._url = url @property def image(self): - """Gets the image of this RecognizeTrainTicketRequestBody. + """Gets the image of this TransportationLicenseReq. 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 - :return: The image of this RecognizeTrainTicketRequestBody. + :return: The image of this TransportationLicenseReq. :rtype: str """ return self._image @image.setter def image(self, image): - """Sets the image of this RecognizeTrainTicketRequestBody. + """Sets the image of this TransportationLicenseReq. 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过4096像素。 支持JPEG/JPG/PNG/BMP/TIFF格式。 - :param image: The image of this RecognizeTrainTicketRequestBody. + :param image: The image of this TransportationLicenseReq. :type: str """ self._image = image @@ -127,7 +127,7 @@ class RecognizeTrainTicketRequestBody: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeTrainTicketRequestBody): + if not isinstance(other, TransportationLicenseReq): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/transportation_license_result_body.py similarity index 67% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/transportation_license_result_body.py index 8d6336db8..868d65c30 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_transportation_license_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/transportation_license_result_body.py @@ -9,7 +9,7 @@ import six -class RecognizeTransportationLicenseResultResponse: +class TransportationLicenseResultBody: """ @@ -55,7 +55,7 @@ class RecognizeTransportationLicenseResultResponse: } def __init__(self, owner_name=None, license_number=None, vehicle_number=None, vehicle_type=None, vehicle_weight=None, vehicle_size=None, issuing_authority=None, issue_date=None, owner_address=None, economic_type=None, business_certificate=None, business_scope=None, confidence=None): - """RecognizeTransportationLicenseResultResponse - a model defined in huaweicloud sdk""" + """TransportationLicenseResultBody - a model defined in huaweicloud sdk""" @@ -103,286 +103,286 @@ class RecognizeTransportationLicenseResultResponse: @property def owner_name(self): - """Gets the owner_name of this RecognizeTransportationLicenseResultResponse. + """Gets the owner_name of this TransportationLicenseResultBody. 业户名称。 - :return: The owner_name of this RecognizeTransportationLicenseResultResponse. + :return: The owner_name of this TransportationLicenseResultBody. :rtype: str """ return self._owner_name @owner_name.setter def owner_name(self, owner_name): - """Sets the owner_name of this RecognizeTransportationLicenseResultResponse. + """Sets the owner_name of this TransportationLicenseResultBody. 业户名称。 - :param owner_name: The owner_name of this RecognizeTransportationLicenseResultResponse. + :param owner_name: The owner_name of this TransportationLicenseResultBody. :type: str """ self._owner_name = owner_name @property def license_number(self): - """Gets the license_number of this RecognizeTransportationLicenseResultResponse. + """Gets the license_number of this TransportationLicenseResultBody. 道路运输证号。 - :return: The license_number of this RecognizeTransportationLicenseResultResponse. + :return: The license_number of this TransportationLicenseResultBody. :rtype: str """ return self._license_number @license_number.setter def license_number(self, license_number): - """Sets the license_number of this RecognizeTransportationLicenseResultResponse. + """Sets the license_number of this TransportationLicenseResultBody. 道路运输证号。 - :param license_number: The license_number of this RecognizeTransportationLicenseResultResponse. + :param license_number: The license_number of this TransportationLicenseResultBody. :type: str """ self._license_number = license_number @property def vehicle_number(self): - """Gets the vehicle_number of this RecognizeTransportationLicenseResultResponse. + """Gets the vehicle_number of this TransportationLicenseResultBody. 车辆号牌。 - :return: The vehicle_number of this RecognizeTransportationLicenseResultResponse. + :return: The vehicle_number of this TransportationLicenseResultBody. :rtype: str """ return self._vehicle_number @vehicle_number.setter def vehicle_number(self, vehicle_number): - """Sets the vehicle_number of this RecognizeTransportationLicenseResultResponse. + """Sets the vehicle_number of this TransportationLicenseResultBody. 车辆号牌。 - :param vehicle_number: The vehicle_number of this RecognizeTransportationLicenseResultResponse. + :param vehicle_number: The vehicle_number of this TransportationLicenseResultBody. :type: str """ self._vehicle_number = vehicle_number @property def vehicle_type(self): - """Gets the vehicle_type of this RecognizeTransportationLicenseResultResponse. + """Gets the vehicle_type of this TransportationLicenseResultBody. 车辆类型。 - :return: The vehicle_type of this RecognizeTransportationLicenseResultResponse. + :return: The vehicle_type of this TransportationLicenseResultBody. :rtype: str """ return self._vehicle_type @vehicle_type.setter def vehicle_type(self, vehicle_type): - """Sets the vehicle_type of this RecognizeTransportationLicenseResultResponse. + """Sets the vehicle_type of this TransportationLicenseResultBody. 车辆类型。 - :param vehicle_type: The vehicle_type of this RecognizeTransportationLicenseResultResponse. + :param vehicle_type: The vehicle_type of this TransportationLicenseResultBody. :type: str """ self._vehicle_type = vehicle_type @property def vehicle_weight(self): - """Gets the vehicle_weight of this RecognizeTransportationLicenseResultResponse. + """Gets the vehicle_weight of this TransportationLicenseResultBody. 吨(座)位。 - :return: The vehicle_weight of this RecognizeTransportationLicenseResultResponse. + :return: The vehicle_weight of this TransportationLicenseResultBody. :rtype: str """ return self._vehicle_weight @vehicle_weight.setter def vehicle_weight(self, vehicle_weight): - """Sets the vehicle_weight of this RecognizeTransportationLicenseResultResponse. + """Sets the vehicle_weight of this TransportationLicenseResultBody. 吨(座)位。 - :param vehicle_weight: The vehicle_weight of this RecognizeTransportationLicenseResultResponse. + :param vehicle_weight: The vehicle_weight of this TransportationLicenseResultBody. :type: str """ self._vehicle_weight = vehicle_weight @property def vehicle_size(self): - """Gets the vehicle_size of this RecognizeTransportationLicenseResultResponse. + """Gets the vehicle_size of this TransportationLicenseResultBody. 车辆尺寸。 - :return: The vehicle_size of this RecognizeTransportationLicenseResultResponse. + :return: The vehicle_size of this TransportationLicenseResultBody. :rtype: str """ return self._vehicle_size @vehicle_size.setter def vehicle_size(self, vehicle_size): - """Sets the vehicle_size of this RecognizeTransportationLicenseResultResponse. + """Sets the vehicle_size of this TransportationLicenseResultBody. 车辆尺寸。 - :param vehicle_size: The vehicle_size of this RecognizeTransportationLicenseResultResponse. + :param vehicle_size: The vehicle_size of this TransportationLicenseResultBody. :type: str """ self._vehicle_size = vehicle_size @property def issuing_authority(self): - """Gets the issuing_authority of this RecognizeTransportationLicenseResultResponse. + """Gets the issuing_authority of this TransportationLicenseResultBody. 核发机关(非必有,依赖对应运输证板式)。 - :return: The issuing_authority of this RecognizeTransportationLicenseResultResponse. + :return: The issuing_authority of this TransportationLicenseResultBody. :rtype: str """ return self._issuing_authority @issuing_authority.setter def issuing_authority(self, issuing_authority): - """Sets the issuing_authority of this RecognizeTransportationLicenseResultResponse. + """Sets the issuing_authority of this TransportationLicenseResultBody. 核发机关(非必有,依赖对应运输证板式)。 - :param issuing_authority: The issuing_authority of this RecognizeTransportationLicenseResultResponse. + :param issuing_authority: The issuing_authority of this TransportationLicenseResultBody. :type: str """ self._issuing_authority = issuing_authority @property def issue_date(self): - """Gets the issue_date of this RecognizeTransportationLicenseResultResponse. + """Gets the issue_date of this TransportationLicenseResultBody. 签发日期(非必有,依赖对应运输证板式)。 - :return: The issue_date of this RecognizeTransportationLicenseResultResponse. + :return: The issue_date of this TransportationLicenseResultBody. :rtype: str """ return self._issue_date @issue_date.setter def issue_date(self, issue_date): - """Sets the issue_date of this RecognizeTransportationLicenseResultResponse. + """Sets the issue_date of this TransportationLicenseResultBody. 签发日期(非必有,依赖对应运输证板式)。 - :param issue_date: The issue_date of this RecognizeTransportationLicenseResultResponse. + :param issue_date: The issue_date of this TransportationLicenseResultBody. :type: str """ self._issue_date = issue_date @property def owner_address(self): - """Gets the owner_address of this RecognizeTransportationLicenseResultResponse. + """Gets the owner_address of this TransportationLicenseResultBody. 业户地址(非必有,依赖对应运输证板式)。 - :return: The owner_address of this RecognizeTransportationLicenseResultResponse. + :return: The owner_address of this TransportationLicenseResultBody. :rtype: str """ return self._owner_address @owner_address.setter def owner_address(self, owner_address): - """Sets the owner_address of this RecognizeTransportationLicenseResultResponse. + """Sets the owner_address of this TransportationLicenseResultBody. 业户地址(非必有,依赖对应运输证板式)。 - :param owner_address: The owner_address of this RecognizeTransportationLicenseResultResponse. + :param owner_address: The owner_address of this TransportationLicenseResultBody. :type: str """ self._owner_address = owner_address @property def economic_type(self): - """Gets the economic_type of this RecognizeTransportationLicenseResultResponse. + """Gets the economic_type of this TransportationLicenseResultBody. 经济类型(非必有,依赖对应运输证板式)。 - :return: The economic_type of this RecognizeTransportationLicenseResultResponse. + :return: The economic_type of this TransportationLicenseResultBody. :rtype: str """ return self._economic_type @economic_type.setter def economic_type(self, economic_type): - """Sets the economic_type of this RecognizeTransportationLicenseResultResponse. + """Sets the economic_type of this TransportationLicenseResultBody. 经济类型(非必有,依赖对应运输证板式)。 - :param economic_type: The economic_type of this RecognizeTransportationLicenseResultResponse. + :param economic_type: The economic_type of this TransportationLicenseResultBody. :type: str """ self._economic_type = economic_type @property def business_certificate(self): - """Gets the business_certificate of this RecognizeTransportationLicenseResultResponse. + """Gets the business_certificate of this TransportationLicenseResultBody. 经营许可证号(非必有,依赖对应运输证板式)。 - :return: The business_certificate of this RecognizeTransportationLicenseResultResponse. + :return: The business_certificate of this TransportationLicenseResultBody. :rtype: str """ return self._business_certificate @business_certificate.setter def business_certificate(self, business_certificate): - """Sets the business_certificate of this RecognizeTransportationLicenseResultResponse. + """Sets the business_certificate of this TransportationLicenseResultBody. 经营许可证号(非必有,依赖对应运输证板式)。 - :param business_certificate: The business_certificate of this RecognizeTransportationLicenseResultResponse. + :param business_certificate: The business_certificate of this TransportationLicenseResultBody. :type: str """ self._business_certificate = business_certificate @property def business_scope(self): - """Gets the business_scope of this RecognizeTransportationLicenseResultResponse. + """Gets the business_scope of this TransportationLicenseResultBody. 道路普通货物运输(非必有,依赖对应运输证板式)。 - :return: The business_scope of this RecognizeTransportationLicenseResultResponse. + :return: The business_scope of this TransportationLicenseResultBody. :rtype: str """ return self._business_scope @business_scope.setter def business_scope(self, business_scope): - """Sets the business_scope of this RecognizeTransportationLicenseResultResponse. + """Sets the business_scope of this TransportationLicenseResultBody. 道路普通货物运输(非必有,依赖对应运输证板式)。 - :param business_scope: The business_scope of this RecognizeTransportationLicenseResultResponse. + :param business_scope: The business_scope of this TransportationLicenseResultBody. :type: str """ self._business_scope = business_scope @property def confidence(self): - """Gets the confidence of this RecognizeTransportationLicenseResultResponse. + """Gets the confidence of this TransportationLicenseResultBody. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :return: The confidence of this RecognizeTransportationLicenseResultResponse. + :return: The confidence of this TransportationLicenseResultBody. :rtype: object """ return self._confidence @confidence.setter def confidence(self, confidence): - """Sets the confidence of this RecognizeTransportationLicenseResultResponse. + """Sets the confidence of this TransportationLicenseResultBody. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :param confidence: The confidence of this RecognizeTransportationLicenseResultResponse. + :param confidence: The confidence of this TransportationLicenseResultBody. :type: object """ self._confidence = confidence @@ -424,7 +424,7 @@ class RecognizeTransportationLicenseResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeTransportationLicenseResultResponse): + if not isinstance(other, TransportationLicenseResultBody): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/vin_req.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/vin_req.py new file mode 100644 index 000000000..ca10dba24 --- /dev/null +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/vin_req.py @@ -0,0 +1,137 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class VINReq: + + + """ + 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 = { + 'image': 'str', + 'url': 'str' + } + + attribute_map = { + 'image': 'image', + 'url': 'url' + } + + def __init__(self, image=None, url=None): + """VINReq - a model defined in huaweicloud sdk""" + + + + self._image = None + self._url = None + self.discriminator = None + + if image is not None: + self.image = image + if url is not None: + self.url = url + + @property + def image(self): + """Gets the image of this VINReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :return: The image of this VINReq. + :rtype: str + """ + return self._image + + @image.setter + def image(self, image): + """Sets the image of this VINReq. + + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 + + :param image: The image of this VINReq. + :type: str + """ + self._image = image + + @property + def url(self): + """Gets the url of this VINReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this VINReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this VINReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this VINReq. + :type: str + """ + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, VINReq): + 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-ocr/huaweicloudsdkocr/v1/model/recognize_vin_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/vin_response_body_item.py similarity index 84% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/vin_response_body_item.py index 74ab90f3f..666304dd2 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_vin_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/vin_response_body_item.py @@ -9,7 +9,7 @@ import six -class RecognizeVinResultResponse: +class VINResponseBodyItem: """ @@ -31,7 +31,7 @@ class RecognizeVinResultResponse: } def __init__(self, vin=None): - """RecognizeVinResultResponse - a model defined in huaweicloud sdk""" + """VINResponseBodyItem - a model defined in huaweicloud sdk""" @@ -42,22 +42,22 @@ class RecognizeVinResultResponse: @property def vin(self): - """Gets the vin of this RecognizeVinResultResponse. + """Gets the vin of this VINResponseBodyItem. 识别检测到的车架号。 - :return: The vin of this RecognizeVinResultResponse. + :return: The vin of this VINResponseBodyItem. :rtype: str """ return self._vin @vin.setter def vin(self, vin): - """Sets the vin of this RecognizeVinResultResponse. + """Sets the vin of this VINResponseBodyItem. 识别检测到的车架号。 - :param vin: The vin of this RecognizeVinResultResponse. + :param vin: The vin of this VINResponseBodyItem. :type: str """ self._vin = vin @@ -99,7 +99,7 @@ class RecognizeVinResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeVinResultResponse): + if not isinstance(other, VINResponseBodyItem): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_items_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/web_image_items_response.py similarity index 71% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_items_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/web_image_items_response.py index c49a62171..5da2a1655 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_items_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/web_image_items_response.py @@ -9,7 +9,7 @@ import six -class RecognizeWebImageItemsResponse: +class WebImageItemsResponse: """ @@ -57,7 +57,7 @@ class RecognizeWebImageItemsResponse: } def __init__(self, words=None, confidence=None, location=None, extracted_data=None, contact_info=None, image_size=None, height=None, width=None, name=None, phone=None, province=None, city=None, district=None, detail_address=None): - """RecognizeWebImageItemsResponse - a model defined in huaweicloud sdk""" + """WebImageItemsResponse - a model defined in huaweicloud sdk""" @@ -77,9 +77,12 @@ class RecognizeWebImageItemsResponse: self._detail_address = None self.discriminator = None - self.words = words - self.confidence = confidence - self.location = location + if words is not None: + self.words = words + if confidence is not None: + self.confidence = confidence + if location is not None: + self.location = location if extracted_data is not None: self.extracted_data = extracted_data if contact_info is not None: @@ -105,308 +108,308 @@ class RecognizeWebImageItemsResponse: @property def words(self): - """Gets the words of this RecognizeWebImageItemsResponse. + """Gets the words of this WebImageItemsResponse. 文字块识别结果。 - :return: The words of this RecognizeWebImageItemsResponse. + :return: The words of this WebImageItemsResponse. :rtype: str """ return self._words @words.setter def words(self, words): - """Sets the words of this RecognizeWebImageItemsResponse. + """Sets the words of this WebImageItemsResponse. 文字块识别结果。 - :param words: The words of this RecognizeWebImageItemsResponse. + :param words: The words of this WebImageItemsResponse. :type: str """ self._words = words @property def confidence(self): - """Gets the confidence of this RecognizeWebImageItemsResponse. + """Gets the confidence of this WebImageItemsResponse. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :return: The confidence of this RecognizeWebImageItemsResponse. + :return: The confidence of this WebImageItemsResponse. :rtype: float """ return self._confidence @confidence.setter def confidence(self, confidence): - """Sets the confidence of this RecognizeWebImageItemsResponse. + """Sets the confidence of this WebImageItemsResponse. 相关字段的置信度信息,置信度越大,表示本次识别的对应字段的可靠性越高,在统计意义上,置信度越大,准确率越高。 置信度由算法给出,不直接等价于对应字段的准确率。 - :param confidence: The confidence of this RecognizeWebImageItemsResponse. + :param confidence: The confidence of this WebImageItemsResponse. :type: float """ self._confidence = confidence @property def location(self): - """Gets the location of this RecognizeWebImageItemsResponse. + """Gets the location of this WebImageItemsResponse. 文字块的区域位置信息,列表形式,包含文字区域四个顶点的二维坐标(x,y);坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - :return: The location of this RecognizeWebImageItemsResponse. + :return: The location of this WebImageItemsResponse. :rtype: list[int] """ return self._location @location.setter def location(self, location): - """Sets the location of this RecognizeWebImageItemsResponse. + """Sets the location of this WebImageItemsResponse. 文字块的区域位置信息,列表形式,包含文字区域四个顶点的二维坐标(x,y);坐标原点为图片左上角,x轴沿水平方向,y轴沿竖直方向。 - :param location: The location of this RecognizeWebImageItemsResponse. + :param location: The location of this WebImageItemsResponse. :type: list[int] """ self._location = location @property def extracted_data(self): - """Gets the extracted_data of this RecognizeWebImageItemsResponse. + """Gets the extracted_data of this WebImageItemsResponse. 提取出的结构化JSON结果,该字典内的key值与入参列表extract_type的值一致,目前仅支持联系人信息提取,亦即key值为\"contact_info\"的字段。 若入参extract_type为空列表或该字段缺失时,不进行提取,此字段为空。 - :return: The extracted_data of this RecognizeWebImageItemsResponse. + :return: The extracted_data of this WebImageItemsResponse. :rtype: object """ return self._extracted_data @extracted_data.setter def extracted_data(self, extracted_data): - """Sets the extracted_data of this RecognizeWebImageItemsResponse. + """Sets the extracted_data of this WebImageItemsResponse. 提取出的结构化JSON结果,该字典内的key值与入参列表extract_type的值一致,目前仅支持联系人信息提取,亦即key值为\"contact_info\"的字段。 若入参extract_type为空列表或该字段缺失时,不进行提取,此字段为空。 - :param extracted_data: The extracted_data of this RecognizeWebImageItemsResponse. + :param extracted_data: The extracted_data of this WebImageItemsResponse. :type: object """ self._extracted_data = extracted_data @property def contact_info(self): - """Gets the contact_info of this RecognizeWebImageItemsResponse. + """Gets the contact_info of this WebImageItemsResponse. 该字段表示提取的联系人信息,包括:姓名、联系电话、省市区以及详细地址。 若入参extract_type列表中无该字段,则此字段不存在。 - :return: The contact_info of this RecognizeWebImageItemsResponse. + :return: The contact_info of this WebImageItemsResponse. :rtype: object """ return self._contact_info @contact_info.setter def contact_info(self, contact_info): - """Sets the contact_info of this RecognizeWebImageItemsResponse. + """Sets the contact_info of this WebImageItemsResponse. 该字段表示提取的联系人信息,包括:姓名、联系电话、省市区以及详细地址。 若入参extract_type列表中无该字段,则此字段不存在。 - :param contact_info: The contact_info of this RecognizeWebImageItemsResponse. + :param contact_info: The contact_info of this WebImageItemsResponse. :type: object """ self._contact_info = contact_info @property def image_size(self): - """Gets the image_size of this RecognizeWebImageItemsResponse. + """Gets the image_size of this WebImageItemsResponse. 该字段表示返回图片宽高信息。 如入参extract_type列表中无该字段,则此字段不存在。 - :return: The image_size of this RecognizeWebImageItemsResponse. + :return: The image_size of this WebImageItemsResponse. :rtype: object """ return self._image_size @image_size.setter def image_size(self, image_size): - """Sets the image_size of this RecognizeWebImageItemsResponse. + """Sets the image_size of this WebImageItemsResponse. 该字段表示返回图片宽高信息。 如入参extract_type列表中无该字段,则此字段不存在。 - :param image_size: The image_size of this RecognizeWebImageItemsResponse. + :param image_size: The image_size of this WebImageItemsResponse. :type: object """ self._image_size = image_size @property def height(self): - """Gets the height of this RecognizeWebImageItemsResponse. + """Gets the height of this WebImageItemsResponse. 传入image_size时的返回,为图像高度。 - :return: The height of this RecognizeWebImageItemsResponse. + :return: The height of this WebImageItemsResponse. :rtype: int """ return self._height @height.setter def height(self, height): - """Sets the height of this RecognizeWebImageItemsResponse. + """Sets the height of this WebImageItemsResponse. 传入image_size时的返回,为图像高度。 - :param height: The height of this RecognizeWebImageItemsResponse. + :param height: The height of this WebImageItemsResponse. :type: int """ self._height = height @property def width(self): - """Gets the width of this RecognizeWebImageItemsResponse. + """Gets the width of this WebImageItemsResponse. 传入image_size时的返回,为图像宽度。 - :return: The width of this RecognizeWebImageItemsResponse. + :return: The width of this WebImageItemsResponse. :rtype: int """ return self._width @width.setter def width(self, width): - """Sets the width of this RecognizeWebImageItemsResponse. + """Sets the width of this WebImageItemsResponse. 传入image_size时的返回,为图像宽度。 - :param width: The width of this RecognizeWebImageItemsResponse. + :param width: The width of this WebImageItemsResponse. :type: int """ self._width = width @property def name(self): - """Gets the name of this RecognizeWebImageItemsResponse. + """Gets the name of this WebImageItemsResponse. 传入contact_info时的返回,为姓名。 - :return: The name of this RecognizeWebImageItemsResponse. + :return: The name of this WebImageItemsResponse. :rtype: str """ return self._name @name.setter def name(self, name): - """Sets the name of this RecognizeWebImageItemsResponse. + """Sets the name of this WebImageItemsResponse. 传入contact_info时的返回,为姓名。 - :param name: The name of this RecognizeWebImageItemsResponse. + :param name: The name of this WebImageItemsResponse. :type: str """ self._name = name @property def phone(self): - """Gets the phone of this RecognizeWebImageItemsResponse. + """Gets the phone of this WebImageItemsResponse. 传入contact_info时的返回,联系电话。 - :return: The phone of this RecognizeWebImageItemsResponse. + :return: The phone of this WebImageItemsResponse. :rtype: str """ return self._phone @phone.setter def phone(self, phone): - """Sets the phone of this RecognizeWebImageItemsResponse. + """Sets the phone of this WebImageItemsResponse. 传入contact_info时的返回,联系电话。 - :param phone: The phone of this RecognizeWebImageItemsResponse. + :param phone: The phone of this WebImageItemsResponse. :type: str """ self._phone = phone @property def province(self): - """Gets the province of this RecognizeWebImageItemsResponse. + """Gets the province of this WebImageItemsResponse. 传入contact_info时的返回,省。 - :return: The province of this RecognizeWebImageItemsResponse. + :return: The province of this WebImageItemsResponse. :rtype: str """ return self._province @province.setter def province(self, province): - """Sets the province of this RecognizeWebImageItemsResponse. + """Sets the province of this WebImageItemsResponse. 传入contact_info时的返回,省。 - :param province: The province of this RecognizeWebImageItemsResponse. + :param province: The province of this WebImageItemsResponse. :type: str """ self._province = province @property def city(self): - """Gets the city of this RecognizeWebImageItemsResponse. + """Gets the city of this WebImageItemsResponse. 传入contact_info时的返回,市。 - :return: The city of this RecognizeWebImageItemsResponse. + :return: The city of this WebImageItemsResponse. :rtype: str """ return self._city @city.setter def city(self, city): - """Sets the city of this RecognizeWebImageItemsResponse. + """Sets the city of this WebImageItemsResponse. 传入contact_info时的返回,市。 - :param city: The city of this RecognizeWebImageItemsResponse. + :param city: The city of this WebImageItemsResponse. :type: str """ self._city = city @property def district(self): - """Gets the district of this RecognizeWebImageItemsResponse. + """Gets the district of this WebImageItemsResponse. 传入contact_info时的返回,县区。 - :return: The district of this RecognizeWebImageItemsResponse. + :return: The district of this WebImageItemsResponse. :rtype: str """ return self._district @district.setter def district(self, district): - """Sets the district of this RecognizeWebImageItemsResponse. + """Sets the district of this WebImageItemsResponse. 传入contact_info时的返回,县区。 - :param district: The district of this RecognizeWebImageItemsResponse. + :param district: The district of this WebImageItemsResponse. :type: str """ self._district = district @property def detail_address(self): - """Gets the detail_address of this RecognizeWebImageItemsResponse. + """Gets the detail_address of this WebImageItemsResponse. 传入contact_info时的返回,详细地址(不含省市区)。 - :return: The detail_address of this RecognizeWebImageItemsResponse. + :return: The detail_address of this WebImageItemsResponse. :rtype: str """ return self._detail_address @detail_address.setter def detail_address(self, detail_address): - """Sets the detail_address of this RecognizeWebImageItemsResponse. + """Sets the detail_address of this WebImageItemsResponse. 传入contact_info时的返回,详细地址(不含省市区)。 - :param detail_address: The detail_address of this RecognizeWebImageItemsResponse. + :param detail_address: The detail_address of this WebImageItemsResponse. :type: str """ self._detail_address = detail_address @@ -448,7 +451,7 @@ class RecognizeWebImageItemsResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeWebImageItemsResponse): + if not isinstance(other, WebImageItemsResponse): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_request_body.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/web_image_req.py similarity index 55% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_request_body.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/web_image_req.py index 09a93e978..e73e29aaa 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_request_body.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/web_image_req.py @@ -9,7 +9,7 @@ import six -class RecognizeWebImageRequestBody: +class WebImageReq: """ @@ -23,123 +23,123 @@ class RecognizeWebImageRequestBody: sensitive_list = [] openapi_types = { - 'url': 'str', 'image': 'str', + 'url': 'str', 'detect_direction': 'bool', 'extract_type': 'list[str]' } attribute_map = { - 'url': 'url', 'image': 'image', + 'url': 'url', 'detect_direction': 'detect_direction', 'extract_type': 'extract_type' } - def __init__(self, url=None, image=None, detect_direction=None, extract_type=None): - """RecognizeWebImageRequestBody - a model defined in huaweicloud sdk""" + def __init__(self, image=None, url=None, detect_direction=None, extract_type=None): + """WebImageReq - a model defined in huaweicloud sdk""" - self._url = None self._image = None + self._url = None self._detect_direction = None self._extract_type = None self.discriminator = None - if url is not None: - self.url = url if image is not None: self.image = image + if url is not None: + self.url = url if detect_direction is not None: self.detect_direction = detect_direction if extract_type is not None: self.extract_type = extract_type - @property - def url(self): - """Gets the url of this RecognizeWebImageRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :return: The url of this RecognizeWebImageRequestBody. - :rtype: str - """ - return self._url - - @url.setter - def url(self, url): - """Sets the url of this RecognizeWebImageRequestBody. - - 图片的URL路径,目前支持: - 公网HTTP/HTTPS URL - 华为云OBS提供的URL,使用OBS数据需要进行授权。包括对服务授权、临时授权、匿名公开授权。详请参见配置OBS访问权限。 > 说明: - 接口响应时间依赖图片的下载时间,如果图片下载时间过长,会返回接口调用失败。请保证被检测图片所在的存储服务稳定可靠,建议您使用华为云OBS存储。 - - :param url: The url of this RecognizeWebImageRequestBody. - :type: str - """ - self._url = url - @property def image(self): - """Gets the image of this RecognizeWebImageRequestBody. + """Gets the image of this WebImageReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :return: The image of this RecognizeWebImageRequestBody. + :return: The image of this WebImageReq. :rtype: str """ return self._image @image.setter def image(self, image): - """Sets the image of this RecognizeWebImageRequestBody. + """Sets the image of this WebImageReq. - 图片文件Base64编码字符串。要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。。 + 与url二选一 图像数据,base64编码,要求base64编码后大小不超过10M。 图片最小边不小于15像素,最长边不超过8192像素。 支持JPEG/JPG/PNG/BMP/TIFF/GIF/WEBP格式 图片文件Base64编码字符串,点击[这里](https://support.huaweicloud.com/ocr_faq/ocr_01_0032.html)查看详细获取方式。 - :param image: The image of this RecognizeWebImageRequestBody. + :param image: The image of this WebImageReq. :type: str """ self._image = image + @property + def url(self): + """Gets the url of this WebImageReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :return: The url of this WebImageReq. + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this WebImageReq. + + 与image二选一 图片的URL路径,目前仅支持华为云OBS提供的匿名公开授权访问的URL以及公网URL。 + + :param url: The url of this WebImageReq. + :type: str + """ + self._url = url + @property def detect_direction(self): - """Gets the detect_direction of this RecognizeWebImageRequestBody. + """Gets the detect_direction of this WebImageReq. - 若不传该字段,默认不检测图像倾斜角度文字方向,为True时,支持任意角度的旋转倾斜。 + 图片朝向检测开关,可选值包括: - true:检测图片朝向; - false:不检测图片朝向。 > 说明: - 支持任意角度的图片朝向检测。未传入该参数时默认为false,即不检测图片朝向。 - :return: The detect_direction of this RecognizeWebImageRequestBody. + :return: The detect_direction of this WebImageReq. :rtype: bool """ return self._detect_direction @detect_direction.setter def detect_direction(self, detect_direction): - """Sets the detect_direction of this RecognizeWebImageRequestBody. + """Sets the detect_direction of this WebImageReq. - 若不传该字段,默认不检测图像倾斜角度文字方向,为True时,支持任意角度的旋转倾斜。 + 图片朝向检测开关,可选值包括: - true:检测图片朝向; - false:不检测图片朝向。 > 说明: - 支持任意角度的图片朝向检测。未传入该参数时默认为false,即不检测图片朝向。 - :param detect_direction: The detect_direction of this RecognizeWebImageRequestBody. + :param detect_direction: The detect_direction of this WebImageReq. :type: bool """ self._detect_direction = detect_direction @property def extract_type(self): - """Gets the extract_type of this RecognizeWebImageRequestBody. + """Gets the extract_type of this WebImageReq. 结构化数据提取参数列表,目前只支持联系人信息、图像宽高,其入参值分别为\"contact_info\",\"image_size\",若该字段为空列表或缺失该字段,默认不提取。 - :return: The extract_type of this RecognizeWebImageRequestBody. + :return: The extract_type of this WebImageReq. :rtype: list[str] """ return self._extract_type @extract_type.setter def extract_type(self, extract_type): - """Sets the extract_type of this RecognizeWebImageRequestBody. + """Sets the extract_type of this WebImageReq. 结构化数据提取参数列表,目前只支持联系人信息、图像宽高,其入参值分别为\"contact_info\",\"image_size\",若该字段为空列表或缺失该字段,默认不提取。 - :param extract_type: The extract_type of this RecognizeWebImageRequestBody. + :param extract_type: The extract_type of this WebImageReq. :type: list[str] """ self._extract_type = extract_type @@ -181,7 +181,7 @@ class RecognizeWebImageRequestBody: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeWebImageRequestBody): + if not isinstance(other, WebImageReq): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_result_response.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/web_image_response_body_item.py similarity index 76% rename from huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_result_response.py rename to huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/web_image_response_body_item.py index 8657bb47a..a2277921f 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/recognize_web_image_result_response.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/model/web_image_response_body_item.py @@ -9,7 +9,7 @@ import six -class RecognizeWebImageResultResponse: +class WebImageResponseBodyItem: """ @@ -24,7 +24,7 @@ class RecognizeWebImageResultResponse: openapi_types = { 'words_block_count': 'int', - 'words_block_list': 'list[RecognizeWebImageItemsResponse]' + 'words_block_list': 'list[WebImageItemsResponse]' } attribute_map = { @@ -33,7 +33,7 @@ class RecognizeWebImageResultResponse: } def __init__(self, words_block_count=None, words_block_list=None): - """RecognizeWebImageResultResponse - a model defined in huaweicloud sdk""" + """WebImageResponseBodyItem - a model defined in huaweicloud sdk""" @@ -46,45 +46,45 @@ class RecognizeWebImageResultResponse: @property def words_block_count(self): - """Gets the words_block_count of this RecognizeWebImageResultResponse. + """Gets the words_block_count of this WebImageResponseBodyItem. 代表检测识别出来的文字块数目。 - :return: The words_block_count of this RecognizeWebImageResultResponse. + :return: The words_block_count of this WebImageResponseBodyItem. :rtype: int """ return self._words_block_count @words_block_count.setter def words_block_count(self, words_block_count): - """Sets the words_block_count of this RecognizeWebImageResultResponse. + """Sets the words_block_count of this WebImageResponseBodyItem. 代表检测识别出来的文字块数目。 - :param words_block_count: The words_block_count of this RecognizeWebImageResultResponse. + :param words_block_count: The words_block_count of this WebImageResponseBodyItem. :type: int """ self._words_block_count = words_block_count @property def words_block_list(self): - """Gets the words_block_list of this RecognizeWebImageResultResponse. + """Gets the words_block_list of this WebImageResponseBodyItem. 识别文字块列表,输出顺序从左到右,从上到下。 - :return: The words_block_list of this RecognizeWebImageResultResponse. - :rtype: list[RecognizeWebImageItemsResponse] + :return: The words_block_list of this WebImageResponseBodyItem. + :rtype: list[WebImageItemsResponse] """ return self._words_block_list @words_block_list.setter def words_block_list(self, words_block_list): - """Sets the words_block_list of this RecognizeWebImageResultResponse. + """Sets the words_block_list of this WebImageResponseBodyItem. 识别文字块列表,输出顺序从左到右,从上到下。 - :param words_block_list: The words_block_list of this RecognizeWebImageResultResponse. - :type: list[RecognizeWebImageItemsResponse] + :param words_block_list: The words_block_list of this WebImageResponseBodyItem. + :type: list[WebImageItemsResponse] """ self._words_block_list = words_block_list @@ -125,7 +125,7 @@ class RecognizeWebImageResultResponse: def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, RecognizeWebImageResultResponse): + if not isinstance(other, WebImageResponseBodyItem): return False return self.__dict__ == other.__dict__ diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/ocr_async_client.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/ocr_async_client.py index 5f9af2bb0..0f406b1d8 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/ocr_async_client.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/ocr_async_client.py @@ -38,14 +38,20 @@ class OcrAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkocr.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "OcrClient": + raise TypeError("client type error, support client type is OcrClient") + return ClientBuilder(clazz) def recognize_auto_classification_async(self, request): """智能分类识别 - 检测定位图片上指定要识别的票证(票据、证件或其他文字载体),并对其进行结构化识别。接口以列表形式返回图片上要识别票证的位置坐标、结构化识别的内容以及对应的类别。 计费次数说明: 只对识别成功的票证进行计费,识别失败的票证不计费。例如图片中包含三张票证,有两张识别成功,一张识别失败,此时接口计费两次。 + 检测定位图片上指定要识别的票证(票据、证件或其他文字载体),并对其进行结构化识别。接口以列表形式返回图片上要识别票证的位置坐标、结构化识别的内容以及对应的类别。 计费次数说明: 只对识别成功的票证进行计费,识别失败的票证不计费。例如图片中包含三张票证,有两张识别成功,一张识别失败,此时接口计费两次。 :param RecognizeAutoClassificationRequest request :return: RecognizeAutoClassificationResponse @@ -55,13 +61,13 @@ class OcrAsyncClient(Client): def recognize_auto_classification_with_http_info(self, request): """智能分类识别 - 检测定位图片上指定要识别的票证(票据、证件或其他文字载体),并对其进行结构化识别。接口以列表形式返回图片上要识别票证的位置坐标、结构化识别的内容以及对应的类别。 计费次数说明: 只对识别成功的票证进行计费,识别失败的票证不计费。例如图片中包含三张票证,有两张识别成功,一张识别失败,此时接口计费两次。 + 检测定位图片上指定要识别的票证(票据、证件或其他文字载体),并对其进行结构化识别。接口以列表形式返回图片上要识别票证的位置坐标、结构化识别的内容以及对应的类别。 计费次数说明: 只对识别成功的票证进行计费,识别失败的票证不计费。例如图片中包含三张票证,有两张识别成功,一张识别失败,此时接口计费两次。 :param RecognizeAutoClassificationRequest request :return: RecognizeAutoClassificationResponse """ - all_params = ['recognize_auto_classification_request_body'] + all_params = ['project_id', 'auto_classification_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -70,6 +76,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -91,7 +99,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/auto-classification', + resource_path='/v2/{project_id}/ocr/auto-classification', method='POST', path_params=path_params, query_params=query_params, @@ -108,7 +116,7 @@ class OcrAsyncClient(Client): def recognize_bankcard_async(self, request): """银行卡识别 - 识别银行卡上的关键文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别银行卡上的关键文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeBankcardRequest request :return: RecognizeBankcardResponse @@ -118,13 +126,13 @@ class OcrAsyncClient(Client): def recognize_bankcard_with_http_info(self, request): """银行卡识别 - 识别银行卡上的关键文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别银行卡上的关键文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeBankcardRequest request :return: RecognizeBankcardResponse """ - all_params = ['recognize_bankcard_request_body'] + all_params = ['project_id', 'bank_card_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -133,6 +141,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -154,7 +164,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/bankcard', + resource_path='/v2/{project_id}/ocr/bankcard', method='POST', path_params=path_params, query_params=query_params, @@ -187,196 +197,7 @@ class OcrAsyncClient(Client): :return: RecognizeBusinessCardResponse """ - all_params = ['recognize_business_card_request_body'] - local_var_params = {} - for attr in request.attribute_map: - if hasattr(request, attr): - local_var_params[attr] = getattr(request, attr) - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - if isinstance(request, SdkStreamRequest): - body_params = request.get_file_stream() - - response_headers = [] - - header_params['Content-Type'] = http_utils.select_header_content_type( - ['application/json;charset=UTF-8']) - - auth_settings = [] - - return self.call_api( - resource_path='/v1.0/ocr/business-card', - method='POST', - path_params=path_params, - query_params=query_params, - header_params=header_params, - body=body_params, - post_params=form_params, - response_type='RecognizeBusinessCardResponse', - response_headers=response_headers, - auth_settings=auth_settings, - collection_formats=collection_formats, - request_type=request.__class__.__name__) - - - def recognize_business_license_async(self, request): - """营业执照识别 - - 识别用户上传的营业执照首页图片中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 - - :param RecognizeBusinessLicenseRequest request - :return: RecognizeBusinessLicenseResponse - """ - return self.recognize_business_license_with_http_info(request) - - def recognize_business_license_with_http_info(self, request): - """营业执照识别 - - 识别用户上传的营业执照首页图片中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 - - :param RecognizeBusinessLicenseRequest request - :return: RecognizeBusinessLicenseResponse - """ - - all_params = ['recognize_business_license_request_body'] - local_var_params = {} - for attr in request.attribute_map: - if hasattr(request, attr): - local_var_params[attr] = getattr(request, attr) - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - if isinstance(request, SdkStreamRequest): - body_params = request.get_file_stream() - - response_headers = [] - - header_params['Content-Type'] = http_utils.select_header_content_type( - ['application/json;charset=UTF-8']) - - auth_settings = [] - - return self.call_api( - resource_path='/v1.0/ocr/business-license', - method='POST', - path_params=path_params, - query_params=query_params, - header_params=header_params, - body=body_params, - post_params=form_params, - response_type='RecognizeBusinessLicenseResponse', - response_headers=response_headers, - auth_settings=auth_settings, - collection_formats=collection_formats, - request_type=request.__class__.__name__) - - - def recognize_driver_license_async(self, request): - """驾驶证识别 - - 识别用户上传的驾驶证图片(或者用户提供的华为云上OBS的驾驶证图片文件的URL)中主页与副页的文字内容,并将识别的结果返回给用户。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 - - :param RecognizeDriverLicenseRequest request - :return: RecognizeDriverLicenseResponse - """ - return self.recognize_driver_license_with_http_info(request) - - def recognize_driver_license_with_http_info(self, request): - """驾驶证识别 - - 识别用户上传的驾驶证图片(或者用户提供的华为云上OBS的驾驶证图片文件的URL)中主页与副页的文字内容,并将识别的结果返回给用户。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 - - :param RecognizeDriverLicenseRequest request - :return: RecognizeDriverLicenseResponse - """ - - all_params = ['recognize_driver_license_request_body'] - local_var_params = {} - for attr in request.attribute_map: - if hasattr(request, attr): - local_var_params[attr] = getattr(request, attr) - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - if isinstance(request, SdkStreamRequest): - body_params = request.get_file_stream() - - response_headers = [] - - header_params['Content-Type'] = http_utils.select_header_content_type( - ['application/json;charset=UTF-8']) - - auth_settings = [] - - return self.call_api( - resource_path='/v1.0/ocr/driver-license', - method='POST', - path_params=path_params, - query_params=query_params, - header_params=header_params, - body=body_params, - post_params=form_params, - response_type='RecognizeDriverLicenseResponse', - response_headers=response_headers, - auth_settings=auth_settings, - collection_formats=collection_formats, - request_type=request.__class__.__name__) - - - def recognize_financial_statement_async(self, request): - """财务报表识别 - - 识别用户上传的表格图片中的文字内容,并将识别的结果返回给用户。 - - :param RecognizeFinancialStatementRequest request - :return: RecognizeFinancialStatementResponse - """ - return self.recognize_financial_statement_with_http_info(request) - - def recognize_financial_statement_with_http_info(self, request): - """财务报表识别 - - 识别用户上传的表格图片中的文字内容,并将识别的结果返回给用户。 - - :param RecognizeFinancialStatementRequest request - :return: RecognizeFinancialStatementResponse - """ - - all_params = ['project_id', 'recognize_financial_statement'] + all_params = ['project_id', 'business_card_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -408,14 +229,144 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v2/{project_id}/ocr/financial-statement', + resource_path='/v2/{project_id}/ocr/business-card', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, - response_type='RecognizeFinancialStatementResponse', + response_type='RecognizeBusinessCardResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def recognize_business_license_async(self, request): + """营业执照识别 + + 识别营业执照首页图片中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 + + :param RecognizeBusinessLicenseRequest request + :return: RecognizeBusinessLicenseResponse + """ + return self.recognize_business_license_with_http_info(request) + + def recognize_business_license_with_http_info(self, request): + """营业执照识别 + + 识别营业执照首页图片中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 + + :param RecognizeBusinessLicenseRequest request + :return: RecognizeBusinessLicenseResponse + """ + + all_params = ['project_id', 'bankcard_req'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if '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;charset=UTF-8']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/ocr/business-license', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='RecognizeBusinessLicenseResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def recognize_driver_license_async(self, request): + """驾驶证识别 + + 识别用户上传的驾驶证图片(或者用户提供的华为云上OBS的驾驶证图片文件的URL)中主页与副页的文字内容,并将识别的结果返回给用户。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + + :param RecognizeDriverLicenseRequest request + :return: RecognizeDriverLicenseResponse + """ + return self.recognize_driver_license_with_http_info(request) + + def recognize_driver_license_with_http_info(self, request): + """驾驶证识别 + + 识别用户上传的驾驶证图片(或者用户提供的华为云上OBS的驾驶证图片文件的URL)中主页与副页的文字内容,并将识别的结果返回给用户。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + + :param RecognizeDriverLicenseRequest request + :return: RecognizeDriverLicenseResponse + """ + + all_params = ['project_id', 'driver_license_req'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if '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;charset=UTF-8']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/ocr/driver-license', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='RecognizeDriverLicenseResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, @@ -441,7 +392,7 @@ class OcrAsyncClient(Client): :return: RecognizeFlightItineraryResponse """ - all_params = ['recognize_flight_itinerary_request_body'] + all_params = ['project_id', 'flight_itinerary_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -450,6 +401,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -471,7 +424,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/flight-itinerary', + resource_path='/v2/{project_id}/ocr/flight-itinerary', method='POST', path_params=path_params, query_params=query_params, @@ -504,7 +457,7 @@ class OcrAsyncClient(Client): :return: RecognizeGeneralTableResponse """ - all_params = ['recognize_general_table_request_body'] + all_params = ['project_id', 'general_table_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -513,6 +466,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -534,7 +489,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/general-table', + resource_path='/v2/{project_id}/ocr/general-table', method='POST', path_params=path_params, query_params=query_params, @@ -567,7 +522,7 @@ class OcrAsyncClient(Client): :return: RecognizeGeneralTextResponse """ - all_params = ['recognize_general_text_request_body'] + all_params = ['project_id', 'general_text_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -576,6 +531,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -597,7 +554,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/general-text', + resource_path='/v2/{project_id}/ocr/general-text', method='POST', path_params=path_params, query_params=query_params, @@ -612,9 +569,9 @@ class OcrAsyncClient(Client): def recognize_handwriting_async(self, request): - """手写字母数字识别 + """手写文字识别 - 识别用户上传的手写字母数字图片(或者用户提供的华为云上OBS的手写字母数字图片文件的URL)中的字母数字内容,并将识别的结果返回给用户。 + 识别文档中的手写文字信息,并将识别的结构化结果返回给用户。 :param RecognizeHandwritingRequest request :return: RecognizeHandwritingResponse @@ -622,15 +579,15 @@ class OcrAsyncClient(Client): return self.recognize_handwriting_with_http_info(request) def recognize_handwriting_with_http_info(self, request): - """手写字母数字识别 + """手写文字识别 - 识别用户上传的手写字母数字图片(或者用户提供的华为云上OBS的手写字母数字图片文件的URL)中的字母数字内容,并将识别的结果返回给用户。 + 识别文档中的手写文字信息,并将识别的结构化结果返回给用户。 :param RecognizeHandwritingRequest request :return: RecognizeHandwritingResponse """ - all_params = ['recognize_handwriting_request_body'] + all_params = ['project_id', 'handwriting_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -639,6 +596,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -660,7 +619,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/handwriting', + resource_path='/v2/{project_id}/ocr/handwriting', method='POST', path_params=path_params, query_params=query_params, @@ -677,23 +636,23 @@ class OcrAsyncClient(Client): def recognize_id_card_async(self, request): """身份证识别 - 识别用户上传的身份证图片(或者用户提供的华为云上OBS的身份证图片文件的URL)中的文字内容,并将识别的结果返回给用户。 说明: 身份证识别只支持中国大陆汉族身份证识别。 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别身份证图片中的文字内容,并将识别的结果返回给用户。 说明: 身份证识别只支持中国大陆汉族身份证识别。 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 - :param RecognizeIdCardRequest request - :return: RecognizeIdCardResponse + :param RecognizeIDCardRequest request + :return: RecognizeIDCardResponse """ return self.recognize_id_card_with_http_info(request) def recognize_id_card_with_http_info(self, request): """身份证识别 - 识别用户上传的身份证图片(或者用户提供的华为云上OBS的身份证图片文件的URL)中的文字内容,并将识别的结果返回给用户。 说明: 身份证识别只支持中国大陆汉族身份证识别。 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别身份证图片中的文字内容,并将识别的结果返回给用户。 说明: 身份证识别只支持中国大陆汉族身份证识别。 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 - :param RecognizeIdCardRequest request - :return: RecognizeIdCardResponse + :param RecognizeIDCardRequest request + :return: RecognizeIDCardResponse """ - all_params = ['recognize_id_card_request_body'] + all_params = ['project_id', 'id_card_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -702,6 +661,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -723,14 +684,14 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/id-card', + resource_path='/v2/{project_id}/ocr/id-card', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, - response_type='RecognizeIdCardResponse', + response_type='RecognizeIDCardResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, @@ -740,7 +701,7 @@ class OcrAsyncClient(Client): def recognize_license_plate_async(self, request): """车牌识别 - 识别用户上传的车牌图片(或者用户提供的华为云上OBS的车牌图片文件的URL)中的文字内容,并将识别的结果返回给用户。 注意: 车牌识别服务由于内部原因,暂不支持用户调用,调用入口改为VCR服务(车辆识别功能),后续使用敬请关注上线通知。 + 识别输入图片中的车牌信息,并返回其坐标和内容。 :param RecognizeLicensePlateRequest request :return: RecognizeLicensePlateResponse @@ -750,13 +711,13 @@ class OcrAsyncClient(Client): def recognize_license_plate_with_http_info(self, request): """车牌识别 - 识别用户上传的车牌图片(或者用户提供的华为云上OBS的车牌图片文件的URL)中的文字内容,并将识别的结果返回给用户。 注意: 车牌识别服务由于内部原因,暂不支持用户调用,调用入口改为VCR服务(车辆识别功能),后续使用敬请关注上线通知。 + 识别输入图片中的车牌信息,并返回其坐标和内容。 :param RecognizeLicensePlateRequest request :return: RecognizeLicensePlateResponse """ - all_params = ['recognize_license_plate_request_body'] + all_params = ['project_id', 'license_plate_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -765,6 +726,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -786,7 +749,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/license-plate', + resource_path='/v2/{project_id}/ocr/license-plate', method='POST', path_params=path_params, query_params=query_params, @@ -803,7 +766,7 @@ class OcrAsyncClient(Client): def recognize_mvs_invoice_async(self, request): """机动车销售发票识别 - 识别用户上传的机动车销售发票图片(或者用户提供的华为云上OBS的机动车销售发票图片文件的URL)中的文字内容,并将识别的结果返回给用户。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别机动车销售发票图片中的文字内容,并将识别的结果返回给用户。 说明: 该增值税发票仅限于中华人民共和国境内使用的增值税发票。 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeMvsInvoiceRequest request :return: RecognizeMvsInvoiceResponse @@ -813,13 +776,13 @@ class OcrAsyncClient(Client): def recognize_mvs_invoice_with_http_info(self, request): """机动车销售发票识别 - 识别用户上传的机动车销售发票图片(或者用户提供的华为云上OBS的机动车销售发票图片文件的URL)中的文字内容,并将识别的结果返回给用户。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别机动车销售发票图片中的文字内容,并将识别的结果返回给用户。 说明: 该增值税发票仅限于中华人民共和国境内使用的增值税发票。 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeMvsInvoiceRequest request :return: RecognizeMvsInvoiceResponse """ - all_params = ['recognize_mvs_invoice_request_body'] + all_params = ['project_id', 'mvs_invoice_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -828,6 +791,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -849,7 +814,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/mvs-invoice', + resource_path='/v2/{project_id}/ocr/mvs-invoice', method='POST', path_params=path_params, query_params=query_params, @@ -866,7 +831,7 @@ class OcrAsyncClient(Client): def recognize_passport_async(self, request): """护照识别 - 识别用户上传的护照首页图片中的文字信息,并返回识别的结构化结果。当前版本支持中国护照的全字段识别。外国护照支持护照下方两行国际标准化的机读码识别,并可从中提取6-7个关键字段信息。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别用户上传的护照首页图片中的文字信息,并返回识别的结构化结果。当前版本支持中国护照的全字段识别。外国护照支持护照下方两行国际标准化的机读码识别,并可从中提取6-7个关键字段信息。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizePassportRequest request :return: RecognizePassportResponse @@ -876,13 +841,13 @@ class OcrAsyncClient(Client): def recognize_passport_with_http_info(self, request): """护照识别 - 识别用户上传的护照首页图片中的文字信息,并返回识别的结构化结果。当前版本支持中国护照的全字段识别。外国护照支持护照下方两行国际标准化的机读码识别,并可从中提取6-7个关键字段信息。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别用户上传的护照首页图片中的文字信息,并返回识别的结构化结果。当前版本支持中国护照的全字段识别。外国护照支持护照下方两行国际标准化的机读码识别,并可从中提取6-7个关键字段信息。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizePassportRequest request :return: RecognizePassportResponse """ - all_params = ['recognize_passport_request_body'] + all_params = ['project_id', 'passport_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -891,6 +856,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -912,7 +879,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/passport', + resource_path='/v2/{project_id}/ocr/passport', method='POST', path_params=path_params, query_params=query_params, @@ -929,7 +896,7 @@ class OcrAsyncClient(Client): def recognize_quota_invoice_async(self, request): """定额发票识别 - 识别定额发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别定额发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeQuotaInvoiceRequest request :return: RecognizeQuotaInvoiceResponse @@ -939,13 +906,13 @@ class OcrAsyncClient(Client): def recognize_quota_invoice_with_http_info(self, request): """定额发票识别 - 识别定额发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别定额发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeQuotaInvoiceRequest request :return: RecognizeQuotaInvoiceResponse """ - all_params = ['recognize_quota_invoice_request_body'] + all_params = ['project_id', 'train_ticket_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -954,6 +921,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -975,7 +944,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/quota-invoice', + resource_path='/v2/{project_id}/ocr/quota-invoice', method='POST', path_params=path_params, query_params=query_params, @@ -1008,7 +977,7 @@ class OcrAsyncClient(Client): :return: RecognizeTaxiInvoiceResponse """ - all_params = ['recognize_taxi_invoice_request_body'] + all_params = ['project_id', 'taxi_invoice_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1017,6 +986,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1038,7 +1009,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/taxi-invoice', + resource_path='/v2/{project_id}/ocr/taxi-invoice', method='POST', path_params=path_params, query_params=query_params, @@ -1055,7 +1026,7 @@ class OcrAsyncClient(Client): def recognize_toll_invoice_async(self, request): """车辆通行费发票识别 - 识别车辆通行费发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别车辆通行费发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeTollInvoiceRequest request :return: RecognizeTollInvoiceResponse @@ -1065,13 +1036,13 @@ class OcrAsyncClient(Client): def recognize_toll_invoice_with_http_info(self, request): """车辆通行费发票识别 - 识别车辆通行费发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别车辆通行费发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeTollInvoiceRequest request :return: RecognizeTollInvoiceResponse """ - all_params = ['recognize_toll_invoice_request_body'] + all_params = ['project_id', 'recognize_toll_invoice_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1080,6 +1051,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1101,7 +1074,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/toll-invoice', + resource_path='/v2/{project_id}/ocr/toll-invoice', method='POST', path_params=path_params, query_params=query_params, @@ -1118,7 +1091,7 @@ class OcrAsyncClient(Client): def recognize_train_ticket_async(self, request): """火车票识别 - 识别火车票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别火车票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeTrainTicketRequest request :return: RecognizeTrainTicketResponse @@ -1128,13 +1101,13 @@ class OcrAsyncClient(Client): def recognize_train_ticket_with_http_info(self, request): """火车票识别 - 识别火车票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别火车票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeTrainTicketRequest request :return: RecognizeTrainTicketResponse """ - all_params = ['recognize_train_ticket_request_body'] + all_params = ['project_id', 'train_ticket_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1143,6 +1116,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1164,7 +1139,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/train-ticket', + resource_path='/v2/{project_id}/ocr/train-ticket', method='POST', path_params=path_params, query_params=query_params, @@ -1197,7 +1172,7 @@ class OcrAsyncClient(Client): :return: RecognizeTransportationLicenseResponse """ - all_params = ['recognize_transportation_license_request_body'] + all_params = ['project_id', 'transportation_license_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1206,6 +1181,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1227,7 +1204,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/transportation-license', + resource_path='/v2/{project_id}/ocr/transportation-license', method='POST', path_params=path_params, query_params=query_params, @@ -1260,7 +1237,7 @@ class OcrAsyncClient(Client): :return: RecognizeVatInvoiceResponse """ - all_params = ['recognize_vat_invoice_request_body'] + all_params = ['project_id', 'recognize_vat_invoice_request_body'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1269,6 +1246,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1290,7 +1269,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/vat-invoice', + resource_path='/v2/{project_id}/ocr/vat-invoice', method='POST', path_params=path_params, query_params=query_params, @@ -1323,7 +1302,7 @@ class OcrAsyncClient(Client): :return: RecognizeVehicleLicenseResponse """ - all_params = ['recognize_vehicle_license_request_body'] + all_params = ['project_id', 'recognize_vehicle_license_request_body'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1332,6 +1311,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1353,7 +1334,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/vehicle-license', + resource_path='/v2/{project_id}/ocr/vehicle-license', method='POST', path_params=path_params, query_params=query_params, @@ -1370,7 +1351,7 @@ class OcrAsyncClient(Client): def recognize_web_image_async(self, request): """网络图片识别 - 识别用户上传的网络图片中的文字内容,并返回识别的结构化结果。 + 识别网络图片中的文字内容,并返回识别的结构化结果。 :param RecognizeWebImageRequest request :return: RecognizeWebImageResponse @@ -1380,13 +1361,13 @@ class OcrAsyncClient(Client): def recognize_web_image_with_http_info(self, request): """网络图片识别 - 识别用户上传的网络图片中的文字内容,并返回识别的结构化结果。 + 识别网络图片中的文字内容,并返回识别的结构化结果。 :param RecognizeWebImageRequest request :return: RecognizeWebImageResponse """ - all_params = ['recognize_web_image_request_body'] + all_params = ['project_id', 'recognize_web_image_request_body'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1395,6 +1376,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1416,7 +1399,7 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/web-image', + resource_path='/v2/{project_id}/ocr/web-image', method='POST', path_params=path_params, query_params=query_params, @@ -1435,8 +1418,8 @@ class OcrAsyncClient(Client): 识别图片中的车架号信息,并将识别结果返回给用户。 - :param RecognizeVinRequest request - :return: RecognizeVinResponse + :param RecognizeVINRequest request + :return: RecognizeVINResponse """ return self.recognize_vin_with_http_info(request) @@ -1445,11 +1428,11 @@ class OcrAsyncClient(Client): 识别图片中的车架号信息,并将识别结果返回给用户。 - :param RecognizeVinRequest request - :return: RecognizeVinResponse + :param RecognizeVINRequest request + :return: RecognizeVINResponse """ - all_params = ['recognize_vin_request_body'] + all_params = ['project_id', 'recognize_vin_request_body'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1458,6 +1441,8 @@ class OcrAsyncClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1479,14 +1464,14 @@ class OcrAsyncClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/vin', + resource_path='/v2/{project_id}/ocr/vin', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, - response_type='RecognizeVinResponse', + response_type='RecognizeVINResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/ocr_client.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/ocr_client.py index d343b16dc..645f40faa 100644 --- a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/ocr_client.py +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/ocr_client.py @@ -38,14 +38,20 @@ class OcrClient(Client): self.model_package = importlib.import_module("huaweicloudsdkocr.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "OcrClient": + raise TypeError("client type error, support client type is OcrClient") + return ClientBuilder(clazz) def recognize_auto_classification(self, request): """智能分类识别 - 检测定位图片上指定要识别的票证(票据、证件或其他文字载体),并对其进行结构化识别。接口以列表形式返回图片上要识别票证的位置坐标、结构化识别的内容以及对应的类别。 计费次数说明: 只对识别成功的票证进行计费,识别失败的票证不计费。例如图片中包含三张票证,有两张识别成功,一张识别失败,此时接口计费两次。 + 检测定位图片上指定要识别的票证(票据、证件或其他文字载体),并对其进行结构化识别。接口以列表形式返回图片上要识别票证的位置坐标、结构化识别的内容以及对应的类别。 计费次数说明: 只对识别成功的票证进行计费,识别失败的票证不计费。例如图片中包含三张票证,有两张识别成功,一张识别失败,此时接口计费两次。 :param RecognizeAutoClassificationRequest request :return: RecognizeAutoClassificationResponse @@ -55,13 +61,13 @@ class OcrClient(Client): def recognize_auto_classification_with_http_info(self, request): """智能分类识别 - 检测定位图片上指定要识别的票证(票据、证件或其他文字载体),并对其进行结构化识别。接口以列表形式返回图片上要识别票证的位置坐标、结构化识别的内容以及对应的类别。 计费次数说明: 只对识别成功的票证进行计费,识别失败的票证不计费。例如图片中包含三张票证,有两张识别成功,一张识别失败,此时接口计费两次。 + 检测定位图片上指定要识别的票证(票据、证件或其他文字载体),并对其进行结构化识别。接口以列表形式返回图片上要识别票证的位置坐标、结构化识别的内容以及对应的类别。 计费次数说明: 只对识别成功的票证进行计费,识别失败的票证不计费。例如图片中包含三张票证,有两张识别成功,一张识别失败,此时接口计费两次。 :param RecognizeAutoClassificationRequest request :return: RecognizeAutoClassificationResponse """ - all_params = ['recognize_auto_classification_request_body'] + all_params = ['project_id', 'auto_classification_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -70,6 +76,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -91,7 +99,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/auto-classification', + resource_path='/v2/{project_id}/ocr/auto-classification', method='POST', path_params=path_params, query_params=query_params, @@ -108,7 +116,7 @@ class OcrClient(Client): def recognize_bankcard(self, request): """银行卡识别 - 识别银行卡上的关键文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别银行卡上的关键文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeBankcardRequest request :return: RecognizeBankcardResponse @@ -118,13 +126,13 @@ class OcrClient(Client): def recognize_bankcard_with_http_info(self, request): """银行卡识别 - 识别银行卡上的关键文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别银行卡上的关键文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeBankcardRequest request :return: RecognizeBankcardResponse """ - all_params = ['recognize_bankcard_request_body'] + all_params = ['project_id', 'bank_card_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -133,6 +141,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -154,7 +164,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/bankcard', + resource_path='/v2/{project_id}/ocr/bankcard', method='POST', path_params=path_params, query_params=query_params, @@ -187,196 +197,7 @@ class OcrClient(Client): :return: RecognizeBusinessCardResponse """ - all_params = ['recognize_business_card_request_body'] - local_var_params = {} - for attr in request.attribute_map: - if hasattr(request, attr): - local_var_params[attr] = getattr(request, attr) - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - if isinstance(request, SdkStreamRequest): - body_params = request.get_file_stream() - - response_headers = [] - - header_params['Content-Type'] = http_utils.select_header_content_type( - ['application/json;charset=UTF-8']) - - auth_settings = [] - - return self.call_api( - resource_path='/v1.0/ocr/business-card', - method='POST', - path_params=path_params, - query_params=query_params, - header_params=header_params, - body=body_params, - post_params=form_params, - response_type='RecognizeBusinessCardResponse', - response_headers=response_headers, - auth_settings=auth_settings, - collection_formats=collection_formats, - request_type=request.__class__.__name__) - - - def recognize_business_license(self, request): - """营业执照识别 - - 识别用户上传的营业执照首页图片中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 - - :param RecognizeBusinessLicenseRequest request - :return: RecognizeBusinessLicenseResponse - """ - return self.recognize_business_license_with_http_info(request) - - def recognize_business_license_with_http_info(self, request): - """营业执照识别 - - 识别用户上传的营业执照首页图片中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 - - :param RecognizeBusinessLicenseRequest request - :return: RecognizeBusinessLicenseResponse - """ - - all_params = ['recognize_business_license_request_body'] - local_var_params = {} - for attr in request.attribute_map: - if hasattr(request, attr): - local_var_params[attr] = getattr(request, attr) - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - if isinstance(request, SdkStreamRequest): - body_params = request.get_file_stream() - - response_headers = [] - - header_params['Content-Type'] = http_utils.select_header_content_type( - ['application/json;charset=UTF-8']) - - auth_settings = [] - - return self.call_api( - resource_path='/v1.0/ocr/business-license', - method='POST', - path_params=path_params, - query_params=query_params, - header_params=header_params, - body=body_params, - post_params=form_params, - response_type='RecognizeBusinessLicenseResponse', - response_headers=response_headers, - auth_settings=auth_settings, - collection_formats=collection_formats, - request_type=request.__class__.__name__) - - - def recognize_driver_license(self, request): - """驾驶证识别 - - 识别用户上传的驾驶证图片(或者用户提供的华为云上OBS的驾驶证图片文件的URL)中主页与副页的文字内容,并将识别的结果返回给用户。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 - - :param RecognizeDriverLicenseRequest request - :return: RecognizeDriverLicenseResponse - """ - return self.recognize_driver_license_with_http_info(request) - - def recognize_driver_license_with_http_info(self, request): - """驾驶证识别 - - 识别用户上传的驾驶证图片(或者用户提供的华为云上OBS的驾驶证图片文件的URL)中主页与副页的文字内容,并将识别的结果返回给用户。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 - - :param RecognizeDriverLicenseRequest request - :return: RecognizeDriverLicenseResponse - """ - - all_params = ['recognize_driver_license_request_body'] - local_var_params = {} - for attr in request.attribute_map: - if hasattr(request, attr): - local_var_params[attr] = getattr(request, attr) - - collection_formats = {} - - path_params = {} - - query_params = [] - - header_params = {} - - form_params = {} - - body_params = None - if 'body' in local_var_params: - body_params = local_var_params['body'] - if isinstance(request, SdkStreamRequest): - body_params = request.get_file_stream() - - response_headers = [] - - header_params['Content-Type'] = http_utils.select_header_content_type( - ['application/json;charset=UTF-8']) - - auth_settings = [] - - return self.call_api( - resource_path='/v1.0/ocr/driver-license', - method='POST', - path_params=path_params, - query_params=query_params, - header_params=header_params, - body=body_params, - post_params=form_params, - response_type='RecognizeDriverLicenseResponse', - response_headers=response_headers, - auth_settings=auth_settings, - collection_formats=collection_formats, - request_type=request.__class__.__name__) - - - def recognize_financial_statement(self, request): - """财务报表识别 - - 识别用户上传的表格图片中的文字内容,并将识别的结果返回给用户。 - - :param RecognizeFinancialStatementRequest request - :return: RecognizeFinancialStatementResponse - """ - return self.recognize_financial_statement_with_http_info(request) - - def recognize_financial_statement_with_http_info(self, request): - """财务报表识别 - - 识别用户上传的表格图片中的文字内容,并将识别的结果返回给用户。 - - :param RecognizeFinancialStatementRequest request - :return: RecognizeFinancialStatementResponse - """ - - all_params = ['project_id', 'recognize_financial_statement'] + all_params = ['project_id', 'business_card_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -408,14 +229,144 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v2/{project_id}/ocr/financial-statement', + resource_path='/v2/{project_id}/ocr/business-card', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, - response_type='RecognizeFinancialStatementResponse', + response_type='RecognizeBusinessCardResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def recognize_business_license(self, request): + """营业执照识别 + + 识别营业执照首页图片中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 + + :param RecognizeBusinessLicenseRequest request + :return: RecognizeBusinessLicenseResponse + """ + return self.recognize_business_license_with_http_info(request) + + def recognize_business_license_with_http_info(self, request): + """营业执照识别 + + 识别营业执照首页图片中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 + + :param RecognizeBusinessLicenseRequest request + :return: RecognizeBusinessLicenseResponse + """ + + all_params = ['project_id', 'bankcard_req'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if '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;charset=UTF-8']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/ocr/business-license', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='RecognizeBusinessLicenseResponse', + response_headers=response_headers, + auth_settings=auth_settings, + collection_formats=collection_formats, + request_type=request.__class__.__name__) + + + def recognize_driver_license(self, request): + """驾驶证识别 + + 识别用户上传的驾驶证图片(或者用户提供的华为云上OBS的驾驶证图片文件的URL)中主页与副页的文字内容,并将识别的结果返回给用户。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + + :param RecognizeDriverLicenseRequest request + :return: RecognizeDriverLicenseResponse + """ + return self.recognize_driver_license_with_http_info(request) + + def recognize_driver_license_with_http_info(self, request): + """驾驶证识别 + + 识别用户上传的驾驶证图片(或者用户提供的华为云上OBS的驾驶证图片文件的URL)中主页与副页的文字内容,并将识别的结果返回给用户。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + + :param RecognizeDriverLicenseRequest request + :return: RecognizeDriverLicenseResponse + """ + + all_params = ['project_id', 'driver_license_req'] + local_var_params = {} + for attr in request.attribute_map: + if hasattr(request, attr): + local_var_params[attr] = getattr(request, attr) + + collection_formats = {} + + path_params = {} + if '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;charset=UTF-8']) + + auth_settings = [] + + return self.call_api( + resource_path='/v2/{project_id}/ocr/driver-license', + method='POST', + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=body_params, + post_params=form_params, + response_type='RecognizeDriverLicenseResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, @@ -441,7 +392,7 @@ class OcrClient(Client): :return: RecognizeFlightItineraryResponse """ - all_params = ['recognize_flight_itinerary_request_body'] + all_params = ['project_id', 'flight_itinerary_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -450,6 +401,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -471,7 +424,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/flight-itinerary', + resource_path='/v2/{project_id}/ocr/flight-itinerary', method='POST', path_params=path_params, query_params=query_params, @@ -504,7 +457,7 @@ class OcrClient(Client): :return: RecognizeGeneralTableResponse """ - all_params = ['recognize_general_table_request_body'] + all_params = ['project_id', 'general_table_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -513,6 +466,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -534,7 +489,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/general-table', + resource_path='/v2/{project_id}/ocr/general-table', method='POST', path_params=path_params, query_params=query_params, @@ -567,7 +522,7 @@ class OcrClient(Client): :return: RecognizeGeneralTextResponse """ - all_params = ['recognize_general_text_request_body'] + all_params = ['project_id', 'general_text_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -576,6 +531,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -597,7 +554,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/general-text', + resource_path='/v2/{project_id}/ocr/general-text', method='POST', path_params=path_params, query_params=query_params, @@ -612,9 +569,9 @@ class OcrClient(Client): def recognize_handwriting(self, request): - """手写字母数字识别 + """手写文字识别 - 识别用户上传的手写字母数字图片(或者用户提供的华为云上OBS的手写字母数字图片文件的URL)中的字母数字内容,并将识别的结果返回给用户。 + 识别文档中的手写文字信息,并将识别的结构化结果返回给用户。 :param RecognizeHandwritingRequest request :return: RecognizeHandwritingResponse @@ -622,15 +579,15 @@ class OcrClient(Client): return self.recognize_handwriting_with_http_info(request) def recognize_handwriting_with_http_info(self, request): - """手写字母数字识别 + """手写文字识别 - 识别用户上传的手写字母数字图片(或者用户提供的华为云上OBS的手写字母数字图片文件的URL)中的字母数字内容,并将识别的结果返回给用户。 + 识别文档中的手写文字信息,并将识别的结构化结果返回给用户。 :param RecognizeHandwritingRequest request :return: RecognizeHandwritingResponse """ - all_params = ['recognize_handwriting_request_body'] + all_params = ['project_id', 'handwriting_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -639,6 +596,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -660,7 +619,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/handwriting', + resource_path='/v2/{project_id}/ocr/handwriting', method='POST', path_params=path_params, query_params=query_params, @@ -677,23 +636,23 @@ class OcrClient(Client): def recognize_id_card(self, request): """身份证识别 - 识别用户上传的身份证图片(或者用户提供的华为云上OBS的身份证图片文件的URL)中的文字内容,并将识别的结果返回给用户。 说明: 身份证识别只支持中国大陆汉族身份证识别。 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别身份证图片中的文字内容,并将识别的结果返回给用户。 说明: 身份证识别只支持中国大陆汉族身份证识别。 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 - :param RecognizeIdCardRequest request - :return: RecognizeIdCardResponse + :param RecognizeIDCardRequest request + :return: RecognizeIDCardResponse """ return self.recognize_id_card_with_http_info(request) def recognize_id_card_with_http_info(self, request): """身份证识别 - 识别用户上传的身份证图片(或者用户提供的华为云上OBS的身份证图片文件的URL)中的文字内容,并将识别的结果返回给用户。 说明: 身份证识别只支持中国大陆汉族身份证识别。 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别身份证图片中的文字内容,并将识别的结果返回给用户。 说明: 身份证识别只支持中国大陆汉族身份证识别。 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 - :param RecognizeIdCardRequest request - :return: RecognizeIdCardResponse + :param RecognizeIDCardRequest request + :return: RecognizeIDCardResponse """ - all_params = ['recognize_id_card_request_body'] + all_params = ['project_id', 'id_card_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -702,6 +661,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -723,14 +684,14 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/id-card', + resource_path='/v2/{project_id}/ocr/id-card', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, - response_type='RecognizeIdCardResponse', + response_type='RecognizeIDCardResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, @@ -740,7 +701,7 @@ class OcrClient(Client): def recognize_license_plate(self, request): """车牌识别 - 识别用户上传的车牌图片(或者用户提供的华为云上OBS的车牌图片文件的URL)中的文字内容,并将识别的结果返回给用户。 注意: 车牌识别服务由于内部原因,暂不支持用户调用,调用入口改为VCR服务(车辆识别功能),后续使用敬请关注上线通知。 + 识别输入图片中的车牌信息,并返回其坐标和内容。 :param RecognizeLicensePlateRequest request :return: RecognizeLicensePlateResponse @@ -750,13 +711,13 @@ class OcrClient(Client): def recognize_license_plate_with_http_info(self, request): """车牌识别 - 识别用户上传的车牌图片(或者用户提供的华为云上OBS的车牌图片文件的URL)中的文字内容,并将识别的结果返回给用户。 注意: 车牌识别服务由于内部原因,暂不支持用户调用,调用入口改为VCR服务(车辆识别功能),后续使用敬请关注上线通知。 + 识别输入图片中的车牌信息,并返回其坐标和内容。 :param RecognizeLicensePlateRequest request :return: RecognizeLicensePlateResponse """ - all_params = ['recognize_license_plate_request_body'] + all_params = ['project_id', 'license_plate_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -765,6 +726,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -786,7 +749,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/license-plate', + resource_path='/v2/{project_id}/ocr/license-plate', method='POST', path_params=path_params, query_params=query_params, @@ -803,7 +766,7 @@ class OcrClient(Client): def recognize_mvs_invoice(self, request): """机动车销售发票识别 - 识别用户上传的机动车销售发票图片(或者用户提供的华为云上OBS的机动车销售发票图片文件的URL)中的文字内容,并将识别的结果返回给用户。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别机动车销售发票图片中的文字内容,并将识别的结果返回给用户。 说明: 该增值税发票仅限于中华人民共和国境内使用的增值税发票。 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeMvsInvoiceRequest request :return: RecognizeMvsInvoiceResponse @@ -813,13 +776,13 @@ class OcrClient(Client): def recognize_mvs_invoice_with_http_info(self, request): """机动车销售发票识别 - 识别用户上传的机动车销售发票图片(或者用户提供的华为云上OBS的机动车销售发票图片文件的URL)中的文字内容,并将识别的结果返回给用户。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别机动车销售发票图片中的文字内容,并将识别的结果返回给用户。 说明: 该增值税发票仅限于中华人民共和国境内使用的增值税发票。 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeMvsInvoiceRequest request :return: RecognizeMvsInvoiceResponse """ - all_params = ['recognize_mvs_invoice_request_body'] + all_params = ['project_id', 'mvs_invoice_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -828,6 +791,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -849,7 +814,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/mvs-invoice', + resource_path='/v2/{project_id}/ocr/mvs-invoice', method='POST', path_params=path_params, query_params=query_params, @@ -866,7 +831,7 @@ class OcrClient(Client): def recognize_passport(self, request): """护照识别 - 识别用户上传的护照首页图片中的文字信息,并返回识别的结构化结果。当前版本支持中国护照的全字段识别。外国护照支持护照下方两行国际标准化的机读码识别,并可从中提取6-7个关键字段信息。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别用户上传的护照首页图片中的文字信息,并返回识别的结构化结果。当前版本支持中国护照的全字段识别。外国护照支持护照下方两行国际标准化的机读码识别,并可从中提取6-7个关键字段信息。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizePassportRequest request :return: RecognizePassportResponse @@ -876,13 +841,13 @@ class OcrClient(Client): def recognize_passport_with_http_info(self, request): """护照识别 - 识别用户上传的护照首页图片中的文字信息,并返回识别的结构化结果。当前版本支持中国护照的全字段识别。外国护照支持护照下方两行国际标准化的机读码识别,并可从中提取6-7个关键字段信息。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别用户上传的护照首页图片中的文字信息,并返回识别的结构化结果。当前版本支持中国护照的全字段识别。外国护照支持护照下方两行国际标准化的机读码识别,并可从中提取6-7个关键字段信息。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizePassportRequest request :return: RecognizePassportResponse """ - all_params = ['recognize_passport_request_body'] + all_params = ['project_id', 'passport_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -891,6 +856,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -912,7 +879,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/passport', + resource_path='/v2/{project_id}/ocr/passport', method='POST', path_params=path_params, query_params=query_params, @@ -929,7 +896,7 @@ class OcrClient(Client): def recognize_quota_invoice(self, request): """定额发票识别 - 识别定额发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别定额发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeQuotaInvoiceRequest request :return: RecognizeQuotaInvoiceResponse @@ -939,13 +906,13 @@ class OcrClient(Client): def recognize_quota_invoice_with_http_info(self, request): """定额发票识别 - 识别定额发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别定额发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeQuotaInvoiceRequest request :return: RecognizeQuotaInvoiceResponse """ - all_params = ['recognize_quota_invoice_request_body'] + all_params = ['project_id', 'train_ticket_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -954,6 +921,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -975,7 +944,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/quota-invoice', + resource_path='/v2/{project_id}/ocr/quota-invoice', method='POST', path_params=path_params, query_params=query_params, @@ -1008,7 +977,7 @@ class OcrClient(Client): :return: RecognizeTaxiInvoiceResponse """ - all_params = ['recognize_taxi_invoice_request_body'] + all_params = ['project_id', 'taxi_invoice_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1017,6 +986,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1038,7 +1009,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/taxi-invoice', + resource_path='/v2/{project_id}/ocr/taxi-invoice', method='POST', path_params=path_params, query_params=query_params, @@ -1055,7 +1026,7 @@ class OcrClient(Client): def recognize_toll_invoice(self, request): """车辆通行费发票识别 - 识别车辆通行费发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别车辆通行费发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeTollInvoiceRequest request :return: RecognizeTollInvoiceResponse @@ -1065,13 +1036,13 @@ class OcrClient(Client): def recognize_toll_invoice_with_http_info(self, request): """车辆通行费发票识别 - 识别车辆通行费发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别车辆通行费发票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeTollInvoiceRequest request :return: RecognizeTollInvoiceResponse """ - all_params = ['recognize_toll_invoice_request_body'] + all_params = ['project_id', 'recognize_toll_invoice_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1080,6 +1051,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1101,7 +1074,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/toll-invoice', + resource_path='/v2/{project_id}/ocr/toll-invoice', method='POST', path_params=path_params, query_params=query_params, @@ -1118,7 +1091,7 @@ class OcrClient(Client): def recognize_train_ticket(self, request): """火车票识别 - 识别火车票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别火车票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeTrainTicketRequest request :return: RecognizeTrainTicketResponse @@ -1128,13 +1101,13 @@ class OcrClient(Client): def recognize_train_ticket_with_http_info(self, request): """火车票识别 - 识别火车票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用智能分类识别服务。 + 识别火车票中的文字信息,并返回识别的结构化结果。 说明: 如果图片中包含多张卡证票据,请调用[智能分类识别](https://apiexplorer.developer.huaweicloud.com/apiexplorer/doc?product=OCR&api=AutoClassification)服务。 :param RecognizeTrainTicketRequest request :return: RecognizeTrainTicketResponse """ - all_params = ['recognize_train_ticket_request_body'] + all_params = ['project_id', 'train_ticket_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1143,6 +1116,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1164,7 +1139,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/train-ticket', + resource_path='/v2/{project_id}/ocr/train-ticket', method='POST', path_params=path_params, query_params=query_params, @@ -1197,7 +1172,7 @@ class OcrClient(Client): :return: RecognizeTransportationLicenseResponse """ - all_params = ['recognize_transportation_license_request_body'] + all_params = ['project_id', 'transportation_license_req'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1206,6 +1181,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1227,7 +1204,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/transportation-license', + resource_path='/v2/{project_id}/ocr/transportation-license', method='POST', path_params=path_params, query_params=query_params, @@ -1260,7 +1237,7 @@ class OcrClient(Client): :return: RecognizeVatInvoiceResponse """ - all_params = ['recognize_vat_invoice_request_body'] + all_params = ['project_id', 'recognize_vat_invoice_request_body'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1269,6 +1246,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1290,7 +1269,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/vat-invoice', + resource_path='/v2/{project_id}/ocr/vat-invoice', method='POST', path_params=path_params, query_params=query_params, @@ -1323,7 +1302,7 @@ class OcrClient(Client): :return: RecognizeVehicleLicenseResponse """ - all_params = ['recognize_vehicle_license_request_body'] + all_params = ['project_id', 'recognize_vehicle_license_request_body'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1332,6 +1311,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1353,7 +1334,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/vehicle-license', + resource_path='/v2/{project_id}/ocr/vehicle-license', method='POST', path_params=path_params, query_params=query_params, @@ -1370,7 +1351,7 @@ class OcrClient(Client): def recognize_web_image(self, request): """网络图片识别 - 识别用户上传的网络图片中的文字内容,并返回识别的结构化结果。 + 识别网络图片中的文字内容,并返回识别的结构化结果。 :param RecognizeWebImageRequest request :return: RecognizeWebImageResponse @@ -1380,13 +1361,13 @@ class OcrClient(Client): def recognize_web_image_with_http_info(self, request): """网络图片识别 - 识别用户上传的网络图片中的文字内容,并返回识别的结构化结果。 + 识别网络图片中的文字内容,并返回识别的结构化结果。 :param RecognizeWebImageRequest request :return: RecognizeWebImageResponse """ - all_params = ['recognize_web_image_request_body'] + all_params = ['project_id', 'recognize_web_image_request_body'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1395,6 +1376,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1416,7 +1399,7 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/web-image', + resource_path='/v2/{project_id}/ocr/web-image', method='POST', path_params=path_params, query_params=query_params, @@ -1435,8 +1418,8 @@ class OcrClient(Client): 识别图片中的车架号信息,并将识别结果返回给用户。 - :param RecognizeVinRequest request - :return: RecognizeVinResponse + :param RecognizeVINRequest request + :return: RecognizeVINResponse """ return self.recognize_vin_with_http_info(request) @@ -1445,11 +1428,11 @@ class OcrClient(Client): 识别图片中的车架号信息,并将识别结果返回给用户。 - :param RecognizeVinRequest request - :return: RecognizeVinResponse + :param RecognizeVINRequest request + :return: RecognizeVINResponse """ - all_params = ['recognize_vin_request_body'] + all_params = ['project_id', 'recognize_vin_request_body'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): @@ -1458,6 +1441,8 @@ class OcrClient(Client): collection_formats = {} path_params = {} + if 'project_id' in local_var_params: + path_params['project_id'] = local_var_params['project_id'] query_params = [] @@ -1479,14 +1464,14 @@ class OcrClient(Client): auth_settings = [] return self.call_api( - resource_path='/v1.0/ocr/vin', + resource_path='/v2/{project_id}/ocr/vin', method='POST', path_params=path_params, query_params=query_params, header_params=header_params, body=body_params, post_params=form_params, - response_type='RecognizeVinResponse', + response_type='RecognizeVINResponse', response_headers=response_headers, auth_settings=auth_settings, collection_formats=collection_formats, diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/region/__init__.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/region/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/region/ocr_region.py b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/region/ocr_region.py new file mode 100644 index 000000000..9b0d2ee96 --- /dev/null +++ b/huaweicloud-sdk-ocr/huaweicloudsdkocr/v1/region/ocr_region.py @@ -0,0 +1,16 @@ +# coding: utf-8 + +from huaweicloudsdkcore.region.region import Region + + +class OcrRegion: + def __init__(self): + pass + + CN_NORTH_4 = Region(id="cn-north-4", endpoint="https://ocr.cn-north-4.myhuaweicloud.com") + + CN_SOUTH_1 = Region(id="cn-south-1", endpoint="https://ocr.cn-south-1.myhuaweicloud.com") + + CN_EAST_3 = Region(id="cn-east-3", endpoint="https://ocr.cn-east-3.myhuaweicloud.com") + + diff --git a/huaweicloud-sdk-ocr/setup.py b/huaweicloud-sdk-ocr/setup.py index 21484db60..0dc003c0f 100644 --- a/huaweicloud-sdk-ocr/setup.py +++ b/huaweicloud-sdk-ocr/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkocr" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/projectman_async_client.py b/huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/projectman_async_client.py index e6b5784ff..b37737966 100644 --- a/huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/projectman_async_client.py +++ b/huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/projectman_async_client.py @@ -38,8 +38,14 @@ class ProjectManAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkprojectman.v4.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ProjectManClient": + raise TypeError("client type error, support client type is ProjectManClient") + return ClientBuilder(clazz) def add_apply_join_project_for_agc_async(self, request): diff --git a/huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/projectman_client.py b/huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/projectman_client.py index f60b552c6..acf5370de 100644 --- a/huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/projectman_client.py +++ b/huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/projectman_client.py @@ -38,8 +38,14 @@ class ProjectManClient(Client): self.model_package = importlib.import_module("huaweicloudsdkprojectman.v4.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ProjectManClient": + raise TypeError("client type error, support client type is ProjectManClient") + return ClientBuilder(clazz) def add_apply_join_project_for_agc(self, request): diff --git a/huaweicloud-sdk-projectman/setup.py b/huaweicloud-sdk-projectman/setup.py index 088518c52..f7fbc7d76 100644 --- a/huaweicloud-sdk-projectman/setup.py +++ b/huaweicloud-sdk-projectman/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkprojectman" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_async_client.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_async_client.py index b62453e18..c99467a24 100644 --- a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_async_client.py +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_async_client.py @@ -38,8 +38,14 @@ class RabbitMQAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkrabbitmq.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "RabbitMQClient": + raise TypeError("client type error, support client type is RabbitMQClient") + return ClientBuilder(clazz) def batch_create_or_delete_instance_tag_async(self, request): diff --git a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_client.py b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_client.py index cc2754a22..8b6ae7a44 100644 --- a/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_client.py +++ b/huaweicloud-sdk-rabbitmq/huaweicloudsdkrabbitmq/v2/rabbitmq_client.py @@ -38,8 +38,14 @@ class RabbitMQClient(Client): self.model_package = importlib.import_module("huaweicloudsdkrabbitmq.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "RabbitMQClient": + raise TypeError("client type error, support client type is RabbitMQClient") + return ClientBuilder(clazz) def batch_create_or_delete_instance_tag(self, request): diff --git a/huaweicloud-sdk-rabbitmq/setup.py b/huaweicloud-sdk-rabbitmq/setup.py index 352c33af2..9782dcc26 100644 --- a/huaweicloud-sdk-rabbitmq/setup.py +++ b/huaweicloud-sdk-rabbitmq/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkrabbitmq" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/__init__.py b/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/__init__.py index 01d37ef2a..96af2557b 100644 --- a/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/__init__.py +++ b/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/__init__.py @@ -43,6 +43,7 @@ from huaweicloudsdkrds.v3.model.create_database_response import CreateDatabaseRe from huaweicloudsdkrds.v3.model.create_db_user_request import CreateDbUserRequest from huaweicloudsdkrds.v3.model.create_db_user_response import CreateDbUserResponse from huaweicloudsdkrds.v3.model.create_instance_request import CreateInstanceRequest +from huaweicloudsdkrds.v3.model.create_instance_resp_item import CreateInstanceRespItem from huaweicloudsdkrds.v3.model.create_instance_response import CreateInstanceResponse from huaweicloudsdkrds.v3.model.data_ip_request import DataIpRequest from huaweicloudsdkrds.v3.model.database_for_creation import DatabaseForCreation diff --git a/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/__init__.py b/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/__init__.py index 14cce8c75..8e9e759b5 100644 --- a/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/__init__.py +++ b/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/__init__.py @@ -40,6 +40,7 @@ from huaweicloudsdkrds.v3.model.create_database_response import CreateDatabaseRe from huaweicloudsdkrds.v3.model.create_db_user_request import CreateDbUserRequest from huaweicloudsdkrds.v3.model.create_db_user_response import CreateDbUserResponse from huaweicloudsdkrds.v3.model.create_instance_request import CreateInstanceRequest +from huaweicloudsdkrds.v3.model.create_instance_resp_item import CreateInstanceRespItem from huaweicloudsdkrds.v3.model.create_instance_response import CreateInstanceResponse from huaweicloudsdkrds.v3.model.data_ip_request import DataIpRequest from huaweicloudsdkrds.v3.model.database_for_creation import DatabaseForCreation diff --git a/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/create_instance_resp_item.py b/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/create_instance_resp_item.py new file mode 100644 index 000000000..73e7409ce --- /dev/null +++ b/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/create_instance_resp_item.py @@ -0,0 +1,602 @@ +# coding: utf-8 + +import pprint +import re + +import six + + + + + +class CreateInstanceRespItem: + + + """ + 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': 'str', + 'name': 'str', + 'status': 'str', + 'datastore': 'Datastore', + 'ha': 'Ha', + 'configuration_id': 'str', + 'port': 'str', + 'backup_strategy': 'BackupStrategy', + 'enterprise_project_id': 'str', + 'disk_encryption_id': 'str', + 'flavor_ref': 'str', + 'volume': 'Volume', + 'region': 'str', + 'availability_zone': 'str', + 'vpc_id': 'str', + 'subnet_id': 'str', + 'security_group_id': 'str', + 'charge_info': 'ChargeInfo', + 'collation': 'str', + 'restore_point': 'RestorePoint' + } + + attribute_map = { + 'id': 'id', + 'name': 'name', + 'status': 'status', + 'datastore': 'datastore', + 'ha': 'ha', + 'configuration_id': 'configuration_id', + 'port': 'port', + 'backup_strategy': 'backup_strategy', + 'enterprise_project_id': 'enterprise_project_id', + 'disk_encryption_id': 'disk_encryption_id', + 'flavor_ref': 'flavor_ref', + 'volume': 'volume', + 'region': 'region', + 'availability_zone': 'availability_zone', + 'vpc_id': 'vpc_id', + 'subnet_id': 'subnet_id', + 'security_group_id': 'security_group_id', + 'charge_info': 'charge_info', + 'collation': 'collation', + 'restore_point': 'restore_point' + } + + def __init__(self, id=None, name=None, status=None, datastore=None, ha=None, configuration_id=None, port=None, backup_strategy=None, enterprise_project_id=None, disk_encryption_id=None, flavor_ref=None, volume=None, region=None, availability_zone=None, vpc_id=None, subnet_id=None, security_group_id=None, charge_info=None, collation=None, restore_point=None): + """CreateInstanceRespItem - a model defined in huaweicloud sdk""" + + + + self._id = None + self._name = None + self._status = None + self._datastore = None + self._ha = None + self._configuration_id = None + self._port = None + self._backup_strategy = None + self._enterprise_project_id = None + self._disk_encryption_id = None + self._flavor_ref = None + self._volume = None + self._region = None + self._availability_zone = None + self._vpc_id = None + self._subnet_id = None + self._security_group_id = None + self._charge_info = None + self._collation = None + self._restore_point = None + self.discriminator = None + + if id is not None: + self.id = id + self.name = name + if status is not None: + self.status = status + self.datastore = datastore + if ha is not None: + self.ha = ha + if configuration_id is not None: + self.configuration_id = configuration_id + if port is not None: + self.port = port + if backup_strategy is not None: + self.backup_strategy = backup_strategy + if enterprise_project_id is not None: + self.enterprise_project_id = enterprise_project_id + if disk_encryption_id is not None: + self.disk_encryption_id = disk_encryption_id + self.flavor_ref = flavor_ref + self.volume = volume + self.region = region + self.availability_zone = availability_zone + self.vpc_id = vpc_id + self.subnet_id = subnet_id + self.security_group_id = security_group_id + if charge_info is not None: + self.charge_info = charge_info + if collation is not None: + self.collation = collation + if restore_point is not None: + self.restore_point = restore_point + + @property + def id(self): + """Gets the id of this CreateInstanceRespItem. + + 实例id + + :return: The id of this CreateInstanceRespItem. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this CreateInstanceRespItem. + + 实例id + + :param id: The id of this CreateInstanceRespItem. + :type: str + """ + self._id = id + + @property + def name(self): + """Gets the name of this CreateInstanceRespItem. + + 实例名称。 用于表示实例的名称,同一租户下,同类型的实例名可重名,其中,SQL Server实例名唯一。 取值范围:4~64个字符之间,必须以字母开头,区分大小写,可以包含字母、数字、中划线或者下划线,不能包含其他的特殊字符。 + + :return: The name of this CreateInstanceRespItem. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateInstanceRespItem. + + 实例名称。 用于表示实例的名称,同一租户下,同类型的实例名可重名,其中,SQL Server实例名唯一。 取值范围:4~64个字符之间,必须以字母开头,区分大小写,可以包含字母、数字、中划线或者下划线,不能包含其他的特殊字符。 + + :param name: The name of this CreateInstanceRespItem. + :type: str + """ + self._name = name + + @property + def status(self): + """Gets the status of this CreateInstanceRespItem. + + 实例状态。如BUILD,表示创建中。 仅创建按需实例时会返回该参数。 + + :return: The status of this CreateInstanceRespItem. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this CreateInstanceRespItem. + + 实例状态。如BUILD,表示创建中。 仅创建按需实例时会返回该参数。 + + :param status: The status of this CreateInstanceRespItem. + :type: str + """ + self._status = status + + @property + def datastore(self): + """Gets the datastore of this CreateInstanceRespItem. + + + :return: The datastore of this CreateInstanceRespItem. + :rtype: Datastore + """ + return self._datastore + + @datastore.setter + def datastore(self, datastore): + """Sets the datastore of this CreateInstanceRespItem. + + + :param datastore: The datastore of this CreateInstanceRespItem. + :type: Datastore + """ + self._datastore = datastore + + @property + def ha(self): + """Gets the ha of this CreateInstanceRespItem. + + + :return: The ha of this CreateInstanceRespItem. + :rtype: Ha + """ + return self._ha + + @ha.setter + def ha(self, ha): + """Sets the ha of this CreateInstanceRespItem. + + + :param ha: The ha of this CreateInstanceRespItem. + :type: Ha + """ + self._ha = ha + + @property + def configuration_id(self): + """Gets the configuration_id of this CreateInstanceRespItem. + + 参数组ID。 + + :return: The configuration_id of this CreateInstanceRespItem. + :rtype: str + """ + return self._configuration_id + + @configuration_id.setter + def configuration_id(self, configuration_id): + """Sets the configuration_id of this CreateInstanceRespItem. + + 参数组ID。 + + :param configuration_id: The configuration_id of this CreateInstanceRespItem. + :type: str + """ + self._configuration_id = configuration_id + + @property + def port(self): + """Gets the port of this CreateInstanceRespItem. + + 数据库端口信息。 - MySQL数据库端口设置范围为1024~65535(其中12017和33071被RDS系统占用不可设置)。 - PostgreSQL数据库端口修改范围为2100~9500。 - Microsoft SQL Server实例的端口设置范围为1433和2100~9500(其中5355和5985不可设置。对于2017 EE、2017 SE、2017 Web版,5050、5353和5986不可设置。 当不传该参数时,默认端口如下: - MySQL默认3306。 - PostgreSQL默认5432。 - Microsoft SQL Server默认1433。 + + :return: The port of this CreateInstanceRespItem. + :rtype: str + """ + return self._port + + @port.setter + def port(self, port): + """Sets the port of this CreateInstanceRespItem. + + 数据库端口信息。 - MySQL数据库端口设置范围为1024~65535(其中12017和33071被RDS系统占用不可设置)。 - PostgreSQL数据库端口修改范围为2100~9500。 - Microsoft SQL Server实例的端口设置范围为1433和2100~9500(其中5355和5985不可设置。对于2017 EE、2017 SE、2017 Web版,5050、5353和5986不可设置。 当不传该参数时,默认端口如下: - MySQL默认3306。 - PostgreSQL默认5432。 - Microsoft SQL Server默认1433。 + + :param port: The port of this CreateInstanceRespItem. + :type: str + """ + self._port = port + + @property + def backup_strategy(self): + """Gets the backup_strategy of this CreateInstanceRespItem. + + + :return: The backup_strategy of this CreateInstanceRespItem. + :rtype: BackupStrategy + """ + return self._backup_strategy + + @backup_strategy.setter + def backup_strategy(self, backup_strategy): + """Sets the backup_strategy of this CreateInstanceRespItem. + + + :param backup_strategy: The backup_strategy of this CreateInstanceRespItem. + :type: BackupStrategy + """ + self._backup_strategy = backup_strategy + + @property + def enterprise_project_id(self): + """Gets the enterprise_project_id of this CreateInstanceRespItem. + + 企业项目ID。 + + :return: The enterprise_project_id of this CreateInstanceRespItem. + :rtype: str + """ + return self._enterprise_project_id + + @enterprise_project_id.setter + def enterprise_project_id(self, enterprise_project_id): + """Sets the enterprise_project_id of this CreateInstanceRespItem. + + 企业项目ID。 + + :param enterprise_project_id: The enterprise_project_id of this CreateInstanceRespItem. + :type: str + """ + self._enterprise_project_id = enterprise_project_id + + @property + def disk_encryption_id(self): + """Gets the disk_encryption_id of this CreateInstanceRespItem. + + 用于磁盘加密的密钥ID。 + + :return: The disk_encryption_id of this CreateInstanceRespItem. + :rtype: str + """ + return self._disk_encryption_id + + @disk_encryption_id.setter + def disk_encryption_id(self, disk_encryption_id): + """Sets the disk_encryption_id of this CreateInstanceRespItem. + + 用于磁盘加密的密钥ID。 + + :param disk_encryption_id: The disk_encryption_id of this CreateInstanceRespItem. + :type: str + """ + self._disk_encryption_id = disk_encryption_id + + @property + def flavor_ref(self): + """Gets the flavor_ref of this CreateInstanceRespItem. + + 规格码。 + + :return: The flavor_ref of this CreateInstanceRespItem. + :rtype: str + """ + return self._flavor_ref + + @flavor_ref.setter + def flavor_ref(self, flavor_ref): + """Sets the flavor_ref of this CreateInstanceRespItem. + + 规格码。 + + :param flavor_ref: The flavor_ref of this CreateInstanceRespItem. + :type: str + """ + self._flavor_ref = flavor_ref + + @property + def volume(self): + """Gets the volume of this CreateInstanceRespItem. + + + :return: The volume of this CreateInstanceRespItem. + :rtype: Volume + """ + return self._volume + + @volume.setter + def volume(self, volume): + """Sets the volume of this CreateInstanceRespItem. + + + :param volume: The volume of this CreateInstanceRespItem. + :type: Volume + """ + self._volume = volume + + @property + def region(self): + """Gets the region of this CreateInstanceRespItem. + + 区域ID。创建主实例时必选,其它场景不可选。 取值参见[地区和终端节点](https://developer.huaweicloud.com/endpoint)。 + + :return: The region of this CreateInstanceRespItem. + :rtype: str + """ + return self._region + + @region.setter + def region(self, region): + """Sets the region of this CreateInstanceRespItem. + + 区域ID。创建主实例时必选,其它场景不可选。 取值参见[地区和终端节点](https://developer.huaweicloud.com/endpoint)。 + + :param region: The region of this CreateInstanceRespItem. + :type: str + """ + self._region = region + + @property + def availability_zone(self): + """Gets the availability_zone of this CreateInstanceRespItem. + + 可用区ID。对于数据库实例类型不是单机的实例,需要分别为实例所有节点指定可用区,并用逗号隔开。 取值参见[地区和终端节点](https://developer.huaweicloud.com/endpoint)。 + + :return: The availability_zone of this CreateInstanceRespItem. + :rtype: str + """ + return self._availability_zone + + @availability_zone.setter + def availability_zone(self, availability_zone): + """Sets the availability_zone of this CreateInstanceRespItem. + + 可用区ID。对于数据库实例类型不是单机的实例,需要分别为实例所有节点指定可用区,并用逗号隔开。 取值参见[地区和终端节点](https://developer.huaweicloud.com/endpoint)。 + + :param availability_zone: The availability_zone of this CreateInstanceRespItem. + :type: str + """ + self._availability_zone = availability_zone + + @property + def vpc_id(self): + """Gets the vpc_id of this CreateInstanceRespItem. + + 虚拟私有云ID。创建只读实例时不可选(只读实例的网络属性默认和主实例相同),其它场景必选。 + + :return: The vpc_id of this CreateInstanceRespItem. + :rtype: str + """ + return self._vpc_id + + @vpc_id.setter + def vpc_id(self, vpc_id): + """Sets the vpc_id of this CreateInstanceRespItem. + + 虚拟私有云ID。创建只读实例时不可选(只读实例的网络属性默认和主实例相同),其它场景必选。 + + :param vpc_id: The vpc_id of this CreateInstanceRespItem. + :type: str + """ + self._vpc_id = vpc_id + + @property + def subnet_id(self): + """Gets the subnet_id of this CreateInstanceRespItem. + + 子网ID。创建只读实例时不可选(只读实例的网络属性默认和主实例相同),其它场景必选。 + + :return: The subnet_id of this CreateInstanceRespItem. + :rtype: str + """ + return self._subnet_id + + @subnet_id.setter + def subnet_id(self, subnet_id): + """Sets the subnet_id of this CreateInstanceRespItem. + + 子网ID。创建只读实例时不可选(只读实例的网络属性默认和主实例相同),其它场景必选。 + + :param subnet_id: The subnet_id of this CreateInstanceRespItem. + :type: str + """ + self._subnet_id = subnet_id + + @property + def security_group_id(self): + """Gets the security_group_id of this CreateInstanceRespItem. + + 安全组ID。创建只读实例时不可选(只读实例的网络属性默认和主实例相同),其它场景必选。 + + :return: The security_group_id of this CreateInstanceRespItem. + :rtype: str + """ + return self._security_group_id + + @security_group_id.setter + def security_group_id(self, security_group_id): + """Sets the security_group_id of this CreateInstanceRespItem. + + 安全组ID。创建只读实例时不可选(只读实例的网络属性默认和主实例相同),其它场景必选。 + + :param security_group_id: The security_group_id of this CreateInstanceRespItem. + :type: str + """ + self._security_group_id = security_group_id + + @property + def charge_info(self): + """Gets the charge_info of this CreateInstanceRespItem. + + + :return: The charge_info of this CreateInstanceRespItem. + :rtype: ChargeInfo + """ + return self._charge_info + + @charge_info.setter + def charge_info(self, charge_info): + """Sets the charge_info of this CreateInstanceRespItem. + + + :param charge_info: The charge_info of this CreateInstanceRespItem. + :type: ChargeInfo + """ + self._charge_info = charge_info + + @property + def collation(self): + """Gets the collation of this CreateInstanceRespItem. + + 仅限Microsoft SQL Server实例使用。取值范围:根据查询SQL Server可用字符集的字符集查询列表查询可设置的字符集。 + + :return: The collation of this CreateInstanceRespItem. + :rtype: str + """ + return self._collation + + @collation.setter + def collation(self, collation): + """Sets the collation of this CreateInstanceRespItem. + + 仅限Microsoft SQL Server实例使用。取值范围:根据查询SQL Server可用字符集的字符集查询列表查询可设置的字符集。 + + :param collation: The collation of this CreateInstanceRespItem. + :type: str + """ + self._collation = collation + + @property + def restore_point(self): + """Gets the restore_point of this CreateInstanceRespItem. + + + :return: The restore_point of this CreateInstanceRespItem. + :rtype: RestorePoint + """ + return self._restore_point + + @restore_point.setter + def restore_point(self, restore_point): + """Sets the restore_point of this CreateInstanceRespItem. + + + :param restore_point: The restore_point of this CreateInstanceRespItem. + :type: RestorePoint + """ + self._restore_point = restore_point + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.openapi_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + if attr in self.sensitive_list: + result[attr] = "****" + else: + result[attr] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateInstanceRespItem): + 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-rds/huaweicloudsdkrds/v3/model/create_instance_response.py b/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/create_instance_response.py index 23ea588de..0648cfe72 100644 --- a/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/create_instance_response.py +++ b/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/create_instance_response.py @@ -23,7 +23,7 @@ class CreateInstanceResponse(SdkResponse): sensitive_list = [] openapi_types = { - 'instance': 'InstanceRequest', + 'instance': 'CreateInstanceRespItem', 'job_id': 'str', 'order_id': 'str' } @@ -57,7 +57,7 @@ class CreateInstanceResponse(SdkResponse): :return: The instance of this CreateInstanceResponse. - :rtype: InstanceRequest + :rtype: CreateInstanceRespItem """ return self._instance @@ -67,7 +67,7 @@ class CreateInstanceResponse(SdkResponse): :param instance: The instance of this CreateInstanceResponse. - :type: InstanceRequest + :type: CreateInstanceRespItem """ self._instance = instance diff --git a/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/rds_async_client.py b/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/rds_async_client.py index 2a754e526..fa01472fb 100644 --- a/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/rds_async_client.py +++ b/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/rds_async_client.py @@ -38,8 +38,14 @@ class RdsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkrds.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "RdsClient": + raise TypeError("client type error, support client type is RdsClient") + return ClientBuilder(clazz) def attach_eip_async(self, request): diff --git a/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/rds_client.py b/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/rds_client.py index 7698ebd83..ff2157fe5 100644 --- a/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/rds_client.py +++ b/huaweicloud-sdk-rds/huaweicloudsdkrds/v3/rds_client.py @@ -38,8 +38,14 @@ class RdsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkrds.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "RdsClient": + raise TypeError("client type error, support client type is RdsClient") + return ClientBuilder(clazz) def attach_eip(self, request): diff --git a/huaweicloud-sdk-rds/setup.py b/huaweicloud-sdk-rds/setup.py index 5317601f4..d3fd288fd 100644 --- a/huaweicloud-sdk-rds/setup.py +++ b/huaweicloud-sdk-rds/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkrds" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-rms/huaweicloudsdkrms/v1/rms_async_client.py b/huaweicloud-sdk-rms/huaweicloudsdkrms/v1/rms_async_client.py index 49f627d52..2ab20c8cb 100644 --- a/huaweicloud-sdk-rms/huaweicloudsdkrms/v1/rms_async_client.py +++ b/huaweicloud-sdk-rms/huaweicloudsdkrms/v1/rms_async_client.py @@ -38,8 +38,14 @@ class RmsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkrms.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials") + + if clazz.__name__ != "RmsClient": + raise TypeError("client type error, support client type is RmsClient") + return ClientBuilder(clazz, "GlobalCredentials") def show_resource_history_async(self, request): diff --git a/huaweicloud-sdk-rms/huaweicloudsdkrms/v1/rms_client.py b/huaweicloud-sdk-rms/huaweicloudsdkrms/v1/rms_client.py index 719cab449..8c43a222f 100644 --- a/huaweicloud-sdk-rms/huaweicloudsdkrms/v1/rms_client.py +++ b/huaweicloud-sdk-rms/huaweicloudsdkrms/v1/rms_client.py @@ -38,8 +38,14 @@ class RmsClient(Client): self.model_package = importlib.import_module("huaweicloudsdkrms.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials") + + if clazz.__name__ != "RmsClient": + raise TypeError("client type error, support client type is RmsClient") + return ClientBuilder(clazz, "GlobalCredentials") def show_resource_history(self, request): diff --git a/huaweicloud-sdk-rms/setup.py b/huaweicloud-sdk-rms/setup.py index 083f2d0d9..d07ee04da 100644 --- a/huaweicloud-sdk-rms/setup.py +++ b/huaweicloud-sdk-rms/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkrms" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/servicestage_async_client.py b/huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/servicestage_async_client.py index 65c5459db..f92a38f94 100644 --- a/huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/servicestage_async_client.py +++ b/huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/servicestage_async_client.py @@ -38,8 +38,14 @@ class ServiceStageAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkservicestage.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ServiceStageClient": + raise TypeError("client type error, support client type is ServiceStageClient") + return ClientBuilder(clazz) def change_application_async(self, request): diff --git a/huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/servicestage_client.py b/huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/servicestage_client.py index b35296e75..7fdc02b13 100644 --- a/huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/servicestage_client.py +++ b/huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/servicestage_client.py @@ -38,8 +38,14 @@ class ServiceStageClient(Client): self.model_package = importlib.import_module("huaweicloudsdkservicestage.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "ServiceStageClient": + raise TypeError("client type error, support client type is ServiceStageClient") + return ClientBuilder(clazz) def change_application(self, request): diff --git a/huaweicloud-sdk-servicestage/setup.py b/huaweicloud-sdk-servicestage/setup.py index 840aa9525..e5c27d4b6 100644 --- a/huaweicloud-sdk-servicestage/setup.py +++ b/huaweicloud-sdk-servicestage/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkservicestage" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-smn/huaweicloudsdksmn/v2/model/publish_message_request_body.py b/huaweicloud-sdk-smn/huaweicloudsdksmn/v2/model/publish_message_request_body.py index 4401e8c91..36259ced9 100644 --- a/huaweicloud-sdk-smn/huaweicloudsdksmn/v2/model/publish_message_request_body.py +++ b/huaweicloud-sdk-smn/huaweicloudsdksmn/v2/model/publish_message_request_body.py @@ -27,7 +27,7 @@ class PublishMessageRequestBody: 'message': 'str', 'message_structure': 'str', 'message_template_name': 'str', - 'tags': 'object', + 'tags': 'dict(str, str)', 'time_to_live': 'str' } @@ -159,7 +159,7 @@ class PublishMessageRequestBody: tag以及替换tag的参数组成的字典。消息模板中的标签对应的值。使用消息模板方式的消息发布必须携带该参数。字典中的key为消息模板中的参数名称,不超过21个字符。字典中的value为消息模板中的参数被替换后的值,不超过1KB。 :return: The tags of this PublishMessageRequestBody. - :rtype: object + :rtype: dict(str, str) """ return self._tags @@ -170,7 +170,7 @@ class PublishMessageRequestBody: tag以及替换tag的参数组成的字典。消息模板中的标签对应的值。使用消息模板方式的消息发布必须携带该参数。字典中的key为消息模板中的参数名称,不超过21个字符。字典中的value为消息模板中的参数被替换后的值,不超过1KB。 :param tags: The tags of this PublishMessageRequestBody. - :type: object + :type: dict(str, str) """ self._tags = tags diff --git a/huaweicloud-sdk-smn/huaweicloudsdksmn/v2/smn_async_client.py b/huaweicloud-sdk-smn/huaweicloudsdksmn/v2/smn_async_client.py index 5691bd10d..19e097937 100644 --- a/huaweicloud-sdk-smn/huaweicloudsdksmn/v2/smn_async_client.py +++ b/huaweicloud-sdk-smn/huaweicloudsdksmn/v2/smn_async_client.py @@ -38,8 +38,14 @@ class SmnAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdksmn.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "SmnClient": + raise TypeError("client type error, support client type is SmnClient") + return ClientBuilder(clazz) def add_subscription_async(self, request): diff --git a/huaweicloud-sdk-smn/huaweicloudsdksmn/v2/smn_client.py b/huaweicloud-sdk-smn/huaweicloudsdksmn/v2/smn_client.py index 39aa439fe..301e84f28 100644 --- a/huaweicloud-sdk-smn/huaweicloudsdksmn/v2/smn_client.py +++ b/huaweicloud-sdk-smn/huaweicloudsdksmn/v2/smn_client.py @@ -38,8 +38,14 @@ class SmnClient(Client): self.model_package = importlib.import_module("huaweicloudsdksmn.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "SmnClient": + raise TypeError("client type error, support client type is SmnClient") + return ClientBuilder(clazz) def add_subscription(self, request): diff --git a/huaweicloud-sdk-smn/setup.py b/huaweicloud-sdk-smn/setup.py index 17cdac11c..3aaf71812 100644 --- a/huaweicloud-sdk-smn/setup.py +++ b/huaweicloud-sdk-smn/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdksmn" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-tms/huaweicloudsdktms/v1/tms_async_client.py b/huaweicloud-sdk-tms/huaweicloudsdktms/v1/tms_async_client.py index 460937db0..10f7a258d 100644 --- a/huaweicloud-sdk-tms/huaweicloudsdktms/v1/tms_async_client.py +++ b/huaweicloud-sdk-tms/huaweicloudsdktms/v1/tms_async_client.py @@ -38,8 +38,14 @@ class TmsAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdktms.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials") + + if clazz.__name__ != "TmsClient": + raise TypeError("client type error, support client type is TmsClient") + return ClientBuilder(clazz, "GlobalCredentials") def create_predefine_tags_async(self, request): diff --git a/huaweicloud-sdk-tms/huaweicloudsdktms/v1/tms_client.py b/huaweicloud-sdk-tms/huaweicloudsdktms/v1/tms_client.py index 9f4a6bfca..6c980c008 100644 --- a/huaweicloud-sdk-tms/huaweicloudsdktms/v1/tms_client.py +++ b/huaweicloud-sdk-tms/huaweicloudsdktms/v1/tms_client.py @@ -38,8 +38,14 @@ class TmsClient(Client): self.model_package = importlib.import_module("huaweicloudsdktms.v1.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls, "GlobalCredentials") + + if clazz.__name__ != "TmsClient": + raise TypeError("client type error, support client type is TmsClient") + return ClientBuilder(clazz, "GlobalCredentials") def create_predefine_tags(self, request): diff --git a/huaweicloud-sdk-tms/setup.py b/huaweicloud-sdk-tms/setup.py index db9b82512..930ba4fa8 100644 --- a/huaweicloud-sdk-tms/setup.py +++ b/huaweicloud-sdk-tms/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdktms" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" diff --git a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/vpc_async_client.py b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/vpc_async_client.py index 9e4ce594b..f3d16f43f 100644 --- a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/vpc_async_client.py +++ b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/vpc_async_client.py @@ -38,8 +38,14 @@ class VpcAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkvpc.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "VpcClient": + raise TypeError("client type error, support client type is VpcClient") + return ClientBuilder(clazz) def accept_vpc_peering_async(self, request): diff --git a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/vpc_client.py b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/vpc_client.py index fe7e94ab1..25e9599ca 100644 --- a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/vpc_client.py +++ b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v2/vpc_client.py @@ -38,8 +38,14 @@ class VpcClient(Client): self.model_package = importlib.import_module("huaweicloudsdkvpc.v2.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "VpcClient": + raise TypeError("client type error, support client type is VpcClient") + return ClientBuilder(clazz) def accept_vpc_peering(self, request): diff --git a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/vpc_async_client.py b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/vpc_async_client.py index 4f2c588fc..62f998747 100644 --- a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/vpc_async_client.py +++ b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/vpc_async_client.py @@ -38,8 +38,14 @@ class VpcAsyncClient(Client): self.model_package = importlib.import_module("huaweicloudsdkvpc.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "VpcClient": + raise TypeError("client type error, support client type is VpcClient") + return ClientBuilder(clazz) def batch_create_sub_network_interface_async(self, request): diff --git a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/vpc_client.py b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/vpc_client.py index 42febde2a..b2132bdd8 100644 --- a/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/vpc_client.py +++ b/huaweicloud-sdk-vpc/huaweicloudsdkvpc/v3/vpc_client.py @@ -38,8 +38,14 @@ class VpcClient(Client): self.model_package = importlib.import_module("huaweicloudsdkvpc.v3.model") self.preset_headers = {'User-Agent': 'HuaweiCloud-SDK-Python'} - @staticmethod - def new_builder(clazz): + @classmethod + def new_builder(cls, clazz=None): + if clazz is None: + return ClientBuilder(cls) + + if clazz.__name__ != "VpcClient": + raise TypeError("client type error, support client type is VpcClient") + return ClientBuilder(clazz) def batch_create_sub_network_interface(self, request): diff --git a/huaweicloud-sdk-vpc/setup.py b/huaweicloud-sdk-vpc/setup.py index 97d2ad946..453e16b75 100644 --- a/huaweicloud-sdk-vpc/setup.py +++ b/huaweicloud-sdk-vpc/setup.py @@ -4,7 +4,7 @@ from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkvpc" -VERSION = "3.0.28-beta" +VERSION = "3.0.29-beta" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3"