google-api-client 0.20.1 → 0.21.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +190 -0
- data/README.md +3 -12
- data/generated/google/apis/abusiveexperiencereport_v1.rb +2 -2
- data/generated/google/apis/abusiveexperiencereport_v1/classes.rb +1 -0
- data/generated/google/apis/abusiveexperiencereport_v1/service.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +11 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +1 -0
- data/generated/google/apis/adexchangebuyer_v1_2.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_2/service.rb +24 -40
- data/generated/google/apis/adexchangebuyer_v1_3.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_3/service.rb +66 -110
- data/generated/google/apis/adexchangebuyer_v1_4/service.rb +117 -195
- data/generated/google/apis/adexchangeseller_v1.rb +1 -1
- data/generated/google/apis/adexchangeseller_v1/service.rb +36 -60
- data/generated/google/apis/adexchangeseller_v1_1.rb +1 -1
- data/generated/google/apis/adexchangeseller_v1_1/service.rb +54 -90
- data/generated/google/apis/adexchangeseller_v2_0.rb +1 -1
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +45 -75
- data/generated/google/apis/adexperiencereport_v1.rb +2 -2
- data/generated/google/apis/adexperiencereport_v1/classes.rb +1 -0
- data/generated/google/apis/adexperiencereport_v1/service.rb +1 -1
- data/generated/google/apis/admin_datatransfer_v1/service.rb +18 -30
- data/generated/google/apis/admin_directory_v1.rb +3 -3
- data/generated/google/apis/admin_directory_v1/classes.rb +18 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +3 -0
- data/generated/google/apis/admin_directory_v1/service.rb +363 -577
- data/generated/google/apis/admin_reports_v1.rb +1 -1
- data/generated/google/apis/admin_reports_v1/service.rb +21 -35
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsense_v1_4/service.rb +117 -195
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1/service.rb +81 -135
- data/generated/google/apis/analytics_v2_4.rb +1 -1
- data/generated/google/apis/analytics_v2_4/service.rb +21 -35
- data/generated/google/apis/analytics_v3.rb +4 -1
- data/generated/google/apis/analytics_v3/classes.rb +119 -60
- data/generated/google/apis/analytics_v3/representations.rb +43 -12
- data/generated/google/apis/analytics_v3/service.rb +294 -435
- data/generated/google/apis/analyticsreporting_v4.rb +2 -2
- data/generated/google/apis/analyticsreporting_v4/classes.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4/service.rb +1 -1
- data/generated/google/apis/androiddeviceprovisioning_v1.rb +1 -1
- data/generated/google/apis/androiddeviceprovisioning_v1/classes.rb +10 -1
- data/generated/google/apis/androiddeviceprovisioning_v1/representations.rb +1 -0
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +8 -12
- data/generated/google/apis/androidenterprise_v1/service.rb +254 -425
- data/generated/google/apis/androidmanagement_v1.rb +1 -1
- data/generated/google/apis/androidmanagement_v1/classes.rb +38 -6
- data/generated/google/apis/androidmanagement_v1/representations.rb +18 -0
- data/generated/google/apis/androidpublisher_v1.rb +1 -1
- data/generated/google/apis/androidpublisher_v1/service.rb +9 -15
- data/generated/google/apis/androidpublisher_v1_1.rb +1 -1
- data/generated/google/apis/androidpublisher_v1_1/service.rb +12 -20
- data/generated/google/apis/androidpublisher_v2.rb +1 -1
- data/generated/google/apis/androidpublisher_v2/classes.rb +102 -1
- data/generated/google/apis/androidpublisher_v2/representations.rb +46 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +297 -286
- data/generated/google/apis/androidpublisher_v3.rb +34 -0
- data/generated/google/apis/androidpublisher_v3/classes.rb +1899 -0
- data/generated/google/apis/androidpublisher_v3/representations.rb +882 -0
- data/generated/google/apis/androidpublisher_v3/service.rb +2208 -0
- data/generated/google/apis/appengine_v1.rb +1 -1
- data/generated/google/apis/appengine_v1/classes.rb +11 -4
- data/generated/google/apis/appengine_v1/service.rb +28 -19
- data/generated/google/apis/appengine_v1beta.rb +1 -1
- data/generated/google/apis/appengine_v1beta/classes.rb +11 -7
- data/generated/google/apis/appengine_v1beta/service.rb +28 -19
- data/generated/google/apis/appsactivity_v1.rb +1 -1
- data/generated/google/apis/appsactivity_v1/service.rb +6 -10
- data/generated/google/apis/appsmarket_v2/service.rb +12 -20
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/appstate_v1/service.rb +18 -30
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +76 -15
- data/generated/google/apis/bigquery_v2/representations.rb +22 -0
- data/generated/google/apis/bigquery_v2/service.rb +69 -115
- data/generated/google/apis/bigquerydatatransfer_v1.rb +1 -1
- data/generated/google/apis/bigquerydatatransfer_v1/classes.rb +1 -2
- data/generated/google/apis/bigquerydatatransfer_v1/service.rb +2 -2
- data/generated/google/apis/blogger_v2/service.rb +30 -50
- data/generated/google/apis/blogger_v3/service.rb +102 -170
- data/generated/google/apis/books_v1.rb +1 -1
- data/generated/google/apis/books_v1/service.rb +156 -260
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/calendar_v3/service.rb +114 -190
- data/generated/google/apis/chat_v1.rb +1 -1
- data/generated/google/apis/chat_v1/classes.rb +6 -0
- data/generated/google/apis/chat_v1/representations.rb +1 -0
- data/generated/google/apis/civicinfo_v2/service.rb +18 -30
- data/generated/google/apis/classroom_v1.rb +1 -1
- data/generated/google/apis/classroom_v1/classes.rb +0 -69
- data/generated/google/apis/classroom_v1/representations.rb +0 -31
- data/generated/google/apis/classroom_v1/service.rb +0 -88
- data/generated/google/apis/cloudbilling_v1.rb +1 -1
- data/generated/google/apis/cloudbilling_v1/classes.rb +0 -1
- data/generated/google/apis/cloudbilling_v1/service.rb +2 -1
- data/generated/google/apis/clouddebugger_v2.rb +2 -2
- data/generated/google/apis/clouddebugger_v2/classes.rb +2 -1
- data/generated/google/apis/clouddebugger_v2/service.rb +1 -1
- data/generated/google/apis/cloudfunctions_v1.rb +3 -4
- data/generated/google/apis/cloudfunctions_v1/classes.rb +14 -0
- data/generated/google/apis/cloudfunctions_v1/representations.rb +2 -0
- data/generated/google/apis/cloudfunctions_v1/service.rb +3 -4
- data/generated/google/apis/cloudfunctions_v1beta2.rb +3 -4
- data/generated/google/apis/cloudfunctions_v1beta2/classes.rb +14 -0
- data/generated/google/apis/cloudfunctions_v1beta2/representations.rb +2 -0
- data/generated/google/apis/cloudfunctions_v1beta2/service.rb +3 -4
- data/generated/google/apis/cloudiot_v1.rb +1 -1
- data/generated/google/apis/cloudiot_v1/classes.rb +29 -7
- data/generated/google/apis/cloudiot_v1/service.rb +387 -0
- data/generated/google/apis/cloudkms_v1.rb +2 -2
- data/generated/google/apis/cloudkms_v1/classes.rb +29 -7
- data/generated/google/apis/cloudkms_v1/service.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +31 -9
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +5 -3
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +29 -7
- data/generated/google/apis/cloudresourcemanager_v2.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v2/classes.rb +29 -7
- data/generated/google/apis/cloudresourcemanager_v2beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v2beta1/classes.rb +29 -7
- data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
- data/generated/google/apis/cloudtasks_v2beta2/classes.rb +39 -10
- data/generated/google/apis/cloudtasks_v2beta2/service.rb +9 -11
- data/generated/google/apis/cloudtrace_v1.rb +1 -1
- data/generated/google/apis/cloudtrace_v1/classes.rb +1 -1
- data/generated/google/apis/{dlp_v2beta1.rb → composer_v1beta1.rb} +9 -11
- data/generated/google/apis/composer_v1beta1/classes.rb +640 -0
- data/generated/google/apis/composer_v1beta1/representations.rb +195 -0
- data/generated/google/apis/composer_v1beta1/service.rb +462 -0
- data/generated/google/apis/compute_alpha.rb +1 -1
- data/generated/google/apis/compute_alpha/classes.rb +4279 -1869
- data/generated/google/apis/compute_alpha/representations.rb +1366 -346
- data/generated/google/apis/compute_alpha/service.rb +4754 -4134
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +211 -55
- data/generated/google/apis/compute_beta/representations.rb +41 -0
- data/generated/google/apis/compute_beta/service.rb +1273 -2082
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +245 -44
- data/generated/google/apis/compute_v1/representations.rb +81 -0
- data/generated/google/apis/compute_v1/service.rb +1567 -1668
- data/generated/google/apis/container_v1.rb +2 -2
- data/generated/google/apis/container_v1/classes.rb +20 -15
- data/generated/google/apis/container_v1/representations.rb +1 -0
- data/generated/google/apis/container_v1/service.rb +51 -49
- data/generated/google/apis/container_v1beta1.rb +2 -2
- data/generated/google/apis/container_v1beta1/classes.rb +193 -14
- data/generated/google/apis/container_v1beta1/representations.rb +78 -0
- data/generated/google/apis/container_v1beta1/service.rb +129 -49
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +173 -8
- data/generated/google/apis/content_v2/representations.rb +71 -0
- data/generated/google/apis/content_v2/service.rb +246 -410
- data/generated/google/apis/content_v2sandbox.rb +1 -1
- data/generated/google/apis/content_v2sandbox/classes.rb +75 -8
- data/generated/google/apis/content_v2sandbox/representations.rb +33 -0
- data/generated/google/apis/content_v2sandbox/service.rb +63 -105
- data/generated/google/apis/customsearch_v1.rb +1 -1
- data/generated/google/apis/customsearch_v1/service.rb +9 -15
- data/generated/google/apis/dataflow_v1b3.rb +1 -1
- data/generated/google/apis/dataflow_v1b3/classes.rb +15 -0
- data/generated/google/apis/dataflow_v1b3/representations.rb +2 -0
- data/generated/google/apis/dataproc_v1.rb +2 -2
- data/generated/google/apis/dataproc_v1/classes.rb +6 -6
- data/generated/google/apis/dataproc_v1/service.rb +1 -1
- data/generated/google/apis/dataproc_v1beta2.rb +2 -2
- data/generated/google/apis/dataproc_v1beta2/classes.rb +48 -13
- data/generated/google/apis/dataproc_v1beta2/representations.rb +12 -0
- data/generated/google/apis/dataproc_v1beta2/service.rb +1 -1
- data/generated/google/apis/datastore_v1.rb +2 -2
- data/generated/google/apis/datastore_v1/service.rb +1 -1
- data/generated/google/apis/datastore_v1beta1.rb +2 -2
- data/generated/google/apis/datastore_v1beta1/service.rb +1 -1
- data/generated/google/apis/datastore_v1beta3.rb +2 -2
- data/generated/google/apis/datastore_v1beta3/service.rb +1 -1
- data/generated/google/apis/deploymentmanager_alpha.rb +1 -1
- data/generated/google/apis/deploymentmanager_alpha/classes.rb +60 -5
- data/generated/google/apis/deploymentmanager_alpha/representations.rb +17 -0
- data/generated/google/apis/deploymentmanager_alpha/service.rb +118 -194
- data/generated/google/apis/deploymentmanager_v2.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2/classes.rb +60 -5
- data/generated/google/apis/deploymentmanager_v2/representations.rb +17 -0
- data/generated/google/apis/deploymentmanager_v2/service.rb +61 -99
- data/generated/google/apis/deploymentmanager_v2beta.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2beta/classes.rb +60 -5
- data/generated/google/apis/deploymentmanager_v2beta/representations.rb +17 -0
- data/generated/google/apis/deploymentmanager_v2beta/service.rb +103 -169
- data/generated/google/apis/dfareporting_v2_8.rb +1 -1
- data/generated/google/apis/dfareporting_v2_8/classes.rb +5 -5
- data/generated/google/apis/dfareporting_v2_8/service.rb +622 -1031
- data/generated/google/apis/dfareporting_v3_0.rb +1 -1
- data/generated/google/apis/dfareporting_v3_0/classes.rb +5 -5
- data/generated/google/apis/dfareporting_v3_0/service.rb +619 -1026
- data/generated/google/apis/dfareporting_v3_1.rb +40 -0
- data/generated/google/apis/dfareporting_v3_1/classes.rb +12256 -0
- data/generated/google/apis/dfareporting_v3_1/representations.rb +4389 -0
- data/generated/google/apis/dfareporting_v3_1/service.rb +8790 -0
- data/generated/google/apis/dialogflow_v2.rb +1 -1
- data/generated/google/apis/dialogflow_v2/classes.rb +94 -24
- data/generated/google/apis/dialogflow_v2/representations.rb +13 -0
- data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
- data/generated/google/apis/dialogflow_v2beta1/classes.rb +94 -24
- data/generated/google/apis/dialogflow_v2beta1/representations.rb +13 -0
- data/generated/google/apis/discovery_v1/service.rb +9 -15
- data/generated/google/apis/dlp_v2.rb +1 -1
- data/generated/google/apis/dlp_v2/classes.rb +136 -1572
- data/generated/google/apis/dlp_v2/representations.rb +676 -1405
- data/generated/google/apis/dlp_v2/service.rb +24 -24
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/dns_v1/classes.rb +7 -0
- data/generated/google/apis/dns_v1/representations.rb +1 -0
- data/generated/google/apis/dns_v1/service.rb +49 -81
- data/generated/google/apis/dns_v1beta2.rb +1 -1
- data/generated/google/apis/dns_v1beta2/classes.rb +7 -0
- data/generated/google/apis/dns_v1beta2/representations.rb +1 -0
- data/generated/google/apis/dns_v1beta2/service.rb +49 -81
- data/generated/google/apis/dns_v2beta1.rb +1 -1
- data/generated/google/apis/dns_v2beta1/classes.rb +7 -0
- data/generated/google/apis/dns_v2beta1/representations.rb +1 -0
- data/generated/google/apis/dns_v2beta1/service.rb +49 -81
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +30 -50
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/doubleclicksearch_v2/service.rb +33 -55
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/service.rb +205 -341
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/service.rb +120 -200
- data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
- data/generated/google/apis/firebasedynamiclinks_v1/service.rb +1 -1
- data/generated/google/apis/firestore_v1beta1.rb +2 -2
- data/generated/google/apis/firestore_v1beta1/service.rb +1 -1
- data/generated/google/apis/fitness_v1/service.rb +45 -75
- data/generated/google/apis/fusiontables_v1.rb +1 -1
- data/generated/google/apis/fusiontables_v1/service.rb +99 -165
- data/generated/google/apis/fusiontables_v2/service.rb +105 -175
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_configuration_v1configuration/service.rb +42 -70
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_management_v1management/service.rb +84 -140
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/games_v1/service.rb +162 -270
- data/generated/google/apis/genomics_v1.rb +1 -1
- data/generated/google/apis/genomics_v1/classes.rb +41 -7
- data/generated/google/apis/genomics_v1/representations.rb +1 -0
- data/generated/google/apis/genomics_v1alpha2.rb +1 -1
- data/generated/google/apis/genomics_v1alpha2/classes.rb +12 -0
- data/generated/google/apis/genomics_v1alpha2/representations.rb +1 -0
- data/generated/google/apis/genomics_v2alpha1.rb +1 -1
- data/generated/google/apis/genomics_v2alpha1/classes.rb +70 -0
- data/generated/google/apis/genomics_v2alpha1/representations.rb +20 -0
- data/generated/google/apis/gmail_v1/service.rb +189 -315
- data/generated/google/apis/groupsmigration_v1/service.rb +6 -10
- data/generated/google/apis/groupssettings_v1/service.rb +12 -20
- data/generated/google/apis/iam_v1.rb +2 -2
- data/generated/google/apis/iam_v1/classes.rb +29 -7
- data/generated/google/apis/iam_v1/service.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +56 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +8 -0
- data/generated/google/apis/identitytoolkit_v3/service.rb +63 -105
- data/generated/google/apis/jobs_v2.rb +38 -0
- data/generated/google/apis/jobs_v2/classes.rb +3374 -0
- data/generated/google/apis/jobs_v2/representations.rb +1067 -0
- data/generated/google/apis/jobs_v2/service.rb +753 -0
- data/generated/google/apis/language_v1.rb +1 -1
- data/generated/google/apis/language_v1/classes.rb +1 -0
- data/generated/google/apis/language_v1beta1.rb +1 -1
- data/generated/google/apis/language_v1beta1/classes.rb +1 -0
- data/generated/google/apis/language_v1beta2.rb +1 -1
- data/generated/google/apis/language_v1beta2/classes.rb +1 -0
- data/generated/google/apis/licensing_v1/service.rb +24 -40
- data/generated/google/apis/logging_v2.rb +1 -1
- data/generated/google/apis/logging_v2/classes.rb +55 -5
- data/generated/google/apis/logging_v2/representations.rb +16 -0
- data/generated/google/apis/logging_v2/service.rb +6 -4
- data/generated/google/apis/logging_v2beta1.rb +1 -1
- data/generated/google/apis/logging_v2beta1/classes.rb +55 -5
- data/generated/google/apis/logging_v2beta1/representations.rb +16 -0
- data/generated/google/apis/logging_v2beta1/service.rb +6 -4
- data/generated/google/apis/mirror_v1.rb +1 -1
- data/generated/google/apis/mirror_v1/service.rb +75 -125
- data/generated/google/apis/ml_v1.rb +1 -1
- data/generated/google/apis/ml_v1/classes.rb +65 -28
- data/generated/google/apis/ml_v1/representations.rb +1 -0
- data/generated/google/apis/ml_v1/service.rb +2 -2
- data/generated/google/apis/monitoring_v3.rb +1 -1
- data/generated/google/apis/monitoring_v3/classes.rb +7 -7
- data/generated/google/apis/oauth2_v1.rb +1 -1
- data/generated/google/apis/oauth2_v1/service.rb +27 -45
- data/generated/google/apis/oauth2_v2.rb +1 -1
- data/generated/google/apis/oauth2_v2/service.rb +15 -25
- data/generated/google/apis/oslogin_v1.rb +1 -1
- data/generated/google/apis/oslogin_v1/classes.rb +6 -0
- data/generated/google/apis/oslogin_v1/representations.rb +1 -0
- data/generated/google/apis/oslogin_v1alpha.rb +1 -1
- data/generated/google/apis/oslogin_v1alpha/classes.rb +7 -1
- data/generated/google/apis/oslogin_v1alpha/representations.rb +1 -0
- data/generated/google/apis/oslogin_v1alpha/service.rb +4 -1
- data/generated/google/apis/oslogin_v1beta.rb +1 -1
- data/generated/google/apis/oslogin_v1beta/classes.rb +6 -0
- data/generated/google/apis/oslogin_v1beta/representations.rb +1 -0
- data/generated/google/apis/pagespeedonline_v1.rb +1 -1
- data/generated/google/apis/pagespeedonline_v1/service.rb +6 -10
- data/generated/google/apis/pagespeedonline_v2.rb +1 -1
- data/generated/google/apis/pagespeedonline_v2/service.rb +6 -10
- data/generated/google/apis/pagespeedonline_v4/service.rb +6 -10
- data/generated/google/apis/partners_v2.rb +1 -1
- data/generated/google/apis/partners_v2/classes.rb +7 -0
- data/generated/google/apis/partners_v2/representations.rb +1 -0
- data/generated/google/apis/people_v1.rb +1 -1
- data/generated/google/apis/people_v1/service.rb +4 -0
- data/generated/google/apis/photoslibrary_v1.rb +49 -0
- data/generated/google/apis/photoslibrary_v1/classes.rb +1330 -0
- data/generated/google/apis/photoslibrary_v1/representations.rb +625 -0
- data/generated/google/apis/photoslibrary_v1/service.rb +399 -0
- data/generated/google/apis/playcustomapp_v1/service.rb +6 -10
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_domains_v1/service.rb +63 -105
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/plus_v1/service.rb +30 -50
- data/generated/google/apis/pubsub_v1.rb +2 -2
- data/generated/google/apis/pubsub_v1/classes.rb +29 -7
- data/generated/google/apis/pubsub_v1/service.rb +1 -1
- data/generated/google/apis/pubsub_v1beta1a.rb +2 -2
- data/generated/google/apis/pubsub_v1beta1a/service.rb +1 -1
- data/generated/google/apis/pubsub_v1beta2.rb +2 -2
- data/generated/google/apis/pubsub_v1beta2/classes.rb +29 -7
- data/generated/google/apis/pubsub_v1beta2/service.rb +1 -1
- data/generated/google/apis/{dlp_v2beta2.rb → redis_v1beta1.rb} +10 -11
- data/generated/google/apis/redis_v1beta1/classes.rb +681 -0
- data/generated/google/apis/redis_v1beta1/representations.rb +240 -0
- data/generated/google/apis/redis_v1beta1/service.rb +426 -0
- data/generated/google/apis/replicapool_v1beta1/service.rb +33 -55
- data/generated/google/apis/replicapool_v1beta2/service.rb +39 -65
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +33 -55
- data/generated/google/apis/reseller_v1/service.rb +54 -90
- data/generated/google/apis/resourceviews_v1beta1/service.rb +45 -75
- data/generated/google/apis/resourceviews_v1beta2/service.rb +36 -60
- data/generated/google/apis/runtimeconfig_v1.rb +2 -2
- data/generated/google/apis/runtimeconfig_v1/service.rb +1 -1
- data/generated/google/apis/runtimeconfig_v1beta1.rb +2 -2
- data/generated/google/apis/runtimeconfig_v1beta1/classes.rb +29 -7
- data/generated/google/apis/runtimeconfig_v1beta1/service.rb +1 -1
- data/generated/google/apis/script_v1.rb +8 -2
- data/generated/google/apis/script_v1/classes.rb +3 -3
- data/generated/google/apis/script_v1/service.rb +8 -2
- data/generated/google/apis/servicebroker_v1.rb +36 -0
- data/generated/google/apis/servicebroker_v1/classes.rb +240 -0
- data/generated/google/apis/servicebroker_v1/representations.rb +96 -0
- data/generated/google/apis/servicebroker_v1/service.rb +168 -0
- data/generated/google/apis/servicebroker_v1alpha1.rb +36 -0
- data/generated/google/apis/servicebroker_v1alpha1/classes.rb +939 -0
- data/generated/google/apis/servicebroker_v1alpha1/representations.rb +348 -0
- data/generated/google/apis/servicebroker_v1alpha1/service.rb +728 -0
- data/generated/google/apis/servicebroker_v1beta1.rb +36 -0
- data/generated/google/apis/servicebroker_v1beta1/classes.rb +1046 -0
- data/generated/google/apis/servicebroker_v1beta1/representations.rb +393 -0
- data/generated/google/apis/servicebroker_v1beta1/service.rb +917 -0
- data/generated/google/apis/servicecontrol_v1.rb +2 -2
- data/generated/google/apis/servicecontrol_v1/classes.rb +1 -0
- data/generated/google/apis/servicecontrol_v1/service.rb +1 -1
- data/generated/google/apis/servicemanagement_v1.rb +2 -2
- data/generated/google/apis/servicemanagement_v1/classes.rb +29 -7
- data/generated/google/apis/servicemanagement_v1/service.rb +1 -1
- data/generated/google/apis/serviceusage_v1beta1.rb +1 -1
- data/generated/google/apis/serviceusage_v1beta1/classes.rb +299 -0
- data/generated/google/apis/serviceusage_v1beta1/representations.rb +101 -0
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +421 -0
- data/generated/google/apis/sheets_v4/representations.rb +120 -0
- data/generated/google/apis/site_verification_v1/service.rb +24 -40
- data/generated/google/apis/slides_v1.rb +1 -1
- data/generated/google/apis/slides_v1/classes.rb +6 -2
- data/generated/google/apis/sourcerepo_v1.rb +1 -1
- data/generated/google/apis/sourcerepo_v1/classes.rb +160 -8
- data/generated/google/apis/sourcerepo_v1/representations.rb +63 -0
- data/generated/google/apis/sourcerepo_v1/service.rb +99 -0
- data/generated/google/apis/spanner_v1.rb +1 -1
- data/generated/google/apis/spanner_v1/classes.rb +40 -13
- data/generated/google/apis/spanner_v1/service.rb +2 -2
- data/generated/google/apis/spectrum_v1explorer.rb +1 -1
- data/generated/google/apis/spectrum_v1explorer/service.rb +21 -35
- data/generated/google/apis/speech_v1.rb +1 -1
- data/generated/google/apis/speech_v1/classes.rb +12 -0
- data/generated/google/apis/speech_v1/representations.rb +1 -0
- data/generated/google/apis/sqladmin_v1beta3.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta3/service.rb +75 -125
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +76 -0
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +44 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +246 -210
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +3 -6
- data/generated/google/apis/storage_v1/service.rb +144 -240
- data/generated/google/apis/storage_v1beta1.rb +1 -1
- data/generated/google/apis/storage_v1beta1/service.rb +75 -125
- data/generated/google/apis/storage_v1beta2.rb +1 -1
- data/generated/google/apis/storage_v1beta2/service.rb +105 -175
- data/generated/google/apis/storagetransfer_v1.rb +1 -1
- data/generated/google/apis/storagetransfer_v1/classes.rb +4 -3
- data/generated/google/apis/surveys_v2.rb +1 -1
- data/generated/google/apis/surveys_v2/classes.rb +19 -122
- data/generated/google/apis/surveys_v2/representations.rb +0 -38
- data/generated/google/apis/surveys_v2/service.rb +27 -157
- data/generated/google/apis/tagmanager_v1/service.rb +153 -255
- data/generated/google/apis/tagmanager_v2/service.rb +222 -370
- data/generated/google/apis/tasks_v1/service.rb +45 -75
- data/generated/google/apis/testing_v1.rb +1 -1
- data/generated/google/apis/texttospeech_v1beta1.rb +2 -2
- data/generated/google/apis/texttospeech_v1beta1/service.rb +1 -1
- data/generated/google/apis/toolresults_v1beta3.rb +1 -1
- data/generated/google/apis/toolresults_v1beta3/service.rb +75 -125
- data/generated/google/apis/tpu_v1alpha1.rb +1 -1
- data/generated/google/apis/urlshortener_v1/service.rb +12 -20
- data/generated/google/apis/vault_v1.rb +2 -2
- data/generated/google/apis/vault_v1/service.rb +1 -1
- data/generated/google/apis/videointelligence_v1.rb +34 -0
- data/generated/google/apis/videointelligence_v1/classes.rb +2149 -0
- data/generated/google/apis/videointelligence_v1/representations.rb +972 -0
- data/generated/google/apis/videointelligence_v1/service.rb +246 -0
- data/generated/google/apis/videointelligence_v1beta1.rb +1 -1
- data/generated/google/apis/videointelligence_v1beta1/classes.rb +18 -18
- data/generated/google/apis/{taskqueue_v1beta2.rb → videointelligence_v1beta2.rb} +10 -13
- data/generated/google/apis/videointelligence_v1beta2/classes.rb +2092 -0
- data/generated/google/apis/videointelligence_v1beta2/representations.rb +933 -0
- data/generated/google/apis/videointelligence_v1beta2/service.rb +92 -0
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +2001 -105
- data/generated/google/apis/vision_v1/representations.rb +1024 -170
- data/generated/google/apis/vision_v1/service.rb +35 -0
- data/generated/google/apis/vision_v1p1beta1.rb +1 -1
- data/generated/google/apis/vision_v1p1beta1/classes.rb +4147 -772
- data/generated/google/apis/vision_v1p1beta1/representations.rb +1659 -209
- data/generated/google/apis/vision_v1p1beta1/service.rb +35 -0
- data/generated/google/apis/vision_v1p2beta1.rb +1 -1
- data/generated/google/apis/vision_v1p2beta1/classes.rb +2603 -844
- data/generated/google/apis/vision_v1p2beta1/representations.rb +784 -8
- data/generated/google/apis/vision_v1p2beta1/service.rb +3 -3
- data/generated/google/apis/webfonts_v1/service.rb +6 -10
- data/generated/google/apis/webmasters_v3/service.rb +42 -70
- data/generated/google/apis/websecurityscanner_v1alpha.rb +34 -0
- data/generated/google/apis/websecurityscanner_v1alpha/classes.rb +760 -0
- data/generated/google/apis/websecurityscanner_v1alpha/representations.rb +354 -0
- data/generated/google/apis/websecurityscanner_v1alpha/service.rb +548 -0
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1/service.rb +27 -45
- data/generated/google/apis/youtube_analytics_v1beta1.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1beta1/service.rb +27 -45
- data/generated/google/apis/youtube_analytics_v2.rb +46 -0
- data/generated/google/apis/youtube_analytics_v2/classes.rb +532 -0
- data/generated/google/apis/youtube_analytics_v2/representations.rb +232 -0
- data/generated/google/apis/youtube_analytics_v2/service.rb +478 -0
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/service.rb +225 -375
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +0 -168
- data/generated/google/apis/youtube_v3/representations.rb +0 -62
- data/generated/google/apis/youtube_v3/service.rb +216 -415
- data/lib/google/apis/generator/helpers.rb +3 -1
- data/lib/google/apis/version.rb +1 -1
- metadata +55 -39
- data/generated/google/apis/dlp_v2beta1/classes.rb +0 -3820
- data/generated/google/apis/dlp_v2beta1/representations.rb +0 -1879
- data/generated/google/apis/dlp_v2beta1/service.rb +0 -603
- data/generated/google/apis/dlp_v2beta2/classes.rb +0 -6386
- data/generated/google/apis/dlp_v2beta2/representations.rb +0 -3085
- data/generated/google/apis/dlp_v2beta2/service.rb +0 -1332
- data/generated/google/apis/prediction_v1_2.rb +0 -44
- data/generated/google/apis/prediction_v1_2/classes.rb +0 -237
- data/generated/google/apis/prediction_v1_2/representations.rb +0 -133
- data/generated/google/apis/prediction_v1_2/service.rb +0 -287
- data/generated/google/apis/prediction_v1_3.rb +0 -44
- data/generated/google/apis/prediction_v1_3/classes.rb +0 -286
- data/generated/google/apis/prediction_v1_3/representations.rb +0 -139
- data/generated/google/apis/prediction_v1_3/service.rb +0 -284
- data/generated/google/apis/prediction_v1_4.rb +0 -44
- data/generated/google/apis/prediction_v1_4/classes.rb +0 -336
- data/generated/google/apis/prediction_v1_4/representations.rb +0 -158
- data/generated/google/apis/prediction_v1_4/service.rb +0 -284
- data/generated/google/apis/prediction_v1_5.rb +0 -44
- data/generated/google/apis/prediction_v1_5/classes.rb +0 -708
- data/generated/google/apis/prediction_v1_5/representations.rb +0 -352
- data/generated/google/apis/prediction_v1_5/service.rb +0 -357
- data/generated/google/apis/prediction_v1_6.rb +0 -47
- data/generated/google/apis/prediction_v1_6/classes.rb +0 -751
- data/generated/google/apis/prediction_v1_6/representations.rb +0 -369
- data/generated/google/apis/prediction_v1_6/service.rb +0 -381
- data/generated/google/apis/taskqueue_v1beta1.rb +0 -37
- data/generated/google/apis/taskqueue_v1beta1/classes.rb +0 -242
- data/generated/google/apis/taskqueue_v1beta1/representations.rb +0 -124
- data/generated/google/apis/taskqueue_v1beta1/service.rb +0 -269
- data/generated/google/apis/taskqueue_v1beta2/classes.rb +0 -254
- data/generated/google/apis/taskqueue_v1beta2/representations.rb +0 -126
- data/generated/google/apis/taskqueue_v1beta2/service.rb +0 -409
@@ -49,6 +49,41 @@ module Google
|
|
49
49
|
@batch_path = 'batch'
|
50
50
|
end
|
51
51
|
|
52
|
+
# Run asynchronous image detection and annotation for a list of generic
|
53
|
+
# files, such as PDF files, which may contain multiple pages and multiple
|
54
|
+
# images per page. Progress and results can be retrieved through the
|
55
|
+
# `google.longrunning.Operations` interface.
|
56
|
+
# `Operation.metadata` contains `OperationMetadata` (metadata).
|
57
|
+
# `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).
|
58
|
+
# @param [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest] google_cloud_vision_v1p1beta1_async_batch_annotate_files_request_object
|
59
|
+
# @param [String] fields
|
60
|
+
# Selector specifying which fields to include in a partial response.
|
61
|
+
# @param [String] quota_user
|
62
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
63
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
64
|
+
# @param [Google::Apis::RequestOptions] options
|
65
|
+
# Request-specific options
|
66
|
+
#
|
67
|
+
# @yield [result, err] Result & error if block supplied
|
68
|
+
# @yieldparam result [Google::Apis::VisionV1p1beta1::Operation] parsed result object
|
69
|
+
# @yieldparam err [StandardError] error object if request failed
|
70
|
+
#
|
71
|
+
# @return [Google::Apis::VisionV1p1beta1::Operation]
|
72
|
+
#
|
73
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
74
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
75
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
76
|
+
def async_file_batch_annotate(google_cloud_vision_v1p1beta1_async_batch_annotate_files_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
77
|
+
command = make_simple_command(:post, 'v1p1beta1/files:asyncBatchAnnotate', options)
|
78
|
+
command.request_representation = Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest::Representation
|
79
|
+
command.request_object = google_cloud_vision_v1p1beta1_async_batch_annotate_files_request_object
|
80
|
+
command.response_representation = Google::Apis::VisionV1p1beta1::Operation::Representation
|
81
|
+
command.response_class = Google::Apis::VisionV1p1beta1::Operation
|
82
|
+
command.query['fields'] = fields unless fields.nil?
|
83
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
84
|
+
execute_or_queue_command(command, &block)
|
85
|
+
end
|
86
|
+
|
52
87
|
# Run image detection and annotation for a batch of images.
|
53
88
|
# @param [Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest] google_cloud_vision_v1p1beta1_batch_annotate_images_request_object
|
54
89
|
# @param [String] fields
|
@@ -27,7 +27,7 @@ module Google
|
|
27
27
|
# @see https://cloud.google.com/vision/
|
28
28
|
module VisionV1p2beta1
|
29
29
|
VERSION = 'V1p2beta1'
|
30
|
-
REVISION = '
|
30
|
+
REVISION = '20180515'
|
31
31
|
|
32
32
|
# View and manage your data across Google Cloud Platform services
|
33
33
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
@@ -22,168 +22,20 @@ module Google
|
|
22
22
|
module Apis
|
23
23
|
module VisionV1p2beta1
|
24
24
|
|
25
|
-
#
|
26
|
-
#
|
27
|
-
|
28
|
-
# can be trivially provided to the constructor of "java.awt.Color" in Java; it
|
29
|
-
# can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
30
|
-
# method in iOS; and, with just a little work, it can be easily formatted into
|
31
|
-
# a CSS "rgba()" string in JavaScript, as well. Here are some examples:
|
32
|
-
# Example (Java):
|
33
|
-
# import com.google.type.Color;
|
34
|
-
# // ...
|
35
|
-
# public static java.awt.Color fromProto(Color protocolor) `
|
36
|
-
# float alpha = protocolor.hasAlpha()
|
37
|
-
# ? protocolor.getAlpha().getValue()
|
38
|
-
# : 1.0;
|
39
|
-
# return new java.awt.Color(
|
40
|
-
# protocolor.getRed(),
|
41
|
-
# protocolor.getGreen(),
|
42
|
-
# protocolor.getBlue(),
|
43
|
-
# alpha);
|
44
|
-
# `
|
45
|
-
# public static Color toProto(java.awt.Color color) `
|
46
|
-
# float red = (float) color.getRed();
|
47
|
-
# float green = (float) color.getGreen();
|
48
|
-
# float blue = (float) color.getBlue();
|
49
|
-
# float denominator = 255.0;
|
50
|
-
# Color.Builder resultBuilder =
|
51
|
-
# Color
|
52
|
-
# .newBuilder()
|
53
|
-
# .setRed(red / denominator)
|
54
|
-
# .setGreen(green / denominator)
|
55
|
-
# .setBlue(blue / denominator);
|
56
|
-
# int alpha = color.getAlpha();
|
57
|
-
# if (alpha != 255) `
|
58
|
-
# result.setAlpha(
|
59
|
-
# FloatValue
|
60
|
-
# .newBuilder()
|
61
|
-
# .setValue(((float) alpha) / denominator)
|
62
|
-
# .build());
|
63
|
-
# `
|
64
|
-
# return resultBuilder.build();
|
65
|
-
# `
|
66
|
-
# // ...
|
67
|
-
# Example (iOS / Obj-C):
|
68
|
-
# // ...
|
69
|
-
# static UIColor* fromProto(Color* protocolor) `
|
70
|
-
# float red = [protocolor red];
|
71
|
-
# float green = [protocolor green];
|
72
|
-
# float blue = [protocolor blue];
|
73
|
-
# FloatValue* alpha_wrapper = [protocolor alpha];
|
74
|
-
# float alpha = 1.0;
|
75
|
-
# if (alpha_wrapper != nil) `
|
76
|
-
# alpha = [alpha_wrapper value];
|
77
|
-
# `
|
78
|
-
# return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
|
79
|
-
# `
|
80
|
-
# static Color* toProto(UIColor* color) `
|
81
|
-
# CGFloat red, green, blue, alpha;
|
82
|
-
# if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
|
83
|
-
# return nil;
|
84
|
-
# `
|
85
|
-
# Color* result = [Color alloc] init];
|
86
|
-
# [result setRed:red];
|
87
|
-
# [result setGreen:green];
|
88
|
-
# [result setBlue:blue];
|
89
|
-
# if (alpha <= 0.9999) `
|
90
|
-
# [result setAlpha:floatWrapperWithValue(alpha)];
|
91
|
-
# `
|
92
|
-
# [result autorelease];
|
93
|
-
# return result;
|
94
|
-
# `
|
95
|
-
# // ...
|
96
|
-
# Example (JavaScript):
|
97
|
-
# // ...
|
98
|
-
# var protoToCssColor = function(rgb_color) `
|
99
|
-
# var redFrac = rgb_color.red || 0.0;
|
100
|
-
# var greenFrac = rgb_color.green || 0.0;
|
101
|
-
# var blueFrac = rgb_color.blue || 0.0;
|
102
|
-
# var red = Math.floor(redFrac * 255);
|
103
|
-
# var green = Math.floor(greenFrac * 255);
|
104
|
-
# var blue = Math.floor(blueFrac * 255);
|
105
|
-
# if (!('alpha' in rgb_color)) `
|
106
|
-
# return rgbToCssColor_(red, green, blue);
|
107
|
-
# `
|
108
|
-
# var alphaFrac = rgb_color.alpha.value || 0.0;
|
109
|
-
# var rgbParams = [red, green, blue].join(',');
|
110
|
-
# return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
|
111
|
-
# `;
|
112
|
-
# var rgbToCssColor_ = function(red, green, blue) `
|
113
|
-
# var rgbNumber = new Number((red << 16) | (green << 8) | blue);
|
114
|
-
# var hexString = rgbNumber.toString(16);
|
115
|
-
# var missingZeros = 6 - hexString.length;
|
116
|
-
# var resultBuilder = ['#'];
|
117
|
-
# for (var i = 0; i < missingZeros; i++) `
|
118
|
-
# resultBuilder.push('0');
|
119
|
-
# `
|
120
|
-
# resultBuilder.push(hexString);
|
121
|
-
# return resultBuilder.join('');
|
122
|
-
# `;
|
123
|
-
# // ...
|
124
|
-
class Color
|
125
|
-
include Google::Apis::Core::Hashable
|
126
|
-
|
127
|
-
# The fraction of this color that should be applied to the pixel. That is,
|
128
|
-
# the final pixel color is defined by the equation:
|
129
|
-
# pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
|
130
|
-
# This means that a value of 1.0 corresponds to a solid color, whereas
|
131
|
-
# a value of 0.0 corresponds to a completely transparent color. This
|
132
|
-
# uses a wrapper message rather than a simple float scalar so that it is
|
133
|
-
# possible to distinguish between a default value and the value being unset.
|
134
|
-
# If omitted, this color object is to be rendered as a solid color
|
135
|
-
# (as if the alpha value had been explicitly given with a value of 1.0).
|
136
|
-
# Corresponds to the JSON property `alpha`
|
137
|
-
# @return [Float]
|
138
|
-
attr_accessor :alpha
|
139
|
-
|
140
|
-
# The amount of blue in the color as a value in the interval [0, 1].
|
141
|
-
# Corresponds to the JSON property `blue`
|
142
|
-
# @return [Float]
|
143
|
-
attr_accessor :blue
|
144
|
-
|
145
|
-
# The amount of green in the color as a value in the interval [0, 1].
|
146
|
-
# Corresponds to the JSON property `green`
|
147
|
-
# @return [Float]
|
148
|
-
attr_accessor :green
|
149
|
-
|
150
|
-
# The amount of red in the color as a value in the interval [0, 1].
|
151
|
-
# Corresponds to the JSON property `red`
|
152
|
-
# @return [Float]
|
153
|
-
attr_accessor :red
|
154
|
-
|
155
|
-
def initialize(**args)
|
156
|
-
update!(**args)
|
157
|
-
end
|
158
|
-
|
159
|
-
# Update properties of this object
|
160
|
-
def update!(**args)
|
161
|
-
@alpha = args[:alpha] if args.key?(:alpha)
|
162
|
-
@blue = args[:blue] if args.key?(:blue)
|
163
|
-
@green = args[:green] if args.key?(:green)
|
164
|
-
@red = args[:red] if args.key?(:red)
|
165
|
-
end
|
166
|
-
end
|
167
|
-
|
168
|
-
# Request for performing Google Cloud Vision API tasks over a user-provided
|
169
|
-
# image, with user-requested features.
|
170
|
-
class GoogleCloudVisionV1p2beta1AnnotateImageRequest
|
25
|
+
# Response to a single file annotation request. A file may contain one or more
|
26
|
+
# images, which individually have their own responses.
|
27
|
+
class AnnotateFileResponse
|
171
28
|
include Google::Apis::Core::Hashable
|
172
29
|
|
173
|
-
#
|
174
|
-
# Corresponds to the JSON property `
|
175
|
-
# @return [
|
176
|
-
attr_accessor :
|
177
|
-
|
178
|
-
# Client image to perform Google Cloud Vision API tasks over.
|
179
|
-
# Corresponds to the JSON property `image`
|
180
|
-
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Image]
|
181
|
-
attr_accessor :image
|
30
|
+
# The desired input location and metadata.
|
31
|
+
# Corresponds to the JSON property `inputConfig`
|
32
|
+
# @return [Google::Apis::VisionV1p2beta1::InputConfig]
|
33
|
+
attr_accessor :input_config
|
182
34
|
|
183
|
-
#
|
184
|
-
# Corresponds to the JSON property `
|
185
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
186
|
-
attr_accessor :
|
35
|
+
# Individual responses to images found within the file.
|
36
|
+
# Corresponds to the JSON property `responses`
|
37
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::AnnotateImageResponse>]
|
38
|
+
attr_accessor :responses
|
187
39
|
|
188
40
|
def initialize(**args)
|
189
41
|
update!(**args)
|
@@ -191,25 +43,24 @@ module Google
|
|
191
43
|
|
192
44
|
# Update properties of this object
|
193
45
|
def update!(**args)
|
194
|
-
@
|
195
|
-
@
|
196
|
-
@image_context = args[:image_context] if args.key?(:image_context)
|
46
|
+
@input_config = args[:input_config] if args.key?(:input_config)
|
47
|
+
@responses = args[:responses] if args.key?(:responses)
|
197
48
|
end
|
198
49
|
end
|
199
50
|
|
200
51
|
# Response to an image annotation request.
|
201
|
-
class
|
52
|
+
class AnnotateImageResponse
|
202
53
|
include Google::Apis::Core::Hashable
|
203
54
|
|
204
55
|
# If an image was produced from a file (e.g. a PDF), this message gives
|
205
56
|
# information about the source of that image.
|
206
57
|
# Corresponds to the JSON property `context`
|
207
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
58
|
+
# @return [Google::Apis::VisionV1p2beta1::ImageAnnotationContext]
|
208
59
|
attr_accessor :context
|
209
60
|
|
210
61
|
# Set of crop hints that are used to generate new crops when serving images.
|
211
62
|
# Corresponds to the JSON property `cropHintsAnnotation`
|
212
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
63
|
+
# @return [Google::Apis::VisionV1p2beta1::CropHintsAnnotation]
|
213
64
|
attr_accessor :crop_hints_annotation
|
214
65
|
|
215
66
|
# The `Status` type defines a logical error model that is suitable for different
|
@@ -257,7 +108,7 @@ module Google
|
|
257
108
|
|
258
109
|
# If present, face detection has completed successfully.
|
259
110
|
# Corresponds to the JSON property `faceAnnotations`
|
260
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
111
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::FaceAnnotation>]
|
261
112
|
attr_accessor :face_annotations
|
262
113
|
|
263
114
|
# TextAnnotation contains a structured representation of OCR extracted text.
|
@@ -268,44 +119,44 @@ module Google
|
|
268
119
|
# to the TextAnnotation.TextProperty message definition below for more
|
269
120
|
# detail.
|
270
121
|
# Corresponds to the JSON property `fullTextAnnotation`
|
271
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
122
|
+
# @return [Google::Apis::VisionV1p2beta1::TextAnnotation]
|
272
123
|
attr_accessor :full_text_annotation
|
273
124
|
|
274
125
|
# Stores image properties, such as dominant colors.
|
275
126
|
# Corresponds to the JSON property `imagePropertiesAnnotation`
|
276
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
127
|
+
# @return [Google::Apis::VisionV1p2beta1::ImageProperties]
|
277
128
|
attr_accessor :image_properties_annotation
|
278
129
|
|
279
130
|
# If present, label detection has completed successfully.
|
280
131
|
# Corresponds to the JSON property `labelAnnotations`
|
281
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
132
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::EntityAnnotation>]
|
282
133
|
attr_accessor :label_annotations
|
283
134
|
|
284
135
|
# If present, landmark detection has completed successfully.
|
285
136
|
# Corresponds to the JSON property `landmarkAnnotations`
|
286
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
137
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::EntityAnnotation>]
|
287
138
|
attr_accessor :landmark_annotations
|
288
139
|
|
289
140
|
# If present, logo detection has completed successfully.
|
290
141
|
# Corresponds to the JSON property `logoAnnotations`
|
291
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
142
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::EntityAnnotation>]
|
292
143
|
attr_accessor :logo_annotations
|
293
144
|
|
294
145
|
# Set of features pertaining to the image, computed by computer vision
|
295
146
|
# methods over safe-search verticals (for example, adult, spoof, medical,
|
296
147
|
# violence).
|
297
148
|
# Corresponds to the JSON property `safeSearchAnnotation`
|
298
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
149
|
+
# @return [Google::Apis::VisionV1p2beta1::SafeSearchAnnotation]
|
299
150
|
attr_accessor :safe_search_annotation
|
300
151
|
|
301
152
|
# If present, text (OCR) detection has completed successfully.
|
302
153
|
# Corresponds to the JSON property `textAnnotations`
|
303
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
154
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::EntityAnnotation>]
|
304
155
|
attr_accessor :text_annotations
|
305
156
|
|
306
157
|
# Relevant information for the image from the Internet.
|
307
158
|
# Corresponds to the JSON property `webDetection`
|
308
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
159
|
+
# @return [Google::Apis::VisionV1p2beta1::WebDetection]
|
309
160
|
attr_accessor :web_detection
|
310
161
|
|
311
162
|
def initialize(**args)
|
@@ -329,28 +180,13 @@ module Google
|
|
329
180
|
end
|
330
181
|
end
|
331
182
|
|
332
|
-
#
|
333
|
-
class
|
183
|
+
# The response for a single offline file annotation request.
|
184
|
+
class AsyncAnnotateFileResponse
|
334
185
|
include Google::Apis::Core::Hashable
|
335
186
|
|
336
|
-
# Required. Requested features.
|
337
|
-
# Corresponds to the JSON property `features`
|
338
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature>]
|
339
|
-
attr_accessor :features
|
340
|
-
|
341
|
-
# Image context and/or feature-specific parameters.
|
342
|
-
# Corresponds to the JSON property `imageContext`
|
343
|
-
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext]
|
344
|
-
attr_accessor :image_context
|
345
|
-
|
346
|
-
# The desired input location and metadata.
|
347
|
-
# Corresponds to the JSON property `inputConfig`
|
348
|
-
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1InputConfig]
|
349
|
-
attr_accessor :input_config
|
350
|
-
|
351
187
|
# The desired output location and metadata.
|
352
188
|
# Corresponds to the JSON property `outputConfig`
|
353
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
189
|
+
# @return [Google::Apis::VisionV1p2beta1::OutputConfig]
|
354
190
|
attr_accessor :output_config
|
355
191
|
|
356
192
|
def initialize(**args)
|
@@ -359,21 +195,19 @@ module Google
|
|
359
195
|
|
360
196
|
# Update properties of this object
|
361
197
|
def update!(**args)
|
362
|
-
@features = args[:features] if args.key?(:features)
|
363
|
-
@image_context = args[:image_context] if args.key?(:image_context)
|
364
|
-
@input_config = args[:input_config] if args.key?(:input_config)
|
365
198
|
@output_config = args[:output_config] if args.key?(:output_config)
|
366
199
|
end
|
367
200
|
end
|
368
201
|
|
369
|
-
#
|
370
|
-
class
|
202
|
+
# Response to an async batch file annotation request.
|
203
|
+
class AsyncBatchAnnotateFilesResponse
|
371
204
|
include Google::Apis::Core::Hashable
|
372
205
|
|
373
|
-
# The
|
374
|
-
#
|
375
|
-
#
|
376
|
-
|
206
|
+
# The list of file annotation responses, one for each request in
|
207
|
+
# AsyncBatchAnnotateFilesRequest.
|
208
|
+
# Corresponds to the JSON property `responses`
|
209
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::AsyncAnnotateFileResponse>]
|
210
|
+
attr_accessor :responses
|
377
211
|
|
378
212
|
def initialize(**args)
|
379
213
|
update!(**args)
|
@@ -381,19 +215,38 @@ module Google
|
|
381
215
|
|
382
216
|
# Update properties of this object
|
383
217
|
def update!(**args)
|
384
|
-
@
|
218
|
+
@responses = args[:responses] if args.key?(:responses)
|
385
219
|
end
|
386
220
|
end
|
387
221
|
|
388
|
-
#
|
389
|
-
|
390
|
-
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
|
222
|
+
# Logical element on the page.
|
223
|
+
class Block
|
391
224
|
include Google::Apis::Core::Hashable
|
392
225
|
|
393
|
-
#
|
394
|
-
# Corresponds to the JSON property `
|
395
|
-
# @return [
|
396
|
-
attr_accessor :
|
226
|
+
# Detected block type (text, image etc) for this block.
|
227
|
+
# Corresponds to the JSON property `blockType`
|
228
|
+
# @return [String]
|
229
|
+
attr_accessor :block_type
|
230
|
+
|
231
|
+
# A bounding polygon for the detected image annotation.
|
232
|
+
# Corresponds to the JSON property `boundingBox`
|
233
|
+
# @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
|
234
|
+
attr_accessor :bounding_box
|
235
|
+
|
236
|
+
# Confidence of the OCR results on the block. Range [0, 1].
|
237
|
+
# Corresponds to the JSON property `confidence`
|
238
|
+
# @return [Float]
|
239
|
+
attr_accessor :confidence
|
240
|
+
|
241
|
+
# List of paragraphs in this block (if this blocks is of type text).
|
242
|
+
# Corresponds to the JSON property `paragraphs`
|
243
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::Paragraph>]
|
244
|
+
attr_accessor :paragraphs
|
245
|
+
|
246
|
+
# Additional information detected on the structural component.
|
247
|
+
# Corresponds to the JSON property `property`
|
248
|
+
# @return [Google::Apis::VisionV1p2beta1::TextProperty]
|
249
|
+
attr_accessor :property
|
397
250
|
|
398
251
|
def initialize(**args)
|
399
252
|
update!(**args)
|
@@ -401,57 +254,27 @@ module Google
|
|
401
254
|
|
402
255
|
# Update properties of this object
|
403
256
|
def update!(**args)
|
404
|
-
@
|
257
|
+
@block_type = args[:block_type] if args.key?(:block_type)
|
258
|
+
@bounding_box = args[:bounding_box] if args.key?(:bounding_box)
|
259
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
260
|
+
@paragraphs = args[:paragraphs] if args.key?(:paragraphs)
|
261
|
+
@property = args[:property] if args.key?(:property)
|
405
262
|
end
|
406
263
|
end
|
407
264
|
|
408
|
-
#
|
409
|
-
class
|
265
|
+
# A bounding polygon for the detected image annotation.
|
266
|
+
class BoundingPoly
|
410
267
|
include Google::Apis::Core::Hashable
|
411
268
|
|
412
|
-
# The
|
413
|
-
#
|
414
|
-
#
|
415
|
-
|
416
|
-
attr_accessor :responses
|
417
|
-
|
418
|
-
def initialize(**args)
|
419
|
-
update!(**args)
|
420
|
-
end
|
421
|
-
|
422
|
-
# Update properties of this object
|
423
|
-
def update!(**args)
|
424
|
-
@responses = args[:responses] if args.key?(:responses)
|
425
|
-
end
|
426
|
-
end
|
427
|
-
|
428
|
-
# Multiple image annotation requests are batched into a single service call.
|
429
|
-
class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest
|
430
|
-
include Google::Apis::Core::Hashable
|
431
|
-
|
432
|
-
# Individual image annotation requests for this batch.
|
433
|
-
# Corresponds to the JSON property `requests`
|
434
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest>]
|
435
|
-
attr_accessor :requests
|
436
|
-
|
437
|
-
def initialize(**args)
|
438
|
-
update!(**args)
|
439
|
-
end
|
440
|
-
|
441
|
-
# Update properties of this object
|
442
|
-
def update!(**args)
|
443
|
-
@requests = args[:requests] if args.key?(:requests)
|
444
|
-
end
|
445
|
-
end
|
269
|
+
# The bounding polygon normalized vertices.
|
270
|
+
# Corresponds to the JSON property `normalizedVertices`
|
271
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::NormalizedVertex>]
|
272
|
+
attr_accessor :normalized_vertices
|
446
273
|
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
# Individual responses to image annotation requests within the batch.
|
452
|
-
# Corresponds to the JSON property `responses`
|
453
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageResponse>]
|
454
|
-
attr_accessor :responses
|
274
|
+
# The bounding polygon vertices.
|
275
|
+
# Corresponds to the JSON property `vertices`
|
276
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::Vertex>]
|
277
|
+
attr_accessor :vertices
|
455
278
|
|
456
279
|
def initialize(**args)
|
457
280
|
update!(**args)
|
@@ -459,61 +282,140 @@ module Google
|
|
459
282
|
|
460
283
|
# Update properties of this object
|
461
284
|
def update!(**args)
|
462
|
-
@
|
285
|
+
@normalized_vertices = args[:normalized_vertices] if args.key?(:normalized_vertices)
|
286
|
+
@vertices = args[:vertices] if args.key?(:vertices)
|
463
287
|
end
|
464
288
|
end
|
465
289
|
|
466
|
-
#
|
467
|
-
|
290
|
+
# Represents a color in the RGBA color space. This representation is designed
|
291
|
+
# for simplicity of conversion to/from color representations in various
|
292
|
+
# languages over compactness; for example, the fields of this representation
|
293
|
+
# can be trivially provided to the constructor of "java.awt.Color" in Java; it
|
294
|
+
# can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
295
|
+
# method in iOS; and, with just a little work, it can be easily formatted into
|
296
|
+
# a CSS "rgba()" string in JavaScript, as well. Here are some examples:
|
297
|
+
# Example (Java):
|
298
|
+
# import com.google.type.Color;
|
299
|
+
# // ...
|
300
|
+
# public static java.awt.Color fromProto(Color protocolor) `
|
301
|
+
# float alpha = protocolor.hasAlpha()
|
302
|
+
# ? protocolor.getAlpha().getValue()
|
303
|
+
# : 1.0;
|
304
|
+
# return new java.awt.Color(
|
305
|
+
# protocolor.getRed(),
|
306
|
+
# protocolor.getGreen(),
|
307
|
+
# protocolor.getBlue(),
|
308
|
+
# alpha);
|
309
|
+
# `
|
310
|
+
# public static Color toProto(java.awt.Color color) `
|
311
|
+
# float red = (float) color.getRed();
|
312
|
+
# float green = (float) color.getGreen();
|
313
|
+
# float blue = (float) color.getBlue();
|
314
|
+
# float denominator = 255.0;
|
315
|
+
# Color.Builder resultBuilder =
|
316
|
+
# Color
|
317
|
+
# .newBuilder()
|
318
|
+
# .setRed(red / denominator)
|
319
|
+
# .setGreen(green / denominator)
|
320
|
+
# .setBlue(blue / denominator);
|
321
|
+
# int alpha = color.getAlpha();
|
322
|
+
# if (alpha != 255) `
|
323
|
+
# result.setAlpha(
|
324
|
+
# FloatValue
|
325
|
+
# .newBuilder()
|
326
|
+
# .setValue(((float) alpha) / denominator)
|
327
|
+
# .build());
|
328
|
+
# `
|
329
|
+
# return resultBuilder.build();
|
330
|
+
# `
|
331
|
+
# // ...
|
332
|
+
# Example (iOS / Obj-C):
|
333
|
+
# // ...
|
334
|
+
# static UIColor* fromProto(Color* protocolor) `
|
335
|
+
# float red = [protocolor red];
|
336
|
+
# float green = [protocolor green];
|
337
|
+
# float blue = [protocolor blue];
|
338
|
+
# FloatValue* alpha_wrapper = [protocolor alpha];
|
339
|
+
# float alpha = 1.0;
|
340
|
+
# if (alpha_wrapper != nil) `
|
341
|
+
# alpha = [alpha_wrapper value];
|
342
|
+
# `
|
343
|
+
# return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
|
344
|
+
# `
|
345
|
+
# static Color* toProto(UIColor* color) `
|
346
|
+
# CGFloat red, green, blue, alpha;
|
347
|
+
# if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
|
348
|
+
# return nil;
|
349
|
+
# `
|
350
|
+
# Color* result = [Color alloc] init];
|
351
|
+
# [result setRed:red];
|
352
|
+
# [result setGreen:green];
|
353
|
+
# [result setBlue:blue];
|
354
|
+
# if (alpha <= 0.9999) `
|
355
|
+
# [result setAlpha:floatWrapperWithValue(alpha)];
|
356
|
+
# `
|
357
|
+
# [result autorelease];
|
358
|
+
# return result;
|
359
|
+
# `
|
360
|
+
# // ...
|
361
|
+
# Example (JavaScript):
|
362
|
+
# // ...
|
363
|
+
# var protoToCssColor = function(rgb_color) `
|
364
|
+
# var redFrac = rgb_color.red || 0.0;
|
365
|
+
# var greenFrac = rgb_color.green || 0.0;
|
366
|
+
# var blueFrac = rgb_color.blue || 0.0;
|
367
|
+
# var red = Math.floor(redFrac * 255);
|
368
|
+
# var green = Math.floor(greenFrac * 255);
|
369
|
+
# var blue = Math.floor(blueFrac * 255);
|
370
|
+
# if (!('alpha' in rgb_color)) `
|
371
|
+
# return rgbToCssColor_(red, green, blue);
|
372
|
+
# `
|
373
|
+
# var alphaFrac = rgb_color.alpha.value || 0.0;
|
374
|
+
# var rgbParams = [red, green, blue].join(',');
|
375
|
+
# return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
|
376
|
+
# `;
|
377
|
+
# var rgbToCssColor_ = function(red, green, blue) `
|
378
|
+
# var rgbNumber = new Number((red << 16) | (green << 8) | blue);
|
379
|
+
# var hexString = rgbNumber.toString(16);
|
380
|
+
# var missingZeros = 6 - hexString.length;
|
381
|
+
# var resultBuilder = ['#'];
|
382
|
+
# for (var i = 0; i < missingZeros; i++) `
|
383
|
+
# resultBuilder.push('0');
|
384
|
+
# `
|
385
|
+
# resultBuilder.push(hexString);
|
386
|
+
# return resultBuilder.join('');
|
387
|
+
# `;
|
388
|
+
# // ...
|
389
|
+
class Color
|
468
390
|
include Google::Apis::Core::Hashable
|
469
391
|
|
470
|
-
#
|
471
|
-
#
|
472
|
-
#
|
473
|
-
|
474
|
-
|
475
|
-
#
|
476
|
-
#
|
477
|
-
#
|
478
|
-
|
479
|
-
|
480
|
-
# Confidence of the OCR results on the block. Range [0, 1].
|
481
|
-
# Corresponds to the JSON property `confidence`
|
392
|
+
# The fraction of this color that should be applied to the pixel. That is,
|
393
|
+
# the final pixel color is defined by the equation:
|
394
|
+
# pixel color = alpha * (this color) + (1.0 - alpha) * (background color)
|
395
|
+
# This means that a value of 1.0 corresponds to a solid color, whereas
|
396
|
+
# a value of 0.0 corresponds to a completely transparent color. This
|
397
|
+
# uses a wrapper message rather than a simple float scalar so that it is
|
398
|
+
# possible to distinguish between a default value and the value being unset.
|
399
|
+
# If omitted, this color object is to be rendered as a solid color
|
400
|
+
# (as if the alpha value had been explicitly given with a value of 1.0).
|
401
|
+
# Corresponds to the JSON property `alpha`
|
482
402
|
# @return [Float]
|
483
|
-
attr_accessor :
|
484
|
-
|
485
|
-
# List of paragraphs in this block (if this blocks is of type text).
|
486
|
-
# Corresponds to the JSON property `paragraphs`
|
487
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Paragraph>]
|
488
|
-
attr_accessor :paragraphs
|
489
|
-
|
490
|
-
# Additional information detected on the structural component.
|
491
|
-
# Corresponds to the JSON property `property`
|
492
|
-
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
|
493
|
-
attr_accessor :property
|
494
|
-
|
495
|
-
def initialize(**args)
|
496
|
-
update!(**args)
|
497
|
-
end
|
403
|
+
attr_accessor :alpha
|
498
404
|
|
499
|
-
#
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
@confidence = args[:confidence] if args.key?(:confidence)
|
504
|
-
@paragraphs = args[:paragraphs] if args.key?(:paragraphs)
|
505
|
-
@property = args[:property] if args.key?(:property)
|
506
|
-
end
|
507
|
-
end
|
405
|
+
# The amount of blue in the color as a value in the interval [0, 1].
|
406
|
+
# Corresponds to the JSON property `blue`
|
407
|
+
# @return [Float]
|
408
|
+
attr_accessor :blue
|
508
409
|
|
509
|
-
|
510
|
-
|
511
|
-
|
410
|
+
# The amount of green in the color as a value in the interval [0, 1].
|
411
|
+
# Corresponds to the JSON property `green`
|
412
|
+
# @return [Float]
|
413
|
+
attr_accessor :green
|
512
414
|
|
513
|
-
# The
|
514
|
-
# Corresponds to the JSON property `
|
515
|
-
# @return [
|
516
|
-
attr_accessor :
|
415
|
+
# The amount of red in the color as a value in the interval [0, 1].
|
416
|
+
# Corresponds to the JSON property `red`
|
417
|
+
# @return [Float]
|
418
|
+
attr_accessor :red
|
517
419
|
|
518
420
|
def initialize(**args)
|
519
421
|
update!(**args)
|
@@ -521,13 +423,16 @@ module Google
|
|
521
423
|
|
522
424
|
# Update properties of this object
|
523
425
|
def update!(**args)
|
524
|
-
@
|
426
|
+
@alpha = args[:alpha] if args.key?(:alpha)
|
427
|
+
@blue = args[:blue] if args.key?(:blue)
|
428
|
+
@green = args[:green] if args.key?(:green)
|
429
|
+
@red = args[:red] if args.key?(:red)
|
525
430
|
end
|
526
431
|
end
|
527
432
|
|
528
433
|
# Color information consists of RGB channels, score, and the fraction of
|
529
434
|
# the image that the color occupies in the image.
|
530
|
-
class
|
435
|
+
class ColorInfo
|
531
436
|
include Google::Apis::Core::Hashable
|
532
437
|
|
533
438
|
# Represents a color in the RGBA color space. This representation is designed
|
@@ -657,12 +562,12 @@ module Google
|
|
657
562
|
end
|
658
563
|
|
659
564
|
# Single crop hint that is used to generate a new crop when serving an image.
|
660
|
-
class
|
565
|
+
class CropHint
|
661
566
|
include Google::Apis::Core::Hashable
|
662
567
|
|
663
568
|
# A bounding polygon for the detected image annotation.
|
664
569
|
# Corresponds to the JSON property `boundingPoly`
|
665
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
570
|
+
# @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
|
666
571
|
attr_accessor :bounding_poly
|
667
572
|
|
668
573
|
# Confidence of this being a salient region. Range [0, 1].
|
@@ -689,12 +594,12 @@ module Google
|
|
689
594
|
end
|
690
595
|
|
691
596
|
# Set of crop hints that are used to generate new crops when serving images.
|
692
|
-
class
|
597
|
+
class CropHintsAnnotation
|
693
598
|
include Google::Apis::Core::Hashable
|
694
599
|
|
695
600
|
# Crop hint results.
|
696
601
|
# Corresponds to the JSON property `cropHints`
|
697
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
602
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::CropHint>]
|
698
603
|
attr_accessor :crop_hints
|
699
604
|
|
700
605
|
def initialize(**args)
|
@@ -707,19 +612,20 @@ module Google
|
|
707
612
|
end
|
708
613
|
end
|
709
614
|
|
710
|
-
#
|
711
|
-
class
|
615
|
+
# Detected start or end of a structural component.
|
616
|
+
class DetectedBreak
|
712
617
|
include Google::Apis::Core::Hashable
|
713
618
|
|
714
|
-
#
|
715
|
-
#
|
716
|
-
#
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
#
|
721
|
-
#
|
722
|
-
|
619
|
+
# True if break prepends the element.
|
620
|
+
# Corresponds to the JSON property `isPrefix`
|
621
|
+
# @return [Boolean]
|
622
|
+
attr_accessor :is_prefix
|
623
|
+
alias_method :is_prefix?, :is_prefix
|
624
|
+
|
625
|
+
# Detected break type.
|
626
|
+
# Corresponds to the JSON property `type`
|
627
|
+
# @return [String]
|
628
|
+
attr_accessor :type
|
723
629
|
|
724
630
|
def initialize(**args)
|
725
631
|
update!(**args)
|
@@ -727,19 +633,47 @@ module Google
|
|
727
633
|
|
728
634
|
# Update properties of this object
|
729
635
|
def update!(**args)
|
730
|
-
@
|
636
|
+
@is_prefix = args[:is_prefix] if args.key?(:is_prefix)
|
637
|
+
@type = args[:type] if args.key?(:type)
|
731
638
|
end
|
732
639
|
end
|
733
640
|
|
734
|
-
#
|
735
|
-
class
|
641
|
+
# Detected language for a structural component.
|
642
|
+
class DetectedLanguage
|
736
643
|
include Google::Apis::Core::Hashable
|
737
644
|
|
738
|
-
#
|
739
|
-
# Corresponds to the JSON property `
|
740
|
-
# @return [
|
741
|
-
attr_accessor :
|
742
|
-
|
645
|
+
# Confidence of detected language. Range [0, 1].
|
646
|
+
# Corresponds to the JSON property `confidence`
|
647
|
+
# @return [Float]
|
648
|
+
attr_accessor :confidence
|
649
|
+
|
650
|
+
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
651
|
+
# information, see
|
652
|
+
# http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
653
|
+
# Corresponds to the JSON property `languageCode`
|
654
|
+
# @return [String]
|
655
|
+
attr_accessor :language_code
|
656
|
+
|
657
|
+
def initialize(**args)
|
658
|
+
update!(**args)
|
659
|
+
end
|
660
|
+
|
661
|
+
# Update properties of this object
|
662
|
+
def update!(**args)
|
663
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
664
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
665
|
+
end
|
666
|
+
end
|
667
|
+
|
668
|
+
# Set of dominant colors and their corresponding scores.
|
669
|
+
class DominantColorsAnnotation
|
670
|
+
include Google::Apis::Core::Hashable
|
671
|
+
|
672
|
+
# RGB color values with their score and pixel fraction.
|
673
|
+
# Corresponds to the JSON property `colors`
|
674
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::ColorInfo>]
|
675
|
+
attr_accessor :colors
|
676
|
+
|
743
677
|
def initialize(**args)
|
744
678
|
update!(**args)
|
745
679
|
end
|
@@ -751,12 +685,12 @@ module Google
|
|
751
685
|
end
|
752
686
|
|
753
687
|
# Set of detected entity features.
|
754
|
-
class
|
688
|
+
class EntityAnnotation
|
755
689
|
include Google::Apis::Core::Hashable
|
756
690
|
|
757
691
|
# A bounding polygon for the detected image annotation.
|
758
692
|
# Corresponds to the JSON property `boundingPoly`
|
759
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
693
|
+
# @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
|
760
694
|
attr_accessor :bounding_poly
|
761
695
|
|
762
696
|
# **Deprecated. Use `score` instead.**
|
@@ -785,7 +719,7 @@ module Google
|
|
785
719
|
# may indicate the location of the place where the image was taken.
|
786
720
|
# Location information is usually present for landmarks.
|
787
721
|
# Corresponds to the JSON property `locations`
|
788
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
722
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::LocationInfo>]
|
789
723
|
attr_accessor :locations
|
790
724
|
|
791
725
|
# Opaque entity ID. Some IDs may be available in
|
@@ -798,7 +732,7 @@ module Google
|
|
798
732
|
# Some entities may have optional user-supplied `Property` (name/value)
|
799
733
|
# fields, such a score or string that qualifies the entity.
|
800
734
|
# Corresponds to the JSON property `properties`
|
801
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
735
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::Property>]
|
802
736
|
attr_accessor :properties
|
803
737
|
|
804
738
|
# Overall score of the result. Range [0, 1].
|
@@ -834,7 +768,7 @@ module Google
|
|
834
768
|
end
|
835
769
|
|
836
770
|
# A face annotation object contains the results of face detection.
|
837
|
-
class
|
771
|
+
class FaceAnnotation
|
838
772
|
include Google::Apis::Core::Hashable
|
839
773
|
|
840
774
|
# Anger likelihood.
|
@@ -849,7 +783,7 @@ module Google
|
|
849
783
|
|
850
784
|
# A bounding polygon for the detected image annotation.
|
851
785
|
# Corresponds to the JSON property `boundingPoly`
|
852
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
786
|
+
# @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
|
853
787
|
attr_accessor :bounding_poly
|
854
788
|
|
855
789
|
# Detection confidence. Range [0, 1].
|
@@ -859,7 +793,7 @@ module Google
|
|
859
793
|
|
860
794
|
# A bounding polygon for the detected image annotation.
|
861
795
|
# Corresponds to the JSON property `fdBoundingPoly`
|
862
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
796
|
+
# @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
|
863
797
|
attr_accessor :fd_bounding_poly
|
864
798
|
|
865
799
|
# Headwear likelihood.
|
@@ -879,7 +813,7 @@ module Google
|
|
879
813
|
|
880
814
|
# Detected face landmarks.
|
881
815
|
# Corresponds to the JSON property `landmarks`
|
882
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
816
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::Landmark>]
|
883
817
|
attr_accessor :landmarks
|
884
818
|
|
885
819
|
# Yaw angle, which indicates the leftward/rightward angle that the face is
|
@@ -941,71 +875,8 @@ module Google
|
|
941
875
|
end
|
942
876
|
end
|
943
877
|
|
944
|
-
# A face-specific landmark (for example, a face feature).
|
945
|
-
class GoogleCloudVisionV1p2beta1FaceAnnotationLandmark
|
946
|
-
include Google::Apis::Core::Hashable
|
947
|
-
|
948
|
-
# A 3D position in the image, used primarily for Face detection landmarks.
|
949
|
-
# A valid Position must have both x and y coordinates.
|
950
|
-
# The position coordinates are in the same scale as the original image.
|
951
|
-
# Corresponds to the JSON property `position`
|
952
|
-
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Position]
|
953
|
-
attr_accessor :position
|
954
|
-
|
955
|
-
# Face landmark type.
|
956
|
-
# Corresponds to the JSON property `type`
|
957
|
-
# @return [String]
|
958
|
-
attr_accessor :type
|
959
|
-
|
960
|
-
def initialize(**args)
|
961
|
-
update!(**args)
|
962
|
-
end
|
963
|
-
|
964
|
-
# Update properties of this object
|
965
|
-
def update!(**args)
|
966
|
-
@position = args[:position] if args.key?(:position)
|
967
|
-
@type = args[:type] if args.key?(:type)
|
968
|
-
end
|
969
|
-
end
|
970
|
-
|
971
|
-
# The type of Google Cloud Vision API detection to perform, and the maximum
|
972
|
-
# number of results to return for that type. Multiple `Feature` objects can
|
973
|
-
# be specified in the `features` list.
|
974
|
-
class GoogleCloudVisionV1p2beta1Feature
|
975
|
-
include Google::Apis::Core::Hashable
|
976
|
-
|
977
|
-
# Maximum number of results of this type. Does not apply to
|
978
|
-
# `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
|
979
|
-
# Corresponds to the JSON property `maxResults`
|
980
|
-
# @return [Fixnum]
|
981
|
-
attr_accessor :max_results
|
982
|
-
|
983
|
-
# Model to use for the feature.
|
984
|
-
# Supported values: "builtin/stable" (the default if unset) and
|
985
|
-
# "builtin/latest".
|
986
|
-
# Corresponds to the JSON property `model`
|
987
|
-
# @return [String]
|
988
|
-
attr_accessor :model
|
989
|
-
|
990
|
-
# The feature type.
|
991
|
-
# Corresponds to the JSON property `type`
|
992
|
-
# @return [String]
|
993
|
-
attr_accessor :type
|
994
|
-
|
995
|
-
def initialize(**args)
|
996
|
-
update!(**args)
|
997
|
-
end
|
998
|
-
|
999
|
-
# Update properties of this object
|
1000
|
-
def update!(**args)
|
1001
|
-
@max_results = args[:max_results] if args.key?(:max_results)
|
1002
|
-
@model = args[:model] if args.key?(:model)
|
1003
|
-
@type = args[:type] if args.key?(:type)
|
1004
|
-
end
|
1005
|
-
end
|
1006
|
-
|
1007
878
|
# The Google Cloud Storage location where the output will be written to.
|
1008
|
-
class
|
879
|
+
class GcsDestination
|
1009
880
|
include Google::Apis::Core::Hashable
|
1010
881
|
|
1011
882
|
# Google Cloud Storage URI where the results will be stored. Results will
|
@@ -1035,11 +906,11 @@ module Google
|
|
1035
906
|
end
|
1036
907
|
|
1037
908
|
# The Google Cloud Storage location where the input will be read from.
|
1038
|
-
class
|
909
|
+
class GcsSource
|
1039
910
|
include Google::Apis::Core::Hashable
|
1040
911
|
|
1041
|
-
# Google Cloud Storage URI for the input file. This must only be a
|
1042
|
-
# object. Wildcards are not currently supported.
|
912
|
+
# Google Cloud Storage URI for the input file. This must only be a
|
913
|
+
# Google Cloud Storage object. Wildcards are not currently supported.
|
1043
914
|
# Corresponds to the JSON property `uri`
|
1044
915
|
# @return [String]
|
1045
916
|
attr_accessor :uri
|
@@ -1054,22 +925,20 @@ module Google
|
|
1054
925
|
end
|
1055
926
|
end
|
1056
927
|
|
1057
|
-
#
|
1058
|
-
|
928
|
+
# Response to a single file annotation request. A file may contain one or more
|
929
|
+
# images, which individually have their own responses.
|
930
|
+
class GoogleCloudVisionV1p2beta1AnnotateFileResponse
|
1059
931
|
include Google::Apis::Core::Hashable
|
1060
932
|
|
1061
|
-
#
|
1062
|
-
#
|
1063
|
-
#
|
1064
|
-
|
1065
|
-
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1066
|
-
# @return [String]
|
1067
|
-
attr_accessor :content
|
933
|
+
# The desired input location and metadata.
|
934
|
+
# Corresponds to the JSON property `inputConfig`
|
935
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1InputConfig]
|
936
|
+
attr_accessor :input_config
|
1068
937
|
|
1069
|
-
#
|
1070
|
-
# Corresponds to the JSON property `
|
1071
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
1072
|
-
attr_accessor :
|
938
|
+
# Individual responses to images found within the file.
|
939
|
+
# Corresponds to the JSON property `responses`
|
940
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageResponse>]
|
941
|
+
attr_accessor :responses
|
1073
942
|
|
1074
943
|
def initialize(**args)
|
1075
944
|
update!(**args)
|
@@ -1077,26 +946,30 @@ module Google
|
|
1077
946
|
|
1078
947
|
# Update properties of this object
|
1079
948
|
def update!(**args)
|
1080
|
-
@
|
1081
|
-
@
|
949
|
+
@input_config = args[:input_config] if args.key?(:input_config)
|
950
|
+
@responses = args[:responses] if args.key?(:responses)
|
1082
951
|
end
|
1083
952
|
end
|
1084
953
|
|
1085
|
-
#
|
1086
|
-
#
|
1087
|
-
class
|
954
|
+
# Request for performing Google Cloud Vision API tasks over a user-provided
|
955
|
+
# image, with user-requested features.
|
956
|
+
class GoogleCloudVisionV1p2beta1AnnotateImageRequest
|
1088
957
|
include Google::Apis::Core::Hashable
|
1089
958
|
|
1090
|
-
#
|
1091
|
-
#
|
1092
|
-
#
|
1093
|
-
|
1094
|
-
attr_accessor :page_number
|
959
|
+
# Requested features.
|
960
|
+
# Corresponds to the JSON property `features`
|
961
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature>]
|
962
|
+
attr_accessor :features
|
1095
963
|
|
1096
|
-
#
|
1097
|
-
# Corresponds to the JSON property `
|
1098
|
-
# @return [
|
1099
|
-
attr_accessor :
|
964
|
+
# Client image to perform Google Cloud Vision API tasks over.
|
965
|
+
# Corresponds to the JSON property `image`
|
966
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Image]
|
967
|
+
attr_accessor :image
|
968
|
+
|
969
|
+
# Image context and/or feature-specific parameters.
|
970
|
+
# Corresponds to the JSON property `imageContext`
|
971
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext]
|
972
|
+
attr_accessor :image_context
|
1100
973
|
|
1101
974
|
def initialize(**args)
|
1102
975
|
update!(**args)
|
@@ -1104,63 +977,1866 @@ module Google
|
|
1104
977
|
|
1105
978
|
# Update properties of this object
|
1106
979
|
def update!(**args)
|
1107
|
-
@
|
1108
|
-
@
|
980
|
+
@features = args[:features] if args.key?(:features)
|
981
|
+
@image = args[:image] if args.key?(:image)
|
982
|
+
@image_context = args[:image_context] if args.key?(:image_context)
|
1109
983
|
end
|
1110
984
|
end
|
1111
985
|
|
1112
|
-
#
|
1113
|
-
class
|
986
|
+
# Response to an image annotation request.
|
987
|
+
class GoogleCloudVisionV1p2beta1AnnotateImageResponse
|
1114
988
|
include Google::Apis::Core::Hashable
|
1115
989
|
|
1116
|
-
#
|
1117
|
-
#
|
1118
|
-
#
|
1119
|
-
|
990
|
+
# If an image was produced from a file (e.g. a PDF), this message gives
|
991
|
+
# information about the source of that image.
|
992
|
+
# Corresponds to the JSON property `context`
|
993
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageAnnotationContext]
|
994
|
+
attr_accessor :context
|
1120
995
|
|
1121
|
-
#
|
1122
|
-
#
|
1123
|
-
#
|
1124
|
-
|
1125
|
-
# setting a hint will help get better results (although it will be a
|
1126
|
-
# significant hindrance if the hint is wrong). Text detection returns an
|
1127
|
-
# error if one or more of the specified languages is not one of the
|
1128
|
-
# [supported languages](/vision/docs/languages).
|
1129
|
-
# Corresponds to the JSON property `languageHints`
|
1130
|
-
# @return [Array<String>]
|
1131
|
-
attr_accessor :language_hints
|
996
|
+
# Set of crop hints that are used to generate new crops when serving images.
|
997
|
+
# Corresponds to the JSON property `cropHintsAnnotation`
|
998
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHintsAnnotation]
|
999
|
+
attr_accessor :crop_hints_annotation
|
1132
1000
|
|
1133
|
-
#
|
1134
|
-
#
|
1135
|
-
#
|
1136
|
-
|
1001
|
+
# The `Status` type defines a logical error model that is suitable for different
|
1002
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
1003
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
1004
|
+
# - Simple to use and understand for most users
|
1005
|
+
# - Flexible enough to meet unexpected needs
|
1006
|
+
# # Overview
|
1007
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
1008
|
+
# and error details. The error code should be an enum value of
|
1009
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
1010
|
+
# error message should be a developer-facing English message that helps
|
1011
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
1012
|
+
# error message is needed, put the localized message in the error details or
|
1013
|
+
# localize it in the client. The optional error details may contain arbitrary
|
1014
|
+
# information about the error. There is a predefined set of error detail types
|
1015
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
1016
|
+
# # Language mapping
|
1017
|
+
# The `Status` message is the logical representation of the error model, but it
|
1018
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
1019
|
+
# exposed in different client libraries and different wire protocols, it can be
|
1020
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
1021
|
+
# in Java, but more likely mapped to some error codes in C.
|
1022
|
+
# # Other uses
|
1023
|
+
# The error model and the `Status` message can be used in a variety of
|
1024
|
+
# environments, either with or without APIs, to provide a
|
1025
|
+
# consistent developer experience across different environments.
|
1026
|
+
# Example uses of this error model include:
|
1027
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
1028
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
1029
|
+
# errors.
|
1030
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
1031
|
+
# have a `Status` message for error reporting.
|
1032
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
1033
|
+
# `Status` message should be used directly inside batch response, one for
|
1034
|
+
# each error sub-response.
|
1035
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
1036
|
+
# results in its response, the status of those operations should be
|
1037
|
+
# represented directly using the `Status` message.
|
1038
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
1039
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
1040
|
+
# Corresponds to the JSON property `error`
|
1041
|
+
# @return [Google::Apis::VisionV1p2beta1::Status]
|
1042
|
+
attr_accessor :error
|
1137
1043
|
|
1138
|
-
#
|
1139
|
-
# Corresponds to the JSON property `
|
1140
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
1141
|
-
attr_accessor :
|
1044
|
+
# If present, face detection has completed successfully.
|
1045
|
+
# Corresponds to the JSON property `faceAnnotations`
|
1046
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1FaceAnnotation>]
|
1047
|
+
attr_accessor :face_annotations
|
1142
1048
|
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1049
|
+
# TextAnnotation contains a structured representation of OCR extracted text.
|
1050
|
+
# The hierarchy of an OCR extracted text structure is like this:
|
1051
|
+
# TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
|
1052
|
+
# Each structural component, starting from Page, may further have their own
|
1053
|
+
# properties. Properties describe detected languages, breaks etc.. Please refer
|
1054
|
+
# to the TextAnnotation.TextProperty message definition below for more
|
1055
|
+
# detail.
|
1056
|
+
# Corresponds to the JSON property `fullTextAnnotation`
|
1057
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotation]
|
1058
|
+
attr_accessor :full_text_annotation
|
1146
1059
|
|
1147
|
-
#
|
1060
|
+
# Stores image properties, such as dominant colors.
|
1061
|
+
# Corresponds to the JSON property `imagePropertiesAnnotation`
|
1062
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageProperties]
|
1063
|
+
attr_accessor :image_properties_annotation
|
1064
|
+
|
1065
|
+
# If present, label detection has completed successfully.
|
1066
|
+
# Corresponds to the JSON property `labelAnnotations`
|
1067
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
|
1068
|
+
attr_accessor :label_annotations
|
1069
|
+
|
1070
|
+
# If present, landmark detection has completed successfully.
|
1071
|
+
# Corresponds to the JSON property `landmarkAnnotations`
|
1072
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
|
1073
|
+
attr_accessor :landmark_annotations
|
1074
|
+
|
1075
|
+
# If present, logo detection has completed successfully.
|
1076
|
+
# Corresponds to the JSON property `logoAnnotations`
|
1077
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
|
1078
|
+
attr_accessor :logo_annotations
|
1079
|
+
|
1080
|
+
# Set of features pertaining to the image, computed by computer vision
|
1081
|
+
# methods over safe-search verticals (for example, adult, spoof, medical,
|
1082
|
+
# violence).
|
1083
|
+
# Corresponds to the JSON property `safeSearchAnnotation`
|
1084
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1SafeSearchAnnotation]
|
1085
|
+
attr_accessor :safe_search_annotation
|
1086
|
+
|
1087
|
+
# If present, text (OCR) detection has completed successfully.
|
1088
|
+
# Corresponds to the JSON property `textAnnotations`
|
1089
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1EntityAnnotation>]
|
1090
|
+
attr_accessor :text_annotations
|
1091
|
+
|
1092
|
+
# Relevant information for the image from the Internet.
|
1093
|
+
# Corresponds to the JSON property `webDetection`
|
1094
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetection]
|
1095
|
+
attr_accessor :web_detection
|
1096
|
+
|
1097
|
+
def initialize(**args)
|
1098
|
+
update!(**args)
|
1099
|
+
end
|
1100
|
+
|
1101
|
+
# Update properties of this object
|
1102
|
+
def update!(**args)
|
1103
|
+
@context = args[:context] if args.key?(:context)
|
1104
|
+
@crop_hints_annotation = args[:crop_hints_annotation] if args.key?(:crop_hints_annotation)
|
1105
|
+
@error = args[:error] if args.key?(:error)
|
1106
|
+
@face_annotations = args[:face_annotations] if args.key?(:face_annotations)
|
1107
|
+
@full_text_annotation = args[:full_text_annotation] if args.key?(:full_text_annotation)
|
1108
|
+
@image_properties_annotation = args[:image_properties_annotation] if args.key?(:image_properties_annotation)
|
1109
|
+
@label_annotations = args[:label_annotations] if args.key?(:label_annotations)
|
1110
|
+
@landmark_annotations = args[:landmark_annotations] if args.key?(:landmark_annotations)
|
1111
|
+
@logo_annotations = args[:logo_annotations] if args.key?(:logo_annotations)
|
1112
|
+
@safe_search_annotation = args[:safe_search_annotation] if args.key?(:safe_search_annotation)
|
1113
|
+
@text_annotations = args[:text_annotations] if args.key?(:text_annotations)
|
1114
|
+
@web_detection = args[:web_detection] if args.key?(:web_detection)
|
1115
|
+
end
|
1116
|
+
end
|
1117
|
+
|
1118
|
+
# An offline file annotation request.
|
1119
|
+
class GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest
|
1120
|
+
include Google::Apis::Core::Hashable
|
1121
|
+
|
1122
|
+
# Required. Requested features.
|
1123
|
+
# Corresponds to the JSON property `features`
|
1124
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Feature>]
|
1125
|
+
attr_accessor :features
|
1126
|
+
|
1127
|
+
# Image context and/or feature-specific parameters.
|
1128
|
+
# Corresponds to the JSON property `imageContext`
|
1129
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageContext]
|
1130
|
+
attr_accessor :image_context
|
1131
|
+
|
1132
|
+
# The desired input location and metadata.
|
1133
|
+
# Corresponds to the JSON property `inputConfig`
|
1134
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1InputConfig]
|
1135
|
+
attr_accessor :input_config
|
1136
|
+
|
1137
|
+
# The desired output location and metadata.
|
1138
|
+
# Corresponds to the JSON property `outputConfig`
|
1139
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig]
|
1140
|
+
attr_accessor :output_config
|
1141
|
+
|
1142
|
+
def initialize(**args)
|
1143
|
+
update!(**args)
|
1144
|
+
end
|
1145
|
+
|
1146
|
+
# Update properties of this object
|
1147
|
+
def update!(**args)
|
1148
|
+
@features = args[:features] if args.key?(:features)
|
1149
|
+
@image_context = args[:image_context] if args.key?(:image_context)
|
1150
|
+
@input_config = args[:input_config] if args.key?(:input_config)
|
1151
|
+
@output_config = args[:output_config] if args.key?(:output_config)
|
1152
|
+
end
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
# The response for a single offline file annotation request.
|
1156
|
+
class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse
|
1157
|
+
include Google::Apis::Core::Hashable
|
1158
|
+
|
1159
|
+
# The desired output location and metadata.
|
1160
|
+
# Corresponds to the JSON property `outputConfig`
|
1161
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1OutputConfig]
|
1162
|
+
attr_accessor :output_config
|
1163
|
+
|
1164
|
+
def initialize(**args)
|
1165
|
+
update!(**args)
|
1166
|
+
end
|
1167
|
+
|
1168
|
+
# Update properties of this object
|
1169
|
+
def update!(**args)
|
1170
|
+
@output_config = args[:output_config] if args.key?(:output_config)
|
1171
|
+
end
|
1172
|
+
end
|
1173
|
+
|
1174
|
+
# Multiple async file annotation requests are batched into a single service
|
1175
|
+
# call.
|
1176
|
+
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest
|
1177
|
+
include Google::Apis::Core::Hashable
|
1178
|
+
|
1179
|
+
# Individual async file annotation requests for this batch.
|
1180
|
+
# Corresponds to the JSON property `requests`
|
1181
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest>]
|
1182
|
+
attr_accessor :requests
|
1183
|
+
|
1184
|
+
def initialize(**args)
|
1185
|
+
update!(**args)
|
1186
|
+
end
|
1187
|
+
|
1188
|
+
# Update properties of this object
|
1189
|
+
def update!(**args)
|
1190
|
+
@requests = args[:requests] if args.key?(:requests)
|
1191
|
+
end
|
1192
|
+
end
|
1193
|
+
|
1194
|
+
# Response to an async batch file annotation request.
|
1195
|
+
class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse
|
1196
|
+
include Google::Apis::Core::Hashable
|
1197
|
+
|
1198
|
+
# The list of file annotation responses, one for each request in
|
1199
|
+
# AsyncBatchAnnotateFilesRequest.
|
1200
|
+
# Corresponds to the JSON property `responses`
|
1201
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse>]
|
1202
|
+
attr_accessor :responses
|
1203
|
+
|
1204
|
+
def initialize(**args)
|
1205
|
+
update!(**args)
|
1206
|
+
end
|
1207
|
+
|
1208
|
+
# Update properties of this object
|
1209
|
+
def update!(**args)
|
1210
|
+
@responses = args[:responses] if args.key?(:responses)
|
1211
|
+
end
|
1212
|
+
end
|
1213
|
+
|
1214
|
+
# Multiple image annotation requests are batched into a single service call.
|
1215
|
+
class GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest
|
1216
|
+
include Google::Apis::Core::Hashable
|
1217
|
+
|
1218
|
+
# Individual image annotation requests for this batch.
|
1219
|
+
# Corresponds to the JSON property `requests`
|
1220
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageRequest>]
|
1221
|
+
attr_accessor :requests
|
1222
|
+
|
1223
|
+
def initialize(**args)
|
1224
|
+
update!(**args)
|
1225
|
+
end
|
1226
|
+
|
1227
|
+
# Update properties of this object
|
1228
|
+
def update!(**args)
|
1229
|
+
@requests = args[:requests] if args.key?(:requests)
|
1230
|
+
end
|
1231
|
+
end
|
1232
|
+
|
1233
|
+
# Response to a batch image annotation request.
|
1234
|
+
class GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse
|
1235
|
+
include Google::Apis::Core::Hashable
|
1236
|
+
|
1237
|
+
# Individual responses to image annotation requests within the batch.
|
1238
|
+
# Corresponds to the JSON property `responses`
|
1239
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1AnnotateImageResponse>]
|
1240
|
+
attr_accessor :responses
|
1241
|
+
|
1242
|
+
def initialize(**args)
|
1243
|
+
update!(**args)
|
1244
|
+
end
|
1245
|
+
|
1246
|
+
# Update properties of this object
|
1247
|
+
def update!(**args)
|
1248
|
+
@responses = args[:responses] if args.key?(:responses)
|
1249
|
+
end
|
1250
|
+
end
|
1251
|
+
|
1252
|
+
# Logical element on the page.
|
1253
|
+
class GoogleCloudVisionV1p2beta1Block
|
1254
|
+
include Google::Apis::Core::Hashable
|
1255
|
+
|
1256
|
+
# Detected block type (text, image etc) for this block.
|
1257
|
+
# Corresponds to the JSON property `blockType`
|
1258
|
+
# @return [String]
|
1259
|
+
attr_accessor :block_type
|
1260
|
+
|
1261
|
+
# A bounding polygon for the detected image annotation.
|
1262
|
+
# Corresponds to the JSON property `boundingBox`
|
1263
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
|
1264
|
+
attr_accessor :bounding_box
|
1265
|
+
|
1266
|
+
# Confidence of the OCR results on the block. Range [0, 1].
|
1267
|
+
# Corresponds to the JSON property `confidence`
|
1268
|
+
# @return [Float]
|
1269
|
+
attr_accessor :confidence
|
1270
|
+
|
1271
|
+
# List of paragraphs in this block (if this blocks is of type text).
|
1272
|
+
# Corresponds to the JSON property `paragraphs`
|
1273
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Paragraph>]
|
1274
|
+
attr_accessor :paragraphs
|
1275
|
+
|
1276
|
+
# Additional information detected on the structural component.
|
1277
|
+
# Corresponds to the JSON property `property`
|
1278
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
|
1279
|
+
attr_accessor :property
|
1280
|
+
|
1281
|
+
def initialize(**args)
|
1282
|
+
update!(**args)
|
1283
|
+
end
|
1284
|
+
|
1285
|
+
# Update properties of this object
|
1286
|
+
def update!(**args)
|
1287
|
+
@block_type = args[:block_type] if args.key?(:block_type)
|
1288
|
+
@bounding_box = args[:bounding_box] if args.key?(:bounding_box)
|
1289
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
1290
|
+
@paragraphs = args[:paragraphs] if args.key?(:paragraphs)
|
1291
|
+
@property = args[:property] if args.key?(:property)
|
1292
|
+
end
|
1293
|
+
end
|
1294
|
+
|
1295
|
+
# A bounding polygon for the detected image annotation.
|
1296
|
+
class GoogleCloudVisionV1p2beta1BoundingPoly
|
1297
|
+
include Google::Apis::Core::Hashable
|
1298
|
+
|
1299
|
+
# The bounding polygon normalized vertices.
|
1300
|
+
# Corresponds to the JSON property `normalizedVertices`
|
1301
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1NormalizedVertex>]
|
1302
|
+
attr_accessor :normalized_vertices
|
1303
|
+
|
1304
|
+
# The bounding polygon vertices.
|
1305
|
+
# Corresponds to the JSON property `vertices`
|
1306
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Vertex>]
|
1307
|
+
attr_accessor :vertices
|
1308
|
+
|
1309
|
+
def initialize(**args)
|
1310
|
+
update!(**args)
|
1311
|
+
end
|
1312
|
+
|
1313
|
+
# Update properties of this object
|
1314
|
+
def update!(**args)
|
1315
|
+
@normalized_vertices = args[:normalized_vertices] if args.key?(:normalized_vertices)
|
1316
|
+
@vertices = args[:vertices] if args.key?(:vertices)
|
1317
|
+
end
|
1318
|
+
end
|
1319
|
+
|
1320
|
+
# Color information consists of RGB channels, score, and the fraction of
|
1321
|
+
# the image that the color occupies in the image.
|
1322
|
+
class GoogleCloudVisionV1p2beta1ColorInfo
|
1323
|
+
include Google::Apis::Core::Hashable
|
1324
|
+
|
1325
|
+
# Represents a color in the RGBA color space. This representation is designed
|
1326
|
+
# for simplicity of conversion to/from color representations in various
|
1327
|
+
# languages over compactness; for example, the fields of this representation
|
1328
|
+
# can be trivially provided to the constructor of "java.awt.Color" in Java; it
|
1329
|
+
# can also be trivially provided to UIColor's "+colorWithRed:green:blue:alpha"
|
1330
|
+
# method in iOS; and, with just a little work, it can be easily formatted into
|
1331
|
+
# a CSS "rgba()" string in JavaScript, as well. Here are some examples:
|
1332
|
+
# Example (Java):
|
1333
|
+
# import com.google.type.Color;
|
1334
|
+
# // ...
|
1335
|
+
# public static java.awt.Color fromProto(Color protocolor) `
|
1336
|
+
# float alpha = protocolor.hasAlpha()
|
1337
|
+
# ? protocolor.getAlpha().getValue()
|
1338
|
+
# : 1.0;
|
1339
|
+
# return new java.awt.Color(
|
1340
|
+
# protocolor.getRed(),
|
1341
|
+
# protocolor.getGreen(),
|
1342
|
+
# protocolor.getBlue(),
|
1343
|
+
# alpha);
|
1344
|
+
# `
|
1345
|
+
# public static Color toProto(java.awt.Color color) `
|
1346
|
+
# float red = (float) color.getRed();
|
1347
|
+
# float green = (float) color.getGreen();
|
1348
|
+
# float blue = (float) color.getBlue();
|
1349
|
+
# float denominator = 255.0;
|
1350
|
+
# Color.Builder resultBuilder =
|
1351
|
+
# Color
|
1352
|
+
# .newBuilder()
|
1353
|
+
# .setRed(red / denominator)
|
1354
|
+
# .setGreen(green / denominator)
|
1355
|
+
# .setBlue(blue / denominator);
|
1356
|
+
# int alpha = color.getAlpha();
|
1357
|
+
# if (alpha != 255) `
|
1358
|
+
# result.setAlpha(
|
1359
|
+
# FloatValue
|
1360
|
+
# .newBuilder()
|
1361
|
+
# .setValue(((float) alpha) / denominator)
|
1362
|
+
# .build());
|
1363
|
+
# `
|
1364
|
+
# return resultBuilder.build();
|
1365
|
+
# `
|
1366
|
+
# // ...
|
1367
|
+
# Example (iOS / Obj-C):
|
1368
|
+
# // ...
|
1369
|
+
# static UIColor* fromProto(Color* protocolor) `
|
1370
|
+
# float red = [protocolor red];
|
1371
|
+
# float green = [protocolor green];
|
1372
|
+
# float blue = [protocolor blue];
|
1373
|
+
# FloatValue* alpha_wrapper = [protocolor alpha];
|
1374
|
+
# float alpha = 1.0;
|
1375
|
+
# if (alpha_wrapper != nil) `
|
1376
|
+
# alpha = [alpha_wrapper value];
|
1377
|
+
# `
|
1378
|
+
# return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];
|
1379
|
+
# `
|
1380
|
+
# static Color* toProto(UIColor* color) `
|
1381
|
+
# CGFloat red, green, blue, alpha;
|
1382
|
+
# if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) `
|
1383
|
+
# return nil;
|
1384
|
+
# `
|
1385
|
+
# Color* result = [Color alloc] init];
|
1386
|
+
# [result setRed:red];
|
1387
|
+
# [result setGreen:green];
|
1388
|
+
# [result setBlue:blue];
|
1389
|
+
# if (alpha <= 0.9999) `
|
1390
|
+
# [result setAlpha:floatWrapperWithValue(alpha)];
|
1391
|
+
# `
|
1392
|
+
# [result autorelease];
|
1393
|
+
# return result;
|
1394
|
+
# `
|
1395
|
+
# // ...
|
1396
|
+
# Example (JavaScript):
|
1397
|
+
# // ...
|
1398
|
+
# var protoToCssColor = function(rgb_color) `
|
1399
|
+
# var redFrac = rgb_color.red || 0.0;
|
1400
|
+
# var greenFrac = rgb_color.green || 0.0;
|
1401
|
+
# var blueFrac = rgb_color.blue || 0.0;
|
1402
|
+
# var red = Math.floor(redFrac * 255);
|
1403
|
+
# var green = Math.floor(greenFrac * 255);
|
1404
|
+
# var blue = Math.floor(blueFrac * 255);
|
1405
|
+
# if (!('alpha' in rgb_color)) `
|
1406
|
+
# return rgbToCssColor_(red, green, blue);
|
1407
|
+
# `
|
1408
|
+
# var alphaFrac = rgb_color.alpha.value || 0.0;
|
1409
|
+
# var rgbParams = [red, green, blue].join(',');
|
1410
|
+
# return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
|
1411
|
+
# `;
|
1412
|
+
# var rgbToCssColor_ = function(red, green, blue) `
|
1413
|
+
# var rgbNumber = new Number((red << 16) | (green << 8) | blue);
|
1414
|
+
# var hexString = rgbNumber.toString(16);
|
1415
|
+
# var missingZeros = 6 - hexString.length;
|
1416
|
+
# var resultBuilder = ['#'];
|
1417
|
+
# for (var i = 0; i < missingZeros; i++) `
|
1418
|
+
# resultBuilder.push('0');
|
1419
|
+
# `
|
1420
|
+
# resultBuilder.push(hexString);
|
1421
|
+
# return resultBuilder.join('');
|
1422
|
+
# `;
|
1423
|
+
# // ...
|
1424
|
+
# Corresponds to the JSON property `color`
|
1425
|
+
# @return [Google::Apis::VisionV1p2beta1::Color]
|
1426
|
+
attr_accessor :color
|
1427
|
+
|
1428
|
+
# The fraction of pixels the color occupies in the image.
|
1429
|
+
# Value in range [0, 1].
|
1430
|
+
# Corresponds to the JSON property `pixelFraction`
|
1431
|
+
# @return [Float]
|
1432
|
+
attr_accessor :pixel_fraction
|
1433
|
+
|
1434
|
+
# Image-specific score for this color. Value in range [0, 1].
|
1435
|
+
# Corresponds to the JSON property `score`
|
1436
|
+
# @return [Float]
|
1437
|
+
attr_accessor :score
|
1438
|
+
|
1439
|
+
def initialize(**args)
|
1440
|
+
update!(**args)
|
1441
|
+
end
|
1442
|
+
|
1443
|
+
# Update properties of this object
|
1444
|
+
def update!(**args)
|
1445
|
+
@color = args[:color] if args.key?(:color)
|
1446
|
+
@pixel_fraction = args[:pixel_fraction] if args.key?(:pixel_fraction)
|
1447
|
+
@score = args[:score] if args.key?(:score)
|
1448
|
+
end
|
1449
|
+
end
|
1450
|
+
|
1451
|
+
# Single crop hint that is used to generate a new crop when serving an image.
|
1452
|
+
class GoogleCloudVisionV1p2beta1CropHint
|
1453
|
+
include Google::Apis::Core::Hashable
|
1454
|
+
|
1455
|
+
# A bounding polygon for the detected image annotation.
|
1456
|
+
# Corresponds to the JSON property `boundingPoly`
|
1457
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
|
1458
|
+
attr_accessor :bounding_poly
|
1459
|
+
|
1460
|
+
# Confidence of this being a salient region. Range [0, 1].
|
1461
|
+
# Corresponds to the JSON property `confidence`
|
1462
|
+
# @return [Float]
|
1463
|
+
attr_accessor :confidence
|
1464
|
+
|
1465
|
+
# Fraction of importance of this salient region with respect to the original
|
1466
|
+
# image.
|
1467
|
+
# Corresponds to the JSON property `importanceFraction`
|
1468
|
+
# @return [Float]
|
1469
|
+
attr_accessor :importance_fraction
|
1470
|
+
|
1471
|
+
def initialize(**args)
|
1472
|
+
update!(**args)
|
1473
|
+
end
|
1474
|
+
|
1475
|
+
# Update properties of this object
|
1476
|
+
def update!(**args)
|
1477
|
+
@bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
|
1478
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
1479
|
+
@importance_fraction = args[:importance_fraction] if args.key?(:importance_fraction)
|
1480
|
+
end
|
1481
|
+
end
|
1482
|
+
|
1483
|
+
# Set of crop hints that are used to generate new crops when serving images.
|
1484
|
+
class GoogleCloudVisionV1p2beta1CropHintsAnnotation
|
1485
|
+
include Google::Apis::Core::Hashable
|
1486
|
+
|
1487
|
+
# Crop hint results.
|
1488
|
+
# Corresponds to the JSON property `cropHints`
|
1489
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHint>]
|
1490
|
+
attr_accessor :crop_hints
|
1491
|
+
|
1492
|
+
def initialize(**args)
|
1493
|
+
update!(**args)
|
1494
|
+
end
|
1495
|
+
|
1496
|
+
# Update properties of this object
|
1497
|
+
def update!(**args)
|
1498
|
+
@crop_hints = args[:crop_hints] if args.key?(:crop_hints)
|
1499
|
+
end
|
1500
|
+
end
|
1501
|
+
|
1502
|
+
# Parameters for crop hints annotation request.
|
1503
|
+
class GoogleCloudVisionV1p2beta1CropHintsParams
|
1504
|
+
include Google::Apis::Core::Hashable
|
1505
|
+
|
1506
|
+
# Aspect ratios in floats, representing the ratio of the width to the height
|
1507
|
+
# of the image. For example, if the desired aspect ratio is 4/3, the
|
1508
|
+
# corresponding float value should be 1.33333. If not specified, the
|
1509
|
+
# best possible crop is returned. The number of provided aspect ratios is
|
1510
|
+
# limited to a maximum of 16; any aspect ratios provided after the 16th are
|
1511
|
+
# ignored.
|
1512
|
+
# Corresponds to the JSON property `aspectRatios`
|
1513
|
+
# @return [Array<Float>]
|
1514
|
+
attr_accessor :aspect_ratios
|
1515
|
+
|
1516
|
+
def initialize(**args)
|
1517
|
+
update!(**args)
|
1518
|
+
end
|
1519
|
+
|
1520
|
+
# Update properties of this object
|
1521
|
+
def update!(**args)
|
1522
|
+
@aspect_ratios = args[:aspect_ratios] if args.key?(:aspect_ratios)
|
1523
|
+
end
|
1524
|
+
end
|
1525
|
+
|
1526
|
+
# Set of dominant colors and their corresponding scores.
|
1527
|
+
class GoogleCloudVisionV1p2beta1DominantColorsAnnotation
|
1528
|
+
include Google::Apis::Core::Hashable
|
1529
|
+
|
1530
|
+
# RGB color values with their score and pixel fraction.
|
1531
|
+
# Corresponds to the JSON property `colors`
|
1532
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ColorInfo>]
|
1533
|
+
attr_accessor :colors
|
1534
|
+
|
1535
|
+
def initialize(**args)
|
1536
|
+
update!(**args)
|
1537
|
+
end
|
1538
|
+
|
1539
|
+
# Update properties of this object
|
1540
|
+
def update!(**args)
|
1541
|
+
@colors = args[:colors] if args.key?(:colors)
|
1542
|
+
end
|
1543
|
+
end
|
1544
|
+
|
1545
|
+
# Set of detected entity features.
|
1546
|
+
class GoogleCloudVisionV1p2beta1EntityAnnotation
|
1547
|
+
include Google::Apis::Core::Hashable
|
1548
|
+
|
1549
|
+
# A bounding polygon for the detected image annotation.
|
1550
|
+
# Corresponds to the JSON property `boundingPoly`
|
1551
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
|
1552
|
+
attr_accessor :bounding_poly
|
1553
|
+
|
1554
|
+
# **Deprecated. Use `score` instead.**
|
1555
|
+
# The accuracy of the entity detection in an image.
|
1556
|
+
# For example, for an image in which the "Eiffel Tower" entity is detected,
|
1557
|
+
# this field represents the confidence that there is a tower in the query
|
1558
|
+
# image. Range [0, 1].
|
1559
|
+
# Corresponds to the JSON property `confidence`
|
1560
|
+
# @return [Float]
|
1561
|
+
attr_accessor :confidence
|
1562
|
+
|
1563
|
+
# Entity textual description, expressed in its `locale` language.
|
1564
|
+
# Corresponds to the JSON property `description`
|
1565
|
+
# @return [String]
|
1566
|
+
attr_accessor :description
|
1567
|
+
|
1568
|
+
# The language code for the locale in which the entity textual
|
1569
|
+
# `description` is expressed.
|
1570
|
+
# Corresponds to the JSON property `locale`
|
1571
|
+
# @return [String]
|
1572
|
+
attr_accessor :locale
|
1573
|
+
|
1574
|
+
# The location information for the detected entity. Multiple
|
1575
|
+
# `LocationInfo` elements can be present because one location may
|
1576
|
+
# indicate the location of the scene in the image, and another location
|
1577
|
+
# may indicate the location of the place where the image was taken.
|
1578
|
+
# Location information is usually present for landmarks.
|
1579
|
+
# Corresponds to the JSON property `locations`
|
1580
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1LocationInfo>]
|
1581
|
+
attr_accessor :locations
|
1582
|
+
|
1583
|
+
# Opaque entity ID. Some IDs may be available in
|
1584
|
+
# [Google Knowledge Graph Search
|
1585
|
+
# API](https://developers.google.com/knowledge-graph/).
|
1586
|
+
# Corresponds to the JSON property `mid`
|
1587
|
+
# @return [String]
|
1588
|
+
attr_accessor :mid
|
1589
|
+
|
1590
|
+
# Some entities may have optional user-supplied `Property` (name/value)
|
1591
|
+
# fields, such a score or string that qualifies the entity.
|
1592
|
+
# Corresponds to the JSON property `properties`
|
1593
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Property>]
|
1594
|
+
attr_accessor :properties
|
1595
|
+
|
1596
|
+
# Overall score of the result. Range [0, 1].
|
1597
|
+
# Corresponds to the JSON property `score`
|
1598
|
+
# @return [Float]
|
1599
|
+
attr_accessor :score
|
1600
|
+
|
1601
|
+
# The relevancy of the ICA (Image Content Annotation) label to the
|
1602
|
+
# image. For example, the relevancy of "tower" is likely higher to an image
|
1603
|
+
# containing the detected "Eiffel Tower" than to an image containing a
|
1604
|
+
# detected distant towering building, even though the confidence that
|
1605
|
+
# there is a tower in each image may be the same. Range [0, 1].
|
1606
|
+
# Corresponds to the JSON property `topicality`
|
1607
|
+
# @return [Float]
|
1608
|
+
attr_accessor :topicality
|
1609
|
+
|
1610
|
+
def initialize(**args)
|
1611
|
+
update!(**args)
|
1612
|
+
end
|
1613
|
+
|
1614
|
+
# Update properties of this object
|
1615
|
+
def update!(**args)
|
1616
|
+
@bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
|
1617
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
1618
|
+
@description = args[:description] if args.key?(:description)
|
1619
|
+
@locale = args[:locale] if args.key?(:locale)
|
1620
|
+
@locations = args[:locations] if args.key?(:locations)
|
1621
|
+
@mid = args[:mid] if args.key?(:mid)
|
1622
|
+
@properties = args[:properties] if args.key?(:properties)
|
1623
|
+
@score = args[:score] if args.key?(:score)
|
1624
|
+
@topicality = args[:topicality] if args.key?(:topicality)
|
1625
|
+
end
|
1626
|
+
end
|
1627
|
+
|
1628
|
+
# A face annotation object contains the results of face detection.
|
1629
|
+
class GoogleCloudVisionV1p2beta1FaceAnnotation
|
1630
|
+
include Google::Apis::Core::Hashable
|
1631
|
+
|
1632
|
+
# Anger likelihood.
|
1633
|
+
# Corresponds to the JSON property `angerLikelihood`
|
1634
|
+
# @return [String]
|
1635
|
+
attr_accessor :anger_likelihood
|
1636
|
+
|
1637
|
+
# Blurred likelihood.
|
1638
|
+
# Corresponds to the JSON property `blurredLikelihood`
|
1639
|
+
# @return [String]
|
1640
|
+
attr_accessor :blurred_likelihood
|
1641
|
+
|
1642
|
+
# A bounding polygon for the detected image annotation.
|
1643
|
+
# Corresponds to the JSON property `boundingPoly`
|
1644
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
|
1645
|
+
attr_accessor :bounding_poly
|
1646
|
+
|
1647
|
+
# Detection confidence. Range [0, 1].
|
1648
|
+
# Corresponds to the JSON property `detectionConfidence`
|
1649
|
+
# @return [Float]
|
1650
|
+
attr_accessor :detection_confidence
|
1651
|
+
|
1652
|
+
# A bounding polygon for the detected image annotation.
|
1653
|
+
# Corresponds to the JSON property `fdBoundingPoly`
|
1654
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
|
1655
|
+
attr_accessor :fd_bounding_poly
|
1656
|
+
|
1657
|
+
# Headwear likelihood.
|
1658
|
+
# Corresponds to the JSON property `headwearLikelihood`
|
1659
|
+
# @return [String]
|
1660
|
+
attr_accessor :headwear_likelihood
|
1661
|
+
|
1662
|
+
# Joy likelihood.
|
1663
|
+
# Corresponds to the JSON property `joyLikelihood`
|
1664
|
+
# @return [String]
|
1665
|
+
attr_accessor :joy_likelihood
|
1666
|
+
|
1667
|
+
# Face landmarking confidence. Range [0, 1].
|
1668
|
+
# Corresponds to the JSON property `landmarkingConfidence`
|
1669
|
+
# @return [Float]
|
1670
|
+
attr_accessor :landmarking_confidence
|
1671
|
+
|
1672
|
+
# Detected face landmarks.
|
1673
|
+
# Corresponds to the JSON property `landmarks`
|
1674
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1FaceAnnotationLandmark>]
|
1675
|
+
attr_accessor :landmarks
|
1676
|
+
|
1677
|
+
# Yaw angle, which indicates the leftward/rightward angle that the face is
|
1678
|
+
# pointing relative to the vertical plane perpendicular to the image. Range
|
1679
|
+
# [-180,180].
|
1680
|
+
# Corresponds to the JSON property `panAngle`
|
1681
|
+
# @return [Float]
|
1682
|
+
attr_accessor :pan_angle
|
1683
|
+
|
1684
|
+
# Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
|
1685
|
+
# of the face relative to the image vertical about the axis perpendicular to
|
1686
|
+
# the face. Range [-180,180].
|
1687
|
+
# Corresponds to the JSON property `rollAngle`
|
1688
|
+
# @return [Float]
|
1689
|
+
attr_accessor :roll_angle
|
1690
|
+
|
1691
|
+
# Sorrow likelihood.
|
1692
|
+
# Corresponds to the JSON property `sorrowLikelihood`
|
1693
|
+
# @return [String]
|
1694
|
+
attr_accessor :sorrow_likelihood
|
1695
|
+
|
1696
|
+
# Surprise likelihood.
|
1697
|
+
# Corresponds to the JSON property `surpriseLikelihood`
|
1698
|
+
# @return [String]
|
1699
|
+
attr_accessor :surprise_likelihood
|
1700
|
+
|
1701
|
+
# Pitch angle, which indicates the upwards/downwards angle that the face is
|
1702
|
+
# pointing relative to the image's horizontal plane. Range [-180,180].
|
1703
|
+
# Corresponds to the JSON property `tiltAngle`
|
1704
|
+
# @return [Float]
|
1705
|
+
attr_accessor :tilt_angle
|
1706
|
+
|
1707
|
+
# Under-exposed likelihood.
|
1708
|
+
# Corresponds to the JSON property `underExposedLikelihood`
|
1709
|
+
# @return [String]
|
1710
|
+
attr_accessor :under_exposed_likelihood
|
1711
|
+
|
1712
|
+
def initialize(**args)
|
1713
|
+
update!(**args)
|
1714
|
+
end
|
1715
|
+
|
1716
|
+
# Update properties of this object
|
1717
|
+
def update!(**args)
|
1718
|
+
@anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood)
|
1719
|
+
@blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood)
|
1720
|
+
@bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
|
1721
|
+
@detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence)
|
1722
|
+
@fd_bounding_poly = args[:fd_bounding_poly] if args.key?(:fd_bounding_poly)
|
1723
|
+
@headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood)
|
1724
|
+
@joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood)
|
1725
|
+
@landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence)
|
1726
|
+
@landmarks = args[:landmarks] if args.key?(:landmarks)
|
1727
|
+
@pan_angle = args[:pan_angle] if args.key?(:pan_angle)
|
1728
|
+
@roll_angle = args[:roll_angle] if args.key?(:roll_angle)
|
1729
|
+
@sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood)
|
1730
|
+
@surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood)
|
1731
|
+
@tilt_angle = args[:tilt_angle] if args.key?(:tilt_angle)
|
1732
|
+
@under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood)
|
1733
|
+
end
|
1734
|
+
end
|
1735
|
+
|
1736
|
+
# A face-specific landmark (for example, a face feature).
|
1737
|
+
class GoogleCloudVisionV1p2beta1FaceAnnotationLandmark
|
1738
|
+
include Google::Apis::Core::Hashable
|
1739
|
+
|
1740
|
+
# A 3D position in the image, used primarily for Face detection landmarks.
|
1741
|
+
# A valid Position must have both x and y coordinates.
|
1742
|
+
# The position coordinates are in the same scale as the original image.
|
1743
|
+
# Corresponds to the JSON property `position`
|
1744
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Position]
|
1745
|
+
attr_accessor :position
|
1746
|
+
|
1747
|
+
# Face landmark type.
|
1748
|
+
# Corresponds to the JSON property `type`
|
1749
|
+
# @return [String]
|
1750
|
+
attr_accessor :type
|
1751
|
+
|
1752
|
+
def initialize(**args)
|
1753
|
+
update!(**args)
|
1754
|
+
end
|
1755
|
+
|
1756
|
+
# Update properties of this object
|
1757
|
+
def update!(**args)
|
1758
|
+
@position = args[:position] if args.key?(:position)
|
1759
|
+
@type = args[:type] if args.key?(:type)
|
1760
|
+
end
|
1761
|
+
end
|
1762
|
+
|
1763
|
+
# The type of Google Cloud Vision API detection to perform, and the maximum
|
1764
|
+
# number of results to return for that type. Multiple `Feature` objects can
|
1765
|
+
# be specified in the `features` list.
|
1766
|
+
class GoogleCloudVisionV1p2beta1Feature
|
1767
|
+
include Google::Apis::Core::Hashable
|
1768
|
+
|
1769
|
+
# Maximum number of results of this type. Does not apply to
|
1770
|
+
# `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.
|
1771
|
+
# Corresponds to the JSON property `maxResults`
|
1772
|
+
# @return [Fixnum]
|
1773
|
+
attr_accessor :max_results
|
1774
|
+
|
1775
|
+
# Model to use for the feature.
|
1776
|
+
# Supported values: "builtin/stable" (the default if unset) and
|
1777
|
+
# "builtin/latest".
|
1778
|
+
# Corresponds to the JSON property `model`
|
1779
|
+
# @return [String]
|
1780
|
+
attr_accessor :model
|
1781
|
+
|
1782
|
+
# The feature type.
|
1783
|
+
# Corresponds to the JSON property `type`
|
1784
|
+
# @return [String]
|
1785
|
+
attr_accessor :type
|
1786
|
+
|
1787
|
+
def initialize(**args)
|
1788
|
+
update!(**args)
|
1789
|
+
end
|
1790
|
+
|
1791
|
+
# Update properties of this object
|
1792
|
+
def update!(**args)
|
1793
|
+
@max_results = args[:max_results] if args.key?(:max_results)
|
1794
|
+
@model = args[:model] if args.key?(:model)
|
1795
|
+
@type = args[:type] if args.key?(:type)
|
1796
|
+
end
|
1797
|
+
end
|
1798
|
+
|
1799
|
+
# The Google Cloud Storage location where the output will be written to.
|
1800
|
+
class GoogleCloudVisionV1p2beta1GcsDestination
|
1801
|
+
include Google::Apis::Core::Hashable
|
1802
|
+
|
1803
|
+
# Google Cloud Storage URI where the results will be stored. Results will
|
1804
|
+
# be in JSON format and preceded by its corresponding input URI. This field
|
1805
|
+
# can either represent a single file, or a prefix for multiple outputs.
|
1806
|
+
# Prefixes must end in a `/`.
|
1807
|
+
# Examples:
|
1808
|
+
# * File: gs://bucket-name/filename.json
|
1809
|
+
# * Prefix: gs://bucket-name/prefix/here/
|
1810
|
+
# * File: gs://bucket-name/prefix/here
|
1811
|
+
# If multiple outputs, each response is still AnnotateFileResponse, each of
|
1812
|
+
# which contains some subset of the full list of AnnotateImageResponse.
|
1813
|
+
# Multiple outputs can happen if, for example, the output JSON is too large
|
1814
|
+
# and overflows into multiple sharded files.
|
1815
|
+
# Corresponds to the JSON property `uri`
|
1816
|
+
# @return [String]
|
1817
|
+
attr_accessor :uri
|
1818
|
+
|
1819
|
+
def initialize(**args)
|
1820
|
+
update!(**args)
|
1821
|
+
end
|
1822
|
+
|
1823
|
+
# Update properties of this object
|
1824
|
+
def update!(**args)
|
1825
|
+
@uri = args[:uri] if args.key?(:uri)
|
1826
|
+
end
|
1827
|
+
end
|
1828
|
+
|
1829
|
+
# The Google Cloud Storage location where the input will be read from.
|
1830
|
+
class GoogleCloudVisionV1p2beta1GcsSource
|
1831
|
+
include Google::Apis::Core::Hashable
|
1832
|
+
|
1833
|
+
# Google Cloud Storage URI for the input file. This must only be a
|
1834
|
+
# Google Cloud Storage object. Wildcards are not currently supported.
|
1835
|
+
# Corresponds to the JSON property `uri`
|
1836
|
+
# @return [String]
|
1837
|
+
attr_accessor :uri
|
1838
|
+
|
1839
|
+
def initialize(**args)
|
1840
|
+
update!(**args)
|
1841
|
+
end
|
1842
|
+
|
1843
|
+
# Update properties of this object
|
1844
|
+
def update!(**args)
|
1845
|
+
@uri = args[:uri] if args.key?(:uri)
|
1846
|
+
end
|
1847
|
+
end
|
1848
|
+
|
1849
|
+
# Client image to perform Google Cloud Vision API tasks over.
|
1850
|
+
class GoogleCloudVisionV1p2beta1Image
|
1851
|
+
include Google::Apis::Core::Hashable
|
1852
|
+
|
1853
|
+
# Image content, represented as a stream of bytes.
|
1854
|
+
# Note: As with all `bytes` fields, protobuffers use a pure binary
|
1855
|
+
# representation, whereas JSON representations use base64.
|
1856
|
+
# Corresponds to the JSON property `content`
|
1857
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1858
|
+
# @return [String]
|
1859
|
+
attr_accessor :content
|
1860
|
+
|
1861
|
+
# External image source (Google Cloud Storage or web URL image location).
|
1862
|
+
# Corresponds to the JSON property `source`
|
1863
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1ImageSource]
|
1864
|
+
attr_accessor :source
|
1865
|
+
|
1866
|
+
def initialize(**args)
|
1867
|
+
update!(**args)
|
1868
|
+
end
|
1869
|
+
|
1870
|
+
# Update properties of this object
|
1871
|
+
def update!(**args)
|
1872
|
+
@content = args[:content] if args.key?(:content)
|
1873
|
+
@source = args[:source] if args.key?(:source)
|
1874
|
+
end
|
1875
|
+
end
|
1876
|
+
|
1877
|
+
# If an image was produced from a file (e.g. a PDF), this message gives
|
1878
|
+
# information about the source of that image.
|
1879
|
+
class GoogleCloudVisionV1p2beta1ImageAnnotationContext
|
1880
|
+
include Google::Apis::Core::Hashable
|
1881
|
+
|
1882
|
+
# If the file was a PDF or TIFF, this field gives the page number within
|
1883
|
+
# the file used to produce the image.
|
1884
|
+
# Corresponds to the JSON property `pageNumber`
|
1885
|
+
# @return [Fixnum]
|
1886
|
+
attr_accessor :page_number
|
1887
|
+
|
1888
|
+
# The URI of the file used to produce the image.
|
1889
|
+
# Corresponds to the JSON property `uri`
|
1890
|
+
# @return [String]
|
1891
|
+
attr_accessor :uri
|
1892
|
+
|
1893
|
+
def initialize(**args)
|
1894
|
+
update!(**args)
|
1895
|
+
end
|
1896
|
+
|
1897
|
+
# Update properties of this object
|
1898
|
+
def update!(**args)
|
1899
|
+
@page_number = args[:page_number] if args.key?(:page_number)
|
1900
|
+
@uri = args[:uri] if args.key?(:uri)
|
1901
|
+
end
|
1902
|
+
end
|
1903
|
+
|
1904
|
+
# Image context and/or feature-specific parameters.
|
1905
|
+
class GoogleCloudVisionV1p2beta1ImageContext
|
1906
|
+
include Google::Apis::Core::Hashable
|
1907
|
+
|
1908
|
+
# Parameters for crop hints annotation request.
|
1909
|
+
# Corresponds to the JSON property `cropHintsParams`
|
1910
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1CropHintsParams]
|
1911
|
+
attr_accessor :crop_hints_params
|
1912
|
+
|
1913
|
+
# List of languages to use for TEXT_DETECTION. In most cases, an empty value
|
1914
|
+
# yields the best results since it enables automatic language detection. For
|
1915
|
+
# languages based on the Latin alphabet, setting `language_hints` is not
|
1916
|
+
# needed. In rare cases, when the language of the text in the image is known,
|
1917
|
+
# setting a hint will help get better results (although it will be a
|
1918
|
+
# significant hindrance if the hint is wrong). Text detection returns an
|
1919
|
+
# error if one or more of the specified languages is not one of the
|
1920
|
+
# [supported languages](/vision/docs/languages).
|
1921
|
+
# Corresponds to the JSON property `languageHints`
|
1922
|
+
# @return [Array<String>]
|
1923
|
+
attr_accessor :language_hints
|
1924
|
+
|
1925
|
+
# Rectangle determined by min and max `LatLng` pairs.
|
1926
|
+
# Corresponds to the JSON property `latLongRect`
|
1927
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1LatLongRect]
|
1928
|
+
attr_accessor :lat_long_rect
|
1929
|
+
|
1930
|
+
# Parameters for web detection request.
|
1931
|
+
# Corresponds to the JSON property `webDetectionParams`
|
1932
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionParams]
|
1933
|
+
attr_accessor :web_detection_params
|
1934
|
+
|
1935
|
+
def initialize(**args)
|
1936
|
+
update!(**args)
|
1937
|
+
end
|
1938
|
+
|
1939
|
+
# Update properties of this object
|
1940
|
+
def update!(**args)
|
1941
|
+
@crop_hints_params = args[:crop_hints_params] if args.key?(:crop_hints_params)
|
1942
|
+
@language_hints = args[:language_hints] if args.key?(:language_hints)
|
1943
|
+
@lat_long_rect = args[:lat_long_rect] if args.key?(:lat_long_rect)
|
1944
|
+
@web_detection_params = args[:web_detection_params] if args.key?(:web_detection_params)
|
1945
|
+
end
|
1946
|
+
end
|
1947
|
+
|
1948
|
+
# Stores image properties, such as dominant colors.
|
1949
|
+
class GoogleCloudVisionV1p2beta1ImageProperties
|
1950
|
+
include Google::Apis::Core::Hashable
|
1951
|
+
|
1952
|
+
# Set of dominant colors and their corresponding scores.
|
1953
|
+
# Corresponds to the JSON property `dominantColors`
|
1954
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1DominantColorsAnnotation]
|
1955
|
+
attr_accessor :dominant_colors
|
1956
|
+
|
1957
|
+
def initialize(**args)
|
1958
|
+
update!(**args)
|
1959
|
+
end
|
1960
|
+
|
1961
|
+
# Update properties of this object
|
1962
|
+
def update!(**args)
|
1963
|
+
@dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors)
|
1964
|
+
end
|
1965
|
+
end
|
1966
|
+
|
1967
|
+
# External image source (Google Cloud Storage or web URL image location).
|
1968
|
+
class GoogleCloudVisionV1p2beta1ImageSource
|
1969
|
+
include Google::Apis::Core::Hashable
|
1970
|
+
|
1971
|
+
# **Use `image_uri` instead.**
|
1972
|
+
# The Google Cloud Storage URI of the form
|
1973
|
+
# `gs://bucket_name/object_name`. Object versioning is not supported. See
|
1974
|
+
# [Google Cloud Storage Request
|
1975
|
+
# URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.
|
1976
|
+
# Corresponds to the JSON property `gcsImageUri`
|
1977
|
+
# @return [String]
|
1978
|
+
attr_accessor :gcs_image_uri
|
1979
|
+
|
1980
|
+
# The URI of the source image. Can be either:
|
1981
|
+
# 1. A Google Cloud Storage URI of the form
|
1982
|
+
# `gs://bucket_name/object_name`. Object versioning is not supported. See
|
1983
|
+
# [Google Cloud Storage Request
|
1984
|
+
# URIs](https://cloud.google.com/storage/docs/reference-uris) for more
|
1985
|
+
# info.
|
1986
|
+
# 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
|
1987
|
+
# HTTP/HTTPS URLs, Google cannot guarantee that the request will be
|
1988
|
+
# completed. Your request may fail if the specified host denies the
|
1989
|
+
# request (e.g. due to request throttling or DOS prevention), or if Google
|
1990
|
+
# throttles requests to the site for abuse prevention. You should not
|
1991
|
+
# depend on externally-hosted images for production applications.
|
1992
|
+
# When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
|
1993
|
+
# precedence.
|
1994
|
+
# Corresponds to the JSON property `imageUri`
|
1995
|
+
# @return [String]
|
1996
|
+
attr_accessor :image_uri
|
1997
|
+
|
1998
|
+
def initialize(**args)
|
1999
|
+
update!(**args)
|
2000
|
+
end
|
2001
|
+
|
2002
|
+
# Update properties of this object
|
2003
|
+
def update!(**args)
|
2004
|
+
@gcs_image_uri = args[:gcs_image_uri] if args.key?(:gcs_image_uri)
|
2005
|
+
@image_uri = args[:image_uri] if args.key?(:image_uri)
|
2006
|
+
end
|
2007
|
+
end
|
2008
|
+
|
2009
|
+
# The desired input location and metadata.
|
2010
|
+
class GoogleCloudVisionV1p2beta1InputConfig
|
2011
|
+
include Google::Apis::Core::Hashable
|
2012
|
+
|
2013
|
+
# The Google Cloud Storage location where the input will be read from.
|
2014
|
+
# Corresponds to the JSON property `gcsSource`
|
2015
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1GcsSource]
|
2016
|
+
attr_accessor :gcs_source
|
2017
|
+
|
2018
|
+
# The type of the file. Currently only "application/pdf" and "image/tiff"
|
2019
|
+
# are supported. Wildcards are not supported.
|
2020
|
+
# Corresponds to the JSON property `mimeType`
|
2021
|
+
# @return [String]
|
2022
|
+
attr_accessor :mime_type
|
2023
|
+
|
2024
|
+
def initialize(**args)
|
2025
|
+
update!(**args)
|
2026
|
+
end
|
2027
|
+
|
2028
|
+
# Update properties of this object
|
2029
|
+
def update!(**args)
|
2030
|
+
@gcs_source = args[:gcs_source] if args.key?(:gcs_source)
|
2031
|
+
@mime_type = args[:mime_type] if args.key?(:mime_type)
|
2032
|
+
end
|
2033
|
+
end
|
2034
|
+
|
2035
|
+
# Rectangle determined by min and max `LatLng` pairs.
|
2036
|
+
class GoogleCloudVisionV1p2beta1LatLongRect
|
2037
|
+
include Google::Apis::Core::Hashable
|
2038
|
+
|
2039
|
+
# An object representing a latitude/longitude pair. This is expressed as a pair
|
2040
|
+
# of doubles representing degrees latitude and degrees longitude. Unless
|
2041
|
+
# specified otherwise, this must conform to the
|
2042
|
+
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
2043
|
+
# standard</a>. Values must be within normalized ranges.
|
2044
|
+
# Corresponds to the JSON property `maxLatLng`
|
2045
|
+
# @return [Google::Apis::VisionV1p2beta1::LatLng]
|
2046
|
+
attr_accessor :max_lat_lng
|
2047
|
+
|
2048
|
+
# An object representing a latitude/longitude pair. This is expressed as a pair
|
2049
|
+
# of doubles representing degrees latitude and degrees longitude. Unless
|
2050
|
+
# specified otherwise, this must conform to the
|
2051
|
+
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
2052
|
+
# standard</a>. Values must be within normalized ranges.
|
2053
|
+
# Corresponds to the JSON property `minLatLng`
|
2054
|
+
# @return [Google::Apis::VisionV1p2beta1::LatLng]
|
2055
|
+
attr_accessor :min_lat_lng
|
2056
|
+
|
2057
|
+
def initialize(**args)
|
2058
|
+
update!(**args)
|
2059
|
+
end
|
2060
|
+
|
2061
|
+
# Update properties of this object
|
2062
|
+
def update!(**args)
|
2063
|
+
@max_lat_lng = args[:max_lat_lng] if args.key?(:max_lat_lng)
|
2064
|
+
@min_lat_lng = args[:min_lat_lng] if args.key?(:min_lat_lng)
|
2065
|
+
end
|
2066
|
+
end
|
2067
|
+
|
2068
|
+
# Detected entity location information.
|
2069
|
+
class GoogleCloudVisionV1p2beta1LocationInfo
|
2070
|
+
include Google::Apis::Core::Hashable
|
2071
|
+
|
2072
|
+
# An object representing a latitude/longitude pair. This is expressed as a pair
|
2073
|
+
# of doubles representing degrees latitude and degrees longitude. Unless
|
2074
|
+
# specified otherwise, this must conform to the
|
2075
|
+
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
2076
|
+
# standard</a>. Values must be within normalized ranges.
|
2077
|
+
# Corresponds to the JSON property `latLng`
|
2078
|
+
# @return [Google::Apis::VisionV1p2beta1::LatLng]
|
2079
|
+
attr_accessor :lat_lng
|
2080
|
+
|
2081
|
+
def initialize(**args)
|
2082
|
+
update!(**args)
|
2083
|
+
end
|
2084
|
+
|
2085
|
+
# Update properties of this object
|
2086
|
+
def update!(**args)
|
2087
|
+
@lat_lng = args[:lat_lng] if args.key?(:lat_lng)
|
2088
|
+
end
|
2089
|
+
end
|
2090
|
+
|
2091
|
+
# A vertex represents a 2D point in the image.
|
2092
|
+
# NOTE: the normalized vertex coordinates are relative to the original image
|
2093
|
+
# and range from 0 to 1.
|
2094
|
+
class GoogleCloudVisionV1p2beta1NormalizedVertex
|
2095
|
+
include Google::Apis::Core::Hashable
|
2096
|
+
|
2097
|
+
# X coordinate.
|
2098
|
+
# Corresponds to the JSON property `x`
|
2099
|
+
# @return [Float]
|
2100
|
+
attr_accessor :x
|
2101
|
+
|
2102
|
+
# Y coordinate.
|
2103
|
+
# Corresponds to the JSON property `y`
|
2104
|
+
# @return [Float]
|
2105
|
+
attr_accessor :y
|
2106
|
+
|
2107
|
+
def initialize(**args)
|
2108
|
+
update!(**args)
|
2109
|
+
end
|
2110
|
+
|
2111
|
+
# Update properties of this object
|
2112
|
+
def update!(**args)
|
2113
|
+
@x = args[:x] if args.key?(:x)
|
2114
|
+
@y = args[:y] if args.key?(:y)
|
2115
|
+
end
|
2116
|
+
end
|
2117
|
+
|
2118
|
+
# Contains metadata for the BatchAnnotateImages operation.
|
2119
|
+
class GoogleCloudVisionV1p2beta1OperationMetadata
|
2120
|
+
include Google::Apis::Core::Hashable
|
2121
|
+
|
2122
|
+
# The time when the batch request was received.
|
2123
|
+
# Corresponds to the JSON property `createTime`
|
2124
|
+
# @return [String]
|
2125
|
+
attr_accessor :create_time
|
2126
|
+
|
2127
|
+
# Current state of the batch operation.
|
2128
|
+
# Corresponds to the JSON property `state`
|
2129
|
+
# @return [String]
|
2130
|
+
attr_accessor :state
|
2131
|
+
|
2132
|
+
# The time when the operation result was last updated.
|
2133
|
+
# Corresponds to the JSON property `updateTime`
|
2134
|
+
# @return [String]
|
2135
|
+
attr_accessor :update_time
|
2136
|
+
|
2137
|
+
def initialize(**args)
|
2138
|
+
update!(**args)
|
2139
|
+
end
|
2140
|
+
|
2141
|
+
# Update properties of this object
|
2142
|
+
def update!(**args)
|
2143
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
2144
|
+
@state = args[:state] if args.key?(:state)
|
2145
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
2146
|
+
end
|
2147
|
+
end
|
2148
|
+
|
2149
|
+
# The desired output location and metadata.
|
2150
|
+
class GoogleCloudVisionV1p2beta1OutputConfig
|
2151
|
+
include Google::Apis::Core::Hashable
|
2152
|
+
|
2153
|
+
# The max number of response protos to put into each output JSON file on
|
2154
|
+
# Google Cloud Storage.
|
2155
|
+
# The valid range is [1, 100]. If not specified, the default value is 20.
|
2156
|
+
# For example, for one pdf file with 100 pages, 100 response protos will
|
2157
|
+
# be generated. If `batch_size` = 20, then 5 json files each
|
2158
|
+
# containing 20 response protos will be written under the prefix
|
2159
|
+
# `gcs_destination`.`uri`.
|
2160
|
+
# Currently, batch_size only applies to GcsDestination, with potential future
|
2161
|
+
# support for other output configurations.
|
2162
|
+
# Corresponds to the JSON property `batchSize`
|
2163
|
+
# @return [Fixnum]
|
2164
|
+
attr_accessor :batch_size
|
2165
|
+
|
2166
|
+
# The Google Cloud Storage location where the output will be written to.
|
2167
|
+
# Corresponds to the JSON property `gcsDestination`
|
2168
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1GcsDestination]
|
2169
|
+
attr_accessor :gcs_destination
|
2170
|
+
|
2171
|
+
def initialize(**args)
|
2172
|
+
update!(**args)
|
2173
|
+
end
|
2174
|
+
|
2175
|
+
# Update properties of this object
|
2176
|
+
def update!(**args)
|
2177
|
+
@batch_size = args[:batch_size] if args.key?(:batch_size)
|
2178
|
+
@gcs_destination = args[:gcs_destination] if args.key?(:gcs_destination)
|
2179
|
+
end
|
2180
|
+
end
|
2181
|
+
|
2182
|
+
# Detected page from OCR.
|
2183
|
+
class GoogleCloudVisionV1p2beta1Page
|
2184
|
+
include Google::Apis::Core::Hashable
|
2185
|
+
|
2186
|
+
# List of blocks of text, images etc on this page.
|
2187
|
+
# Corresponds to the JSON property `blocks`
|
2188
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Block>]
|
2189
|
+
attr_accessor :blocks
|
2190
|
+
|
2191
|
+
# Confidence of the OCR results on the page. Range [0, 1].
|
2192
|
+
# Corresponds to the JSON property `confidence`
|
2193
|
+
# @return [Float]
|
2194
|
+
attr_accessor :confidence
|
2195
|
+
|
2196
|
+
# Page height. For PDFs the unit is points. For images (including
|
2197
|
+
# TIFFs) the unit is pixels.
|
2198
|
+
# Corresponds to the JSON property `height`
|
2199
|
+
# @return [Fixnum]
|
2200
|
+
attr_accessor :height
|
2201
|
+
|
2202
|
+
# Additional information detected on the structural component.
|
2203
|
+
# Corresponds to the JSON property `property`
|
2204
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
|
2205
|
+
attr_accessor :property
|
2206
|
+
|
2207
|
+
# Page width. For PDFs the unit is points. For images (including
|
2208
|
+
# TIFFs) the unit is pixels.
|
2209
|
+
# Corresponds to the JSON property `width`
|
2210
|
+
# @return [Fixnum]
|
2211
|
+
attr_accessor :width
|
2212
|
+
|
2213
|
+
def initialize(**args)
|
2214
|
+
update!(**args)
|
2215
|
+
end
|
2216
|
+
|
2217
|
+
# Update properties of this object
|
2218
|
+
def update!(**args)
|
2219
|
+
@blocks = args[:blocks] if args.key?(:blocks)
|
2220
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
2221
|
+
@height = args[:height] if args.key?(:height)
|
2222
|
+
@property = args[:property] if args.key?(:property)
|
2223
|
+
@width = args[:width] if args.key?(:width)
|
2224
|
+
end
|
2225
|
+
end
|
2226
|
+
|
2227
|
+
# Structural unit of text representing a number of words in certain order.
|
2228
|
+
class GoogleCloudVisionV1p2beta1Paragraph
|
2229
|
+
include Google::Apis::Core::Hashable
|
2230
|
+
|
2231
|
+
# A bounding polygon for the detected image annotation.
|
2232
|
+
# Corresponds to the JSON property `boundingBox`
|
2233
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
|
2234
|
+
attr_accessor :bounding_box
|
2235
|
+
|
2236
|
+
# Confidence of the OCR results for the paragraph. Range [0, 1].
|
2237
|
+
# Corresponds to the JSON property `confidence`
|
2238
|
+
# @return [Float]
|
2239
|
+
attr_accessor :confidence
|
2240
|
+
|
2241
|
+
# Additional information detected on the structural component.
|
2242
|
+
# Corresponds to the JSON property `property`
|
2243
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
|
2244
|
+
attr_accessor :property
|
2245
|
+
|
2246
|
+
# List of words in this paragraph.
|
2247
|
+
# Corresponds to the JSON property `words`
|
2248
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Word>]
|
2249
|
+
attr_accessor :words
|
2250
|
+
|
2251
|
+
def initialize(**args)
|
2252
|
+
update!(**args)
|
2253
|
+
end
|
2254
|
+
|
2255
|
+
# Update properties of this object
|
2256
|
+
def update!(**args)
|
2257
|
+
@bounding_box = args[:bounding_box] if args.key?(:bounding_box)
|
2258
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
2259
|
+
@property = args[:property] if args.key?(:property)
|
2260
|
+
@words = args[:words] if args.key?(:words)
|
2261
|
+
end
|
2262
|
+
end
|
2263
|
+
|
2264
|
+
# A 3D position in the image, used primarily for Face detection landmarks.
|
2265
|
+
# A valid Position must have both x and y coordinates.
|
2266
|
+
# The position coordinates are in the same scale as the original image.
|
2267
|
+
class GoogleCloudVisionV1p2beta1Position
|
2268
|
+
include Google::Apis::Core::Hashable
|
2269
|
+
|
2270
|
+
# X coordinate.
|
2271
|
+
# Corresponds to the JSON property `x`
|
2272
|
+
# @return [Float]
|
2273
|
+
attr_accessor :x
|
2274
|
+
|
2275
|
+
# Y coordinate.
|
2276
|
+
# Corresponds to the JSON property `y`
|
2277
|
+
# @return [Float]
|
2278
|
+
attr_accessor :y
|
2279
|
+
|
2280
|
+
# Z coordinate (or depth).
|
2281
|
+
# Corresponds to the JSON property `z`
|
2282
|
+
# @return [Float]
|
2283
|
+
attr_accessor :z
|
2284
|
+
|
2285
|
+
def initialize(**args)
|
2286
|
+
update!(**args)
|
2287
|
+
end
|
2288
|
+
|
2289
|
+
# Update properties of this object
|
2290
|
+
def update!(**args)
|
2291
|
+
@x = args[:x] if args.key?(:x)
|
2292
|
+
@y = args[:y] if args.key?(:y)
|
2293
|
+
@z = args[:z] if args.key?(:z)
|
2294
|
+
end
|
2295
|
+
end
|
2296
|
+
|
2297
|
+
# A `Property` consists of a user-supplied name/value pair.
|
2298
|
+
class GoogleCloudVisionV1p2beta1Property
|
2299
|
+
include Google::Apis::Core::Hashable
|
2300
|
+
|
2301
|
+
# Name of the property.
|
2302
|
+
# Corresponds to the JSON property `name`
|
2303
|
+
# @return [String]
|
2304
|
+
attr_accessor :name
|
2305
|
+
|
2306
|
+
# Value of numeric properties.
|
2307
|
+
# Corresponds to the JSON property `uint64Value`
|
2308
|
+
# @return [Fixnum]
|
2309
|
+
attr_accessor :uint64_value
|
2310
|
+
|
2311
|
+
# Value of the property.
|
2312
|
+
# Corresponds to the JSON property `value`
|
2313
|
+
# @return [String]
|
2314
|
+
attr_accessor :value
|
2315
|
+
|
2316
|
+
def initialize(**args)
|
2317
|
+
update!(**args)
|
2318
|
+
end
|
2319
|
+
|
2320
|
+
# Update properties of this object
|
2321
|
+
def update!(**args)
|
2322
|
+
@name = args[:name] if args.key?(:name)
|
2323
|
+
@uint64_value = args[:uint64_value] if args.key?(:uint64_value)
|
2324
|
+
@value = args[:value] if args.key?(:value)
|
2325
|
+
end
|
2326
|
+
end
|
2327
|
+
|
2328
|
+
# Set of features pertaining to the image, computed by computer vision
|
2329
|
+
# methods over safe-search verticals (for example, adult, spoof, medical,
|
2330
|
+
# violence).
|
2331
|
+
class GoogleCloudVisionV1p2beta1SafeSearchAnnotation
|
2332
|
+
include Google::Apis::Core::Hashable
|
2333
|
+
|
2334
|
+
# Represents the adult content likelihood for the image. Adult content may
|
2335
|
+
# contain elements such as nudity, pornographic images or cartoons, or
|
2336
|
+
# sexual activities.
|
2337
|
+
# Corresponds to the JSON property `adult`
|
2338
|
+
# @return [String]
|
2339
|
+
attr_accessor :adult
|
2340
|
+
|
2341
|
+
# Likelihood that this is a medical image.
|
2342
|
+
# Corresponds to the JSON property `medical`
|
2343
|
+
# @return [String]
|
2344
|
+
attr_accessor :medical
|
2345
|
+
|
2346
|
+
# Likelihood that the request image contains racy content. Racy content may
|
2347
|
+
# include (but is not limited to) skimpy or sheer clothing, strategically
|
2348
|
+
# covered nudity, lewd or provocative poses, or close-ups of sensitive
|
2349
|
+
# body areas.
|
2350
|
+
# Corresponds to the JSON property `racy`
|
2351
|
+
# @return [String]
|
2352
|
+
attr_accessor :racy
|
2353
|
+
|
2354
|
+
# Spoof likelihood. The likelihood that an modification
|
2355
|
+
# was made to the image's canonical version to make it appear
|
2356
|
+
# funny or offensive.
|
2357
|
+
# Corresponds to the JSON property `spoof`
|
2358
|
+
# @return [String]
|
2359
|
+
attr_accessor :spoof
|
2360
|
+
|
2361
|
+
# Likelihood that this image contains violent content.
|
2362
|
+
# Corresponds to the JSON property `violence`
|
2363
|
+
# @return [String]
|
2364
|
+
attr_accessor :violence
|
2365
|
+
|
2366
|
+
def initialize(**args)
|
2367
|
+
update!(**args)
|
2368
|
+
end
|
2369
|
+
|
2370
|
+
# Update properties of this object
|
2371
|
+
def update!(**args)
|
2372
|
+
@adult = args[:adult] if args.key?(:adult)
|
2373
|
+
@medical = args[:medical] if args.key?(:medical)
|
2374
|
+
@racy = args[:racy] if args.key?(:racy)
|
2375
|
+
@spoof = args[:spoof] if args.key?(:spoof)
|
2376
|
+
@violence = args[:violence] if args.key?(:violence)
|
2377
|
+
end
|
2378
|
+
end
|
2379
|
+
|
2380
|
+
# A single symbol representation.
|
2381
|
+
class GoogleCloudVisionV1p2beta1Symbol
|
2382
|
+
include Google::Apis::Core::Hashable
|
2383
|
+
|
2384
|
+
# A bounding polygon for the detected image annotation.
|
2385
|
+
# Corresponds to the JSON property `boundingBox`
|
2386
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
|
2387
|
+
attr_accessor :bounding_box
|
2388
|
+
|
2389
|
+
# Confidence of the OCR results for the symbol. Range [0, 1].
|
2390
|
+
# Corresponds to the JSON property `confidence`
|
2391
|
+
# @return [Float]
|
2392
|
+
attr_accessor :confidence
|
2393
|
+
|
2394
|
+
# Additional information detected on the structural component.
|
2395
|
+
# Corresponds to the JSON property `property`
|
2396
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
|
2397
|
+
attr_accessor :property
|
2398
|
+
|
2399
|
+
# The actual UTF-8 representation of the symbol.
|
2400
|
+
# Corresponds to the JSON property `text`
|
2401
|
+
# @return [String]
|
2402
|
+
attr_accessor :text
|
2403
|
+
|
2404
|
+
def initialize(**args)
|
2405
|
+
update!(**args)
|
2406
|
+
end
|
2407
|
+
|
2408
|
+
# Update properties of this object
|
2409
|
+
def update!(**args)
|
2410
|
+
@bounding_box = args[:bounding_box] if args.key?(:bounding_box)
|
2411
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
2412
|
+
@property = args[:property] if args.key?(:property)
|
2413
|
+
@text = args[:text] if args.key?(:text)
|
2414
|
+
end
|
2415
|
+
end
|
2416
|
+
|
2417
|
+
# TextAnnotation contains a structured representation of OCR extracted text.
|
2418
|
+
# The hierarchy of an OCR extracted text structure is like this:
|
2419
|
+
# TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol
|
2420
|
+
# Each structural component, starting from Page, may further have their own
|
2421
|
+
# properties. Properties describe detected languages, breaks etc.. Please refer
|
2422
|
+
# to the TextAnnotation.TextProperty message definition below for more
|
2423
|
+
# detail.
|
2424
|
+
class GoogleCloudVisionV1p2beta1TextAnnotation
|
2425
|
+
include Google::Apis::Core::Hashable
|
2426
|
+
|
2427
|
+
# List of pages detected by OCR.
|
2428
|
+
# Corresponds to the JSON property `pages`
|
2429
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Page>]
|
2430
|
+
attr_accessor :pages
|
2431
|
+
|
2432
|
+
# UTF-8 text detected on the pages.
|
2433
|
+
# Corresponds to the JSON property `text`
|
2434
|
+
# @return [String]
|
2435
|
+
attr_accessor :text
|
2436
|
+
|
2437
|
+
def initialize(**args)
|
2438
|
+
update!(**args)
|
2439
|
+
end
|
2440
|
+
|
2441
|
+
# Update properties of this object
|
2442
|
+
def update!(**args)
|
2443
|
+
@pages = args[:pages] if args.key?(:pages)
|
2444
|
+
@text = args[:text] if args.key?(:text)
|
2445
|
+
end
|
2446
|
+
end
|
2447
|
+
|
2448
|
+
# Detected start or end of a structural component.
|
2449
|
+
class GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak
|
2450
|
+
include Google::Apis::Core::Hashable
|
2451
|
+
|
2452
|
+
# True if break prepends the element.
|
2453
|
+
# Corresponds to the JSON property `isPrefix`
|
2454
|
+
# @return [Boolean]
|
2455
|
+
attr_accessor :is_prefix
|
2456
|
+
alias_method :is_prefix?, :is_prefix
|
2457
|
+
|
2458
|
+
# Detected break type.
|
2459
|
+
# Corresponds to the JSON property `type`
|
2460
|
+
# @return [String]
|
2461
|
+
attr_accessor :type
|
2462
|
+
|
2463
|
+
def initialize(**args)
|
2464
|
+
update!(**args)
|
2465
|
+
end
|
2466
|
+
|
2467
|
+
# Update properties of this object
|
2468
|
+
def update!(**args)
|
2469
|
+
@is_prefix = args[:is_prefix] if args.key?(:is_prefix)
|
2470
|
+
@type = args[:type] if args.key?(:type)
|
2471
|
+
end
|
2472
|
+
end
|
2473
|
+
|
2474
|
+
# Detected language for a structural component.
|
2475
|
+
class GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
|
2476
|
+
include Google::Apis::Core::Hashable
|
2477
|
+
|
2478
|
+
# Confidence of detected language. Range [0, 1].
|
2479
|
+
# Corresponds to the JSON property `confidence`
|
2480
|
+
# @return [Float]
|
2481
|
+
attr_accessor :confidence
|
2482
|
+
|
2483
|
+
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
2484
|
+
# information, see
|
2485
|
+
# http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
2486
|
+
# Corresponds to the JSON property `languageCode`
|
2487
|
+
# @return [String]
|
2488
|
+
attr_accessor :language_code
|
2489
|
+
|
2490
|
+
def initialize(**args)
|
2491
|
+
update!(**args)
|
2492
|
+
end
|
2493
|
+
|
2494
|
+
# Update properties of this object
|
2495
|
+
def update!(**args)
|
2496
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
2497
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
2498
|
+
end
|
2499
|
+
end
|
2500
|
+
|
2501
|
+
# Additional information detected on the structural component.
|
2502
|
+
class GoogleCloudVisionV1p2beta1TextAnnotationTextProperty
|
2503
|
+
include Google::Apis::Core::Hashable
|
2504
|
+
|
2505
|
+
# Detected start or end of a structural component.
|
2506
|
+
# Corresponds to the JSON property `detectedBreak`
|
2507
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak]
|
2508
|
+
attr_accessor :detected_break
|
2509
|
+
|
2510
|
+
# A list of detected languages together with confidence.
|
2511
|
+
# Corresponds to the JSON property `detectedLanguages`
|
2512
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage>]
|
2513
|
+
attr_accessor :detected_languages
|
2514
|
+
|
2515
|
+
def initialize(**args)
|
2516
|
+
update!(**args)
|
2517
|
+
end
|
2518
|
+
|
2519
|
+
# Update properties of this object
|
2520
|
+
def update!(**args)
|
2521
|
+
@detected_break = args[:detected_break] if args.key?(:detected_break)
|
2522
|
+
@detected_languages = args[:detected_languages] if args.key?(:detected_languages)
|
2523
|
+
end
|
2524
|
+
end
|
2525
|
+
|
2526
|
+
# A vertex represents a 2D point in the image.
|
2527
|
+
# NOTE: the vertex coordinates are in the same scale as the original image.
|
2528
|
+
class GoogleCloudVisionV1p2beta1Vertex
|
2529
|
+
include Google::Apis::Core::Hashable
|
2530
|
+
|
2531
|
+
# X coordinate.
|
2532
|
+
# Corresponds to the JSON property `x`
|
2533
|
+
# @return [Fixnum]
|
2534
|
+
attr_accessor :x
|
2535
|
+
|
2536
|
+
# Y coordinate.
|
2537
|
+
# Corresponds to the JSON property `y`
|
2538
|
+
# @return [Fixnum]
|
2539
|
+
attr_accessor :y
|
2540
|
+
|
2541
|
+
def initialize(**args)
|
2542
|
+
update!(**args)
|
2543
|
+
end
|
2544
|
+
|
2545
|
+
# Update properties of this object
|
2546
|
+
def update!(**args)
|
2547
|
+
@x = args[:x] if args.key?(:x)
|
2548
|
+
@y = args[:y] if args.key?(:y)
|
2549
|
+
end
|
2550
|
+
end
|
2551
|
+
|
2552
|
+
# Relevant information for the image from the Internet.
|
2553
|
+
class GoogleCloudVisionV1p2beta1WebDetection
|
2554
|
+
include Google::Apis::Core::Hashable
|
2555
|
+
|
2556
|
+
# Best guess text labels for the request image.
|
2557
|
+
# Corresponds to the JSON property `bestGuessLabels`
|
2558
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebLabel>]
|
2559
|
+
attr_accessor :best_guess_labels
|
2560
|
+
|
2561
|
+
# Fully matching images from the Internet.
|
2562
|
+
# Can include resized copies of the query image.
|
2563
|
+
# Corresponds to the JSON property `fullMatchingImages`
|
2564
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
|
2565
|
+
attr_accessor :full_matching_images
|
2566
|
+
|
2567
|
+
# Web pages containing the matching images from the Internet.
|
2568
|
+
# Corresponds to the JSON property `pagesWithMatchingImages`
|
2569
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebPage>]
|
2570
|
+
attr_accessor :pages_with_matching_images
|
2571
|
+
|
2572
|
+
# Partial matching images from the Internet.
|
2573
|
+
# Those images are similar enough to share some key-point features. For
|
2574
|
+
# example an original image will likely have partial matching for its crops.
|
2575
|
+
# Corresponds to the JSON property `partialMatchingImages`
|
2576
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
|
2577
|
+
attr_accessor :partial_matching_images
|
2578
|
+
|
2579
|
+
# The visually similar image results.
|
2580
|
+
# Corresponds to the JSON property `visuallySimilarImages`
|
2581
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
|
2582
|
+
attr_accessor :visually_similar_images
|
2583
|
+
|
2584
|
+
# Deduced entities from similar images on the Internet.
|
2585
|
+
# Corresponds to the JSON property `webEntities`
|
2586
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebEntity>]
|
2587
|
+
attr_accessor :web_entities
|
2588
|
+
|
2589
|
+
def initialize(**args)
|
2590
|
+
update!(**args)
|
2591
|
+
end
|
2592
|
+
|
2593
|
+
# Update properties of this object
|
2594
|
+
def update!(**args)
|
2595
|
+
@best_guess_labels = args[:best_guess_labels] if args.key?(:best_guess_labels)
|
2596
|
+
@full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
|
2597
|
+
@pages_with_matching_images = args[:pages_with_matching_images] if args.key?(:pages_with_matching_images)
|
2598
|
+
@partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
|
2599
|
+
@visually_similar_images = args[:visually_similar_images] if args.key?(:visually_similar_images)
|
2600
|
+
@web_entities = args[:web_entities] if args.key?(:web_entities)
|
2601
|
+
end
|
2602
|
+
end
|
2603
|
+
|
2604
|
+
# Parameters for web detection request.
|
2605
|
+
class GoogleCloudVisionV1p2beta1WebDetectionParams
|
2606
|
+
include Google::Apis::Core::Hashable
|
2607
|
+
|
2608
|
+
# Whether to include results derived from the geo information in the image.
|
2609
|
+
# Corresponds to the JSON property `includeGeoResults`
|
2610
|
+
# @return [Boolean]
|
2611
|
+
attr_accessor :include_geo_results
|
2612
|
+
alias_method :include_geo_results?, :include_geo_results
|
2613
|
+
|
2614
|
+
def initialize(**args)
|
2615
|
+
update!(**args)
|
2616
|
+
end
|
2617
|
+
|
2618
|
+
# Update properties of this object
|
2619
|
+
def update!(**args)
|
2620
|
+
@include_geo_results = args[:include_geo_results] if args.key?(:include_geo_results)
|
2621
|
+
end
|
2622
|
+
end
|
2623
|
+
|
2624
|
+
# Entity deduced from similar images on the Internet.
|
2625
|
+
class GoogleCloudVisionV1p2beta1WebDetectionWebEntity
|
2626
|
+
include Google::Apis::Core::Hashable
|
2627
|
+
|
2628
|
+
# Canonical description of the entity, in English.
|
2629
|
+
# Corresponds to the JSON property `description`
|
2630
|
+
# @return [String]
|
2631
|
+
attr_accessor :description
|
2632
|
+
|
2633
|
+
# Opaque entity ID.
|
2634
|
+
# Corresponds to the JSON property `entityId`
|
2635
|
+
# @return [String]
|
2636
|
+
attr_accessor :entity_id
|
2637
|
+
|
2638
|
+
# Overall relevancy score for the entity.
|
2639
|
+
# Not normalized and not comparable across different image queries.
|
2640
|
+
# Corresponds to the JSON property `score`
|
2641
|
+
# @return [Float]
|
2642
|
+
attr_accessor :score
|
2643
|
+
|
2644
|
+
def initialize(**args)
|
2645
|
+
update!(**args)
|
2646
|
+
end
|
2647
|
+
|
2648
|
+
# Update properties of this object
|
2649
|
+
def update!(**args)
|
2650
|
+
@description = args[:description] if args.key?(:description)
|
2651
|
+
@entity_id = args[:entity_id] if args.key?(:entity_id)
|
2652
|
+
@score = args[:score] if args.key?(:score)
|
2653
|
+
end
|
2654
|
+
end
|
2655
|
+
|
2656
|
+
# Metadata for online images.
|
2657
|
+
class GoogleCloudVisionV1p2beta1WebDetectionWebImage
|
2658
|
+
include Google::Apis::Core::Hashable
|
2659
|
+
|
2660
|
+
# (Deprecated) Overall relevancy score for the image.
|
2661
|
+
# Corresponds to the JSON property `score`
|
2662
|
+
# @return [Float]
|
2663
|
+
attr_accessor :score
|
2664
|
+
|
2665
|
+
# The result image URL.
|
2666
|
+
# Corresponds to the JSON property `url`
|
2667
|
+
# @return [String]
|
2668
|
+
attr_accessor :url
|
2669
|
+
|
2670
|
+
def initialize(**args)
|
2671
|
+
update!(**args)
|
2672
|
+
end
|
2673
|
+
|
2674
|
+
# Update properties of this object
|
2675
|
+
def update!(**args)
|
2676
|
+
@score = args[:score] if args.key?(:score)
|
2677
|
+
@url = args[:url] if args.key?(:url)
|
2678
|
+
end
|
2679
|
+
end
|
2680
|
+
|
2681
|
+
# Label to provide extra metadata for the web detection.
|
2682
|
+
class GoogleCloudVisionV1p2beta1WebDetectionWebLabel
|
2683
|
+
include Google::Apis::Core::Hashable
|
2684
|
+
|
2685
|
+
# Label for extra metadata.
|
2686
|
+
# Corresponds to the JSON property `label`
|
2687
|
+
# @return [String]
|
2688
|
+
attr_accessor :label
|
2689
|
+
|
2690
|
+
# The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
|
2691
|
+
# For more information, see
|
2692
|
+
# http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
|
2693
|
+
# Corresponds to the JSON property `languageCode`
|
2694
|
+
# @return [String]
|
2695
|
+
attr_accessor :language_code
|
2696
|
+
|
2697
|
+
def initialize(**args)
|
2698
|
+
update!(**args)
|
2699
|
+
end
|
2700
|
+
|
2701
|
+
# Update properties of this object
|
2702
|
+
def update!(**args)
|
2703
|
+
@label = args[:label] if args.key?(:label)
|
2704
|
+
@language_code = args[:language_code] if args.key?(:language_code)
|
2705
|
+
end
|
2706
|
+
end
|
2707
|
+
|
2708
|
+
# Metadata for web pages.
|
2709
|
+
class GoogleCloudVisionV1p2beta1WebDetectionWebPage
|
2710
|
+
include Google::Apis::Core::Hashable
|
2711
|
+
|
2712
|
+
# Fully matching images on the page.
|
2713
|
+
# Can include resized copies of the query image.
|
2714
|
+
# Corresponds to the JSON property `fullMatchingImages`
|
2715
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
|
2716
|
+
attr_accessor :full_matching_images
|
2717
|
+
|
2718
|
+
# Title for the web page, may contain HTML markups.
|
2719
|
+
# Corresponds to the JSON property `pageTitle`
|
2720
|
+
# @return [String]
|
2721
|
+
attr_accessor :page_title
|
2722
|
+
|
2723
|
+
# Partial matching images on the page.
|
2724
|
+
# Those images are similar enough to share some key-point features. For
|
2725
|
+
# example an original image will likely have partial matching for its
|
2726
|
+
# crops.
|
2727
|
+
# Corresponds to the JSON property `partialMatchingImages`
|
2728
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1WebDetectionWebImage>]
|
2729
|
+
attr_accessor :partial_matching_images
|
2730
|
+
|
2731
|
+
# (Deprecated) Overall relevancy score for the web page.
|
2732
|
+
# Corresponds to the JSON property `score`
|
2733
|
+
# @return [Float]
|
2734
|
+
attr_accessor :score
|
2735
|
+
|
2736
|
+
# The result web page URL.
|
2737
|
+
# Corresponds to the JSON property `url`
|
2738
|
+
# @return [String]
|
2739
|
+
attr_accessor :url
|
2740
|
+
|
2741
|
+
def initialize(**args)
|
2742
|
+
update!(**args)
|
2743
|
+
end
|
2744
|
+
|
2745
|
+
# Update properties of this object
|
2746
|
+
def update!(**args)
|
2747
|
+
@full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
|
2748
|
+
@page_title = args[:page_title] if args.key?(:page_title)
|
2749
|
+
@partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
|
2750
|
+
@score = args[:score] if args.key?(:score)
|
2751
|
+
@url = args[:url] if args.key?(:url)
|
2752
|
+
end
|
2753
|
+
end
|
2754
|
+
|
2755
|
+
# A word representation.
|
2756
|
+
class GoogleCloudVisionV1p2beta1Word
|
2757
|
+
include Google::Apis::Core::Hashable
|
2758
|
+
|
2759
|
+
# A bounding polygon for the detected image annotation.
|
2760
|
+
# Corresponds to the JSON property `boundingBox`
|
2761
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1BoundingPoly]
|
2762
|
+
attr_accessor :bounding_box
|
2763
|
+
|
2764
|
+
# Confidence of the OCR results for the word. Range [0, 1].
|
2765
|
+
# Corresponds to the JSON property `confidence`
|
2766
|
+
# @return [Float]
|
2767
|
+
attr_accessor :confidence
|
2768
|
+
|
2769
|
+
# Additional information detected on the structural component.
|
2770
|
+
# Corresponds to the JSON property `property`
|
2771
|
+
# @return [Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1TextAnnotationTextProperty]
|
2772
|
+
attr_accessor :property
|
2773
|
+
|
2774
|
+
# List of symbols in the word.
|
2775
|
+
# The order of the symbols follows the natural reading order.
|
2776
|
+
# Corresponds to the JSON property `symbols`
|
2777
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Symbol>]
|
2778
|
+
attr_accessor :symbols
|
2779
|
+
|
2780
|
+
def initialize(**args)
|
2781
|
+
update!(**args)
|
2782
|
+
end
|
2783
|
+
|
2784
|
+
# Update properties of this object
|
2785
|
+
def update!(**args)
|
2786
|
+
@bounding_box = args[:bounding_box] if args.key?(:bounding_box)
|
2787
|
+
@confidence = args[:confidence] if args.key?(:confidence)
|
2788
|
+
@property = args[:property] if args.key?(:property)
|
2789
|
+
@symbols = args[:symbols] if args.key?(:symbols)
|
2790
|
+
end
|
2791
|
+
end
|
2792
|
+
|
2793
|
+
# Metadata for the batch operations such as the current state.
|
2794
|
+
# This is included in the `metadata` field of the `Operation` returned by the
|
2795
|
+
# `GetOperation` call of the `google::longrunning::Operations` service.
|
2796
|
+
class GoogleCloudVisionV1p3beta1BatchOperationMetadata
|
2797
|
+
include Google::Apis::Core::Hashable
|
2798
|
+
|
2799
|
+
# The time when the batch request is finished and
|
2800
|
+
# google.longrunning.Operation.done is set to true.
|
2801
|
+
# Corresponds to the JSON property `endTime`
|
2802
|
+
# @return [String]
|
2803
|
+
attr_accessor :end_time
|
2804
|
+
|
2805
|
+
# The current state of the batch operation.
|
2806
|
+
# Corresponds to the JSON property `state`
|
2807
|
+
# @return [String]
|
2808
|
+
attr_accessor :state
|
2809
|
+
|
2810
|
+
# The time when the batch request was submitted to the server.
|
2811
|
+
# Corresponds to the JSON property `submitTime`
|
2812
|
+
# @return [String]
|
2813
|
+
attr_accessor :submit_time
|
2814
|
+
|
2815
|
+
def initialize(**args)
|
2816
|
+
update!(**args)
|
2817
|
+
end
|
2818
|
+
|
2819
|
+
# Update properties of this object
|
1148
2820
|
def update!(**args)
|
1149
|
-
@
|
1150
|
-
@
|
1151
|
-
@
|
1152
|
-
@web_detection_params = args[:web_detection_params] if args.key?(:web_detection_params)
|
2821
|
+
@end_time = args[:end_time] if args.key?(:end_time)
|
2822
|
+
@state = args[:state] if args.key?(:state)
|
2823
|
+
@submit_time = args[:submit_time] if args.key?(:submit_time)
|
1153
2824
|
end
|
1154
2825
|
end
|
1155
2826
|
|
1156
|
-
#
|
1157
|
-
class
|
2827
|
+
# A bounding polygon for the detected image annotation.
|
2828
|
+
class GoogleCloudVisionV1p3beta1BoundingPoly
|
1158
2829
|
include Google::Apis::Core::Hashable
|
1159
2830
|
|
1160
|
-
#
|
1161
|
-
# Corresponds to the JSON property `
|
1162
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
1163
|
-
attr_accessor :
|
2831
|
+
# The bounding polygon normalized vertices.
|
2832
|
+
# Corresponds to the JSON property `normalizedVertices`
|
2833
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p3beta1NormalizedVertex>]
|
2834
|
+
attr_accessor :normalized_vertices
|
2835
|
+
|
2836
|
+
# The bounding polygon vertices.
|
2837
|
+
# Corresponds to the JSON property `vertices`
|
2838
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p3beta1Vertex>]
|
2839
|
+
attr_accessor :vertices
|
1164
2840
|
|
1165
2841
|
def initialize(**args)
|
1166
2842
|
update!(**args)
|
@@ -1168,40 +2844,101 @@ module Google
|
|
1168
2844
|
|
1169
2845
|
# Update properties of this object
|
1170
2846
|
def update!(**args)
|
1171
|
-
@
|
2847
|
+
@normalized_vertices = args[:normalized_vertices] if args.key?(:normalized_vertices)
|
2848
|
+
@vertices = args[:vertices] if args.key?(:vertices)
|
1172
2849
|
end
|
1173
2850
|
end
|
1174
2851
|
|
1175
|
-
#
|
1176
|
-
|
2852
|
+
# Response message for the `ImportProductSets` method.
|
2853
|
+
# This message is returned by the
|
2854
|
+
# google.longrunning.Operations.GetOperation method in the returned
|
2855
|
+
# google.longrunning.Operation.response field.
|
2856
|
+
class GoogleCloudVisionV1p3beta1ImportProductSetsResponse
|
1177
2857
|
include Google::Apis::Core::Hashable
|
1178
2858
|
|
1179
|
-
#
|
1180
|
-
#
|
1181
|
-
#
|
1182
|
-
|
1183
|
-
|
1184
|
-
#
|
2859
|
+
# The list of reference_images that are imported successfully.
|
2860
|
+
# Corresponds to the JSON property `referenceImages`
|
2861
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p3beta1ReferenceImage>]
|
2862
|
+
attr_accessor :reference_images
|
2863
|
+
|
2864
|
+
# The rpc status for each ImportProductSet request, including both successes
|
2865
|
+
# and errors.
|
2866
|
+
# The number of statuses here matches the number of lines in the csv file,
|
2867
|
+
# and statuses[i] stores the success or failure status of processing the i-th
|
2868
|
+
# line of the csv, starting from line 0.
|
2869
|
+
# Corresponds to the JSON property `statuses`
|
2870
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::Status>]
|
2871
|
+
attr_accessor :statuses
|
2872
|
+
|
2873
|
+
def initialize(**args)
|
2874
|
+
update!(**args)
|
2875
|
+
end
|
2876
|
+
|
2877
|
+
# Update properties of this object
|
2878
|
+
def update!(**args)
|
2879
|
+
@reference_images = args[:reference_images] if args.key?(:reference_images)
|
2880
|
+
@statuses = args[:statuses] if args.key?(:statuses)
|
2881
|
+
end
|
2882
|
+
end
|
2883
|
+
|
2884
|
+
# A vertex represents a 2D point in the image.
|
2885
|
+
# NOTE: the normalized vertex coordinates are relative to the original image
|
2886
|
+
# and range from 0 to 1.
|
2887
|
+
class GoogleCloudVisionV1p3beta1NormalizedVertex
|
2888
|
+
include Google::Apis::Core::Hashable
|
2889
|
+
|
2890
|
+
# X coordinate.
|
2891
|
+
# Corresponds to the JSON property `x`
|
2892
|
+
# @return [Float]
|
2893
|
+
attr_accessor :x
|
2894
|
+
|
2895
|
+
# Y coordinate.
|
2896
|
+
# Corresponds to the JSON property `y`
|
2897
|
+
# @return [Float]
|
2898
|
+
attr_accessor :y
|
2899
|
+
|
2900
|
+
def initialize(**args)
|
2901
|
+
update!(**args)
|
2902
|
+
end
|
2903
|
+
|
2904
|
+
# Update properties of this object
|
2905
|
+
def update!(**args)
|
2906
|
+
@x = args[:x] if args.key?(:x)
|
2907
|
+
@y = args[:y] if args.key?(:y)
|
2908
|
+
end
|
2909
|
+
end
|
2910
|
+
|
2911
|
+
# A `ReferenceImage` represents a product image and its associated metadata,
|
2912
|
+
# such as bounding boxes.
|
2913
|
+
class GoogleCloudVisionV1p3beta1ReferenceImage
|
2914
|
+
include Google::Apis::Core::Hashable
|
2915
|
+
|
2916
|
+
# Bounding polygons around the areas of interest in the reference image.
|
2917
|
+
# Optional. If this field is empty, the system will try to detect regions of
|
2918
|
+
# interest. At most 10 bounding polygons will be used.
|
2919
|
+
# The provided shape is converted into a non-rotated rectangle. Once
|
2920
|
+
# converted, the small edge of the rectangle must be greater than or equal
|
2921
|
+
# to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5
|
2922
|
+
# is not).
|
2923
|
+
# Corresponds to the JSON property `boundingPolys`
|
2924
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p3beta1BoundingPoly>]
|
2925
|
+
attr_accessor :bounding_polys
|
2926
|
+
|
2927
|
+
# The resource name of the reference image.
|
2928
|
+
# Format is:
|
2929
|
+
# `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/
|
2930
|
+
# IMAGE_ID`.
|
2931
|
+
# This field is ignored when creating a reference image.
|
2932
|
+
# Corresponds to the JSON property `name`
|
1185
2933
|
# @return [String]
|
1186
|
-
attr_accessor :
|
2934
|
+
attr_accessor :name
|
1187
2935
|
|
1188
|
-
# The URI of the
|
1189
|
-
#
|
1190
|
-
#
|
1191
|
-
#
|
1192
|
-
# URIs](https://cloud.google.com/storage/docs/reference-uris) for more
|
1193
|
-
# info.
|
1194
|
-
# 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from
|
1195
|
-
# HTTP/HTTPS URLs, Google cannot guarantee that the request will be
|
1196
|
-
# completed. Your request may fail if the specified host denies the
|
1197
|
-
# request (e.g. due to request throttling or DOS prevention), or if Google
|
1198
|
-
# throttles requests to the site for abuse prevention. You should not
|
1199
|
-
# depend on externally-hosted images for production applications.
|
1200
|
-
# When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes
|
1201
|
-
# precedence.
|
1202
|
-
# Corresponds to the JSON property `imageUri`
|
2936
|
+
# The Google Cloud Storage URI of the reference image.
|
2937
|
+
# The URI must start with `gs://`.
|
2938
|
+
# Required.
|
2939
|
+
# Corresponds to the JSON property `uri`
|
1203
2940
|
# @return [String]
|
1204
|
-
attr_accessor :
|
2941
|
+
attr_accessor :uri
|
1205
2942
|
|
1206
2943
|
def initialize(**args)
|
1207
2944
|
update!(**args)
|
@@ -1209,18 +2946,91 @@ module Google
|
|
1209
2946
|
|
1210
2947
|
# Update properties of this object
|
1211
2948
|
def update!(**args)
|
1212
|
-
@
|
1213
|
-
@
|
2949
|
+
@bounding_polys = args[:bounding_polys] if args.key?(:bounding_polys)
|
2950
|
+
@name = args[:name] if args.key?(:name)
|
2951
|
+
@uri = args[:uri] if args.key?(:uri)
|
2952
|
+
end
|
2953
|
+
end
|
2954
|
+
|
2955
|
+
# A vertex represents a 2D point in the image.
|
2956
|
+
# NOTE: the vertex coordinates are in the same scale as the original image.
|
2957
|
+
class GoogleCloudVisionV1p3beta1Vertex
|
2958
|
+
include Google::Apis::Core::Hashable
|
2959
|
+
|
2960
|
+
# X coordinate.
|
2961
|
+
# Corresponds to the JSON property `x`
|
2962
|
+
# @return [Fixnum]
|
2963
|
+
attr_accessor :x
|
2964
|
+
|
2965
|
+
# Y coordinate.
|
2966
|
+
# Corresponds to the JSON property `y`
|
2967
|
+
# @return [Fixnum]
|
2968
|
+
attr_accessor :y
|
2969
|
+
|
2970
|
+
def initialize(**args)
|
2971
|
+
update!(**args)
|
2972
|
+
end
|
2973
|
+
|
2974
|
+
# Update properties of this object
|
2975
|
+
def update!(**args)
|
2976
|
+
@x = args[:x] if args.key?(:x)
|
2977
|
+
@y = args[:y] if args.key?(:y)
|
2978
|
+
end
|
2979
|
+
end
|
2980
|
+
|
2981
|
+
# If an image was produced from a file (e.g. a PDF), this message gives
|
2982
|
+
# information about the source of that image.
|
2983
|
+
class ImageAnnotationContext
|
2984
|
+
include Google::Apis::Core::Hashable
|
2985
|
+
|
2986
|
+
# If the file was a PDF or TIFF, this field gives the page number within
|
2987
|
+
# the file used to produce the image.
|
2988
|
+
# Corresponds to the JSON property `pageNumber`
|
2989
|
+
# @return [Fixnum]
|
2990
|
+
attr_accessor :page_number
|
2991
|
+
|
2992
|
+
# The URI of the file used to produce the image.
|
2993
|
+
# Corresponds to the JSON property `uri`
|
2994
|
+
# @return [String]
|
2995
|
+
attr_accessor :uri
|
2996
|
+
|
2997
|
+
def initialize(**args)
|
2998
|
+
update!(**args)
|
2999
|
+
end
|
3000
|
+
|
3001
|
+
# Update properties of this object
|
3002
|
+
def update!(**args)
|
3003
|
+
@page_number = args[:page_number] if args.key?(:page_number)
|
3004
|
+
@uri = args[:uri] if args.key?(:uri)
|
3005
|
+
end
|
3006
|
+
end
|
3007
|
+
|
3008
|
+
# Stores image properties, such as dominant colors.
|
3009
|
+
class ImageProperties
|
3010
|
+
include Google::Apis::Core::Hashable
|
3011
|
+
|
3012
|
+
# Set of dominant colors and their corresponding scores.
|
3013
|
+
# Corresponds to the JSON property `dominantColors`
|
3014
|
+
# @return [Google::Apis::VisionV1p2beta1::DominantColorsAnnotation]
|
3015
|
+
attr_accessor :dominant_colors
|
3016
|
+
|
3017
|
+
def initialize(**args)
|
3018
|
+
update!(**args)
|
3019
|
+
end
|
3020
|
+
|
3021
|
+
# Update properties of this object
|
3022
|
+
def update!(**args)
|
3023
|
+
@dominant_colors = args[:dominant_colors] if args.key?(:dominant_colors)
|
1214
3024
|
end
|
1215
3025
|
end
|
1216
3026
|
|
1217
3027
|
# The desired input location and metadata.
|
1218
|
-
class
|
3028
|
+
class InputConfig
|
1219
3029
|
include Google::Apis::Core::Hashable
|
1220
3030
|
|
1221
3031
|
# The Google Cloud Storage location where the input will be read from.
|
1222
3032
|
# Corresponds to the JSON property `gcsSource`
|
1223
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
3033
|
+
# @return [Google::Apis::VisionV1p2beta1::GcsSource]
|
1224
3034
|
attr_accessor :gcs_source
|
1225
3035
|
|
1226
3036
|
# The type of the file. Currently only "application/pdf" and "image/tiff"
|
@@ -1240,27 +3050,100 @@ module Google
|
|
1240
3050
|
end
|
1241
3051
|
end
|
1242
3052
|
|
1243
|
-
#
|
1244
|
-
class
|
3053
|
+
# A face-specific landmark (for example, a face feature).
|
3054
|
+
class Landmark
|
1245
3055
|
include Google::Apis::Core::Hashable
|
1246
3056
|
|
1247
|
-
#
|
1248
|
-
#
|
1249
|
-
#
|
1250
|
-
#
|
1251
|
-
#
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
3057
|
+
# A 3D position in the image, used primarily for Face detection landmarks.
|
3058
|
+
# A valid Position must have both x and y coordinates.
|
3059
|
+
# The position coordinates are in the same scale as the original image.
|
3060
|
+
# Corresponds to the JSON property `position`
|
3061
|
+
# @return [Google::Apis::VisionV1p2beta1::Position]
|
3062
|
+
attr_accessor :position
|
3063
|
+
|
3064
|
+
# Face landmark type.
|
3065
|
+
# Corresponds to the JSON property `type`
|
3066
|
+
# @return [String]
|
3067
|
+
attr_accessor :type
|
3068
|
+
|
3069
|
+
def initialize(**args)
|
3070
|
+
update!(**args)
|
3071
|
+
end
|
3072
|
+
|
3073
|
+
# Update properties of this object
|
3074
|
+
def update!(**args)
|
3075
|
+
@position = args[:position] if args.key?(:position)
|
3076
|
+
@type = args[:type] if args.key?(:type)
|
3077
|
+
end
|
3078
|
+
end
|
3079
|
+
|
3080
|
+
# An object representing a latitude/longitude pair. This is expressed as a pair
|
3081
|
+
# of doubles representing degrees latitude and degrees longitude. Unless
|
3082
|
+
# specified otherwise, this must conform to the
|
3083
|
+
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
3084
|
+
# standard</a>. Values must be within normalized ranges.
|
3085
|
+
class LatLng
|
3086
|
+
include Google::Apis::Core::Hashable
|
3087
|
+
|
3088
|
+
# The latitude in degrees. It must be in the range [-90.0, +90.0].
|
3089
|
+
# Corresponds to the JSON property `latitude`
|
3090
|
+
# @return [Float]
|
3091
|
+
attr_accessor :latitude
|
3092
|
+
|
3093
|
+
# The longitude in degrees. It must be in the range [-180.0, +180.0].
|
3094
|
+
# Corresponds to the JSON property `longitude`
|
3095
|
+
# @return [Float]
|
3096
|
+
attr_accessor :longitude
|
3097
|
+
|
3098
|
+
def initialize(**args)
|
3099
|
+
update!(**args)
|
3100
|
+
end
|
3101
|
+
|
3102
|
+
# Update properties of this object
|
3103
|
+
def update!(**args)
|
3104
|
+
@latitude = args[:latitude] if args.key?(:latitude)
|
3105
|
+
@longitude = args[:longitude] if args.key?(:longitude)
|
3106
|
+
end
|
3107
|
+
end
|
3108
|
+
|
3109
|
+
# Detected entity location information.
|
3110
|
+
class LocationInfo
|
3111
|
+
include Google::Apis::Core::Hashable
|
1255
3112
|
|
1256
3113
|
# An object representing a latitude/longitude pair. This is expressed as a pair
|
1257
3114
|
# of doubles representing degrees latitude and degrees longitude. Unless
|
1258
3115
|
# specified otherwise, this must conform to the
|
1259
3116
|
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
1260
3117
|
# standard</a>. Values must be within normalized ranges.
|
1261
|
-
# Corresponds to the JSON property `
|
3118
|
+
# Corresponds to the JSON property `latLng`
|
1262
3119
|
# @return [Google::Apis::VisionV1p2beta1::LatLng]
|
1263
|
-
attr_accessor :
|
3120
|
+
attr_accessor :lat_lng
|
3121
|
+
|
3122
|
+
def initialize(**args)
|
3123
|
+
update!(**args)
|
3124
|
+
end
|
3125
|
+
|
3126
|
+
# Update properties of this object
|
3127
|
+
def update!(**args)
|
3128
|
+
@lat_lng = args[:lat_lng] if args.key?(:lat_lng)
|
3129
|
+
end
|
3130
|
+
end
|
3131
|
+
|
3132
|
+
# A vertex represents a 2D point in the image.
|
3133
|
+
# NOTE: the normalized vertex coordinates are relative to the original image
|
3134
|
+
# and range from 0 to 1.
|
3135
|
+
class NormalizedVertex
|
3136
|
+
include Google::Apis::Core::Hashable
|
3137
|
+
|
3138
|
+
# X coordinate.
|
3139
|
+
# Corresponds to the JSON property `x`
|
3140
|
+
# @return [Float]
|
3141
|
+
attr_accessor :x
|
3142
|
+
|
3143
|
+
# Y coordinate.
|
3144
|
+
# Corresponds to the JSON property `y`
|
3145
|
+
# @return [Float]
|
3146
|
+
attr_accessor :y
|
1264
3147
|
|
1265
3148
|
def initialize(**args)
|
1266
3149
|
update!(**args)
|
@@ -1268,23 +3151,93 @@ module Google
|
|
1268
3151
|
|
1269
3152
|
# Update properties of this object
|
1270
3153
|
def update!(**args)
|
1271
|
-
@
|
1272
|
-
@
|
3154
|
+
@x = args[:x] if args.key?(:x)
|
3155
|
+
@y = args[:y] if args.key?(:y)
|
1273
3156
|
end
|
1274
3157
|
end
|
1275
3158
|
|
1276
|
-
#
|
1277
|
-
|
3159
|
+
# This resource represents a long-running operation that is the result of a
|
3160
|
+
# network API call.
|
3161
|
+
class Operation
|
1278
3162
|
include Google::Apis::Core::Hashable
|
1279
3163
|
|
1280
|
-
#
|
1281
|
-
#
|
1282
|
-
#
|
1283
|
-
#
|
1284
|
-
#
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
3164
|
+
# If the value is `false`, it means the operation is still in progress.
|
3165
|
+
# If `true`, the operation is completed, and either `error` or `response` is
|
3166
|
+
# available.
|
3167
|
+
# Corresponds to the JSON property `done`
|
3168
|
+
# @return [Boolean]
|
3169
|
+
attr_accessor :done
|
3170
|
+
alias_method :done?, :done
|
3171
|
+
|
3172
|
+
# The `Status` type defines a logical error model that is suitable for different
|
3173
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
3174
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
3175
|
+
# - Simple to use and understand for most users
|
3176
|
+
# - Flexible enough to meet unexpected needs
|
3177
|
+
# # Overview
|
3178
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
3179
|
+
# and error details. The error code should be an enum value of
|
3180
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
3181
|
+
# error message should be a developer-facing English message that helps
|
3182
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
3183
|
+
# error message is needed, put the localized message in the error details or
|
3184
|
+
# localize it in the client. The optional error details may contain arbitrary
|
3185
|
+
# information about the error. There is a predefined set of error detail types
|
3186
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
3187
|
+
# # Language mapping
|
3188
|
+
# The `Status` message is the logical representation of the error model, but it
|
3189
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
3190
|
+
# exposed in different client libraries and different wire protocols, it can be
|
3191
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
3192
|
+
# in Java, but more likely mapped to some error codes in C.
|
3193
|
+
# # Other uses
|
3194
|
+
# The error model and the `Status` message can be used in a variety of
|
3195
|
+
# environments, either with or without APIs, to provide a
|
3196
|
+
# consistent developer experience across different environments.
|
3197
|
+
# Example uses of this error model include:
|
3198
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
3199
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
3200
|
+
# errors.
|
3201
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
3202
|
+
# have a `Status` message for error reporting.
|
3203
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
3204
|
+
# `Status` message should be used directly inside batch response, one for
|
3205
|
+
# each error sub-response.
|
3206
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
3207
|
+
# results in its response, the status of those operations should be
|
3208
|
+
# represented directly using the `Status` message.
|
3209
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
3210
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
3211
|
+
# Corresponds to the JSON property `error`
|
3212
|
+
# @return [Google::Apis::VisionV1p2beta1::Status]
|
3213
|
+
attr_accessor :error
|
3214
|
+
|
3215
|
+
# Service-specific metadata associated with the operation. It typically
|
3216
|
+
# contains progress information and common metadata such as create time.
|
3217
|
+
# Some services might not provide such metadata. Any method that returns a
|
3218
|
+
# long-running operation should document the metadata type, if any.
|
3219
|
+
# Corresponds to the JSON property `metadata`
|
3220
|
+
# @return [Hash<String,Object>]
|
3221
|
+
attr_accessor :metadata
|
3222
|
+
|
3223
|
+
# The server-assigned name, which is only unique within the same service that
|
3224
|
+
# originally returns it. If you use the default HTTP mapping, the
|
3225
|
+
# `name` should have the format of `operations/some/unique/name`.
|
3226
|
+
# Corresponds to the JSON property `name`
|
3227
|
+
# @return [String]
|
3228
|
+
attr_accessor :name
|
3229
|
+
|
3230
|
+
# The normal response of the operation in case of success. If the original
|
3231
|
+
# method returns no data on success, such as `Delete`, the response is
|
3232
|
+
# `google.protobuf.Empty`. If the original method is standard
|
3233
|
+
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
3234
|
+
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
3235
|
+
# is the original method name. For example, if the original method name
|
3236
|
+
# is `TakeSnapshot()`, the inferred response type is
|
3237
|
+
# `TakeSnapshotResponse`.
|
3238
|
+
# Corresponds to the JSON property `response`
|
3239
|
+
# @return [Hash<String,Object>]
|
3240
|
+
attr_accessor :response
|
1288
3241
|
|
1289
3242
|
def initialize(**args)
|
1290
3243
|
update!(**args)
|
@@ -1292,12 +3245,16 @@ module Google
|
|
1292
3245
|
|
1293
3246
|
# Update properties of this object
|
1294
3247
|
def update!(**args)
|
1295
|
-
@
|
3248
|
+
@done = args[:done] if args.key?(:done)
|
3249
|
+
@error = args[:error] if args.key?(:error)
|
3250
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
3251
|
+
@name = args[:name] if args.key?(:name)
|
3252
|
+
@response = args[:response] if args.key?(:response)
|
1296
3253
|
end
|
1297
3254
|
end
|
1298
3255
|
|
1299
3256
|
# Contains metadata for the BatchAnnotateImages operation.
|
1300
|
-
class
|
3257
|
+
class OperationMetadata
|
1301
3258
|
include Google::Apis::Core::Hashable
|
1302
3259
|
|
1303
3260
|
# The time when the batch request was received.
|
@@ -1328,10 +3285,11 @@ module Google
|
|
1328
3285
|
end
|
1329
3286
|
|
1330
3287
|
# The desired output location and metadata.
|
1331
|
-
class
|
3288
|
+
class OutputConfig
|
1332
3289
|
include Google::Apis::Core::Hashable
|
1333
3290
|
|
1334
|
-
# The max number of response protos to put into each output JSON file on
|
3291
|
+
# The max number of response protos to put into each output JSON file on
|
3292
|
+
# Google Cloud Storage.
|
1335
3293
|
# The valid range is [1, 100]. If not specified, the default value is 20.
|
1336
3294
|
# For example, for one pdf file with 100 pages, 100 response protos will
|
1337
3295
|
# be generated. If `batch_size` = 20, then 5 json files each
|
@@ -1345,7 +3303,7 @@ module Google
|
|
1345
3303
|
|
1346
3304
|
# The Google Cloud Storage location where the output will be written to.
|
1347
3305
|
# Corresponds to the JSON property `gcsDestination`
|
1348
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
3306
|
+
# @return [Google::Apis::VisionV1p2beta1::GcsDestination]
|
1349
3307
|
attr_accessor :gcs_destination
|
1350
3308
|
|
1351
3309
|
def initialize(**args)
|
@@ -1360,12 +3318,12 @@ module Google
|
|
1360
3318
|
end
|
1361
3319
|
|
1362
3320
|
# Detected page from OCR.
|
1363
|
-
class
|
3321
|
+
class Page
|
1364
3322
|
include Google::Apis::Core::Hashable
|
1365
3323
|
|
1366
3324
|
# List of blocks of text, images etc on this page.
|
1367
3325
|
# Corresponds to the JSON property `blocks`
|
1368
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
3326
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::Block>]
|
1369
3327
|
attr_accessor :blocks
|
1370
3328
|
|
1371
3329
|
# Confidence of the OCR results on the page. Range [0, 1].
|
@@ -1381,7 +3339,7 @@ module Google
|
|
1381
3339
|
|
1382
3340
|
# Additional information detected on the structural component.
|
1383
3341
|
# Corresponds to the JSON property `property`
|
1384
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
3342
|
+
# @return [Google::Apis::VisionV1p2beta1::TextProperty]
|
1385
3343
|
attr_accessor :property
|
1386
3344
|
|
1387
3345
|
# Page width. For PDFs the unit is points. For images (including
|
@@ -1405,12 +3363,12 @@ module Google
|
|
1405
3363
|
end
|
1406
3364
|
|
1407
3365
|
# Structural unit of text representing a number of words in certain order.
|
1408
|
-
class
|
3366
|
+
class Paragraph
|
1409
3367
|
include Google::Apis::Core::Hashable
|
1410
3368
|
|
1411
3369
|
# A bounding polygon for the detected image annotation.
|
1412
3370
|
# Corresponds to the JSON property `boundingBox`
|
1413
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
3371
|
+
# @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
|
1414
3372
|
attr_accessor :bounding_box
|
1415
3373
|
|
1416
3374
|
# Confidence of the OCR results for the paragraph. Range [0, 1].
|
@@ -1420,12 +3378,12 @@ module Google
|
|
1420
3378
|
|
1421
3379
|
# Additional information detected on the structural component.
|
1422
3380
|
# Corresponds to the JSON property `property`
|
1423
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
3381
|
+
# @return [Google::Apis::VisionV1p2beta1::TextProperty]
|
1424
3382
|
attr_accessor :property
|
1425
3383
|
|
1426
3384
|
# List of words in this paragraph.
|
1427
3385
|
# Corresponds to the JSON property `words`
|
1428
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
3386
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::Word>]
|
1429
3387
|
attr_accessor :words
|
1430
3388
|
|
1431
3389
|
def initialize(**args)
|
@@ -1444,7 +3402,7 @@ module Google
|
|
1444
3402
|
# A 3D position in the image, used primarily for Face detection landmarks.
|
1445
3403
|
# A valid Position must have both x and y coordinates.
|
1446
3404
|
# The position coordinates are in the same scale as the original image.
|
1447
|
-
class
|
3405
|
+
class Position
|
1448
3406
|
include Google::Apis::Core::Hashable
|
1449
3407
|
|
1450
3408
|
# X coordinate.
|
@@ -1475,7 +3433,7 @@ module Google
|
|
1475
3433
|
end
|
1476
3434
|
|
1477
3435
|
# A `Property` consists of a user-supplied name/value pair.
|
1478
|
-
class
|
3436
|
+
class Property
|
1479
3437
|
include Google::Apis::Core::Hashable
|
1480
3438
|
|
1481
3439
|
# Name of the property.
|
@@ -1508,7 +3466,7 @@ module Google
|
|
1508
3466
|
# Set of features pertaining to the image, computed by computer vision
|
1509
3467
|
# methods over safe-search verticals (for example, adult, spoof, medical,
|
1510
3468
|
# violence).
|
1511
|
-
class
|
3469
|
+
class SafeSearchAnnotation
|
1512
3470
|
include Google::Apis::Core::Hashable
|
1513
3471
|
|
1514
3472
|
# Represents the adult content likelihood for the image. Adult content may
|
@@ -1557,13 +3515,85 @@ module Google
|
|
1557
3515
|
end
|
1558
3516
|
end
|
1559
3517
|
|
3518
|
+
# The `Status` type defines a logical error model that is suitable for different
|
3519
|
+
# programming environments, including REST APIs and RPC APIs. It is used by
|
3520
|
+
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
3521
|
+
# - Simple to use and understand for most users
|
3522
|
+
# - Flexible enough to meet unexpected needs
|
3523
|
+
# # Overview
|
3524
|
+
# The `Status` message contains three pieces of data: error code, error message,
|
3525
|
+
# and error details. The error code should be an enum value of
|
3526
|
+
# google.rpc.Code, but it may accept additional error codes if needed. The
|
3527
|
+
# error message should be a developer-facing English message that helps
|
3528
|
+
# developers *understand* and *resolve* the error. If a localized user-facing
|
3529
|
+
# error message is needed, put the localized message in the error details or
|
3530
|
+
# localize it in the client. The optional error details may contain arbitrary
|
3531
|
+
# information about the error. There is a predefined set of error detail types
|
3532
|
+
# in the package `google.rpc` that can be used for common error conditions.
|
3533
|
+
# # Language mapping
|
3534
|
+
# The `Status` message is the logical representation of the error model, but it
|
3535
|
+
# is not necessarily the actual wire format. When the `Status` message is
|
3536
|
+
# exposed in different client libraries and different wire protocols, it can be
|
3537
|
+
# mapped differently. For example, it will likely be mapped to some exceptions
|
3538
|
+
# in Java, but more likely mapped to some error codes in C.
|
3539
|
+
# # Other uses
|
3540
|
+
# The error model and the `Status` message can be used in a variety of
|
3541
|
+
# environments, either with or without APIs, to provide a
|
3542
|
+
# consistent developer experience across different environments.
|
3543
|
+
# Example uses of this error model include:
|
3544
|
+
# - Partial errors. If a service needs to return partial errors to the client,
|
3545
|
+
# it may embed the `Status` in the normal response to indicate the partial
|
3546
|
+
# errors.
|
3547
|
+
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
3548
|
+
# have a `Status` message for error reporting.
|
3549
|
+
# - Batch operations. If a client uses batch request and batch response, the
|
3550
|
+
# `Status` message should be used directly inside batch response, one for
|
3551
|
+
# each error sub-response.
|
3552
|
+
# - Asynchronous operations. If an API call embeds asynchronous operation
|
3553
|
+
# results in its response, the status of those operations should be
|
3554
|
+
# represented directly using the `Status` message.
|
3555
|
+
# - Logging. If some API errors are stored in logs, the message `Status` could
|
3556
|
+
# be used directly after any stripping needed for security/privacy reasons.
|
3557
|
+
class Status
|
3558
|
+
include Google::Apis::Core::Hashable
|
3559
|
+
|
3560
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
3561
|
+
# Corresponds to the JSON property `code`
|
3562
|
+
# @return [Fixnum]
|
3563
|
+
attr_accessor :code
|
3564
|
+
|
3565
|
+
# A list of messages that carry the error details. There is a common set of
|
3566
|
+
# message types for APIs to use.
|
3567
|
+
# Corresponds to the JSON property `details`
|
3568
|
+
# @return [Array<Hash<String,Object>>]
|
3569
|
+
attr_accessor :details
|
3570
|
+
|
3571
|
+
# A developer-facing error message, which should be in English. Any
|
3572
|
+
# user-facing error message should be localized and sent in the
|
3573
|
+
# google.rpc.Status.details field, or localized by the client.
|
3574
|
+
# Corresponds to the JSON property `message`
|
3575
|
+
# @return [String]
|
3576
|
+
attr_accessor :message
|
3577
|
+
|
3578
|
+
def initialize(**args)
|
3579
|
+
update!(**args)
|
3580
|
+
end
|
3581
|
+
|
3582
|
+
# Update properties of this object
|
3583
|
+
def update!(**args)
|
3584
|
+
@code = args[:code] if args.key?(:code)
|
3585
|
+
@details = args[:details] if args.key?(:details)
|
3586
|
+
@message = args[:message] if args.key?(:message)
|
3587
|
+
end
|
3588
|
+
end
|
3589
|
+
|
1560
3590
|
# A single symbol representation.
|
1561
|
-
class
|
3591
|
+
class Symbol
|
1562
3592
|
include Google::Apis::Core::Hashable
|
1563
3593
|
|
1564
3594
|
# A bounding polygon for the detected image annotation.
|
1565
3595
|
# Corresponds to the JSON property `boundingBox`
|
1566
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
3596
|
+
# @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
|
1567
3597
|
attr_accessor :bounding_box
|
1568
3598
|
|
1569
3599
|
# Confidence of the OCR results for the symbol. Range [0, 1].
|
@@ -1573,7 +3603,7 @@ module Google
|
|
1573
3603
|
|
1574
3604
|
# Additional information detected on the structural component.
|
1575
3605
|
# Corresponds to the JSON property `property`
|
1576
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
3606
|
+
# @return [Google::Apis::VisionV1p2beta1::TextProperty]
|
1577
3607
|
attr_accessor :property
|
1578
3608
|
|
1579
3609
|
# The actual UTF-8 representation of the symbol.
|
@@ -1601,71 +3631,18 @@ module Google
|
|
1601
3631
|
# properties. Properties describe detected languages, breaks etc.. Please refer
|
1602
3632
|
# to the TextAnnotation.TextProperty message definition below for more
|
1603
3633
|
# detail.
|
1604
|
-
class
|
1605
|
-
include Google::Apis::Core::Hashable
|
1606
|
-
|
1607
|
-
# List of pages detected by OCR.
|
1608
|
-
# Corresponds to the JSON property `pages`
|
1609
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p2beta1Page>]
|
1610
|
-
attr_accessor :pages
|
1611
|
-
|
1612
|
-
# UTF-8 text detected on the pages.
|
1613
|
-
# Corresponds to the JSON property `text`
|
1614
|
-
# @return [String]
|
1615
|
-
attr_accessor :text
|
1616
|
-
|
1617
|
-
def initialize(**args)
|
1618
|
-
update!(**args)
|
1619
|
-
end
|
1620
|
-
|
1621
|
-
# Update properties of this object
|
1622
|
-
def update!(**args)
|
1623
|
-
@pages = args[:pages] if args.key?(:pages)
|
1624
|
-
@text = args[:text] if args.key?(:text)
|
1625
|
-
end
|
1626
|
-
end
|
1627
|
-
|
1628
|
-
# Detected start or end of a structural component.
|
1629
|
-
class GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak
|
1630
|
-
include Google::Apis::Core::Hashable
|
1631
|
-
|
1632
|
-
# True if break prepends the element.
|
1633
|
-
# Corresponds to the JSON property `isPrefix`
|
1634
|
-
# @return [Boolean]
|
1635
|
-
attr_accessor :is_prefix
|
1636
|
-
alias_method :is_prefix?, :is_prefix
|
1637
|
-
|
1638
|
-
# Detected break type.
|
1639
|
-
# Corresponds to the JSON property `type`
|
1640
|
-
# @return [String]
|
1641
|
-
attr_accessor :type
|
1642
|
-
|
1643
|
-
def initialize(**args)
|
1644
|
-
update!(**args)
|
1645
|
-
end
|
1646
|
-
|
1647
|
-
# Update properties of this object
|
1648
|
-
def update!(**args)
|
1649
|
-
@is_prefix = args[:is_prefix] if args.key?(:is_prefix)
|
1650
|
-
@type = args[:type] if args.key?(:type)
|
1651
|
-
end
|
1652
|
-
end
|
1653
|
-
|
1654
|
-
# Detected language for a structural component.
|
1655
|
-
class GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage
|
1656
|
-
include Google::Apis::Core::Hashable
|
1657
|
-
|
1658
|
-
# Confidence of detected language. Range [0, 1].
|
1659
|
-
# Corresponds to the JSON property `confidence`
|
1660
|
-
# @return [Float]
|
1661
|
-
attr_accessor :confidence
|
3634
|
+
class TextAnnotation
|
3635
|
+
include Google::Apis::Core::Hashable
|
1662
3636
|
|
1663
|
-
#
|
1664
|
-
#
|
1665
|
-
#
|
1666
|
-
|
3637
|
+
# List of pages detected by OCR.
|
3638
|
+
# Corresponds to the JSON property `pages`
|
3639
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::Page>]
|
3640
|
+
attr_accessor :pages
|
3641
|
+
|
3642
|
+
# UTF-8 text detected on the pages.
|
3643
|
+
# Corresponds to the JSON property `text`
|
1667
3644
|
# @return [String]
|
1668
|
-
attr_accessor :
|
3645
|
+
attr_accessor :text
|
1669
3646
|
|
1670
3647
|
def initialize(**args)
|
1671
3648
|
update!(**args)
|
@@ -1673,23 +3650,23 @@ module Google
|
|
1673
3650
|
|
1674
3651
|
# Update properties of this object
|
1675
3652
|
def update!(**args)
|
1676
|
-
@
|
1677
|
-
@
|
3653
|
+
@pages = args[:pages] if args.key?(:pages)
|
3654
|
+
@text = args[:text] if args.key?(:text)
|
1678
3655
|
end
|
1679
3656
|
end
|
1680
3657
|
|
1681
3658
|
# Additional information detected on the structural component.
|
1682
|
-
class
|
3659
|
+
class TextProperty
|
1683
3660
|
include Google::Apis::Core::Hashable
|
1684
3661
|
|
1685
3662
|
# Detected start or end of a structural component.
|
1686
3663
|
# Corresponds to the JSON property `detectedBreak`
|
1687
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
3664
|
+
# @return [Google::Apis::VisionV1p2beta1::DetectedBreak]
|
1688
3665
|
attr_accessor :detected_break
|
1689
3666
|
|
1690
3667
|
# A list of detected languages together with confidence.
|
1691
3668
|
# Corresponds to the JSON property `detectedLanguages`
|
1692
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
3669
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::DetectedLanguage>]
|
1693
3670
|
attr_accessor :detected_languages
|
1694
3671
|
|
1695
3672
|
def initialize(**args)
|
@@ -1705,7 +3682,7 @@ module Google
|
|
1705
3682
|
|
1706
3683
|
# A vertex represents a 2D point in the image.
|
1707
3684
|
# NOTE: the vertex coordinates are in the same scale as the original image.
|
1708
|
-
class
|
3685
|
+
class Vertex
|
1709
3686
|
include Google::Apis::Core::Hashable
|
1710
3687
|
|
1711
3688
|
# X coordinate.
|
@@ -1730,40 +3707,40 @@ module Google
|
|
1730
3707
|
end
|
1731
3708
|
|
1732
3709
|
# Relevant information for the image from the Internet.
|
1733
|
-
class
|
3710
|
+
class WebDetection
|
1734
3711
|
include Google::Apis::Core::Hashable
|
1735
3712
|
|
1736
3713
|
# Best guess text labels for the request image.
|
1737
3714
|
# Corresponds to the JSON property `bestGuessLabels`
|
1738
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
3715
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::WebLabel>]
|
1739
3716
|
attr_accessor :best_guess_labels
|
1740
3717
|
|
1741
3718
|
# Fully matching images from the Internet.
|
1742
3719
|
# Can include resized copies of the query image.
|
1743
3720
|
# Corresponds to the JSON property `fullMatchingImages`
|
1744
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
3721
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::WebImage>]
|
1745
3722
|
attr_accessor :full_matching_images
|
1746
3723
|
|
1747
3724
|
# Web pages containing the matching images from the Internet.
|
1748
3725
|
# Corresponds to the JSON property `pagesWithMatchingImages`
|
1749
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
3726
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::WebPage>]
|
1750
3727
|
attr_accessor :pages_with_matching_images
|
1751
3728
|
|
1752
3729
|
# Partial matching images from the Internet.
|
1753
3730
|
# Those images are similar enough to share some key-point features. For
|
1754
3731
|
# example an original image will likely have partial matching for its crops.
|
1755
3732
|
# Corresponds to the JSON property `partialMatchingImages`
|
1756
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
3733
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::WebImage>]
|
1757
3734
|
attr_accessor :partial_matching_images
|
1758
3735
|
|
1759
3736
|
# The visually similar image results.
|
1760
3737
|
# Corresponds to the JSON property `visuallySimilarImages`
|
1761
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
3738
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::WebImage>]
|
1762
3739
|
attr_accessor :visually_similar_images
|
1763
3740
|
|
1764
3741
|
# Deduced entities from similar images on the Internet.
|
1765
3742
|
# Corresponds to the JSON property `webEntities`
|
1766
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
3743
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::WebEntity>]
|
1767
3744
|
attr_accessor :web_entities
|
1768
3745
|
|
1769
3746
|
def initialize(**args)
|
@@ -1781,28 +3758,8 @@ module Google
|
|
1781
3758
|
end
|
1782
3759
|
end
|
1783
3760
|
|
1784
|
-
# Parameters for web detection request.
|
1785
|
-
class GoogleCloudVisionV1p2beta1WebDetectionParams
|
1786
|
-
include Google::Apis::Core::Hashable
|
1787
|
-
|
1788
|
-
# Whether to include results derived from the geo information in the image.
|
1789
|
-
# Corresponds to the JSON property `includeGeoResults`
|
1790
|
-
# @return [Boolean]
|
1791
|
-
attr_accessor :include_geo_results
|
1792
|
-
alias_method :include_geo_results?, :include_geo_results
|
1793
|
-
|
1794
|
-
def initialize(**args)
|
1795
|
-
update!(**args)
|
1796
|
-
end
|
1797
|
-
|
1798
|
-
# Update properties of this object
|
1799
|
-
def update!(**args)
|
1800
|
-
@include_geo_results = args[:include_geo_results] if args.key?(:include_geo_results)
|
1801
|
-
end
|
1802
|
-
end
|
1803
|
-
|
1804
3761
|
# Entity deduced from similar images on the Internet.
|
1805
|
-
class
|
3762
|
+
class WebEntity
|
1806
3763
|
include Google::Apis::Core::Hashable
|
1807
3764
|
|
1808
3765
|
# Canonical description of the entity, in English.
|
@@ -1834,7 +3791,7 @@ module Google
|
|
1834
3791
|
end
|
1835
3792
|
|
1836
3793
|
# Metadata for online images.
|
1837
|
-
class
|
3794
|
+
class WebImage
|
1838
3795
|
include Google::Apis::Core::Hashable
|
1839
3796
|
|
1840
3797
|
# (Deprecated) Overall relevancy score for the image.
|
@@ -1859,7 +3816,7 @@ module Google
|
|
1859
3816
|
end
|
1860
3817
|
|
1861
3818
|
# Label to provide extra metadata for the web detection.
|
1862
|
-
class
|
3819
|
+
class WebLabel
|
1863
3820
|
include Google::Apis::Core::Hashable
|
1864
3821
|
|
1865
3822
|
# Label for extra metadata.
|
@@ -1886,13 +3843,13 @@ module Google
|
|
1886
3843
|
end
|
1887
3844
|
|
1888
3845
|
# Metadata for web pages.
|
1889
|
-
class
|
3846
|
+
class WebPage
|
1890
3847
|
include Google::Apis::Core::Hashable
|
1891
3848
|
|
1892
3849
|
# Fully matching images on the page.
|
1893
3850
|
# Can include resized copies of the query image.
|
1894
3851
|
# Corresponds to the JSON property `fullMatchingImages`
|
1895
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
3852
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::WebImage>]
|
1896
3853
|
attr_accessor :full_matching_images
|
1897
3854
|
|
1898
3855
|
# Title for the web page, may contain HTML markups.
|
@@ -1905,7 +3862,7 @@ module Google
|
|
1905
3862
|
# example an original image will likely have partial matching for its
|
1906
3863
|
# crops.
|
1907
3864
|
# Corresponds to the JSON property `partialMatchingImages`
|
1908
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
3865
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::WebImage>]
|
1909
3866
|
attr_accessor :partial_matching_images
|
1910
3867
|
|
1911
3868
|
# (Deprecated) Overall relevancy score for the web page.
|
@@ -1933,12 +3890,12 @@ module Google
|
|
1933
3890
|
end
|
1934
3891
|
|
1935
3892
|
# A word representation.
|
1936
|
-
class
|
3893
|
+
class Word
|
1937
3894
|
include Google::Apis::Core::Hashable
|
1938
3895
|
|
1939
3896
|
# A bounding polygon for the detected image annotation.
|
1940
3897
|
# Corresponds to the JSON property `boundingBox`
|
1941
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
3898
|
+
# @return [Google::Apis::VisionV1p2beta1::BoundingPoly]
|
1942
3899
|
attr_accessor :bounding_box
|
1943
3900
|
|
1944
3901
|
# Confidence of the OCR results for the word. Range [0, 1].
|
@@ -1948,13 +3905,13 @@ module Google
|
|
1948
3905
|
|
1949
3906
|
# Additional information detected on the structural component.
|
1950
3907
|
# Corresponds to the JSON property `property`
|
1951
|
-
# @return [Google::Apis::VisionV1p2beta1::
|
3908
|
+
# @return [Google::Apis::VisionV1p2beta1::TextProperty]
|
1952
3909
|
attr_accessor :property
|
1953
3910
|
|
1954
3911
|
# List of symbols in the word.
|
1955
3912
|
# The order of the symbols follows the natural reading order.
|
1956
3913
|
# Corresponds to the JSON property `symbols`
|
1957
|
-
# @return [Array<Google::Apis::VisionV1p2beta1::
|
3914
|
+
# @return [Array<Google::Apis::VisionV1p2beta1::Symbol>]
|
1958
3915
|
attr_accessor :symbols
|
1959
3916
|
|
1960
3917
|
def initialize(**args)
|
@@ -1969,204 +3926,6 @@ module Google
|
|
1969
3926
|
@symbols = args[:symbols] if args.key?(:symbols)
|
1970
3927
|
end
|
1971
3928
|
end
|
1972
|
-
|
1973
|
-
# An object representing a latitude/longitude pair. This is expressed as a pair
|
1974
|
-
# of doubles representing degrees latitude and degrees longitude. Unless
|
1975
|
-
# specified otherwise, this must conform to the
|
1976
|
-
# <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
|
1977
|
-
# standard</a>. Values must be within normalized ranges.
|
1978
|
-
class LatLng
|
1979
|
-
include Google::Apis::Core::Hashable
|
1980
|
-
|
1981
|
-
# The latitude in degrees. It must be in the range [-90.0, +90.0].
|
1982
|
-
# Corresponds to the JSON property `latitude`
|
1983
|
-
# @return [Float]
|
1984
|
-
attr_accessor :latitude
|
1985
|
-
|
1986
|
-
# The longitude in degrees. It must be in the range [-180.0, +180.0].
|
1987
|
-
# Corresponds to the JSON property `longitude`
|
1988
|
-
# @return [Float]
|
1989
|
-
attr_accessor :longitude
|
1990
|
-
|
1991
|
-
def initialize(**args)
|
1992
|
-
update!(**args)
|
1993
|
-
end
|
1994
|
-
|
1995
|
-
# Update properties of this object
|
1996
|
-
def update!(**args)
|
1997
|
-
@latitude = args[:latitude] if args.key?(:latitude)
|
1998
|
-
@longitude = args[:longitude] if args.key?(:longitude)
|
1999
|
-
end
|
2000
|
-
end
|
2001
|
-
|
2002
|
-
# This resource represents a long-running operation that is the result of a
|
2003
|
-
# network API call.
|
2004
|
-
class Operation
|
2005
|
-
include Google::Apis::Core::Hashable
|
2006
|
-
|
2007
|
-
# If the value is `false`, it means the operation is still in progress.
|
2008
|
-
# If `true`, the operation is completed, and either `error` or `response` is
|
2009
|
-
# available.
|
2010
|
-
# Corresponds to the JSON property `done`
|
2011
|
-
# @return [Boolean]
|
2012
|
-
attr_accessor :done
|
2013
|
-
alias_method :done?, :done
|
2014
|
-
|
2015
|
-
# The `Status` type defines a logical error model that is suitable for different
|
2016
|
-
# programming environments, including REST APIs and RPC APIs. It is used by
|
2017
|
-
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
2018
|
-
# - Simple to use and understand for most users
|
2019
|
-
# - Flexible enough to meet unexpected needs
|
2020
|
-
# # Overview
|
2021
|
-
# The `Status` message contains three pieces of data: error code, error message,
|
2022
|
-
# and error details. The error code should be an enum value of
|
2023
|
-
# google.rpc.Code, but it may accept additional error codes if needed. The
|
2024
|
-
# error message should be a developer-facing English message that helps
|
2025
|
-
# developers *understand* and *resolve* the error. If a localized user-facing
|
2026
|
-
# error message is needed, put the localized message in the error details or
|
2027
|
-
# localize it in the client. The optional error details may contain arbitrary
|
2028
|
-
# information about the error. There is a predefined set of error detail types
|
2029
|
-
# in the package `google.rpc` that can be used for common error conditions.
|
2030
|
-
# # Language mapping
|
2031
|
-
# The `Status` message is the logical representation of the error model, but it
|
2032
|
-
# is not necessarily the actual wire format. When the `Status` message is
|
2033
|
-
# exposed in different client libraries and different wire protocols, it can be
|
2034
|
-
# mapped differently. For example, it will likely be mapped to some exceptions
|
2035
|
-
# in Java, but more likely mapped to some error codes in C.
|
2036
|
-
# # Other uses
|
2037
|
-
# The error model and the `Status` message can be used in a variety of
|
2038
|
-
# environments, either with or without APIs, to provide a
|
2039
|
-
# consistent developer experience across different environments.
|
2040
|
-
# Example uses of this error model include:
|
2041
|
-
# - Partial errors. If a service needs to return partial errors to the client,
|
2042
|
-
# it may embed the `Status` in the normal response to indicate the partial
|
2043
|
-
# errors.
|
2044
|
-
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
2045
|
-
# have a `Status` message for error reporting.
|
2046
|
-
# - Batch operations. If a client uses batch request and batch response, the
|
2047
|
-
# `Status` message should be used directly inside batch response, one for
|
2048
|
-
# each error sub-response.
|
2049
|
-
# - Asynchronous operations. If an API call embeds asynchronous operation
|
2050
|
-
# results in its response, the status of those operations should be
|
2051
|
-
# represented directly using the `Status` message.
|
2052
|
-
# - Logging. If some API errors are stored in logs, the message `Status` could
|
2053
|
-
# be used directly after any stripping needed for security/privacy reasons.
|
2054
|
-
# Corresponds to the JSON property `error`
|
2055
|
-
# @return [Google::Apis::VisionV1p2beta1::Status]
|
2056
|
-
attr_accessor :error
|
2057
|
-
|
2058
|
-
# Service-specific metadata associated with the operation. It typically
|
2059
|
-
# contains progress information and common metadata such as create time.
|
2060
|
-
# Some services might not provide such metadata. Any method that returns a
|
2061
|
-
# long-running operation should document the metadata type, if any.
|
2062
|
-
# Corresponds to the JSON property `metadata`
|
2063
|
-
# @return [Hash<String,Object>]
|
2064
|
-
attr_accessor :metadata
|
2065
|
-
|
2066
|
-
# The server-assigned name, which is only unique within the same service that
|
2067
|
-
# originally returns it. If you use the default HTTP mapping, the
|
2068
|
-
# `name` should have the format of `operations/some/unique/name`.
|
2069
|
-
# Corresponds to the JSON property `name`
|
2070
|
-
# @return [String]
|
2071
|
-
attr_accessor :name
|
2072
|
-
|
2073
|
-
# The normal response of the operation in case of success. If the original
|
2074
|
-
# method returns no data on success, such as `Delete`, the response is
|
2075
|
-
# `google.protobuf.Empty`. If the original method is standard
|
2076
|
-
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
2077
|
-
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
2078
|
-
# is the original method name. For example, if the original method name
|
2079
|
-
# is `TakeSnapshot()`, the inferred response type is
|
2080
|
-
# `TakeSnapshotResponse`.
|
2081
|
-
# Corresponds to the JSON property `response`
|
2082
|
-
# @return [Hash<String,Object>]
|
2083
|
-
attr_accessor :response
|
2084
|
-
|
2085
|
-
def initialize(**args)
|
2086
|
-
update!(**args)
|
2087
|
-
end
|
2088
|
-
|
2089
|
-
# Update properties of this object
|
2090
|
-
def update!(**args)
|
2091
|
-
@done = args[:done] if args.key?(:done)
|
2092
|
-
@error = args[:error] if args.key?(:error)
|
2093
|
-
@metadata = args[:metadata] if args.key?(:metadata)
|
2094
|
-
@name = args[:name] if args.key?(:name)
|
2095
|
-
@response = args[:response] if args.key?(:response)
|
2096
|
-
end
|
2097
|
-
end
|
2098
|
-
|
2099
|
-
# The `Status` type defines a logical error model that is suitable for different
|
2100
|
-
# programming environments, including REST APIs and RPC APIs. It is used by
|
2101
|
-
# [gRPC](https://github.com/grpc). The error model is designed to be:
|
2102
|
-
# - Simple to use and understand for most users
|
2103
|
-
# - Flexible enough to meet unexpected needs
|
2104
|
-
# # Overview
|
2105
|
-
# The `Status` message contains three pieces of data: error code, error message,
|
2106
|
-
# and error details. The error code should be an enum value of
|
2107
|
-
# google.rpc.Code, but it may accept additional error codes if needed. The
|
2108
|
-
# error message should be a developer-facing English message that helps
|
2109
|
-
# developers *understand* and *resolve* the error. If a localized user-facing
|
2110
|
-
# error message is needed, put the localized message in the error details or
|
2111
|
-
# localize it in the client. The optional error details may contain arbitrary
|
2112
|
-
# information about the error. There is a predefined set of error detail types
|
2113
|
-
# in the package `google.rpc` that can be used for common error conditions.
|
2114
|
-
# # Language mapping
|
2115
|
-
# The `Status` message is the logical representation of the error model, but it
|
2116
|
-
# is not necessarily the actual wire format. When the `Status` message is
|
2117
|
-
# exposed in different client libraries and different wire protocols, it can be
|
2118
|
-
# mapped differently. For example, it will likely be mapped to some exceptions
|
2119
|
-
# in Java, but more likely mapped to some error codes in C.
|
2120
|
-
# # Other uses
|
2121
|
-
# The error model and the `Status` message can be used in a variety of
|
2122
|
-
# environments, either with or without APIs, to provide a
|
2123
|
-
# consistent developer experience across different environments.
|
2124
|
-
# Example uses of this error model include:
|
2125
|
-
# - Partial errors. If a service needs to return partial errors to the client,
|
2126
|
-
# it may embed the `Status` in the normal response to indicate the partial
|
2127
|
-
# errors.
|
2128
|
-
# - Workflow errors. A typical workflow has multiple steps. Each step may
|
2129
|
-
# have a `Status` message for error reporting.
|
2130
|
-
# - Batch operations. If a client uses batch request and batch response, the
|
2131
|
-
# `Status` message should be used directly inside batch response, one for
|
2132
|
-
# each error sub-response.
|
2133
|
-
# - Asynchronous operations. If an API call embeds asynchronous operation
|
2134
|
-
# results in its response, the status of those operations should be
|
2135
|
-
# represented directly using the `Status` message.
|
2136
|
-
# - Logging. If some API errors are stored in logs, the message `Status` could
|
2137
|
-
# be used directly after any stripping needed for security/privacy reasons.
|
2138
|
-
class Status
|
2139
|
-
include Google::Apis::Core::Hashable
|
2140
|
-
|
2141
|
-
# The status code, which should be an enum value of google.rpc.Code.
|
2142
|
-
# Corresponds to the JSON property `code`
|
2143
|
-
# @return [Fixnum]
|
2144
|
-
attr_accessor :code
|
2145
|
-
|
2146
|
-
# A list of messages that carry the error details. There is a common set of
|
2147
|
-
# message types for APIs to use.
|
2148
|
-
# Corresponds to the JSON property `details`
|
2149
|
-
# @return [Array<Hash<String,Object>>]
|
2150
|
-
attr_accessor :details
|
2151
|
-
|
2152
|
-
# A developer-facing error message, which should be in English. Any
|
2153
|
-
# user-facing error message should be localized and sent in the
|
2154
|
-
# google.rpc.Status.details field, or localized by the client.
|
2155
|
-
# Corresponds to the JSON property `message`
|
2156
|
-
# @return [String]
|
2157
|
-
attr_accessor :message
|
2158
|
-
|
2159
|
-
def initialize(**args)
|
2160
|
-
update!(**args)
|
2161
|
-
end
|
2162
|
-
|
2163
|
-
# Update properties of this object
|
2164
|
-
def update!(**args)
|
2165
|
-
@code = args[:code] if args.key?(:code)
|
2166
|
-
@details = args[:details] if args.key?(:details)
|
2167
|
-
@message = args[:message] if args.key?(:message)
|
2168
|
-
end
|
2169
|
-
end
|
2170
3929
|
end
|
2171
3930
|
end
|
2172
3931
|
end
|